generated-configure.sh revision 971:3e7caedda189
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=1392662653
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
14829# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14830
14831  for ac_prog in apt-get yum port pkgutil pkgadd
14832do
14833  # Extract the first word of "$ac_prog", so it can be a program name with args.
14834set dummy $ac_prog; ac_word=$2
14835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14836$as_echo_n "checking for $ac_word... " >&6; }
14837if ${ac_cv_prog_PKGHANDLER+:} false; then :
14838  $as_echo_n "(cached) " >&6
14839else
14840  if test -n "$PKGHANDLER"; then
14841  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14842else
14843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14844for as_dir in $PATH
14845do
14846  IFS=$as_save_IFS
14847  test -z "$as_dir" && as_dir=.
14848    for ac_exec_ext in '' $ac_executable_extensions; do
14849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14850    ac_cv_prog_PKGHANDLER="$ac_prog"
14851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14852    break 2
14853  fi
14854done
14855  done
14856IFS=$as_save_IFS
14857
14858fi
14859fi
14860PKGHANDLER=$ac_cv_prog_PKGHANDLER
14861if test -n "$PKGHANDLER"; then
14862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14863$as_echo "$PKGHANDLER" >&6; }
14864else
14865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14866$as_echo "no" >&6; }
14867fi
14868
14869
14870  test -n "$PKGHANDLER" && break
14871done
14872
14873
14874
14875# Setup tools that requires more complex handling, or that is not needed by the configure script.
14876
14877
14878  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14879  if test "x$MAKE" != x; then
14880    # User has supplied a make, test it.
14881    if test ! -f "$MAKE"; then
14882      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14883    fi
14884
14885  MAKE_CANDIDATE=""$MAKE""
14886  DESCRIPTION="user supplied MAKE=$MAKE"
14887  if test "x$MAKE_CANDIDATE" != x; then
14888    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14889$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14890    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14891    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14892    if test "x$IS_GNU_MAKE" = x; then
14893      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14894$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14895    else
14896      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14897      if test "x$IS_MODERN_MAKE" = x; then
14898        { $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
14899$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;}
14900      else
14901        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14902          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14903            MAKE_EXPECTED_ENV='cygwin'
14904          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14905            MAKE_EXPECTED_ENV='msys'
14906          else
14907            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14908          fi
14909          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14910          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14911        else
14912          # Not relevant for non-Windows
14913          IS_MAKE_CORRECT_ENV=true
14914        fi
14915        if test "x$IS_MAKE_CORRECT_ENV" = x; then
14916          { $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
14917$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;}
14918        else
14919          FOUND_MAKE=$MAKE_CANDIDATE
14920
14921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14922
14923  # First separate the path from the arguments. This will split at the first
14924  # space.
14925  complete="$FOUND_MAKE"
14926  path="${complete%% *}"
14927  tmp="$complete EOL"
14928  arguments="${tmp#* }"
14929
14930  # Input might be given as Windows format, start by converting to
14931  # unix format.
14932  new_path=`$CYGPATH -u "$path"`
14933
14934  # Now try to locate executable using which
14935  new_path=`$WHICH "$new_path" 2> /dev/null`
14936  # bat and cmd files are not always considered executable in cygwin causing which
14937  # to not find them
14938  if test "x$new_path" = x \
14939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14941    new_path=`$CYGPATH -u "$path"`
14942  fi
14943  if test "x$new_path" = x; then
14944    # Oops. Which didn't find the executable.
14945    # The splitting of arguments from the executable at a space might have been incorrect,
14946    # since paths with space are more likely in Windows. Give it another try with the whole
14947    # argument.
14948    path="$complete"
14949    arguments="EOL"
14950    new_path=`$CYGPATH -u "$path"`
14951    new_path=`$WHICH "$new_path" 2> /dev/null`
14952    # bat and cmd files are not always considered executable in cygwin causing which
14953    # to not find them
14954    if test "x$new_path" = x \
14955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14957      new_path=`$CYGPATH -u "$path"`
14958    fi
14959    if test "x$new_path" = x; then
14960      # It's still not found. Now this is an unrecoverable error.
14961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14963      has_space=`$ECHO "$complete" | $GREP " "`
14964      if test "x$has_space" != x; then
14965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14967      fi
14968      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14969    fi
14970  fi
14971
14972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14975  # "foo.exe" is OK but "foo" is an error.
14976  #
14977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
14978  # It is also a way to make sure we got the proper file name for the real test later on.
14979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14980  if test "x$test_shortpath" = x; then
14981    # Short path failed, file does not exist as specified.
14982    # Try adding .exe or .cmd
14983    if test -f "${new_path}.exe"; then
14984      input_to_shortpath="${new_path}.exe"
14985    elif test -f "${new_path}.cmd"; then
14986      input_to_shortpath="${new_path}.cmd"
14987    else
14988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
14989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
14990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
14991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
14992      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14993    fi
14994  else
14995    input_to_shortpath="$new_path"
14996  fi
14997
14998  # Call helper function which possibly converts this using DOS-style short mode.
14999  # If so, the updated path is stored in $new_path.
15000  new_path="$input_to_shortpath"
15001
15002  input_path="$input_to_shortpath"
15003  # Check if we need to convert this using DOS-style short mode. If the path
15004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15005  # take no chances and rewrite it.
15006  # Note: m4 eats our [], so we need to use [ and ] instead.
15007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15008  if test "x$has_forbidden_chars" != x; then
15009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15013      # Going to short mode and back again did indeed matter. Since short mode is
15014      # case insensitive, let's make it lowercase to improve readability.
15015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15016      # Now convert it back to Unix-stile (cygpath)
15017      input_path=`$CYGPATH -u "$shortmode_path"`
15018      new_path="$input_path"
15019    fi
15020  fi
15021
15022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15023  if test "x$test_cygdrive_prefix" = x; then
15024    # As a simple fix, exclude /usr/bin since it's not a real path.
15025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15027      # a path prefixed by /cygdrive for fixpath to work.
15028      new_path="$CYGWIN_ROOT_PATH$input_path"
15029    fi
15030  fi
15031
15032  # remove trailing .exe if any
15033  new_path="${new_path/%.exe/}"
15034
15035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15036
15037  # First separate the path from the arguments. This will split at the first
15038  # space.
15039  complete="$FOUND_MAKE"
15040  path="${complete%% *}"
15041  tmp="$complete EOL"
15042  arguments="${tmp#* }"
15043
15044  # Input might be given as Windows format, start by converting to
15045  # unix format.
15046  new_path="$path"
15047
15048  windows_path="$new_path"
15049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15050    unix_path=`$CYGPATH -u "$windows_path"`
15051    new_path="$unix_path"
15052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15054    new_path="$unix_path"
15055  fi
15056
15057
15058  # Now try to locate executable using which
15059  new_path=`$WHICH "$new_path" 2> /dev/null`
15060
15061  if test "x$new_path" = x; then
15062    # Oops. Which didn't find the executable.
15063    # The splitting of arguments from the executable at a space might have been incorrect,
15064    # since paths with space are more likely in Windows. Give it another try with the whole
15065    # argument.
15066    path="$complete"
15067    arguments="EOL"
15068    new_path="$path"
15069
15070  windows_path="$new_path"
15071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15072    unix_path=`$CYGPATH -u "$windows_path"`
15073    new_path="$unix_path"
15074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15076    new_path="$unix_path"
15077  fi
15078
15079
15080    new_path=`$WHICH "$new_path" 2> /dev/null`
15081
15082    if test "x$new_path" = x; then
15083      # It's still not found. Now this is an unrecoverable error.
15084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15086      has_space=`$ECHO "$complete" | $GREP " "`
15087      if test "x$has_space" != x; then
15088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15090      fi
15091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15092    fi
15093  fi
15094
15095  # Now new_path has a complete unix path to the binary
15096  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15097    # Keep paths in /bin as-is, but remove trailing .exe if any
15098    new_path="${new_path/%.exe/}"
15099    # Do not save /bin paths to all_fixpath_prefixes!
15100  else
15101    # Not in mixed or Windows style, start by that.
15102    new_path=`cmd //c echo $new_path`
15103
15104  input_path="$new_path"
15105  # Check if we need to convert this using DOS-style short mode. If the path
15106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15107  # take no chances and rewrite it.
15108  # Note: m4 eats our [], so we need to use [ and ] instead.
15109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15110  if test "x$has_forbidden_chars" != x; then
15111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15113  fi
15114
15115    # Output is in $new_path
15116
15117  windows_path="$new_path"
15118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15119    unix_path=`$CYGPATH -u "$windows_path"`
15120    new_path="$unix_path"
15121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15123    new_path="$unix_path"
15124  fi
15125
15126    # remove trailing .exe if any
15127    new_path="${new_path/%.exe/}"
15128
15129    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131  fi
15132
15133  else
15134    # We're on a posix platform. Hooray! :)
15135    # First separate the path from the arguments. This will split at the first
15136    # space.
15137    complete="$FOUND_MAKE"
15138    path="${complete%% *}"
15139    tmp="$complete EOL"
15140    arguments="${tmp#* }"
15141
15142    # Cannot rely on the command "which" here since it doesn't always work.
15143    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15144    if test -z "$is_absolute_path"; then
15145      # Path to executable is not absolute. Find it.
15146      IFS_save="$IFS"
15147      IFS=:
15148      for p in $PATH; do
15149        if test -f "$p/$path" && test -x "$p/$path"; then
15150          new_path="$p/$path"
15151          break
15152        fi
15153      done
15154      IFS="$IFS_save"
15155    else
15156      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15157$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15158      new_path="$path"
15159    fi
15160
15161    if test "x$new_path" = x; then
15162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15164      has_space=`$ECHO "$complete" | $GREP " "`
15165      if test "x$has_space" != x; then
15166        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15168      fi
15169      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15170    fi
15171  fi
15172
15173  # Now join together the path and the arguments once again
15174  if test "x$arguments" != xEOL; then
15175    new_complete="$new_path ${arguments% *}"
15176  else
15177    new_complete="$new_path"
15178  fi
15179
15180  if test "x$complete" != "x$new_complete"; then
15181    FOUND_MAKE="$new_complete"
15182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15183$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15184  fi
15185
15186        fi
15187      fi
15188    fi
15189  fi
15190
15191    if test "x$FOUND_MAKE" = x; then
15192      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15193    fi
15194  else
15195    # Try our hardest to locate a correct version of GNU make
15196    for ac_prog in gmake
15197do
15198  # Extract the first word of "$ac_prog", so it can be a program name with args.
15199set dummy $ac_prog; ac_word=$2
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15201$as_echo_n "checking for $ac_word... " >&6; }
15202if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15203  $as_echo_n "(cached) " >&6
15204else
15205  case $CHECK_GMAKE in
15206  [\\/]* | ?:[\\/]*)
15207  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15208  ;;
15209  *)
15210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15211for as_dir in $PATH
15212do
15213  IFS=$as_save_IFS
15214  test -z "$as_dir" && as_dir=.
15215    for ac_exec_ext in '' $ac_executable_extensions; do
15216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15217    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15219    break 2
15220  fi
15221done
15222  done
15223IFS=$as_save_IFS
15224
15225  ;;
15226esac
15227fi
15228CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15229if test -n "$CHECK_GMAKE"; then
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15231$as_echo "$CHECK_GMAKE" >&6; }
15232else
15233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15234$as_echo "no" >&6; }
15235fi
15236
15237
15238  test -n "$CHECK_GMAKE" && break
15239done
15240
15241
15242  MAKE_CANDIDATE=""$CHECK_GMAKE""
15243  DESCRIPTION="gmake in PATH"
15244  if test "x$MAKE_CANDIDATE" != x; then
15245    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15246$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15247    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15248    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15249    if test "x$IS_GNU_MAKE" = x; then
15250      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15251$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15252    else
15253      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15254      if test "x$IS_MODERN_MAKE" = x; then
15255        { $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
15256$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;}
15257      else
15258        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15259          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15260            MAKE_EXPECTED_ENV='cygwin'
15261          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15262            MAKE_EXPECTED_ENV='msys'
15263          else
15264            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15265          fi
15266          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15267          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15268        else
15269          # Not relevant for non-Windows
15270          IS_MAKE_CORRECT_ENV=true
15271        fi
15272        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15273          { $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
15274$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;}
15275        else
15276          FOUND_MAKE=$MAKE_CANDIDATE
15277
15278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15279
15280  # First separate the path from the arguments. This will split at the first
15281  # space.
15282  complete="$FOUND_MAKE"
15283  path="${complete%% *}"
15284  tmp="$complete EOL"
15285  arguments="${tmp#* }"
15286
15287  # Input might be given as Windows format, start by converting to
15288  # unix format.
15289  new_path=`$CYGPATH -u "$path"`
15290
15291  # Now try to locate executable using which
15292  new_path=`$WHICH "$new_path" 2> /dev/null`
15293  # bat and cmd files are not always considered executable in cygwin causing which
15294  # to not find them
15295  if test "x$new_path" = x \
15296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15298    new_path=`$CYGPATH -u "$path"`
15299  fi
15300  if test "x$new_path" = x; then
15301    # Oops. Which didn't find the executable.
15302    # The splitting of arguments from the executable at a space might have been incorrect,
15303    # since paths with space are more likely in Windows. Give it another try with the whole
15304    # argument.
15305    path="$complete"
15306    arguments="EOL"
15307    new_path=`$CYGPATH -u "$path"`
15308    new_path=`$WHICH "$new_path" 2> /dev/null`
15309    # bat and cmd files are not always considered executable in cygwin causing which
15310    # to not find them
15311    if test "x$new_path" = x \
15312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15314      new_path=`$CYGPATH -u "$path"`
15315    fi
15316    if test "x$new_path" = x; then
15317      # It's still not found. Now this is an unrecoverable error.
15318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15320      has_space=`$ECHO "$complete" | $GREP " "`
15321      if test "x$has_space" != x; then
15322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15324      fi
15325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15326    fi
15327  fi
15328
15329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15332  # "foo.exe" is OK but "foo" is an error.
15333  #
15334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15335  # It is also a way to make sure we got the proper file name for the real test later on.
15336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15337  if test "x$test_shortpath" = x; then
15338    # Short path failed, file does not exist as specified.
15339    # Try adding .exe or .cmd
15340    if test -f "${new_path}.exe"; then
15341      input_to_shortpath="${new_path}.exe"
15342    elif test -f "${new_path}.cmd"; then
15343      input_to_shortpath="${new_path}.cmd"
15344    else
15345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15346$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15349      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15350    fi
15351  else
15352    input_to_shortpath="$new_path"
15353  fi
15354
15355  # Call helper function which possibly converts this using DOS-style short mode.
15356  # If so, the updated path is stored in $new_path.
15357  new_path="$input_to_shortpath"
15358
15359  input_path="$input_to_shortpath"
15360  # Check if we need to convert this using DOS-style short mode. If the path
15361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15362  # take no chances and rewrite it.
15363  # Note: m4 eats our [], so we need to use [ and ] instead.
15364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15365  if test "x$has_forbidden_chars" != x; then
15366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15370      # Going to short mode and back again did indeed matter. Since short mode is
15371      # case insensitive, let's make it lowercase to improve readability.
15372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15373      # Now convert it back to Unix-stile (cygpath)
15374      input_path=`$CYGPATH -u "$shortmode_path"`
15375      new_path="$input_path"
15376    fi
15377  fi
15378
15379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15380  if test "x$test_cygdrive_prefix" = x; then
15381    # As a simple fix, exclude /usr/bin since it's not a real path.
15382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15384      # a path prefixed by /cygdrive for fixpath to work.
15385      new_path="$CYGWIN_ROOT_PATH$input_path"
15386    fi
15387  fi
15388
15389  # remove trailing .exe if any
15390  new_path="${new_path/%.exe/}"
15391
15392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15393
15394  # First separate the path from the arguments. This will split at the first
15395  # space.
15396  complete="$FOUND_MAKE"
15397  path="${complete%% *}"
15398  tmp="$complete EOL"
15399  arguments="${tmp#* }"
15400
15401  # Input might be given as Windows format, start by converting to
15402  # unix format.
15403  new_path="$path"
15404
15405  windows_path="$new_path"
15406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15407    unix_path=`$CYGPATH -u "$windows_path"`
15408    new_path="$unix_path"
15409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15411    new_path="$unix_path"
15412  fi
15413
15414
15415  # Now try to locate executable using which
15416  new_path=`$WHICH "$new_path" 2> /dev/null`
15417
15418  if test "x$new_path" = x; then
15419    # Oops. Which didn't find the executable.
15420    # The splitting of arguments from the executable at a space might have been incorrect,
15421    # since paths with space are more likely in Windows. Give it another try with the whole
15422    # argument.
15423    path="$complete"
15424    arguments="EOL"
15425    new_path="$path"
15426
15427  windows_path="$new_path"
15428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15429    unix_path=`$CYGPATH -u "$windows_path"`
15430    new_path="$unix_path"
15431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15433    new_path="$unix_path"
15434  fi
15435
15436
15437    new_path=`$WHICH "$new_path" 2> /dev/null`
15438
15439    if test "x$new_path" = x; then
15440      # It's still not found. Now this is an unrecoverable error.
15441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15443      has_space=`$ECHO "$complete" | $GREP " "`
15444      if test "x$has_space" != x; then
15445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15447      fi
15448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15449    fi
15450  fi
15451
15452  # Now new_path has a complete unix path to the binary
15453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15454    # Keep paths in /bin as-is, but remove trailing .exe if any
15455    new_path="${new_path/%.exe/}"
15456    # Do not save /bin paths to all_fixpath_prefixes!
15457  else
15458    # Not in mixed or Windows style, start by that.
15459    new_path=`cmd //c echo $new_path`
15460
15461  input_path="$new_path"
15462  # Check if we need to convert this using DOS-style short mode. If the path
15463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15464  # take no chances and rewrite it.
15465  # Note: m4 eats our [], so we need to use [ and ] instead.
15466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15467  if test "x$has_forbidden_chars" != x; then
15468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15470  fi
15471
15472    # Output is in $new_path
15473
15474  windows_path="$new_path"
15475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15476    unix_path=`$CYGPATH -u "$windows_path"`
15477    new_path="$unix_path"
15478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15480    new_path="$unix_path"
15481  fi
15482
15483    # remove trailing .exe if any
15484    new_path="${new_path/%.exe/}"
15485
15486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15488  fi
15489
15490  else
15491    # We're on a posix platform. Hooray! :)
15492    # First separate the path from the arguments. This will split at the first
15493    # space.
15494    complete="$FOUND_MAKE"
15495    path="${complete%% *}"
15496    tmp="$complete EOL"
15497    arguments="${tmp#* }"
15498
15499    # Cannot rely on the command "which" here since it doesn't always work.
15500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15501    if test -z "$is_absolute_path"; then
15502      # Path to executable is not absolute. Find it.
15503      IFS_save="$IFS"
15504      IFS=:
15505      for p in $PATH; do
15506        if test -f "$p/$path" && test -x "$p/$path"; then
15507          new_path="$p/$path"
15508          break
15509        fi
15510      done
15511      IFS="$IFS_save"
15512    else
15513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15514$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15515      new_path="$path"
15516    fi
15517
15518    if test "x$new_path" = x; then
15519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15521      has_space=`$ECHO "$complete" | $GREP " "`
15522      if test "x$has_space" != x; then
15523        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15525      fi
15526      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15527    fi
15528  fi
15529
15530  # Now join together the path and the arguments once again
15531  if test "x$arguments" != xEOL; then
15532    new_complete="$new_path ${arguments% *}"
15533  else
15534    new_complete="$new_path"
15535  fi
15536
15537  if test "x$complete" != "x$new_complete"; then
15538    FOUND_MAKE="$new_complete"
15539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15540$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15541  fi
15542
15543        fi
15544      fi
15545    fi
15546  fi
15547
15548
15549    if test "x$FOUND_MAKE" = x; then
15550      for ac_prog in make
15551do
15552  # Extract the first word of "$ac_prog", so it can be a program name with args.
15553set dummy $ac_prog; ac_word=$2
15554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15555$as_echo_n "checking for $ac_word... " >&6; }
15556if ${ac_cv_path_CHECK_MAKE+:} false; then :
15557  $as_echo_n "(cached) " >&6
15558else
15559  case $CHECK_MAKE in
15560  [\\/]* | ?:[\\/]*)
15561  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15562  ;;
15563  *)
15564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15565for as_dir in $PATH
15566do
15567  IFS=$as_save_IFS
15568  test -z "$as_dir" && as_dir=.
15569    for ac_exec_ext in '' $ac_executable_extensions; do
15570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15571    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15573    break 2
15574  fi
15575done
15576  done
15577IFS=$as_save_IFS
15578
15579  ;;
15580esac
15581fi
15582CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15583if test -n "$CHECK_MAKE"; then
15584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15585$as_echo "$CHECK_MAKE" >&6; }
15586else
15587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15588$as_echo "no" >&6; }
15589fi
15590
15591
15592  test -n "$CHECK_MAKE" && break
15593done
15594
15595
15596  MAKE_CANDIDATE=""$CHECK_MAKE""
15597  DESCRIPTION="make in PATH"
15598  if test "x$MAKE_CANDIDATE" != x; then
15599    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15600$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15601    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15602    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15603    if test "x$IS_GNU_MAKE" = x; then
15604      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15605$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15606    else
15607      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15608      if test "x$IS_MODERN_MAKE" = x; then
15609        { $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
15610$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;}
15611      else
15612        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15613          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15614            MAKE_EXPECTED_ENV='cygwin'
15615          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15616            MAKE_EXPECTED_ENV='msys'
15617          else
15618            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15619          fi
15620          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15621          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15622        else
15623          # Not relevant for non-Windows
15624          IS_MAKE_CORRECT_ENV=true
15625        fi
15626        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15627          { $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
15628$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;}
15629        else
15630          FOUND_MAKE=$MAKE_CANDIDATE
15631
15632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15633
15634  # First separate the path from the arguments. This will split at the first
15635  # space.
15636  complete="$FOUND_MAKE"
15637  path="${complete%% *}"
15638  tmp="$complete EOL"
15639  arguments="${tmp#* }"
15640
15641  # Input might be given as Windows format, start by converting to
15642  # unix format.
15643  new_path=`$CYGPATH -u "$path"`
15644
15645  # Now try to locate executable using which
15646  new_path=`$WHICH "$new_path" 2> /dev/null`
15647  # bat and cmd files are not always considered executable in cygwin causing which
15648  # to not find them
15649  if test "x$new_path" = x \
15650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15652    new_path=`$CYGPATH -u "$path"`
15653  fi
15654  if test "x$new_path" = x; then
15655    # Oops. Which didn't find the executable.
15656    # The splitting of arguments from the executable at a space might have been incorrect,
15657    # since paths with space are more likely in Windows. Give it another try with the whole
15658    # argument.
15659    path="$complete"
15660    arguments="EOL"
15661    new_path=`$CYGPATH -u "$path"`
15662    new_path=`$WHICH "$new_path" 2> /dev/null`
15663    # bat and cmd files are not always considered executable in cygwin causing which
15664    # to not find them
15665    if test "x$new_path" = x \
15666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15668      new_path=`$CYGPATH -u "$path"`
15669    fi
15670    if test "x$new_path" = x; then
15671      # It's still not found. Now this is an unrecoverable error.
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15673$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15674      has_space=`$ECHO "$complete" | $GREP " "`
15675      if test "x$has_space" != x; then
15676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15678      fi
15679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15680    fi
15681  fi
15682
15683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15686  # "foo.exe" is OK but "foo" is an error.
15687  #
15688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15689  # It is also a way to make sure we got the proper file name for the real test later on.
15690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15691  if test "x$test_shortpath" = x; then
15692    # Short path failed, file does not exist as specified.
15693    # Try adding .exe or .cmd
15694    if test -f "${new_path}.exe"; then
15695      input_to_shortpath="${new_path}.exe"
15696    elif test -f "${new_path}.cmd"; then
15697      input_to_shortpath="${new_path}.cmd"
15698    else
15699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15704    fi
15705  else
15706    input_to_shortpath="$new_path"
15707  fi
15708
15709  # Call helper function which possibly converts this using DOS-style short mode.
15710  # If so, the updated path is stored in $new_path.
15711  new_path="$input_to_shortpath"
15712
15713  input_path="$input_to_shortpath"
15714  # Check if we need to convert this using DOS-style short mode. If the path
15715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15716  # take no chances and rewrite it.
15717  # Note: m4 eats our [], so we need to use [ and ] instead.
15718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15719  if test "x$has_forbidden_chars" != x; then
15720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15724      # Going to short mode and back again did indeed matter. Since short mode is
15725      # case insensitive, let's make it lowercase to improve readability.
15726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15727      # Now convert it back to Unix-stile (cygpath)
15728      input_path=`$CYGPATH -u "$shortmode_path"`
15729      new_path="$input_path"
15730    fi
15731  fi
15732
15733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15734  if test "x$test_cygdrive_prefix" = x; then
15735    # As a simple fix, exclude /usr/bin since it's not a real path.
15736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15738      # a path prefixed by /cygdrive for fixpath to work.
15739      new_path="$CYGWIN_ROOT_PATH$input_path"
15740    fi
15741  fi
15742
15743  # remove trailing .exe if any
15744  new_path="${new_path/%.exe/}"
15745
15746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15747
15748  # First separate the path from the arguments. This will split at the first
15749  # space.
15750  complete="$FOUND_MAKE"
15751  path="${complete%% *}"
15752  tmp="$complete EOL"
15753  arguments="${tmp#* }"
15754
15755  # Input might be given as Windows format, start by converting to
15756  # unix format.
15757  new_path="$path"
15758
15759  windows_path="$new_path"
15760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15761    unix_path=`$CYGPATH -u "$windows_path"`
15762    new_path="$unix_path"
15763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15765    new_path="$unix_path"
15766  fi
15767
15768
15769  # Now try to locate executable using which
15770  new_path=`$WHICH "$new_path" 2> /dev/null`
15771
15772  if test "x$new_path" = x; then
15773    # Oops. Which didn't find the executable.
15774    # The splitting of arguments from the executable at a space might have been incorrect,
15775    # since paths with space are more likely in Windows. Give it another try with the whole
15776    # argument.
15777    path="$complete"
15778    arguments="EOL"
15779    new_path="$path"
15780
15781  windows_path="$new_path"
15782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783    unix_path=`$CYGPATH -u "$windows_path"`
15784    new_path="$unix_path"
15785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15787    new_path="$unix_path"
15788  fi
15789
15790
15791    new_path=`$WHICH "$new_path" 2> /dev/null`
15792
15793    if test "x$new_path" = x; then
15794      # It's still not found. Now this is an unrecoverable error.
15795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15797      has_space=`$ECHO "$complete" | $GREP " "`
15798      if test "x$has_space" != x; then
15799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15801      fi
15802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15803    fi
15804  fi
15805
15806  # Now new_path has a complete unix path to the binary
15807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15808    # Keep paths in /bin as-is, but remove trailing .exe if any
15809    new_path="${new_path/%.exe/}"
15810    # Do not save /bin paths to all_fixpath_prefixes!
15811  else
15812    # Not in mixed or Windows style, start by that.
15813    new_path=`cmd //c echo $new_path`
15814
15815  input_path="$new_path"
15816  # Check if we need to convert this using DOS-style short mode. If the path
15817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15818  # take no chances and rewrite it.
15819  # Note: m4 eats our [], so we need to use [ and ] instead.
15820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15821  if test "x$has_forbidden_chars" != x; then
15822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15824  fi
15825
15826    # Output is in $new_path
15827
15828  windows_path="$new_path"
15829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15830    unix_path=`$CYGPATH -u "$windows_path"`
15831    new_path="$unix_path"
15832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15834    new_path="$unix_path"
15835  fi
15836
15837    # remove trailing .exe if any
15838    new_path="${new_path/%.exe/}"
15839
15840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15842  fi
15843
15844  else
15845    # We're on a posix platform. Hooray! :)
15846    # First separate the path from the arguments. This will split at the first
15847    # space.
15848    complete="$FOUND_MAKE"
15849    path="${complete%% *}"
15850    tmp="$complete EOL"
15851    arguments="${tmp#* }"
15852
15853    # Cannot rely on the command "which" here since it doesn't always work.
15854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15855    if test -z "$is_absolute_path"; then
15856      # Path to executable is not absolute. Find it.
15857      IFS_save="$IFS"
15858      IFS=:
15859      for p in $PATH; do
15860        if test -f "$p/$path" && test -x "$p/$path"; then
15861          new_path="$p/$path"
15862          break
15863        fi
15864      done
15865      IFS="$IFS_save"
15866    else
15867      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15868$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15869      new_path="$path"
15870    fi
15871
15872    if test "x$new_path" = x; then
15873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15875      has_space=`$ECHO "$complete" | $GREP " "`
15876      if test "x$has_space" != x; then
15877        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15879      fi
15880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15881    fi
15882  fi
15883
15884  # Now join together the path and the arguments once again
15885  if test "x$arguments" != xEOL; then
15886    new_complete="$new_path ${arguments% *}"
15887  else
15888    new_complete="$new_path"
15889  fi
15890
15891  if test "x$complete" != "x$new_complete"; then
15892    FOUND_MAKE="$new_complete"
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15894$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15895  fi
15896
15897        fi
15898      fi
15899    fi
15900  fi
15901
15902    fi
15903
15904    if test "x$FOUND_MAKE" = x; then
15905      if test "x$TOOLS_DIR" != x; then
15906        # We have a tools-dir, check that as well before giving up.
15907        OLD_PATH=$PATH
15908        PATH=$TOOLS_DIR:$PATH
15909        for ac_prog in gmake
15910do
15911  # Extract the first word of "$ac_prog", so it can be a program name with args.
15912set dummy $ac_prog; ac_word=$2
15913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15914$as_echo_n "checking for $ac_word... " >&6; }
15915if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15916  $as_echo_n "(cached) " >&6
15917else
15918  case $CHECK_TOOLSDIR_GMAKE in
15919  [\\/]* | ?:[\\/]*)
15920  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15921  ;;
15922  *)
15923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15924for as_dir in $PATH
15925do
15926  IFS=$as_save_IFS
15927  test -z "$as_dir" && as_dir=.
15928    for ac_exec_ext in '' $ac_executable_extensions; do
15929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15930    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15932    break 2
15933  fi
15934done
15935  done
15936IFS=$as_save_IFS
15937
15938  ;;
15939esac
15940fi
15941CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15942if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15944$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15945else
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15947$as_echo "no" >&6; }
15948fi
15949
15950
15951  test -n "$CHECK_TOOLSDIR_GMAKE" && break
15952done
15953
15954
15955  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15956  DESCRIPTION="gmake in tools-dir"
15957  if test "x$MAKE_CANDIDATE" != x; then
15958    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15959$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15960    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15961    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15962    if test "x$IS_GNU_MAKE" = x; then
15963      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15964$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15965    else
15966      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15967      if test "x$IS_MODERN_MAKE" = x; then
15968        { $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
15969$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;}
15970      else
15971        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15972          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15973            MAKE_EXPECTED_ENV='cygwin'
15974          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15975            MAKE_EXPECTED_ENV='msys'
15976          else
15977            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15978          fi
15979          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15980          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15981        else
15982          # Not relevant for non-Windows
15983          IS_MAKE_CORRECT_ENV=true
15984        fi
15985        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15986          { $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
15987$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;}
15988        else
15989          FOUND_MAKE=$MAKE_CANDIDATE
15990
15991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15992
15993  # First separate the path from the arguments. This will split at the first
15994  # space.
15995  complete="$FOUND_MAKE"
15996  path="${complete%% *}"
15997  tmp="$complete EOL"
15998  arguments="${tmp#* }"
15999
16000  # Input might be given as Windows format, start by converting to
16001  # unix format.
16002  new_path=`$CYGPATH -u "$path"`
16003
16004  # Now try to locate executable using which
16005  new_path=`$WHICH "$new_path" 2> /dev/null`
16006  # bat and cmd files are not always considered executable in cygwin causing which
16007  # to not find them
16008  if test "x$new_path" = x \
16009      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16010      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16011    new_path=`$CYGPATH -u "$path"`
16012  fi
16013  if test "x$new_path" = x; then
16014    # Oops. Which didn't find the executable.
16015    # The splitting of arguments from the executable at a space might have been incorrect,
16016    # since paths with space are more likely in Windows. Give it another try with the whole
16017    # argument.
16018    path="$complete"
16019    arguments="EOL"
16020    new_path=`$CYGPATH -u "$path"`
16021    new_path=`$WHICH "$new_path" 2> /dev/null`
16022    # bat and cmd files are not always considered executable in cygwin causing which
16023    # to not find them
16024    if test "x$new_path" = x \
16025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16027      new_path=`$CYGPATH -u "$path"`
16028    fi
16029    if test "x$new_path" = x; then
16030      # It's still not found. Now this is an unrecoverable error.
16031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16033      has_space=`$ECHO "$complete" | $GREP " "`
16034      if test "x$has_space" != x; then
16035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16037      fi
16038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16039    fi
16040  fi
16041
16042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16045  # "foo.exe" is OK but "foo" is an error.
16046  #
16047  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16048  # It is also a way to make sure we got the proper file name for the real test later on.
16049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16050  if test "x$test_shortpath" = x; then
16051    # Short path failed, file does not exist as specified.
16052    # Try adding .exe or .cmd
16053    if test -f "${new_path}.exe"; then
16054      input_to_shortpath="${new_path}.exe"
16055    elif test -f "${new_path}.cmd"; then
16056      input_to_shortpath="${new_path}.cmd"
16057    else
16058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16063    fi
16064  else
16065    input_to_shortpath="$new_path"
16066  fi
16067
16068  # Call helper function which possibly converts this using DOS-style short mode.
16069  # If so, the updated path is stored in $new_path.
16070  new_path="$input_to_shortpath"
16071
16072  input_path="$input_to_shortpath"
16073  # Check if we need to convert this using DOS-style short mode. If the path
16074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16075  # take no chances and rewrite it.
16076  # Note: m4 eats our [], so we need to use [ and ] instead.
16077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16078  if test "x$has_forbidden_chars" != x; then
16079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16083      # Going to short mode and back again did indeed matter. Since short mode is
16084      # case insensitive, let's make it lowercase to improve readability.
16085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16086      # Now convert it back to Unix-stile (cygpath)
16087      input_path=`$CYGPATH -u "$shortmode_path"`
16088      new_path="$input_path"
16089    fi
16090  fi
16091
16092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16093  if test "x$test_cygdrive_prefix" = x; then
16094    # As a simple fix, exclude /usr/bin since it's not a real path.
16095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16097      # a path prefixed by /cygdrive for fixpath to work.
16098      new_path="$CYGWIN_ROOT_PATH$input_path"
16099    fi
16100  fi
16101
16102  # remove trailing .exe if any
16103  new_path="${new_path/%.exe/}"
16104
16105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16106
16107  # First separate the path from the arguments. This will split at the first
16108  # space.
16109  complete="$FOUND_MAKE"
16110  path="${complete%% *}"
16111  tmp="$complete EOL"
16112  arguments="${tmp#* }"
16113
16114  # Input might be given as Windows format, start by converting to
16115  # unix format.
16116  new_path="$path"
16117
16118  windows_path="$new_path"
16119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16120    unix_path=`$CYGPATH -u "$windows_path"`
16121    new_path="$unix_path"
16122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16124    new_path="$unix_path"
16125  fi
16126
16127
16128  # Now try to locate executable using which
16129  new_path=`$WHICH "$new_path" 2> /dev/null`
16130
16131  if test "x$new_path" = x; then
16132    # Oops. Which didn't find the executable.
16133    # The splitting of arguments from the executable at a space might have been incorrect,
16134    # since paths with space are more likely in Windows. Give it another try with the whole
16135    # argument.
16136    path="$complete"
16137    arguments="EOL"
16138    new_path="$path"
16139
16140  windows_path="$new_path"
16141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16142    unix_path=`$CYGPATH -u "$windows_path"`
16143    new_path="$unix_path"
16144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16146    new_path="$unix_path"
16147  fi
16148
16149
16150    new_path=`$WHICH "$new_path" 2> /dev/null`
16151
16152    if test "x$new_path" = x; then
16153      # It's still not found. Now this is an unrecoverable error.
16154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16155$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16156      has_space=`$ECHO "$complete" | $GREP " "`
16157      if test "x$has_space" != x; then
16158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16160      fi
16161      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16162    fi
16163  fi
16164
16165  # Now new_path has a complete unix path to the binary
16166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16167    # Keep paths in /bin as-is, but remove trailing .exe if any
16168    new_path="${new_path/%.exe/}"
16169    # Do not save /bin paths to all_fixpath_prefixes!
16170  else
16171    # Not in mixed or Windows style, start by that.
16172    new_path=`cmd //c echo $new_path`
16173
16174  input_path="$new_path"
16175  # Check if we need to convert this using DOS-style short mode. If the path
16176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16177  # take no chances and rewrite it.
16178  # Note: m4 eats our [], so we need to use [ and ] instead.
16179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16180  if test "x$has_forbidden_chars" != x; then
16181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16183  fi
16184
16185    # Output is in $new_path
16186
16187  windows_path="$new_path"
16188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16189    unix_path=`$CYGPATH -u "$windows_path"`
16190    new_path="$unix_path"
16191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16193    new_path="$unix_path"
16194  fi
16195
16196    # remove trailing .exe if any
16197    new_path="${new_path/%.exe/}"
16198
16199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16201  fi
16202
16203  else
16204    # We're on a posix platform. Hooray! :)
16205    # First separate the path from the arguments. This will split at the first
16206    # space.
16207    complete="$FOUND_MAKE"
16208    path="${complete%% *}"
16209    tmp="$complete EOL"
16210    arguments="${tmp#* }"
16211
16212    # Cannot rely on the command "which" here since it doesn't always work.
16213    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16214    if test -z "$is_absolute_path"; then
16215      # Path to executable is not absolute. Find it.
16216      IFS_save="$IFS"
16217      IFS=:
16218      for p in $PATH; do
16219        if test -f "$p/$path" && test -x "$p/$path"; then
16220          new_path="$p/$path"
16221          break
16222        fi
16223      done
16224      IFS="$IFS_save"
16225    else
16226      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16227$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16228      new_path="$path"
16229    fi
16230
16231    if test "x$new_path" = x; then
16232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16233$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16234      has_space=`$ECHO "$complete" | $GREP " "`
16235      if test "x$has_space" != x; then
16236        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16238      fi
16239      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16240    fi
16241  fi
16242
16243  # Now join together the path and the arguments once again
16244  if test "x$arguments" != xEOL; then
16245    new_complete="$new_path ${arguments% *}"
16246  else
16247    new_complete="$new_path"
16248  fi
16249
16250  if test "x$complete" != "x$new_complete"; then
16251    FOUND_MAKE="$new_complete"
16252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16253$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16254  fi
16255
16256        fi
16257      fi
16258    fi
16259  fi
16260
16261        if test "x$FOUND_MAKE" = x; then
16262          for ac_prog in make
16263do
16264  # Extract the first word of "$ac_prog", so it can be a program name with args.
16265set dummy $ac_prog; ac_word=$2
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16267$as_echo_n "checking for $ac_word... " >&6; }
16268if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16269  $as_echo_n "(cached) " >&6
16270else
16271  case $CHECK_TOOLSDIR_MAKE in
16272  [\\/]* | ?:[\\/]*)
16273  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16274  ;;
16275  *)
16276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16277for as_dir in $PATH
16278do
16279  IFS=$as_save_IFS
16280  test -z "$as_dir" && as_dir=.
16281    for ac_exec_ext in '' $ac_executable_extensions; do
16282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16283    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16285    break 2
16286  fi
16287done
16288  done
16289IFS=$as_save_IFS
16290
16291  ;;
16292esac
16293fi
16294CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16295if test -n "$CHECK_TOOLSDIR_MAKE"; then
16296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16297$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16298else
16299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16300$as_echo "no" >&6; }
16301fi
16302
16303
16304  test -n "$CHECK_TOOLSDIR_MAKE" && break
16305done
16306
16307
16308  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16309  DESCRIPTION="make in tools-dir"
16310  if test "x$MAKE_CANDIDATE" != x; then
16311    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16312$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16313    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16314    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16315    if test "x$IS_GNU_MAKE" = x; then
16316      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16317$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16318    else
16319      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16320      if test "x$IS_MODERN_MAKE" = x; then
16321        { $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
16322$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;}
16323      else
16324        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16325          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16326            MAKE_EXPECTED_ENV='cygwin'
16327          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16328            MAKE_EXPECTED_ENV='msys'
16329          else
16330            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16331          fi
16332          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16333          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16334        else
16335          # Not relevant for non-Windows
16336          IS_MAKE_CORRECT_ENV=true
16337        fi
16338        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16339          { $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
16340$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;}
16341        else
16342          FOUND_MAKE=$MAKE_CANDIDATE
16343
16344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345
16346  # First separate the path from the arguments. This will split at the first
16347  # space.
16348  complete="$FOUND_MAKE"
16349  path="${complete%% *}"
16350  tmp="$complete EOL"
16351  arguments="${tmp#* }"
16352
16353  # Input might be given as Windows format, start by converting to
16354  # unix format.
16355  new_path=`$CYGPATH -u "$path"`
16356
16357  # Now try to locate executable using which
16358  new_path=`$WHICH "$new_path" 2> /dev/null`
16359  # bat and cmd files are not always considered executable in cygwin causing which
16360  # to not find them
16361  if test "x$new_path" = x \
16362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16364    new_path=`$CYGPATH -u "$path"`
16365  fi
16366  if test "x$new_path" = x; then
16367    # Oops. Which didn't find the executable.
16368    # The splitting of arguments from the executable at a space might have been incorrect,
16369    # since paths with space are more likely in Windows. Give it another try with the whole
16370    # argument.
16371    path="$complete"
16372    arguments="EOL"
16373    new_path=`$CYGPATH -u "$path"`
16374    new_path=`$WHICH "$new_path" 2> /dev/null`
16375    # bat and cmd files are not always considered executable in cygwin causing which
16376    # to not find them
16377    if test "x$new_path" = x \
16378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16380      new_path=`$CYGPATH -u "$path"`
16381    fi
16382    if test "x$new_path" = x; then
16383      # It's still not found. Now this is an unrecoverable error.
16384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16386      has_space=`$ECHO "$complete" | $GREP " "`
16387      if test "x$has_space" != x; then
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16390      fi
16391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16392    fi
16393  fi
16394
16395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16398  # "foo.exe" is OK but "foo" is an error.
16399  #
16400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16401  # It is also a way to make sure we got the proper file name for the real test later on.
16402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16403  if test "x$test_shortpath" = x; then
16404    # Short path failed, file does not exist as specified.
16405    # Try adding .exe or .cmd
16406    if test -f "${new_path}.exe"; then
16407      input_to_shortpath="${new_path}.exe"
16408    elif test -f "${new_path}.cmd"; then
16409      input_to_shortpath="${new_path}.cmd"
16410    else
16411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16416    fi
16417  else
16418    input_to_shortpath="$new_path"
16419  fi
16420
16421  # Call helper function which possibly converts this using DOS-style short mode.
16422  # If so, the updated path is stored in $new_path.
16423  new_path="$input_to_shortpath"
16424
16425  input_path="$input_to_shortpath"
16426  # Check if we need to convert this using DOS-style short mode. If the path
16427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16428  # take no chances and rewrite it.
16429  # Note: m4 eats our [], so we need to use [ and ] instead.
16430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16431  if test "x$has_forbidden_chars" != x; then
16432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16436      # Going to short mode and back again did indeed matter. Since short mode is
16437      # case insensitive, let's make it lowercase to improve readability.
16438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16439      # Now convert it back to Unix-stile (cygpath)
16440      input_path=`$CYGPATH -u "$shortmode_path"`
16441      new_path="$input_path"
16442    fi
16443  fi
16444
16445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16446  if test "x$test_cygdrive_prefix" = x; then
16447    # As a simple fix, exclude /usr/bin since it's not a real path.
16448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16450      # a path prefixed by /cygdrive for fixpath to work.
16451      new_path="$CYGWIN_ROOT_PATH$input_path"
16452    fi
16453  fi
16454
16455  # remove trailing .exe if any
16456  new_path="${new_path/%.exe/}"
16457
16458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459
16460  # First separate the path from the arguments. This will split at the first
16461  # space.
16462  complete="$FOUND_MAKE"
16463  path="${complete%% *}"
16464  tmp="$complete EOL"
16465  arguments="${tmp#* }"
16466
16467  # Input might be given as Windows format, start by converting to
16468  # unix format.
16469  new_path="$path"
16470
16471  windows_path="$new_path"
16472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16473    unix_path=`$CYGPATH -u "$windows_path"`
16474    new_path="$unix_path"
16475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16477    new_path="$unix_path"
16478  fi
16479
16480
16481  # Now try to locate executable using which
16482  new_path=`$WHICH "$new_path" 2> /dev/null`
16483
16484  if test "x$new_path" = x; then
16485    # Oops. Which didn't find the executable.
16486    # The splitting of arguments from the executable at a space might have been incorrect,
16487    # since paths with space are more likely in Windows. Give it another try with the whole
16488    # argument.
16489    path="$complete"
16490    arguments="EOL"
16491    new_path="$path"
16492
16493  windows_path="$new_path"
16494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495    unix_path=`$CYGPATH -u "$windows_path"`
16496    new_path="$unix_path"
16497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16499    new_path="$unix_path"
16500  fi
16501
16502
16503    new_path=`$WHICH "$new_path" 2> /dev/null`
16504
16505    if test "x$new_path" = x; then
16506      # It's still not found. Now this is an unrecoverable error.
16507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16509      has_space=`$ECHO "$complete" | $GREP " "`
16510      if test "x$has_space" != x; then
16511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16513      fi
16514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16515    fi
16516  fi
16517
16518  # Now new_path has a complete unix path to the binary
16519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16520    # Keep paths in /bin as-is, but remove trailing .exe if any
16521    new_path="${new_path/%.exe/}"
16522    # Do not save /bin paths to all_fixpath_prefixes!
16523  else
16524    # Not in mixed or Windows style, start by that.
16525    new_path=`cmd //c echo $new_path`
16526
16527  input_path="$new_path"
16528  # Check if we need to convert this using DOS-style short mode. If the path
16529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16530  # take no chances and rewrite it.
16531  # Note: m4 eats our [], so we need to use [ and ] instead.
16532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16533  if test "x$has_forbidden_chars" != x; then
16534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16536  fi
16537
16538    # Output is in $new_path
16539
16540  windows_path="$new_path"
16541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542    unix_path=`$CYGPATH -u "$windows_path"`
16543    new_path="$unix_path"
16544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16546    new_path="$unix_path"
16547  fi
16548
16549    # remove trailing .exe if any
16550    new_path="${new_path/%.exe/}"
16551
16552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16554  fi
16555
16556  else
16557    # We're on a posix platform. Hooray! :)
16558    # First separate the path from the arguments. This will split at the first
16559    # space.
16560    complete="$FOUND_MAKE"
16561    path="${complete%% *}"
16562    tmp="$complete EOL"
16563    arguments="${tmp#* }"
16564
16565    # Cannot rely on the command "which" here since it doesn't always work.
16566    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16567    if test -z "$is_absolute_path"; then
16568      # Path to executable is not absolute. Find it.
16569      IFS_save="$IFS"
16570      IFS=:
16571      for p in $PATH; do
16572        if test -f "$p/$path" && test -x "$p/$path"; then
16573          new_path="$p/$path"
16574          break
16575        fi
16576      done
16577      IFS="$IFS_save"
16578    else
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16580$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16581      new_path="$path"
16582    fi
16583
16584    if test "x$new_path" = x; then
16585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16586$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16587      has_space=`$ECHO "$complete" | $GREP " "`
16588      if test "x$has_space" != x; then
16589        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16591      fi
16592      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16593    fi
16594  fi
16595
16596  # Now join together the path and the arguments once again
16597  if test "x$arguments" != xEOL; then
16598    new_complete="$new_path ${arguments% *}"
16599  else
16600    new_complete="$new_path"
16601  fi
16602
16603  if test "x$complete" != "x$new_complete"; then
16604    FOUND_MAKE="$new_complete"
16605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16606$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16607  fi
16608
16609        fi
16610      fi
16611    fi
16612  fi
16613
16614        fi
16615        PATH=$OLD_PATH
16616      fi
16617    fi
16618
16619    if test "x$FOUND_MAKE" = x; then
16620      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
16621    fi
16622  fi
16623
16624  MAKE=$FOUND_MAKE
16625
16626  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16627$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16628
16629
16630
16631  # Test if find supports -delete
16632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16633$as_echo_n "checking if find supports -delete... " >&6; }
16634  FIND_DELETE="-delete"
16635
16636  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16637
16638  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16639
16640  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16641  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16642    # No, it does not.
16643    rm $DELETEDIR/TestIfFindSupportsDelete
16644    FIND_DELETE="-exec rm \{\} \+"
16645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16646$as_echo "no" >&6; }
16647  else
16648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16649$as_echo "yes" >&6; }
16650  fi
16651  rmdir $DELETEDIR
16652
16653
16654
16655  # These tools might not be installed by default,
16656  # need hint on how to install them.
16657
16658
16659
16660  # Publish this variable in the help.
16661
16662
16663  if test "x$UNZIP" = x; then
16664    # The variable is not set by user, try to locate tool using the code snippet
16665    for ac_prog in unzip
16666do
16667  # Extract the first word of "$ac_prog", so it can be a program name with args.
16668set dummy $ac_prog; ac_word=$2
16669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16670$as_echo_n "checking for $ac_word... " >&6; }
16671if ${ac_cv_path_UNZIP+:} false; then :
16672  $as_echo_n "(cached) " >&6
16673else
16674  case $UNZIP in
16675  [\\/]* | ?:[\\/]*)
16676  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16677  ;;
16678  *)
16679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16680for as_dir in $PATH
16681do
16682  IFS=$as_save_IFS
16683  test -z "$as_dir" && as_dir=.
16684    for ac_exec_ext in '' $ac_executable_extensions; do
16685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16686    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16688    break 2
16689  fi
16690done
16691  done
16692IFS=$as_save_IFS
16693
16694  ;;
16695esac
16696fi
16697UNZIP=$ac_cv_path_UNZIP
16698if test -n "$UNZIP"; then
16699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16700$as_echo "$UNZIP" >&6; }
16701else
16702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16703$as_echo "no" >&6; }
16704fi
16705
16706
16707  test -n "$UNZIP" && break
16708done
16709
16710  else
16711    # The variable is set, but is it from the command line or the environment?
16712
16713    # Try to remove the string !UNZIP! from our list.
16714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16716      # If it failed, the variable was not from the command line. Ignore it,
16717      # but warn the user (except for BASH, which is always set by the calling BASH).
16718      if test "xUNZIP" != xBASH; then
16719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16720$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16721      fi
16722      # Try to locate tool using the code snippet
16723      for ac_prog in unzip
16724do
16725  # Extract the first word of "$ac_prog", so it can be a program name with args.
16726set dummy $ac_prog; ac_word=$2
16727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16728$as_echo_n "checking for $ac_word... " >&6; }
16729if ${ac_cv_path_UNZIP+:} false; then :
16730  $as_echo_n "(cached) " >&6
16731else
16732  case $UNZIP in
16733  [\\/]* | ?:[\\/]*)
16734  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16735  ;;
16736  *)
16737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16738for as_dir in $PATH
16739do
16740  IFS=$as_save_IFS
16741  test -z "$as_dir" && as_dir=.
16742    for ac_exec_ext in '' $ac_executable_extensions; do
16743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16744    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16746    break 2
16747  fi
16748done
16749  done
16750IFS=$as_save_IFS
16751
16752  ;;
16753esac
16754fi
16755UNZIP=$ac_cv_path_UNZIP
16756if test -n "$UNZIP"; then
16757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16758$as_echo "$UNZIP" >&6; }
16759else
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16761$as_echo "no" >&6; }
16762fi
16763
16764
16765  test -n "$UNZIP" && break
16766done
16767
16768    else
16769      # If it succeeded, then it was overridden by the user. We will use it
16770      # for the tool.
16771
16772      # First remove it from the list of overridden variables, so we can test
16773      # for unknown variables in the end.
16774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16775
16776      # Check if the provided tool contains a complete path.
16777      tool_specified="$UNZIP"
16778      tool_basename="${tool_specified##*/}"
16779      if test "x$tool_basename" = "x$tool_specified"; then
16780        # A command without a complete path is provided, search $PATH.
16781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16782$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16783        # Extract the first word of "$tool_basename", so it can be a program name with args.
16784set dummy $tool_basename; ac_word=$2
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16786$as_echo_n "checking for $ac_word... " >&6; }
16787if ${ac_cv_path_UNZIP+:} false; then :
16788  $as_echo_n "(cached) " >&6
16789else
16790  case $UNZIP in
16791  [\\/]* | ?:[\\/]*)
16792  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16793  ;;
16794  *)
16795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16796for as_dir in $PATH
16797do
16798  IFS=$as_save_IFS
16799  test -z "$as_dir" && as_dir=.
16800    for ac_exec_ext in '' $ac_executable_extensions; do
16801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16802    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16804    break 2
16805  fi
16806done
16807  done
16808IFS=$as_save_IFS
16809
16810  ;;
16811esac
16812fi
16813UNZIP=$ac_cv_path_UNZIP
16814if test -n "$UNZIP"; then
16815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16816$as_echo "$UNZIP" >&6; }
16817else
16818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16819$as_echo "no" >&6; }
16820fi
16821
16822
16823        if test "x$UNZIP" = x; then
16824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16825        fi
16826      else
16827        # Otherwise we believe it is a complete path. Use it as it is.
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16829$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16831$as_echo_n "checking for UNZIP... " >&6; }
16832        if test ! -x "$tool_specified"; then
16833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16834$as_echo "not found" >&6; }
16835          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16836        fi
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16838$as_echo "$tool_specified" >&6; }
16839      fi
16840    fi
16841  fi
16842
16843
16844
16845  if test "x$UNZIP" = x; then
16846    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16847  fi
16848
16849
16850
16851
16852
16853  # Publish this variable in the help.
16854
16855
16856  if test "x$ZIP" = x; then
16857    # The variable is not set by user, try to locate tool using the code snippet
16858    for ac_prog in zip
16859do
16860  # Extract the first word of "$ac_prog", so it can be a program name with args.
16861set dummy $ac_prog; ac_word=$2
16862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16863$as_echo_n "checking for $ac_word... " >&6; }
16864if ${ac_cv_path_ZIP+:} false; then :
16865  $as_echo_n "(cached) " >&6
16866else
16867  case $ZIP in
16868  [\\/]* | ?:[\\/]*)
16869  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16870  ;;
16871  *)
16872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16873for as_dir in $PATH
16874do
16875  IFS=$as_save_IFS
16876  test -z "$as_dir" && as_dir=.
16877    for ac_exec_ext in '' $ac_executable_extensions; do
16878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16879    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16881    break 2
16882  fi
16883done
16884  done
16885IFS=$as_save_IFS
16886
16887  ;;
16888esac
16889fi
16890ZIP=$ac_cv_path_ZIP
16891if test -n "$ZIP"; then
16892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16893$as_echo "$ZIP" >&6; }
16894else
16895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16896$as_echo "no" >&6; }
16897fi
16898
16899
16900  test -n "$ZIP" && break
16901done
16902
16903  else
16904    # The variable is set, but is it from the command line or the environment?
16905
16906    # Try to remove the string !ZIP! from our list.
16907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16909      # If it failed, the variable was not from the command line. Ignore it,
16910      # but warn the user (except for BASH, which is always set by the calling BASH).
16911      if test "xZIP" != xBASH; then
16912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16913$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16914      fi
16915      # Try to locate tool using the code snippet
16916      for ac_prog in zip
16917do
16918  # Extract the first word of "$ac_prog", so it can be a program name with args.
16919set dummy $ac_prog; ac_word=$2
16920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16921$as_echo_n "checking for $ac_word... " >&6; }
16922if ${ac_cv_path_ZIP+:} false; then :
16923  $as_echo_n "(cached) " >&6
16924else
16925  case $ZIP in
16926  [\\/]* | ?:[\\/]*)
16927  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16928  ;;
16929  *)
16930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16931for as_dir in $PATH
16932do
16933  IFS=$as_save_IFS
16934  test -z "$as_dir" && as_dir=.
16935    for ac_exec_ext in '' $ac_executable_extensions; do
16936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16937    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16939    break 2
16940  fi
16941done
16942  done
16943IFS=$as_save_IFS
16944
16945  ;;
16946esac
16947fi
16948ZIP=$ac_cv_path_ZIP
16949if test -n "$ZIP"; then
16950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16951$as_echo "$ZIP" >&6; }
16952else
16953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16954$as_echo "no" >&6; }
16955fi
16956
16957
16958  test -n "$ZIP" && break
16959done
16960
16961    else
16962      # If it succeeded, then it was overridden by the user. We will use it
16963      # for the tool.
16964
16965      # First remove it from the list of overridden variables, so we can test
16966      # for unknown variables in the end.
16967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16968
16969      # Check if the provided tool contains a complete path.
16970      tool_specified="$ZIP"
16971      tool_basename="${tool_specified##*/}"
16972      if test "x$tool_basename" = "x$tool_specified"; then
16973        # A command without a complete path is provided, search $PATH.
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16975$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16976        # Extract the first word of "$tool_basename", so it can be a program name with args.
16977set dummy $tool_basename; ac_word=$2
16978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16979$as_echo_n "checking for $ac_word... " >&6; }
16980if ${ac_cv_path_ZIP+:} false; then :
16981  $as_echo_n "(cached) " >&6
16982else
16983  case $ZIP in
16984  [\\/]* | ?:[\\/]*)
16985  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16986  ;;
16987  *)
16988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16989for as_dir in $PATH
16990do
16991  IFS=$as_save_IFS
16992  test -z "$as_dir" && as_dir=.
16993    for ac_exec_ext in '' $ac_executable_extensions; do
16994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16995    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16997    break 2
16998  fi
16999done
17000  done
17001IFS=$as_save_IFS
17002
17003  ;;
17004esac
17005fi
17006ZIP=$ac_cv_path_ZIP
17007if test -n "$ZIP"; then
17008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17009$as_echo "$ZIP" >&6; }
17010else
17011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17012$as_echo "no" >&6; }
17013fi
17014
17015
17016        if test "x$ZIP" = x; then
17017          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17018        fi
17019      else
17020        # Otherwise we believe it is a complete path. Use it as it is.
17021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17022$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17024$as_echo_n "checking for ZIP... " >&6; }
17025        if test ! -x "$tool_specified"; then
17026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17027$as_echo "not found" >&6; }
17028          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17029        fi
17030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17031$as_echo "$tool_specified" >&6; }
17032      fi
17033    fi
17034  fi
17035
17036
17037
17038  if test "x$ZIP" = x; then
17039    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17040  fi
17041
17042
17043
17044  # Non-required basic tools
17045
17046
17047
17048  # Publish this variable in the help.
17049
17050
17051  if test "x$LDD" = x; then
17052    # The variable is not set by user, try to locate tool using the code snippet
17053    for ac_prog in ldd
17054do
17055  # Extract the first word of "$ac_prog", so it can be a program name with args.
17056set dummy $ac_prog; ac_word=$2
17057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17058$as_echo_n "checking for $ac_word... " >&6; }
17059if ${ac_cv_path_LDD+:} false; then :
17060  $as_echo_n "(cached) " >&6
17061else
17062  case $LDD in
17063  [\\/]* | ?:[\\/]*)
17064  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17065  ;;
17066  *)
17067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17068for as_dir in $PATH
17069do
17070  IFS=$as_save_IFS
17071  test -z "$as_dir" && as_dir=.
17072    for ac_exec_ext in '' $ac_executable_extensions; do
17073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17074    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17076    break 2
17077  fi
17078done
17079  done
17080IFS=$as_save_IFS
17081
17082  ;;
17083esac
17084fi
17085LDD=$ac_cv_path_LDD
17086if test -n "$LDD"; then
17087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17088$as_echo "$LDD" >&6; }
17089else
17090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17091$as_echo "no" >&6; }
17092fi
17093
17094
17095  test -n "$LDD" && break
17096done
17097
17098  else
17099    # The variable is set, but is it from the command line or the environment?
17100
17101    # Try to remove the string !LDD! from our list.
17102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17104      # If it failed, the variable was not from the command line. Ignore it,
17105      # but warn the user (except for BASH, which is always set by the calling BASH).
17106      if test "xLDD" != xBASH; then
17107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17108$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17109      fi
17110      # Try to locate tool using the code snippet
17111      for ac_prog in ldd
17112do
17113  # Extract the first word of "$ac_prog", so it can be a program name with args.
17114set dummy $ac_prog; ac_word=$2
17115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17116$as_echo_n "checking for $ac_word... " >&6; }
17117if ${ac_cv_path_LDD+:} false; then :
17118  $as_echo_n "(cached) " >&6
17119else
17120  case $LDD in
17121  [\\/]* | ?:[\\/]*)
17122  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17123  ;;
17124  *)
17125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17126for as_dir in $PATH
17127do
17128  IFS=$as_save_IFS
17129  test -z "$as_dir" && as_dir=.
17130    for ac_exec_ext in '' $ac_executable_extensions; do
17131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17132    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17134    break 2
17135  fi
17136done
17137  done
17138IFS=$as_save_IFS
17139
17140  ;;
17141esac
17142fi
17143LDD=$ac_cv_path_LDD
17144if test -n "$LDD"; then
17145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17146$as_echo "$LDD" >&6; }
17147else
17148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149$as_echo "no" >&6; }
17150fi
17151
17152
17153  test -n "$LDD" && break
17154done
17155
17156    else
17157      # If it succeeded, then it was overridden by the user. We will use it
17158      # for the tool.
17159
17160      # First remove it from the list of overridden variables, so we can test
17161      # for unknown variables in the end.
17162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17163
17164      # Check if the provided tool contains a complete path.
17165      tool_specified="$LDD"
17166      tool_basename="${tool_specified##*/}"
17167      if test "x$tool_basename" = "x$tool_specified"; then
17168        # A command without a complete path is provided, search $PATH.
17169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17170$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17171        # Extract the first word of "$tool_basename", so it can be a program name with args.
17172set dummy $tool_basename; ac_word=$2
17173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17174$as_echo_n "checking for $ac_word... " >&6; }
17175if ${ac_cv_path_LDD+:} false; then :
17176  $as_echo_n "(cached) " >&6
17177else
17178  case $LDD in
17179  [\\/]* | ?:[\\/]*)
17180  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17181  ;;
17182  *)
17183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17184for as_dir in $PATH
17185do
17186  IFS=$as_save_IFS
17187  test -z "$as_dir" && as_dir=.
17188    for ac_exec_ext in '' $ac_executable_extensions; do
17189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17190    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17192    break 2
17193  fi
17194done
17195  done
17196IFS=$as_save_IFS
17197
17198  ;;
17199esac
17200fi
17201LDD=$ac_cv_path_LDD
17202if test -n "$LDD"; then
17203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17204$as_echo "$LDD" >&6; }
17205else
17206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17207$as_echo "no" >&6; }
17208fi
17209
17210
17211        if test "x$LDD" = x; then
17212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17213        fi
17214      else
17215        # Otherwise we believe it is a complete path. Use it as it is.
17216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17217$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17219$as_echo_n "checking for LDD... " >&6; }
17220        if test ! -x "$tool_specified"; then
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17222$as_echo "not found" >&6; }
17223          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17224        fi
17225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17226$as_echo "$tool_specified" >&6; }
17227      fi
17228    fi
17229  fi
17230
17231
17232  if test "x$LDD" = "x"; then
17233    # List shared lib dependencies is used for
17234    # debug output and checking for forbidden dependencies.
17235    # We can build without it.
17236    LDD="true"
17237  fi
17238
17239
17240  # Publish this variable in the help.
17241
17242
17243  if test "x$OTOOL" = x; then
17244    # The variable is not set by user, try to locate tool using the code snippet
17245    for ac_prog in otool
17246do
17247  # Extract the first word of "$ac_prog", so it can be a program name with args.
17248set dummy $ac_prog; ac_word=$2
17249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17250$as_echo_n "checking for $ac_word... " >&6; }
17251if ${ac_cv_path_OTOOL+:} false; then :
17252  $as_echo_n "(cached) " >&6
17253else
17254  case $OTOOL in
17255  [\\/]* | ?:[\\/]*)
17256  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17257  ;;
17258  *)
17259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17260for as_dir in $PATH
17261do
17262  IFS=$as_save_IFS
17263  test -z "$as_dir" && as_dir=.
17264    for ac_exec_ext in '' $ac_executable_extensions; do
17265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17266    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17268    break 2
17269  fi
17270done
17271  done
17272IFS=$as_save_IFS
17273
17274  ;;
17275esac
17276fi
17277OTOOL=$ac_cv_path_OTOOL
17278if test -n "$OTOOL"; then
17279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17280$as_echo "$OTOOL" >&6; }
17281else
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17283$as_echo "no" >&6; }
17284fi
17285
17286
17287  test -n "$OTOOL" && break
17288done
17289
17290  else
17291    # The variable is set, but is it from the command line or the environment?
17292
17293    # Try to remove the string !OTOOL! from our list.
17294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17296      # If it failed, the variable was not from the command line. Ignore it,
17297      # but warn the user (except for BASH, which is always set by the calling BASH).
17298      if test "xOTOOL" != xBASH; then
17299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17300$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17301      fi
17302      # Try to locate tool using the code snippet
17303      for ac_prog in otool
17304do
17305  # Extract the first word of "$ac_prog", so it can be a program name with args.
17306set dummy $ac_prog; ac_word=$2
17307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17308$as_echo_n "checking for $ac_word... " >&6; }
17309if ${ac_cv_path_OTOOL+:} false; then :
17310  $as_echo_n "(cached) " >&6
17311else
17312  case $OTOOL in
17313  [\\/]* | ?:[\\/]*)
17314  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17315  ;;
17316  *)
17317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17318for as_dir in $PATH
17319do
17320  IFS=$as_save_IFS
17321  test -z "$as_dir" && as_dir=.
17322    for ac_exec_ext in '' $ac_executable_extensions; do
17323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17324    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17326    break 2
17327  fi
17328done
17329  done
17330IFS=$as_save_IFS
17331
17332  ;;
17333esac
17334fi
17335OTOOL=$ac_cv_path_OTOOL
17336if test -n "$OTOOL"; then
17337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17338$as_echo "$OTOOL" >&6; }
17339else
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17341$as_echo "no" >&6; }
17342fi
17343
17344
17345  test -n "$OTOOL" && break
17346done
17347
17348    else
17349      # If it succeeded, then it was overridden by the user. We will use it
17350      # for the tool.
17351
17352      # First remove it from the list of overridden variables, so we can test
17353      # for unknown variables in the end.
17354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17355
17356      # Check if the provided tool contains a complete path.
17357      tool_specified="$OTOOL"
17358      tool_basename="${tool_specified##*/}"
17359      if test "x$tool_basename" = "x$tool_specified"; then
17360        # A command without a complete path is provided, search $PATH.
17361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17362$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17363        # Extract the first word of "$tool_basename", so it can be a program name with args.
17364set dummy $tool_basename; ac_word=$2
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17366$as_echo_n "checking for $ac_word... " >&6; }
17367if ${ac_cv_path_OTOOL+:} false; then :
17368  $as_echo_n "(cached) " >&6
17369else
17370  case $OTOOL in
17371  [\\/]* | ?:[\\/]*)
17372  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17373  ;;
17374  *)
17375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17376for as_dir in $PATH
17377do
17378  IFS=$as_save_IFS
17379  test -z "$as_dir" && as_dir=.
17380    for ac_exec_ext in '' $ac_executable_extensions; do
17381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17382    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17384    break 2
17385  fi
17386done
17387  done
17388IFS=$as_save_IFS
17389
17390  ;;
17391esac
17392fi
17393OTOOL=$ac_cv_path_OTOOL
17394if test -n "$OTOOL"; then
17395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17396$as_echo "$OTOOL" >&6; }
17397else
17398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17399$as_echo "no" >&6; }
17400fi
17401
17402
17403        if test "x$OTOOL" = x; then
17404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17405        fi
17406      else
17407        # Otherwise we believe it is a complete path. Use it as it is.
17408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17409$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17411$as_echo_n "checking for OTOOL... " >&6; }
17412        if test ! -x "$tool_specified"; then
17413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17414$as_echo "not found" >&6; }
17415          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17416        fi
17417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17418$as_echo "$tool_specified" >&6; }
17419      fi
17420    fi
17421  fi
17422
17423
17424  if test "x$OTOOL" = "x"; then
17425    OTOOL="true"
17426  fi
17427
17428
17429  # Publish this variable in the help.
17430
17431
17432  if test "x$READELF" = x; then
17433    # The variable is not set by user, try to locate tool using the code snippet
17434    for ac_prog in greadelf readelf
17435do
17436  # Extract the first word of "$ac_prog", so it can be a program name with args.
17437set dummy $ac_prog; ac_word=$2
17438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17439$as_echo_n "checking for $ac_word... " >&6; }
17440if ${ac_cv_path_READELF+:} false; then :
17441  $as_echo_n "(cached) " >&6
17442else
17443  case $READELF in
17444  [\\/]* | ?:[\\/]*)
17445  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17446  ;;
17447  *)
17448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17449for as_dir in $PATH
17450do
17451  IFS=$as_save_IFS
17452  test -z "$as_dir" && as_dir=.
17453    for ac_exec_ext in '' $ac_executable_extensions; do
17454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17455    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17457    break 2
17458  fi
17459done
17460  done
17461IFS=$as_save_IFS
17462
17463  ;;
17464esac
17465fi
17466READELF=$ac_cv_path_READELF
17467if test -n "$READELF"; then
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17469$as_echo "$READELF" >&6; }
17470else
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17472$as_echo "no" >&6; }
17473fi
17474
17475
17476  test -n "$READELF" && break
17477done
17478
17479  else
17480    # The variable is set, but is it from the command line or the environment?
17481
17482    # Try to remove the string !READELF! from our list.
17483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17485      # If it failed, the variable was not from the command line. Ignore it,
17486      # but warn the user (except for BASH, which is always set by the calling BASH).
17487      if test "xREADELF" != xBASH; then
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17489$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17490      fi
17491      # Try to locate tool using the code snippet
17492      for ac_prog in greadelf readelf
17493do
17494  # Extract the first word of "$ac_prog", so it can be a program name with args.
17495set dummy $ac_prog; ac_word=$2
17496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17497$as_echo_n "checking for $ac_word... " >&6; }
17498if ${ac_cv_path_READELF+:} false; then :
17499  $as_echo_n "(cached) " >&6
17500else
17501  case $READELF in
17502  [\\/]* | ?:[\\/]*)
17503  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17504  ;;
17505  *)
17506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17507for as_dir in $PATH
17508do
17509  IFS=$as_save_IFS
17510  test -z "$as_dir" && as_dir=.
17511    for ac_exec_ext in '' $ac_executable_extensions; do
17512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17513    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17515    break 2
17516  fi
17517done
17518  done
17519IFS=$as_save_IFS
17520
17521  ;;
17522esac
17523fi
17524READELF=$ac_cv_path_READELF
17525if test -n "$READELF"; then
17526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17527$as_echo "$READELF" >&6; }
17528else
17529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17530$as_echo "no" >&6; }
17531fi
17532
17533
17534  test -n "$READELF" && break
17535done
17536
17537    else
17538      # If it succeeded, then it was overridden by the user. We will use it
17539      # for the tool.
17540
17541      # First remove it from the list of overridden variables, so we can test
17542      # for unknown variables in the end.
17543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17544
17545      # Check if the provided tool contains a complete path.
17546      tool_specified="$READELF"
17547      tool_basename="${tool_specified##*/}"
17548      if test "x$tool_basename" = "x$tool_specified"; then
17549        # A command without a complete path is provided, search $PATH.
17550        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17551$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17552        # Extract the first word of "$tool_basename", so it can be a program name with args.
17553set dummy $tool_basename; ac_word=$2
17554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555$as_echo_n "checking for $ac_word... " >&6; }
17556if ${ac_cv_path_READELF+:} false; then :
17557  $as_echo_n "(cached) " >&6
17558else
17559  case $READELF in
17560  [\\/]* | ?:[\\/]*)
17561  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17562  ;;
17563  *)
17564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17565for as_dir in $PATH
17566do
17567  IFS=$as_save_IFS
17568  test -z "$as_dir" && as_dir=.
17569    for ac_exec_ext in '' $ac_executable_extensions; do
17570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17571    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17573    break 2
17574  fi
17575done
17576  done
17577IFS=$as_save_IFS
17578
17579  ;;
17580esac
17581fi
17582READELF=$ac_cv_path_READELF
17583if test -n "$READELF"; then
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17585$as_echo "$READELF" >&6; }
17586else
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588$as_echo "no" >&6; }
17589fi
17590
17591
17592        if test "x$READELF" = x; then
17593          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17594        fi
17595      else
17596        # Otherwise we believe it is a complete path. Use it as it is.
17597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17598$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17600$as_echo_n "checking for READELF... " >&6; }
17601        if test ! -x "$tool_specified"; then
17602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17603$as_echo "not found" >&6; }
17604          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17605        fi
17606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17607$as_echo "$tool_specified" >&6; }
17608      fi
17609    fi
17610  fi
17611
17612
17613
17614
17615  # Publish this variable in the help.
17616
17617
17618  if test "x$HG" = x; then
17619    # The variable is not set by user, try to locate tool using the code snippet
17620    for ac_prog in hg
17621do
17622  # Extract the first word of "$ac_prog", so it can be a program name with args.
17623set dummy $ac_prog; ac_word=$2
17624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17625$as_echo_n "checking for $ac_word... " >&6; }
17626if ${ac_cv_path_HG+:} false; then :
17627  $as_echo_n "(cached) " >&6
17628else
17629  case $HG in
17630  [\\/]* | ?:[\\/]*)
17631  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17632  ;;
17633  *)
17634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17635for as_dir in $PATH
17636do
17637  IFS=$as_save_IFS
17638  test -z "$as_dir" && as_dir=.
17639    for ac_exec_ext in '' $ac_executable_extensions; do
17640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17641    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17643    break 2
17644  fi
17645done
17646  done
17647IFS=$as_save_IFS
17648
17649  ;;
17650esac
17651fi
17652HG=$ac_cv_path_HG
17653if test -n "$HG"; then
17654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17655$as_echo "$HG" >&6; }
17656else
17657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17658$as_echo "no" >&6; }
17659fi
17660
17661
17662  test -n "$HG" && break
17663done
17664
17665  else
17666    # The variable is set, but is it from the command line or the environment?
17667
17668    # Try to remove the string !HG! from our list.
17669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17671      # If it failed, the variable was not from the command line. Ignore it,
17672      # but warn the user (except for BASH, which is always set by the calling BASH).
17673      if test "xHG" != xBASH; then
17674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17675$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17676      fi
17677      # Try to locate tool using the code snippet
17678      for ac_prog in hg
17679do
17680  # Extract the first word of "$ac_prog", so it can be a program name with args.
17681set dummy $ac_prog; ac_word=$2
17682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17683$as_echo_n "checking for $ac_word... " >&6; }
17684if ${ac_cv_path_HG+:} false; then :
17685  $as_echo_n "(cached) " >&6
17686else
17687  case $HG in
17688  [\\/]* | ?:[\\/]*)
17689  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17690  ;;
17691  *)
17692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17693for as_dir in $PATH
17694do
17695  IFS=$as_save_IFS
17696  test -z "$as_dir" && as_dir=.
17697    for ac_exec_ext in '' $ac_executable_extensions; do
17698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17699    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17701    break 2
17702  fi
17703done
17704  done
17705IFS=$as_save_IFS
17706
17707  ;;
17708esac
17709fi
17710HG=$ac_cv_path_HG
17711if test -n "$HG"; then
17712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17713$as_echo "$HG" >&6; }
17714else
17715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17716$as_echo "no" >&6; }
17717fi
17718
17719
17720  test -n "$HG" && break
17721done
17722
17723    else
17724      # If it succeeded, then it was overridden by the user. We will use it
17725      # for the tool.
17726
17727      # First remove it from the list of overridden variables, so we can test
17728      # for unknown variables in the end.
17729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17730
17731      # Check if the provided tool contains a complete path.
17732      tool_specified="$HG"
17733      tool_basename="${tool_specified##*/}"
17734      if test "x$tool_basename" = "x$tool_specified"; then
17735        # A command without a complete path is provided, search $PATH.
17736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17737$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17738        # Extract the first word of "$tool_basename", so it can be a program name with args.
17739set dummy $tool_basename; ac_word=$2
17740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17741$as_echo_n "checking for $ac_word... " >&6; }
17742if ${ac_cv_path_HG+:} false; then :
17743  $as_echo_n "(cached) " >&6
17744else
17745  case $HG in
17746  [\\/]* | ?:[\\/]*)
17747  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17748  ;;
17749  *)
17750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17751for as_dir in $PATH
17752do
17753  IFS=$as_save_IFS
17754  test -z "$as_dir" && as_dir=.
17755    for ac_exec_ext in '' $ac_executable_extensions; do
17756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17757    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17759    break 2
17760  fi
17761done
17762  done
17763IFS=$as_save_IFS
17764
17765  ;;
17766esac
17767fi
17768HG=$ac_cv_path_HG
17769if test -n "$HG"; then
17770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17771$as_echo "$HG" >&6; }
17772else
17773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17774$as_echo "no" >&6; }
17775fi
17776
17777
17778        if test "x$HG" = x; then
17779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17780        fi
17781      else
17782        # Otherwise we believe it is a complete path. Use it as it is.
17783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17784$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17786$as_echo_n "checking for HG... " >&6; }
17787        if test ! -x "$tool_specified"; then
17788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17789$as_echo "not found" >&6; }
17790          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17791        fi
17792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17793$as_echo "$tool_specified" >&6; }
17794      fi
17795    fi
17796  fi
17797
17798
17799
17800
17801  # Publish this variable in the help.
17802
17803
17804  if test "x$STAT" = x; then
17805    # The variable is not set by user, try to locate tool using the code snippet
17806    for ac_prog in stat
17807do
17808  # Extract the first word of "$ac_prog", so it can be a program name with args.
17809set dummy $ac_prog; ac_word=$2
17810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17811$as_echo_n "checking for $ac_word... " >&6; }
17812if ${ac_cv_path_STAT+:} false; then :
17813  $as_echo_n "(cached) " >&6
17814else
17815  case $STAT in
17816  [\\/]* | ?:[\\/]*)
17817  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17818  ;;
17819  *)
17820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17821for as_dir in $PATH
17822do
17823  IFS=$as_save_IFS
17824  test -z "$as_dir" && as_dir=.
17825    for ac_exec_ext in '' $ac_executable_extensions; do
17826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17827    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17829    break 2
17830  fi
17831done
17832  done
17833IFS=$as_save_IFS
17834
17835  ;;
17836esac
17837fi
17838STAT=$ac_cv_path_STAT
17839if test -n "$STAT"; then
17840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17841$as_echo "$STAT" >&6; }
17842else
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17844$as_echo "no" >&6; }
17845fi
17846
17847
17848  test -n "$STAT" && break
17849done
17850
17851  else
17852    # The variable is set, but is it from the command line or the environment?
17853
17854    # Try to remove the string !STAT! from our list.
17855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17857      # If it failed, the variable was not from the command line. Ignore it,
17858      # but warn the user (except for BASH, which is always set by the calling BASH).
17859      if test "xSTAT" != xBASH; then
17860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17861$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17862      fi
17863      # Try to locate tool using the code snippet
17864      for ac_prog in stat
17865do
17866  # Extract the first word of "$ac_prog", so it can be a program name with args.
17867set dummy $ac_prog; ac_word=$2
17868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17869$as_echo_n "checking for $ac_word... " >&6; }
17870if ${ac_cv_path_STAT+:} false; then :
17871  $as_echo_n "(cached) " >&6
17872else
17873  case $STAT in
17874  [\\/]* | ?:[\\/]*)
17875  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17876  ;;
17877  *)
17878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17879for as_dir in $PATH
17880do
17881  IFS=$as_save_IFS
17882  test -z "$as_dir" && as_dir=.
17883    for ac_exec_ext in '' $ac_executable_extensions; do
17884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17885    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17887    break 2
17888  fi
17889done
17890  done
17891IFS=$as_save_IFS
17892
17893  ;;
17894esac
17895fi
17896STAT=$ac_cv_path_STAT
17897if test -n "$STAT"; then
17898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17899$as_echo "$STAT" >&6; }
17900else
17901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17902$as_echo "no" >&6; }
17903fi
17904
17905
17906  test -n "$STAT" && break
17907done
17908
17909    else
17910      # If it succeeded, then it was overridden by the user. We will use it
17911      # for the tool.
17912
17913      # First remove it from the list of overridden variables, so we can test
17914      # for unknown variables in the end.
17915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17916
17917      # Check if the provided tool contains a complete path.
17918      tool_specified="$STAT"
17919      tool_basename="${tool_specified##*/}"
17920      if test "x$tool_basename" = "x$tool_specified"; then
17921        # A command without a complete path is provided, search $PATH.
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17923$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17924        # Extract the first word of "$tool_basename", so it can be a program name with args.
17925set dummy $tool_basename; ac_word=$2
17926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17927$as_echo_n "checking for $ac_word... " >&6; }
17928if ${ac_cv_path_STAT+:} false; then :
17929  $as_echo_n "(cached) " >&6
17930else
17931  case $STAT in
17932  [\\/]* | ?:[\\/]*)
17933  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17934  ;;
17935  *)
17936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17937for as_dir in $PATH
17938do
17939  IFS=$as_save_IFS
17940  test -z "$as_dir" && as_dir=.
17941    for ac_exec_ext in '' $ac_executable_extensions; do
17942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17943    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17945    break 2
17946  fi
17947done
17948  done
17949IFS=$as_save_IFS
17950
17951  ;;
17952esac
17953fi
17954STAT=$ac_cv_path_STAT
17955if test -n "$STAT"; then
17956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17957$as_echo "$STAT" >&6; }
17958else
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17960$as_echo "no" >&6; }
17961fi
17962
17963
17964        if test "x$STAT" = x; then
17965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17966        fi
17967      else
17968        # Otherwise we believe it is a complete path. Use it as it is.
17969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17970$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17972$as_echo_n "checking for STAT... " >&6; }
17973        if test ! -x "$tool_specified"; then
17974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17975$as_echo "not found" >&6; }
17976          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
17977        fi
17978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17979$as_echo "$tool_specified" >&6; }
17980      fi
17981    fi
17982  fi
17983
17984
17985
17986
17987  # Publish this variable in the help.
17988
17989
17990  if test "x$TIME" = x; then
17991    # The variable is not set by user, try to locate tool using the code snippet
17992    for ac_prog in time
17993do
17994  # Extract the first word of "$ac_prog", so it can be a program name with args.
17995set dummy $ac_prog; ac_word=$2
17996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17997$as_echo_n "checking for $ac_word... " >&6; }
17998if ${ac_cv_path_TIME+:} false; then :
17999  $as_echo_n "(cached) " >&6
18000else
18001  case $TIME in
18002  [\\/]* | ?:[\\/]*)
18003  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18004  ;;
18005  *)
18006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18007for as_dir in $PATH
18008do
18009  IFS=$as_save_IFS
18010  test -z "$as_dir" && as_dir=.
18011    for ac_exec_ext in '' $ac_executable_extensions; do
18012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18013    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18015    break 2
18016  fi
18017done
18018  done
18019IFS=$as_save_IFS
18020
18021  ;;
18022esac
18023fi
18024TIME=$ac_cv_path_TIME
18025if test -n "$TIME"; then
18026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18027$as_echo "$TIME" >&6; }
18028else
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18030$as_echo "no" >&6; }
18031fi
18032
18033
18034  test -n "$TIME" && break
18035done
18036
18037  else
18038    # The variable is set, but is it from the command line or the environment?
18039
18040    # Try to remove the string !TIME! from our list.
18041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18043      # If it failed, the variable was not from the command line. Ignore it,
18044      # but warn the user (except for BASH, which is always set by the calling BASH).
18045      if test "xTIME" != xBASH; then
18046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18047$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18048      fi
18049      # Try to locate tool using the code snippet
18050      for ac_prog in time
18051do
18052  # Extract the first word of "$ac_prog", so it can be a program name with args.
18053set dummy $ac_prog; ac_word=$2
18054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18055$as_echo_n "checking for $ac_word... " >&6; }
18056if ${ac_cv_path_TIME+:} false; then :
18057  $as_echo_n "(cached) " >&6
18058else
18059  case $TIME in
18060  [\\/]* | ?:[\\/]*)
18061  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18062  ;;
18063  *)
18064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18065for as_dir in $PATH
18066do
18067  IFS=$as_save_IFS
18068  test -z "$as_dir" && as_dir=.
18069    for ac_exec_ext in '' $ac_executable_extensions; do
18070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18071    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18073    break 2
18074  fi
18075done
18076  done
18077IFS=$as_save_IFS
18078
18079  ;;
18080esac
18081fi
18082TIME=$ac_cv_path_TIME
18083if test -n "$TIME"; then
18084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18085$as_echo "$TIME" >&6; }
18086else
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18088$as_echo "no" >&6; }
18089fi
18090
18091
18092  test -n "$TIME" && break
18093done
18094
18095    else
18096      # If it succeeded, then it was overridden by the user. We will use it
18097      # for the tool.
18098
18099      # First remove it from the list of overridden variables, so we can test
18100      # for unknown variables in the end.
18101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18102
18103      # Check if the provided tool contains a complete path.
18104      tool_specified="$TIME"
18105      tool_basename="${tool_specified##*/}"
18106      if test "x$tool_basename" = "x$tool_specified"; then
18107        # A command without a complete path is provided, search $PATH.
18108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18109$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18110        # Extract the first word of "$tool_basename", so it can be a program name with args.
18111set dummy $tool_basename; ac_word=$2
18112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18113$as_echo_n "checking for $ac_word... " >&6; }
18114if ${ac_cv_path_TIME+:} false; then :
18115  $as_echo_n "(cached) " >&6
18116else
18117  case $TIME in
18118  [\\/]* | ?:[\\/]*)
18119  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18120  ;;
18121  *)
18122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18123for as_dir in $PATH
18124do
18125  IFS=$as_save_IFS
18126  test -z "$as_dir" && as_dir=.
18127    for ac_exec_ext in '' $ac_executable_extensions; do
18128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18129    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18131    break 2
18132  fi
18133done
18134  done
18135IFS=$as_save_IFS
18136
18137  ;;
18138esac
18139fi
18140TIME=$ac_cv_path_TIME
18141if test -n "$TIME"; then
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18143$as_echo "$TIME" >&6; }
18144else
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18146$as_echo "no" >&6; }
18147fi
18148
18149
18150        if test "x$TIME" = x; then
18151          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18152        fi
18153      else
18154        # Otherwise we believe it is a complete path. Use it as it is.
18155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18156$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18158$as_echo_n "checking for TIME... " >&6; }
18159        if test ! -x "$tool_specified"; then
18160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18161$as_echo "not found" >&6; }
18162          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18163        fi
18164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18165$as_echo "$tool_specified" >&6; }
18166      fi
18167    fi
18168  fi
18169
18170
18171  # Check if it's GNU time
18172  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18173  if test "x$IS_GNU_TIME" != x; then
18174    IS_GNU_TIME=yes
18175  else
18176    IS_GNU_TIME=no
18177  fi
18178
18179
18180  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18181
18182
18183
18184  # Publish this variable in the help.
18185
18186
18187  if test "x$COMM" = x; then
18188    # The variable is not set by user, try to locate tool using the code snippet
18189    for ac_prog in comm
18190do
18191  # Extract the first word of "$ac_prog", so it can be a program name with args.
18192set dummy $ac_prog; ac_word=$2
18193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18194$as_echo_n "checking for $ac_word... " >&6; }
18195if ${ac_cv_path_COMM+:} false; then :
18196  $as_echo_n "(cached) " >&6
18197else
18198  case $COMM in
18199  [\\/]* | ?:[\\/]*)
18200  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18201  ;;
18202  *)
18203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18204for as_dir in $PATH
18205do
18206  IFS=$as_save_IFS
18207  test -z "$as_dir" && as_dir=.
18208    for ac_exec_ext in '' $ac_executable_extensions; do
18209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18210    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18212    break 2
18213  fi
18214done
18215  done
18216IFS=$as_save_IFS
18217
18218  ;;
18219esac
18220fi
18221COMM=$ac_cv_path_COMM
18222if test -n "$COMM"; then
18223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18224$as_echo "$COMM" >&6; }
18225else
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18227$as_echo "no" >&6; }
18228fi
18229
18230
18231  test -n "$COMM" && break
18232done
18233
18234  else
18235    # The variable is set, but is it from the command line or the environment?
18236
18237    # Try to remove the string !COMM! from our list.
18238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18240      # If it failed, the variable was not from the command line. Ignore it,
18241      # but warn the user (except for BASH, which is always set by the calling BASH).
18242      if test "xCOMM" != xBASH; then
18243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18244$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18245      fi
18246      # Try to locate tool using the code snippet
18247      for ac_prog in comm
18248do
18249  # Extract the first word of "$ac_prog", so it can be a program name with args.
18250set dummy $ac_prog; ac_word=$2
18251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18252$as_echo_n "checking for $ac_word... " >&6; }
18253if ${ac_cv_path_COMM+:} false; then :
18254  $as_echo_n "(cached) " >&6
18255else
18256  case $COMM in
18257  [\\/]* | ?:[\\/]*)
18258  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18259  ;;
18260  *)
18261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18262for as_dir in $PATH
18263do
18264  IFS=$as_save_IFS
18265  test -z "$as_dir" && as_dir=.
18266    for ac_exec_ext in '' $ac_executable_extensions; do
18267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18268    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18270    break 2
18271  fi
18272done
18273  done
18274IFS=$as_save_IFS
18275
18276  ;;
18277esac
18278fi
18279COMM=$ac_cv_path_COMM
18280if test -n "$COMM"; then
18281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18282$as_echo "$COMM" >&6; }
18283else
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285$as_echo "no" >&6; }
18286fi
18287
18288
18289  test -n "$COMM" && break
18290done
18291
18292    else
18293      # If it succeeded, then it was overridden by the user. We will use it
18294      # for the tool.
18295
18296      # First remove it from the list of overridden variables, so we can test
18297      # for unknown variables in the end.
18298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18299
18300      # Check if the provided tool contains a complete path.
18301      tool_specified="$COMM"
18302      tool_basename="${tool_specified##*/}"
18303      if test "x$tool_basename" = "x$tool_specified"; then
18304        # A command without a complete path is provided, search $PATH.
18305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18306$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18307        # Extract the first word of "$tool_basename", so it can be a program name with args.
18308set dummy $tool_basename; ac_word=$2
18309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18310$as_echo_n "checking for $ac_word... " >&6; }
18311if ${ac_cv_path_COMM+:} false; then :
18312  $as_echo_n "(cached) " >&6
18313else
18314  case $COMM in
18315  [\\/]* | ?:[\\/]*)
18316  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18317  ;;
18318  *)
18319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18320for as_dir in $PATH
18321do
18322  IFS=$as_save_IFS
18323  test -z "$as_dir" && as_dir=.
18324    for ac_exec_ext in '' $ac_executable_extensions; do
18325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18326    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18328    break 2
18329  fi
18330done
18331  done
18332IFS=$as_save_IFS
18333
18334  ;;
18335esac
18336fi
18337COMM=$ac_cv_path_COMM
18338if test -n "$COMM"; then
18339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18340$as_echo "$COMM" >&6; }
18341else
18342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18343$as_echo "no" >&6; }
18344fi
18345
18346
18347        if test "x$COMM" = x; then
18348          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18349        fi
18350      else
18351        # Otherwise we believe it is a complete path. Use it as it is.
18352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18353$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18355$as_echo_n "checking for COMM... " >&6; }
18356        if test ! -x "$tool_specified"; then
18357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18358$as_echo "not found" >&6; }
18359          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18360        fi
18361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18362$as_echo "$tool_specified" >&6; }
18363      fi
18364    fi
18365  fi
18366
18367
18368
18369  if test "x$COMM" = x; then
18370    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18371  fi
18372
18373
18374  fi
18375
18376  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18377
18378
18379
18380  # Publish this variable in the help.
18381
18382
18383  if test "x$DSYMUTIL" = x; then
18384    # The variable is not set by user, try to locate tool using the code snippet
18385    for ac_prog in dsymutil
18386do
18387  # Extract the first word of "$ac_prog", so it can be a program name with args.
18388set dummy $ac_prog; ac_word=$2
18389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18390$as_echo_n "checking for $ac_word... " >&6; }
18391if ${ac_cv_path_DSYMUTIL+:} false; then :
18392  $as_echo_n "(cached) " >&6
18393else
18394  case $DSYMUTIL in
18395  [\\/]* | ?:[\\/]*)
18396  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18397  ;;
18398  *)
18399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18400for as_dir in $PATH
18401do
18402  IFS=$as_save_IFS
18403  test -z "$as_dir" && as_dir=.
18404    for ac_exec_ext in '' $ac_executable_extensions; do
18405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18406    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18408    break 2
18409  fi
18410done
18411  done
18412IFS=$as_save_IFS
18413
18414  ;;
18415esac
18416fi
18417DSYMUTIL=$ac_cv_path_DSYMUTIL
18418if test -n "$DSYMUTIL"; then
18419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18420$as_echo "$DSYMUTIL" >&6; }
18421else
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18423$as_echo "no" >&6; }
18424fi
18425
18426
18427  test -n "$DSYMUTIL" && break
18428done
18429
18430  else
18431    # The variable is set, but is it from the command line or the environment?
18432
18433    # Try to remove the string !DSYMUTIL! from our list.
18434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18436      # If it failed, the variable was not from the command line. Ignore it,
18437      # but warn the user (except for BASH, which is always set by the calling BASH).
18438      if test "xDSYMUTIL" != xBASH; then
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18440$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18441      fi
18442      # Try to locate tool using the code snippet
18443      for ac_prog in dsymutil
18444do
18445  # Extract the first word of "$ac_prog", so it can be a program name with args.
18446set dummy $ac_prog; ac_word=$2
18447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18448$as_echo_n "checking for $ac_word... " >&6; }
18449if ${ac_cv_path_DSYMUTIL+:} false; then :
18450  $as_echo_n "(cached) " >&6
18451else
18452  case $DSYMUTIL in
18453  [\\/]* | ?:[\\/]*)
18454  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18455  ;;
18456  *)
18457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18458for as_dir in $PATH
18459do
18460  IFS=$as_save_IFS
18461  test -z "$as_dir" && as_dir=.
18462    for ac_exec_ext in '' $ac_executable_extensions; do
18463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18464    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18466    break 2
18467  fi
18468done
18469  done
18470IFS=$as_save_IFS
18471
18472  ;;
18473esac
18474fi
18475DSYMUTIL=$ac_cv_path_DSYMUTIL
18476if test -n "$DSYMUTIL"; then
18477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18478$as_echo "$DSYMUTIL" >&6; }
18479else
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18481$as_echo "no" >&6; }
18482fi
18483
18484
18485  test -n "$DSYMUTIL" && break
18486done
18487
18488    else
18489      # If it succeeded, then it was overridden by the user. We will use it
18490      # for the tool.
18491
18492      # First remove it from the list of overridden variables, so we can test
18493      # for unknown variables in the end.
18494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18495
18496      # Check if the provided tool contains a complete path.
18497      tool_specified="$DSYMUTIL"
18498      tool_basename="${tool_specified##*/}"
18499      if test "x$tool_basename" = "x$tool_specified"; then
18500        # A command without a complete path is provided, search $PATH.
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18502$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18503        # Extract the first word of "$tool_basename", so it can be a program name with args.
18504set dummy $tool_basename; ac_word=$2
18505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18506$as_echo_n "checking for $ac_word... " >&6; }
18507if ${ac_cv_path_DSYMUTIL+:} false; then :
18508  $as_echo_n "(cached) " >&6
18509else
18510  case $DSYMUTIL in
18511  [\\/]* | ?:[\\/]*)
18512  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18513  ;;
18514  *)
18515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18516for as_dir in $PATH
18517do
18518  IFS=$as_save_IFS
18519  test -z "$as_dir" && as_dir=.
18520    for ac_exec_ext in '' $ac_executable_extensions; do
18521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18522    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18524    break 2
18525  fi
18526done
18527  done
18528IFS=$as_save_IFS
18529
18530  ;;
18531esac
18532fi
18533DSYMUTIL=$ac_cv_path_DSYMUTIL
18534if test -n "$DSYMUTIL"; then
18535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18536$as_echo "$DSYMUTIL" >&6; }
18537else
18538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18539$as_echo "no" >&6; }
18540fi
18541
18542
18543        if test "x$DSYMUTIL" = x; then
18544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18545        fi
18546      else
18547        # Otherwise we believe it is a complete path. Use it as it is.
18548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18549$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18551$as_echo_n "checking for DSYMUTIL... " >&6; }
18552        if test ! -x "$tool_specified"; then
18553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18554$as_echo "not found" >&6; }
18555          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18556        fi
18557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18558$as_echo "$tool_specified" >&6; }
18559      fi
18560    fi
18561  fi
18562
18563
18564
18565  if test "x$DSYMUTIL" = x; then
18566    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18567  fi
18568
18569
18570
18571
18572
18573  # Publish this variable in the help.
18574
18575
18576  if test "x$XATTR" = x; then
18577    # The variable is not set by user, try to locate tool using the code snippet
18578    for ac_prog in xattr
18579do
18580  # Extract the first word of "$ac_prog", so it can be a program name with args.
18581set dummy $ac_prog; ac_word=$2
18582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18583$as_echo_n "checking for $ac_word... " >&6; }
18584if ${ac_cv_path_XATTR+:} false; then :
18585  $as_echo_n "(cached) " >&6
18586else
18587  case $XATTR in
18588  [\\/]* | ?:[\\/]*)
18589  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18590  ;;
18591  *)
18592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18593for as_dir in $PATH
18594do
18595  IFS=$as_save_IFS
18596  test -z "$as_dir" && as_dir=.
18597    for ac_exec_ext in '' $ac_executable_extensions; do
18598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18599    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18601    break 2
18602  fi
18603done
18604  done
18605IFS=$as_save_IFS
18606
18607  ;;
18608esac
18609fi
18610XATTR=$ac_cv_path_XATTR
18611if test -n "$XATTR"; then
18612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18613$as_echo "$XATTR" >&6; }
18614else
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18616$as_echo "no" >&6; }
18617fi
18618
18619
18620  test -n "$XATTR" && break
18621done
18622
18623  else
18624    # The variable is set, but is it from the command line or the environment?
18625
18626    # Try to remove the string !XATTR! from our list.
18627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18629      # If it failed, the variable was not from the command line. Ignore it,
18630      # but warn the user (except for BASH, which is always set by the calling BASH).
18631      if test "xXATTR" != xBASH; then
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18633$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18634      fi
18635      # Try to locate tool using the code snippet
18636      for ac_prog in xattr
18637do
18638  # Extract the first word of "$ac_prog", so it can be a program name with args.
18639set dummy $ac_prog; ac_word=$2
18640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18641$as_echo_n "checking for $ac_word... " >&6; }
18642if ${ac_cv_path_XATTR+:} false; then :
18643  $as_echo_n "(cached) " >&6
18644else
18645  case $XATTR in
18646  [\\/]* | ?:[\\/]*)
18647  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18648  ;;
18649  *)
18650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18651for as_dir in $PATH
18652do
18653  IFS=$as_save_IFS
18654  test -z "$as_dir" && as_dir=.
18655    for ac_exec_ext in '' $ac_executable_extensions; do
18656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18657    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18659    break 2
18660  fi
18661done
18662  done
18663IFS=$as_save_IFS
18664
18665  ;;
18666esac
18667fi
18668XATTR=$ac_cv_path_XATTR
18669if test -n "$XATTR"; then
18670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18671$as_echo "$XATTR" >&6; }
18672else
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18674$as_echo "no" >&6; }
18675fi
18676
18677
18678  test -n "$XATTR" && break
18679done
18680
18681    else
18682      # If it succeeded, then it was overridden by the user. We will use it
18683      # for the tool.
18684
18685      # First remove it from the list of overridden variables, so we can test
18686      # for unknown variables in the end.
18687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18688
18689      # Check if the provided tool contains a complete path.
18690      tool_specified="$XATTR"
18691      tool_basename="${tool_specified##*/}"
18692      if test "x$tool_basename" = "x$tool_specified"; then
18693        # A command without a complete path is provided, search $PATH.
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18695$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18696        # Extract the first word of "$tool_basename", so it can be a program name with args.
18697set dummy $tool_basename; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_XATTR+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $XATTR in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726XATTR=$ac_cv_path_XATTR
18727if test -n "$XATTR"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18729$as_echo "$XATTR" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736        if test "x$XATTR" = x; then
18737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18738        fi
18739      else
18740        # Otherwise we believe it is a complete path. Use it as it is.
18741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18742$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18744$as_echo_n "checking for XATTR... " >&6; }
18745        if test ! -x "$tool_specified"; then
18746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18747$as_echo "not found" >&6; }
18748          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18749        fi
18750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18751$as_echo "$tool_specified" >&6; }
18752      fi
18753    fi
18754  fi
18755
18756
18757
18758  if test "x$XATTR" = x; then
18759    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18760  fi
18761
18762
18763
18764
18765  # Publish this variable in the help.
18766
18767
18768  if test "x$CODESIGN" = x; then
18769    # The variable is not set by user, try to locate tool using the code snippet
18770    for ac_prog in codesign
18771do
18772  # Extract the first word of "$ac_prog", so it can be a program name with args.
18773set dummy $ac_prog; ac_word=$2
18774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18775$as_echo_n "checking for $ac_word... " >&6; }
18776if ${ac_cv_path_CODESIGN+:} false; then :
18777  $as_echo_n "(cached) " >&6
18778else
18779  case $CODESIGN in
18780  [\\/]* | ?:[\\/]*)
18781  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18782  ;;
18783  *)
18784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18785for as_dir in $PATH
18786do
18787  IFS=$as_save_IFS
18788  test -z "$as_dir" && as_dir=.
18789    for ac_exec_ext in '' $ac_executable_extensions; do
18790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18791    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18793    break 2
18794  fi
18795done
18796  done
18797IFS=$as_save_IFS
18798
18799  ;;
18800esac
18801fi
18802CODESIGN=$ac_cv_path_CODESIGN
18803if test -n "$CODESIGN"; then
18804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18805$as_echo "$CODESIGN" >&6; }
18806else
18807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18808$as_echo "no" >&6; }
18809fi
18810
18811
18812  test -n "$CODESIGN" && break
18813done
18814
18815  else
18816    # The variable is set, but is it from the command line or the environment?
18817
18818    # Try to remove the string !CODESIGN! from our list.
18819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18821      # If it failed, the variable was not from the command line. Ignore it,
18822      # but warn the user (except for BASH, which is always set by the calling BASH).
18823      if test "xCODESIGN" != xBASH; then
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18825$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18826      fi
18827      # Try to locate tool using the code snippet
18828      for ac_prog in codesign
18829do
18830  # Extract the first word of "$ac_prog", so it can be a program name with args.
18831set dummy $ac_prog; ac_word=$2
18832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18833$as_echo_n "checking for $ac_word... " >&6; }
18834if ${ac_cv_path_CODESIGN+:} false; then :
18835  $as_echo_n "(cached) " >&6
18836else
18837  case $CODESIGN in
18838  [\\/]* | ?:[\\/]*)
18839  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18840  ;;
18841  *)
18842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18843for as_dir in $PATH
18844do
18845  IFS=$as_save_IFS
18846  test -z "$as_dir" && as_dir=.
18847    for ac_exec_ext in '' $ac_executable_extensions; do
18848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18849    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18851    break 2
18852  fi
18853done
18854  done
18855IFS=$as_save_IFS
18856
18857  ;;
18858esac
18859fi
18860CODESIGN=$ac_cv_path_CODESIGN
18861if test -n "$CODESIGN"; then
18862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18863$as_echo "$CODESIGN" >&6; }
18864else
18865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18866$as_echo "no" >&6; }
18867fi
18868
18869
18870  test -n "$CODESIGN" && break
18871done
18872
18873    else
18874      # If it succeeded, then it was overridden by the user. We will use it
18875      # for the tool.
18876
18877      # First remove it from the list of overridden variables, so we can test
18878      # for unknown variables in the end.
18879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18880
18881      # Check if the provided tool contains a complete path.
18882      tool_specified="$CODESIGN"
18883      tool_basename="${tool_specified##*/}"
18884      if test "x$tool_basename" = "x$tool_specified"; then
18885        # A command without a complete path is provided, search $PATH.
18886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18887$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18888        # Extract the first word of "$tool_basename", so it can be a program name with args.
18889set dummy $tool_basename; ac_word=$2
18890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18891$as_echo_n "checking for $ac_word... " >&6; }
18892if ${ac_cv_path_CODESIGN+:} false; then :
18893  $as_echo_n "(cached) " >&6
18894else
18895  case $CODESIGN in
18896  [\\/]* | ?:[\\/]*)
18897  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18898  ;;
18899  *)
18900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18901for as_dir in $PATH
18902do
18903  IFS=$as_save_IFS
18904  test -z "$as_dir" && as_dir=.
18905    for ac_exec_ext in '' $ac_executable_extensions; do
18906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18907    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18909    break 2
18910  fi
18911done
18912  done
18913IFS=$as_save_IFS
18914
18915  ;;
18916esac
18917fi
18918CODESIGN=$ac_cv_path_CODESIGN
18919if test -n "$CODESIGN"; then
18920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18921$as_echo "$CODESIGN" >&6; }
18922else
18923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18924$as_echo "no" >&6; }
18925fi
18926
18927
18928        if test "x$CODESIGN" = x; then
18929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18930        fi
18931      else
18932        # Otherwise we believe it is a complete path. Use it as it is.
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18934$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18936$as_echo_n "checking for CODESIGN... " >&6; }
18937        if test ! -x "$tool_specified"; then
18938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18939$as_echo "not found" >&6; }
18940          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18941        fi
18942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18943$as_echo "$tool_specified" >&6; }
18944      fi
18945    fi
18946  fi
18947
18948
18949    if test "x$CODESIGN" != "x"; then
18950      # Verify that the openjdk_codesign certificate is present
18951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18952$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18953      rm -f codesign-testfile
18954      touch codesign-testfile
18955      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18956      rm -f codesign-testfile
18957      if test "x$CODESIGN" = x; then
18958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18959$as_echo "no" >&6; }
18960      else
18961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18962$as_echo "yes" >&6; }
18963      fi
18964    fi
18965  fi
18966
18967
18968# Check if pkg-config is available.
18969
18970
18971if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18972	if test -n "$ac_tool_prefix"; then
18973  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18974set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18976$as_echo_n "checking for $ac_word... " >&6; }
18977if ${ac_cv_path_PKG_CONFIG+:} false; then :
18978  $as_echo_n "(cached) " >&6
18979else
18980  case $PKG_CONFIG in
18981  [\\/]* | ?:[\\/]*)
18982  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18983  ;;
18984  *)
18985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18986for as_dir in $PATH
18987do
18988  IFS=$as_save_IFS
18989  test -z "$as_dir" && as_dir=.
18990    for ac_exec_ext in '' $ac_executable_extensions; do
18991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18992    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18994    break 2
18995  fi
18996done
18997  done
18998IFS=$as_save_IFS
18999
19000  ;;
19001esac
19002fi
19003PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19004if test -n "$PKG_CONFIG"; then
19005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19006$as_echo "$PKG_CONFIG" >&6; }
19007else
19008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19009$as_echo "no" >&6; }
19010fi
19011
19012
19013fi
19014if test -z "$ac_cv_path_PKG_CONFIG"; then
19015  ac_pt_PKG_CONFIG=$PKG_CONFIG
19016  # Extract the first word of "pkg-config", so it can be a program name with args.
19017set dummy pkg-config; ac_word=$2
19018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19019$as_echo_n "checking for $ac_word... " >&6; }
19020if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19021  $as_echo_n "(cached) " >&6
19022else
19023  case $ac_pt_PKG_CONFIG in
19024  [\\/]* | ?:[\\/]*)
19025  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19026  ;;
19027  *)
19028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19029for as_dir in $PATH
19030do
19031  IFS=$as_save_IFS
19032  test -z "$as_dir" && as_dir=.
19033    for ac_exec_ext in '' $ac_executable_extensions; do
19034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19035    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19037    break 2
19038  fi
19039done
19040  done
19041IFS=$as_save_IFS
19042
19043  ;;
19044esac
19045fi
19046ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19047if test -n "$ac_pt_PKG_CONFIG"; then
19048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19049$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19050else
19051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19052$as_echo "no" >&6; }
19053fi
19054
19055  if test "x$ac_pt_PKG_CONFIG" = x; then
19056    PKG_CONFIG=""
19057  else
19058    case $cross_compiling:$ac_tool_warned in
19059yes:)
19060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19062ac_tool_warned=yes ;;
19063esac
19064    PKG_CONFIG=$ac_pt_PKG_CONFIG
19065  fi
19066else
19067  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19068fi
19069
19070fi
19071if test -n "$PKG_CONFIG"; then
19072	_pkg_min_version=0.9.0
19073	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19074$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19075	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19076		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19077$as_echo "yes" >&6; }
19078	else
19079		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19080$as_echo "no" >&6; }
19081		PKG_CONFIG=""
19082	fi
19083
19084fi
19085
19086# After basic tools have been setup, we can check build os specific details.
19087
19088  ###############################################################################
19089
19090  # Note that this is the build platform OS version!
19091
19092  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19093  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19094  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19095  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19096
19097
19098
19099
19100
19101# Setup builddeps, for automatic downloading of tools we need.
19102# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19103# boot-jdk setup, but we need to have basic tools setup first.
19104
19105
19106# Check whether --with-builddeps-conf was given.
19107if test "${with_builddeps_conf+set}" = set; then :
19108  withval=$with_builddeps_conf;
19109fi
19110
19111
19112
19113# Check whether --with-builddeps-server was given.
19114if test "${with_builddeps_server+set}" = set; then :
19115  withval=$with_builddeps_server;
19116fi
19117
19118
19119
19120# Check whether --with-builddeps-dir was given.
19121if test "${with_builddeps_dir+set}" = set; then :
19122  withval=$with_builddeps_dir;
19123else
19124  with_builddeps_dir=/localhome/builddeps
19125fi
19126
19127
19128
19129# Check whether --with-builddeps-group was given.
19130if test "${with_builddeps_group+set}" = set; then :
19131  withval=$with_builddeps_group;
19132fi
19133
19134
19135
19136
19137  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19138    if test "x$with_builddeps_conf" != x; then
19139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19140$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19141      builddepsfile=$with_builddeps_conf
19142      if test -s $builddepsfile; then
19143        . $builddepsfile
19144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19145$as_echo "loaded!" >&6; }
19146      else
19147        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19148      fi
19149    else
19150      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19151$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19152      builddepsfile=`mktemp`
19153      touch $builddepsfile
19154      # Put all found confs into a single file.
19155      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19156      # Source the file to acquire the variables
19157      if test -s $builddepsfile; then
19158        . $builddepsfile
19159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19160$as_echo "found at least one!" >&6; }
19161      else
19162        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19163      fi
19164    fi
19165    # Create build and target names that use _ instead of "-" and ".".
19166    # This is necessary to use them in variable names.
19167    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19168    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19169    # Extract rewrite information for build and target
19170    eval rewritten_build=\${REWRITE_${build_var}}
19171    if test "x$rewritten_build" = x; then
19172      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19173      echo Build stays the same $rewritten_build
19174    else
19175      echo Rewriting build for builddeps into $rewritten_build
19176    fi
19177    eval rewritten_target=\${REWRITE_${target_var}}
19178    if test "x$rewritten_target" = x; then
19179      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19180      echo Target stays the same $rewritten_target
19181    else
19182      echo Rewriting target for builddeps into $rewritten_target
19183    fi
19184    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19185    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19186  fi
19187  for ac_prog in 7z unzip
19188do
19189  # Extract the first word of "$ac_prog", so it can be a program name with args.
19190set dummy $ac_prog; ac_word=$2
19191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19192$as_echo_n "checking for $ac_word... " >&6; }
19193if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19194  $as_echo_n "(cached) " >&6
19195else
19196  if test -n "$BDEPS_UNZIP"; then
19197  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19198else
19199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19200for as_dir in $PATH
19201do
19202  IFS=$as_save_IFS
19203  test -z "$as_dir" && as_dir=.
19204    for ac_exec_ext in '' $ac_executable_extensions; do
19205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19206    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19208    break 2
19209  fi
19210done
19211  done
19212IFS=$as_save_IFS
19213
19214fi
19215fi
19216BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19217if test -n "$BDEPS_UNZIP"; then
19218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19219$as_echo "$BDEPS_UNZIP" >&6; }
19220else
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19222$as_echo "no" >&6; }
19223fi
19224
19225
19226  test -n "$BDEPS_UNZIP" && break
19227done
19228
19229  if test "x$BDEPS_UNZIP" = x7z; then
19230    BDEPS_UNZIP="7z x"
19231  fi
19232
19233  for ac_prog in wget lftp ftp
19234do
19235  # Extract the first word of "$ac_prog", so it can be a program name with args.
19236set dummy $ac_prog; ac_word=$2
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19238$as_echo_n "checking for $ac_word... " >&6; }
19239if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19240  $as_echo_n "(cached) " >&6
19241else
19242  if test -n "$BDEPS_FTP"; then
19243  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19244else
19245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19246for as_dir in $PATH
19247do
19248  IFS=$as_save_IFS
19249  test -z "$as_dir" && as_dir=.
19250    for ac_exec_ext in '' $ac_executable_extensions; do
19251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19252    ac_cv_prog_BDEPS_FTP="$ac_prog"
19253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19254    break 2
19255  fi
19256done
19257  done
19258IFS=$as_save_IFS
19259
19260fi
19261fi
19262BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19263if test -n "$BDEPS_FTP"; then
19264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19265$as_echo "$BDEPS_FTP" >&6; }
19266else
19267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19268$as_echo "no" >&6; }
19269fi
19270
19271
19272  test -n "$BDEPS_FTP" && break
19273done
19274
19275
19276
19277###############################################################################
19278#
19279# Determine OpenJDK variants, options and version numbers.
19280#
19281###############################################################################
19282
19283# We need build & target for this.
19284
19285
19286  ###############################################################################
19287  #
19288  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19289  # We always build headless support.
19290  #
19291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19292$as_echo_n "checking headful support... " >&6; }
19293  # Check whether --enable-headful was given.
19294if test "${enable_headful+set}" = set; then :
19295  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19296else
19297  SUPPORT_HEADFUL=yes
19298fi
19299
19300
19301  SUPPORT_HEADLESS=yes
19302  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19303
19304  if test "x$SUPPORT_HEADFUL" = xyes; then
19305    # We are building both headful and headless.
19306    headful_msg="include support for both headful and headless"
19307  fi
19308
19309  if test "x$SUPPORT_HEADFUL" = xno; then
19310    # Thus we are building headless only.
19311    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19312    headful_msg="headless only"
19313  fi
19314
19315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19316$as_echo "$headful_msg" >&6; }
19317
19318
19319
19320
19321
19322  # Control wether Hotspot runs Queens test after build.
19323  # Check whether --enable-hotspot-test-in-build was given.
19324if test "${enable_hotspot_test_in_build+set}" = set; then :
19325  enableval=$enable_hotspot_test_in_build;
19326else
19327  enable_hotspot_test_in_build=no
19328fi
19329
19330  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19331    TEST_IN_BUILD=true
19332  else
19333    TEST_IN_BUILD=false
19334  fi
19335
19336
19337  ###############################################################################
19338  #
19339  # Choose cacerts source file
19340  #
19341
19342# Check whether --with-cacerts-file was given.
19343if test "${with_cacerts_file+set}" = set; then :
19344  withval=$with_cacerts_file;
19345fi
19346
19347  if test "x$with_cacerts_file" != x; then
19348    CACERTS_FILE=$with_cacerts_file
19349  else
19350    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19351  fi
19352
19353
19354  ###############################################################################
19355  #
19356  # Enable or disable unlimited crypto
19357  #
19358  # Check whether --enable-unlimited-crypto was given.
19359if test "${enable_unlimited_crypto+set}" = set; then :
19360  enableval=$enable_unlimited_crypto;
19361else
19362  enable_unlimited_crypto=no
19363fi
19364
19365  if test "x$enable_unlimited_crypto" = "xyes"; then
19366    UNLIMITED_CRYPTO=true
19367  else
19368    UNLIMITED_CRYPTO=false
19369  fi
19370
19371
19372  ###############################################################################
19373  #
19374  # Enable or disable the elliptic curve crypto implementation
19375  #
19376
19377
19378  ###############################################################################
19379  #
19380  # --enable-rmiconnector-iiop
19381  #
19382  # Check whether --enable-rmiconnector-iiop was given.
19383if test "${enable_rmiconnector_iiop+set}" = set; then :
19384  enableval=$enable_rmiconnector_iiop;
19385fi
19386
19387  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19388    RMICONNECTOR_IIOP=true
19389  else
19390    RMICONNECTOR_IIOP=false
19391  fi
19392
19393
19394  ###############################################################################
19395  #
19396  # Compress jars
19397  #
19398  COMPRESS_JARS=false
19399
19400
19401
19402
19403  # Source the version numbers
19404  . $AUTOCONF_DIR/version-numbers
19405
19406  # Get the settings from parameters
19407
19408# Check whether --with-milestone was given.
19409if test "${with_milestone+set}" = set; then :
19410  withval=$with_milestone;
19411fi
19412
19413  if test "x$with_milestone" = xyes; then
19414    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19415  elif test "x$with_milestone" != x; then
19416    MILESTONE="$with_milestone"
19417  fi
19418  if test "x$MILESTONE" = x; then
19419    MILESTONE=internal
19420  fi
19421
19422
19423# Check whether --with-update-version was given.
19424if test "${with_update_version+set}" = set; then :
19425  withval=$with_update_version;
19426fi
19427
19428  if test "x$with_update_version" = xyes; then
19429    as_fn_error $? "Update version must have a value" "$LINENO" 5
19430  elif test "x$with_update_version" != x; then
19431    JDK_UPDATE_VERSION="$with_update_version"
19432    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19433    # to a bug in expr (which reduces it to just X). To work around this, we
19434    # always add a 0 to one digit update versions.
19435    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19436      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19437    fi
19438  fi
19439
19440
19441# Check whether --with-user-release-suffix was given.
19442if test "${with_user_release_suffix+set}" = set; then :
19443  withval=$with_user_release_suffix;
19444fi
19445
19446  if test "x$with_user_release_suffix" = xyes; then
19447    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19448  elif test "x$with_user_release_suffix" != x; then
19449    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19450  fi
19451
19452
19453# Check whether --with-build-number was given.
19454if test "${with_build_number+set}" = set; then :
19455  withval=$with_build_number;
19456fi
19457
19458  if test "x$with_build_number" = xyes; then
19459    as_fn_error $? "Build number must have a value" "$LINENO" 5
19460  elif test "x$with_build_number" != x; then
19461    JDK_BUILD_NUMBER="$with_build_number"
19462  fi
19463  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19464  if test "x$JDK_BUILD_NUMBER" = x; then
19465    JDK_BUILD_NUMBER=b00
19466    if test "x$USER_RELEASE_SUFFIX" = x; then
19467      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19468      # Avoid [:alnum:] since it depends on the locale.
19469      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19470      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19471    fi
19472  fi
19473
19474  # Now set the JDK version, milestone, build number etc.
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490  COPYRIGHT_YEAR=`date +'%Y'`
19491
19492
19493  if test "x$JDK_UPDATE_VERSION" != x; then
19494    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19495  else
19496    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19497  fi
19498
19499
19500  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19501
19502
19503
19504###############################################################################
19505#
19506# Setup BootJDK, used to bootstrap the build.
19507#
19508###############################################################################
19509
19510
19511  BOOT_JDK_FOUND=no
19512
19513# Check whether --with-boot-jdk was given.
19514if test "${with_boot_jdk+set}" = set; then :
19515  withval=$with_boot_jdk;
19516fi
19517
19518
19519  # We look for the Boot JDK through various means, going from more certain to
19520  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19521  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19522  # must check if this is indeed valid; otherwise we'll continue looking.
19523
19524  # Test: Is bootjdk explicitely set by command line arguments?
19525
19526  if test "x$BOOT_JDK_FOUND" = xno; then
19527    # Now execute the test
19528
19529  if test "x$with_boot_jdk" != x; then
19530    BOOT_JDK=$with_boot_jdk
19531    BOOT_JDK_FOUND=maybe
19532    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19533$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19534  fi
19535
19536
19537    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19538    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19539      # Do we have a bin/java?
19540      if test ! -x "$BOOT_JDK/bin/java"; then
19541        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19543        BOOT_JDK_FOUND=no
19544      else
19545        # Do we have a bin/javac?
19546        if test ! -x "$BOOT_JDK/bin/javac"; then
19547          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19549          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19550$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19551          BOOT_JDK_FOUND=no
19552        else
19553          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19554          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19555            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19557            BOOT_JDK_FOUND=no
19558          else
19559            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19561
19562            # Extra M4 quote needed to protect [] in grep expression.
19563            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19564            if test "x$FOUND_CORRECT_VERSION" = x; then
19565              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19567              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19568$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19569              BOOT_JDK_FOUND=no
19570            else
19571              # We're done! :-)
19572              BOOT_JDK_FOUND=yes
19573
19574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575
19576  # Input might be given as Windows format, start by converting to
19577  # unix format.
19578  path="$BOOT_JDK"
19579  new_path=`$CYGPATH -u "$path"`
19580
19581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19584  # "foo.exe" is OK but "foo" is an error.
19585  #
19586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19587  # It is also a way to make sure we got the proper file name for the real test later on.
19588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19589  if test "x$test_shortpath" = x; then
19590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19592    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19593  fi
19594
19595  # Call helper function which possibly converts this using DOS-style short mode.
19596  # If so, the updated path is stored in $new_path.
19597
19598  input_path="$new_path"
19599  # Check if we need to convert this using DOS-style short mode. If the path
19600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19601  # take no chances and rewrite it.
19602  # Note: m4 eats our [], so we need to use [ and ] instead.
19603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19604  if test "x$has_forbidden_chars" != x; then
19605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19609      # Going to short mode and back again did indeed matter. Since short mode is
19610      # case insensitive, let's make it lowercase to improve readability.
19611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19612      # Now convert it back to Unix-stile (cygpath)
19613      input_path=`$CYGPATH -u "$shortmode_path"`
19614      new_path="$input_path"
19615    fi
19616  fi
19617
19618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19619  if test "x$test_cygdrive_prefix" = x; then
19620    # As a simple fix, exclude /usr/bin since it's not a real path.
19621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19623      # a path prefixed by /cygdrive for fixpath to work.
19624      new_path="$CYGWIN_ROOT_PATH$input_path"
19625    fi
19626  fi
19627
19628
19629  if test "x$path" != "x$new_path"; then
19630    BOOT_JDK="$new_path"
19631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19633  fi
19634
19635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19636
19637  path="$BOOT_JDK"
19638  has_colon=`$ECHO $path | $GREP ^.:`
19639  new_path="$path"
19640  if test "x$has_colon" = x; then
19641    # Not in mixed or Windows style, start by that.
19642    new_path=`cmd //c echo $path`
19643  fi
19644
19645
19646  input_path="$new_path"
19647  # Check if we need to convert this using DOS-style short mode. If the path
19648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19649  # take no chances and rewrite it.
19650  # Note: m4 eats our [], so we need to use [ and ] instead.
19651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19652  if test "x$has_forbidden_chars" != x; then
19653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19655  fi
19656
19657
19658  windows_path="$new_path"
19659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19660    unix_path=`$CYGPATH -u "$windows_path"`
19661    new_path="$unix_path"
19662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19664    new_path="$unix_path"
19665  fi
19666
19667  if test "x$path" != "x$new_path"; then
19668    BOOT_JDK="$new_path"
19669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19671  fi
19672
19673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19675
19676  else
19677    # We're on a posix platform. Hooray! :)
19678    path="$BOOT_JDK"
19679    has_space=`$ECHO "$path" | $GREP " "`
19680    if test "x$has_space" != x; then
19681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19683      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19684    fi
19685
19686    # Use eval to expand a potential ~
19687    eval path="$path"
19688    if test ! -f "$path" && test ! -d "$path"; then
19689      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19690    fi
19691
19692    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19693  fi
19694
19695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19696$as_echo_n "checking for Boot JDK... " >&6; }
19697              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19698$as_echo "$BOOT_JDK" >&6; }
19699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19700$as_echo_n "checking Boot JDK version... " >&6; }
19701              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19703$as_echo "$BOOT_JDK_VERSION" >&6; }
19704            fi # end check jdk version
19705          fi # end check rt.jar
19706        fi # end check javac
19707      fi # end check java
19708    fi # end check boot jdk found
19709  fi
19710
19711  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19712    # Having specified an argument which is incorrect will produce an instant failure;
19713    # we should not go on looking
19714    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19715  fi
19716
19717  # Test: Is bootjdk available from builddeps?
19718
19719  if test "x$BOOT_JDK_FOUND" = xno; then
19720    # Now execute the test
19721
19722
19723
19724  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19725    # Source the builddeps file again, to make sure it uses the latest variables!
19726    . $builddepsfile
19727    # Look for a target and build machine specific resource!
19728    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19729    if test "x$resource" = x; then
19730      # Ok, lets instead look for a target specific resource
19731      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19732    fi
19733    if test "x$resource" = x; then
19734      # Ok, lets instead look for a build specific resource
19735      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19736    fi
19737    if test "x$resource" = x; then
19738      # Ok, lets instead look for a generic resource
19739      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19740      resource=${builddep_bootjdk}
19741    fi
19742    if test "x$resource" != x; then
19743      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19744$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19745      # If the resource in the builddeps.conf file is an existing directory,
19746      # for example /java/linux/cups
19747      if test -d ${resource}; then
19748        depdir=${resource}
19749      else
19750
19751  # bootjdk is for example mymodule
19752  # $resource is for example libs/general/libmymod_1_2_3.zip
19753  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19754  # $with_builddeps_dir is for example /localhome/builddeps
19755  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19756  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19757  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19758  filename=`basename $resource`
19759  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19760  filebase=${filename%%.*}
19761  extension=${filename#*.}
19762  installdir=$with_builddeps_dir/$filebase
19763  if test ! -f $installdir/$filename.unpacked; then
19764    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19765$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19766    if test ! -d $installdir; then
19767      mkdir -p $installdir
19768    fi
19769    if test ! -d $installdir; then
19770      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19771    fi
19772    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19773    touch $tmpfile
19774    if test ! -f $tmpfile; then
19775      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19776    fi
19777
19778  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19779  # $tmpfile is the local file name for the downloaded file.
19780  VALID_TOOL=no
19781  if test "x$BDEPS_FTP" = xwget; then
19782    VALID_TOOL=yes
19783    wget -O $tmpfile $with_builddeps_server/$resource
19784  fi
19785  if test "x$BDEPS_FTP" = xlftp; then
19786    VALID_TOOL=yes
19787    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19788  fi
19789  if test "x$BDEPS_FTP" = xftp; then
19790    VALID_TOOL=yes
19791    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19792    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19793    FTPUSERPWD=${FTPSERVER%%@*}
19794    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19795      FTPUSER=${userpwd%%:*}
19796      FTPPWD=${userpwd#*@}
19797      FTPSERVER=${FTPSERVER#*@}
19798    else
19799      FTPUSER=ftp
19800      FTPPWD=ftp
19801    fi
19802    # the "pass" command does not work on some
19803    # ftp clients (read ftp.exe) but if it works,
19804    # passive mode is better!
19805    ( \
19806        echo "user $FTPUSER $FTPPWD"        ; \
19807        echo "pass"                         ; \
19808        echo "bin"                          ; \
19809        echo "get $FTPPATH $tmpfile"              ; \
19810    ) | ftp -in $FTPSERVER
19811  fi
19812  if test "x$VALID_TOOL" != xyes; then
19813    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19814  fi
19815
19816    mv $tmpfile $installdir/$filename
19817    if test ! -s $installdir/$filename; then
19818      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19819    fi
19820    case "$extension" in
19821      zip)  echo "Unzipping $installdir/$filename..."
19822        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19823        ;;
19824      tar.gz) echo "Untaring $installdir/$filename..."
19825        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19826        ;;
19827      tgz) echo "Untaring $installdir/$filename..."
19828        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19829        ;;
19830      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19831        ;;
19832    esac
19833  fi
19834  if test -f $installdir/$filename.unpacked; then
19835    depdir=$installdir
19836  fi
19837
19838      fi
19839      # Source the builddeps file again, because in the previous command, the depdir
19840      # was updated to point at the current build dependency install directory.
19841      . $builddepsfile
19842      # Now extract variables from the builddeps.conf files.
19843      theroot=${builddep_bootjdk_ROOT}
19844      thecflags=${builddep_bootjdk_CFLAGS}
19845      thelibs=${builddep_bootjdk_LIBS}
19846      if test "x$depdir" = x; then
19847        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19848      fi
19849      BOOT_JDK=$depdir
19850      if test "x$theroot" != x; then
19851        BOOT_JDK="$theroot"
19852      fi
19853      if test "x$thecflags" != x; then
19854        BOOT_JDK_CFLAGS="$thecflags"
19855      fi
19856      if test "x$thelibs" != x; then
19857        BOOT_JDK_LIBS="$thelibs"
19858      fi
19859      BOOT_JDK_FOUND=maybe
19860      else BOOT_JDK_FOUND=no
19861
19862    fi
19863    else BOOT_JDK_FOUND=no
19864
19865  fi
19866
19867
19868
19869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19871      # Do we have a bin/java?
19872      if test ! -x "$BOOT_JDK/bin/java"; then
19873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19875        BOOT_JDK_FOUND=no
19876      else
19877        # Do we have a bin/javac?
19878        if test ! -x "$BOOT_JDK/bin/javac"; then
19879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19883          BOOT_JDK_FOUND=no
19884        else
19885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19889            BOOT_JDK_FOUND=no
19890          else
19891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19893
19894            # Extra M4 quote needed to protect [] in grep expression.
19895            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19896            if test "x$FOUND_CORRECT_VERSION" = x; then
19897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19900$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19901              BOOT_JDK_FOUND=no
19902            else
19903              # We're done! :-)
19904              BOOT_JDK_FOUND=yes
19905
19906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19907
19908  # Input might be given as Windows format, start by converting to
19909  # unix format.
19910  path="$BOOT_JDK"
19911  new_path=`$CYGPATH -u "$path"`
19912
19913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19916  # "foo.exe" is OK but "foo" is an error.
19917  #
19918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19919  # It is also a way to make sure we got the proper file name for the real test later on.
19920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19921  if test "x$test_shortpath" = x; then
19922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19925  fi
19926
19927  # Call helper function which possibly converts this using DOS-style short mode.
19928  # If so, the updated path is stored in $new_path.
19929
19930  input_path="$new_path"
19931  # Check if we need to convert this using DOS-style short mode. If the path
19932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19933  # take no chances and rewrite it.
19934  # Note: m4 eats our [], so we need to use [ and ] instead.
19935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19936  if test "x$has_forbidden_chars" != x; then
19937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19941      # Going to short mode and back again did indeed matter. Since short mode is
19942      # case insensitive, let's make it lowercase to improve readability.
19943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19944      # Now convert it back to Unix-stile (cygpath)
19945      input_path=`$CYGPATH -u "$shortmode_path"`
19946      new_path="$input_path"
19947    fi
19948  fi
19949
19950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19951  if test "x$test_cygdrive_prefix" = x; then
19952    # As a simple fix, exclude /usr/bin since it's not a real path.
19953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19955      # a path prefixed by /cygdrive for fixpath to work.
19956      new_path="$CYGWIN_ROOT_PATH$input_path"
19957    fi
19958  fi
19959
19960
19961  if test "x$path" != "x$new_path"; then
19962    BOOT_JDK="$new_path"
19963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19965  fi
19966
19967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968
19969  path="$BOOT_JDK"
19970  has_colon=`$ECHO $path | $GREP ^.:`
19971  new_path="$path"
19972  if test "x$has_colon" = x; then
19973    # Not in mixed or Windows style, start by that.
19974    new_path=`cmd //c echo $path`
19975  fi
19976
19977
19978  input_path="$new_path"
19979  # Check if we need to convert this using DOS-style short mode. If the path
19980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19981  # take no chances and rewrite it.
19982  # Note: m4 eats our [], so we need to use [ and ] instead.
19983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19984  if test "x$has_forbidden_chars" != x; then
19985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19987  fi
19988
19989
19990  windows_path="$new_path"
19991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19992    unix_path=`$CYGPATH -u "$windows_path"`
19993    new_path="$unix_path"
19994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19996    new_path="$unix_path"
19997  fi
19998
19999  if test "x$path" != "x$new_path"; then
20000    BOOT_JDK="$new_path"
20001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20003  fi
20004
20005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20007
20008  else
20009    # We're on a posix platform. Hooray! :)
20010    path="$BOOT_JDK"
20011    has_space=`$ECHO "$path" | $GREP " "`
20012    if test "x$has_space" != x; then
20013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20016    fi
20017
20018    # Use eval to expand a potential ~
20019    eval path="$path"
20020    if test ! -f "$path" && test ! -d "$path"; then
20021      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20022    fi
20023
20024    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20025  fi
20026
20027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20028$as_echo_n "checking for Boot JDK... " >&6; }
20029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20030$as_echo "$BOOT_JDK" >&6; }
20031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20032$as_echo_n "checking Boot JDK version... " >&6; }
20033              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20035$as_echo "$BOOT_JDK_VERSION" >&6; }
20036            fi # end check jdk version
20037          fi # end check rt.jar
20038        fi # end check javac
20039      fi # end check java
20040    fi # end check boot jdk found
20041  fi
20042
20043
20044  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20045
20046  if test "x$BOOT_JDK_FOUND" = xno; then
20047    # Now execute the test
20048
20049  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20050    # First check at user selected default
20051
20052  if test "x$BOOT_JDK_FOUND" = xno; then
20053    # Now execute the test
20054
20055  if test -x /usr/libexec/java_home; then
20056    BOOT_JDK=`/usr/libexec/java_home `
20057    BOOT_JDK_FOUND=maybe
20058    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20059$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20060  fi
20061
20062
20063    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20064    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20065      # Do we have a bin/java?
20066      if test ! -x "$BOOT_JDK/bin/java"; then
20067        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20069        BOOT_JDK_FOUND=no
20070      else
20071        # Do we have a bin/javac?
20072        if test ! -x "$BOOT_JDK/bin/javac"; then
20073          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20075          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20076$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20077          BOOT_JDK_FOUND=no
20078        else
20079          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20080          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20081            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20083            BOOT_JDK_FOUND=no
20084          else
20085            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20086            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20087
20088            # Extra M4 quote needed to protect [] in grep expression.
20089            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20090            if test "x$FOUND_CORRECT_VERSION" = x; then
20091              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20093              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20094$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20095              BOOT_JDK_FOUND=no
20096            else
20097              # We're done! :-)
20098              BOOT_JDK_FOUND=yes
20099
20100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101
20102  # Input might be given as Windows format, start by converting to
20103  # unix format.
20104  path="$BOOT_JDK"
20105  new_path=`$CYGPATH -u "$path"`
20106
20107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20110  # "foo.exe" is OK but "foo" is an error.
20111  #
20112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20113  # It is also a way to make sure we got the proper file name for the real test later on.
20114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20115  if test "x$test_shortpath" = x; then
20116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20119  fi
20120
20121  # Call helper function which possibly converts this using DOS-style short mode.
20122  # If so, the updated path is stored in $new_path.
20123
20124  input_path="$new_path"
20125  # Check if we need to convert this using DOS-style short mode. If the path
20126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20127  # take no chances and rewrite it.
20128  # Note: m4 eats our [], so we need to use [ and ] instead.
20129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20130  if test "x$has_forbidden_chars" != x; then
20131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20135      # Going to short mode and back again did indeed matter. Since short mode is
20136      # case insensitive, let's make it lowercase to improve readability.
20137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20138      # Now convert it back to Unix-stile (cygpath)
20139      input_path=`$CYGPATH -u "$shortmode_path"`
20140      new_path="$input_path"
20141    fi
20142  fi
20143
20144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20145  if test "x$test_cygdrive_prefix" = x; then
20146    # As a simple fix, exclude /usr/bin since it's not a real path.
20147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20149      # a path prefixed by /cygdrive for fixpath to work.
20150      new_path="$CYGWIN_ROOT_PATH$input_path"
20151    fi
20152  fi
20153
20154
20155  if test "x$path" != "x$new_path"; then
20156    BOOT_JDK="$new_path"
20157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20159  fi
20160
20161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162
20163  path="$BOOT_JDK"
20164  has_colon=`$ECHO $path | $GREP ^.:`
20165  new_path="$path"
20166  if test "x$has_colon" = x; then
20167    # Not in mixed or Windows style, start by that.
20168    new_path=`cmd //c echo $path`
20169  fi
20170
20171
20172  input_path="$new_path"
20173  # Check if we need to convert this using DOS-style short mode. If the path
20174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20175  # take no chances and rewrite it.
20176  # Note: m4 eats our [], so we need to use [ and ] instead.
20177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20178  if test "x$has_forbidden_chars" != x; then
20179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20181  fi
20182
20183
20184  windows_path="$new_path"
20185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20186    unix_path=`$CYGPATH -u "$windows_path"`
20187    new_path="$unix_path"
20188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20190    new_path="$unix_path"
20191  fi
20192
20193  if test "x$path" != "x$new_path"; then
20194    BOOT_JDK="$new_path"
20195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20197  fi
20198
20199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20201
20202  else
20203    # We're on a posix platform. Hooray! :)
20204    path="$BOOT_JDK"
20205    has_space=`$ECHO "$path" | $GREP " "`
20206    if test "x$has_space" != x; then
20207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20209      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20210    fi
20211
20212    # Use eval to expand a potential ~
20213    eval path="$path"
20214    if test ! -f "$path" && test ! -d "$path"; then
20215      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20216    fi
20217
20218    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20219  fi
20220
20221              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20222$as_echo_n "checking for Boot JDK... " >&6; }
20223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20224$as_echo "$BOOT_JDK" >&6; }
20225              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20226$as_echo_n "checking Boot JDK version... " >&6; }
20227              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20228              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20229$as_echo "$BOOT_JDK_VERSION" >&6; }
20230            fi # end check jdk version
20231          fi # end check rt.jar
20232        fi # end check javac
20233      fi # end check java
20234    fi # end check boot jdk found
20235  fi
20236
20237    # If that did not work out (e.g. too old), try explicit versions instead
20238
20239  if test "x$BOOT_JDK_FOUND" = xno; then
20240    # Now execute the test
20241
20242  if test -x /usr/libexec/java_home; then
20243    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20244    BOOT_JDK_FOUND=maybe
20245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20246$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20247  fi
20248
20249
20250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20252      # Do we have a bin/java?
20253      if test ! -x "$BOOT_JDK/bin/java"; then
20254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20256        BOOT_JDK_FOUND=no
20257      else
20258        # Do we have a bin/javac?
20259        if test ! -x "$BOOT_JDK/bin/javac"; then
20260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20264          BOOT_JDK_FOUND=no
20265        else
20266          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20267          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20270            BOOT_JDK_FOUND=no
20271          else
20272            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20274
20275            # Extra M4 quote needed to protect [] in grep expression.
20276            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20277            if test "x$FOUND_CORRECT_VERSION" = x; then
20278              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20280              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20281$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20282              BOOT_JDK_FOUND=no
20283            else
20284              # We're done! :-)
20285              BOOT_JDK_FOUND=yes
20286
20287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20288
20289  # Input might be given as Windows format, start by converting to
20290  # unix format.
20291  path="$BOOT_JDK"
20292  new_path=`$CYGPATH -u "$path"`
20293
20294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20297  # "foo.exe" is OK but "foo" is an error.
20298  #
20299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20300  # It is also a way to make sure we got the proper file name for the real test later on.
20301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20302  if test "x$test_shortpath" = x; then
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20306  fi
20307
20308  # Call helper function which possibly converts this using DOS-style short mode.
20309  # If so, the updated path is stored in $new_path.
20310
20311  input_path="$new_path"
20312  # Check if we need to convert this using DOS-style short mode. If the path
20313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20314  # take no chances and rewrite it.
20315  # Note: m4 eats our [], so we need to use [ and ] instead.
20316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20317  if test "x$has_forbidden_chars" != x; then
20318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20322      # Going to short mode and back again did indeed matter. Since short mode is
20323      # case insensitive, let's make it lowercase to improve readability.
20324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20325      # Now convert it back to Unix-stile (cygpath)
20326      input_path=`$CYGPATH -u "$shortmode_path"`
20327      new_path="$input_path"
20328    fi
20329  fi
20330
20331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20332  if test "x$test_cygdrive_prefix" = x; then
20333    # As a simple fix, exclude /usr/bin since it's not a real path.
20334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20336      # a path prefixed by /cygdrive for fixpath to work.
20337      new_path="$CYGWIN_ROOT_PATH$input_path"
20338    fi
20339  fi
20340
20341
20342  if test "x$path" != "x$new_path"; then
20343    BOOT_JDK="$new_path"
20344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20346  fi
20347
20348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20349
20350  path="$BOOT_JDK"
20351  has_colon=`$ECHO $path | $GREP ^.:`
20352  new_path="$path"
20353  if test "x$has_colon" = x; then
20354    # Not in mixed or Windows style, start by that.
20355    new_path=`cmd //c echo $path`
20356  fi
20357
20358
20359  input_path="$new_path"
20360  # Check if we need to convert this using DOS-style short mode. If the path
20361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20362  # take no chances and rewrite it.
20363  # Note: m4 eats our [], so we need to use [ and ] instead.
20364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20365  if test "x$has_forbidden_chars" != x; then
20366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20368  fi
20369
20370
20371  windows_path="$new_path"
20372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20373    unix_path=`$CYGPATH -u "$windows_path"`
20374    new_path="$unix_path"
20375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20377    new_path="$unix_path"
20378  fi
20379
20380  if test "x$path" != "x$new_path"; then
20381    BOOT_JDK="$new_path"
20382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20384  fi
20385
20386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20388
20389  else
20390    # We're on a posix platform. Hooray! :)
20391    path="$BOOT_JDK"
20392    has_space=`$ECHO "$path" | $GREP " "`
20393    if test "x$has_space" != x; then
20394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20396      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20397    fi
20398
20399    # Use eval to expand a potential ~
20400    eval path="$path"
20401    if test ! -f "$path" && test ! -d "$path"; then
20402      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20403    fi
20404
20405    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20406  fi
20407
20408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20409$as_echo_n "checking for Boot JDK... " >&6; }
20410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20411$as_echo "$BOOT_JDK" >&6; }
20412              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20413$as_echo_n "checking Boot JDK version... " >&6; }
20414              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20416$as_echo "$BOOT_JDK_VERSION" >&6; }
20417            fi # end check jdk version
20418          fi # end check rt.jar
20419        fi # end check javac
20420      fi # end check java
20421    fi # end check boot jdk found
20422  fi
20423
20424
20425  if test "x$BOOT_JDK_FOUND" = xno; then
20426    # Now execute the test
20427
20428  if test -x /usr/libexec/java_home; then
20429    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20430    BOOT_JDK_FOUND=maybe
20431    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20432$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20433  fi
20434
20435
20436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20438      # Do we have a bin/java?
20439      if test ! -x "$BOOT_JDK/bin/java"; then
20440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20442        BOOT_JDK_FOUND=no
20443      else
20444        # Do we have a bin/javac?
20445        if test ! -x "$BOOT_JDK/bin/javac"; then
20446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20450          BOOT_JDK_FOUND=no
20451        else
20452          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20453          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20456            BOOT_JDK_FOUND=no
20457          else
20458            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20459            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20460
20461            # Extra M4 quote needed to protect [] in grep expression.
20462            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20463            if test "x$FOUND_CORRECT_VERSION" = x; then
20464              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20466              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20467$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20468              BOOT_JDK_FOUND=no
20469            else
20470              # We're done! :-)
20471              BOOT_JDK_FOUND=yes
20472
20473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20474
20475  # Input might be given as Windows format, start by converting to
20476  # unix format.
20477  path="$BOOT_JDK"
20478  new_path=`$CYGPATH -u "$path"`
20479
20480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20483  # "foo.exe" is OK but "foo" is an error.
20484  #
20485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20486  # It is also a way to make sure we got the proper file name for the real test later on.
20487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20488  if test "x$test_shortpath" = x; then
20489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20492  fi
20493
20494  # Call helper function which possibly converts this using DOS-style short mode.
20495  # If so, the updated path is stored in $new_path.
20496
20497  input_path="$new_path"
20498  # Check if we need to convert this using DOS-style short mode. If the path
20499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20500  # take no chances and rewrite it.
20501  # Note: m4 eats our [], so we need to use [ and ] instead.
20502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20503  if test "x$has_forbidden_chars" != x; then
20504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20508      # Going to short mode and back again did indeed matter. Since short mode is
20509      # case insensitive, let's make it lowercase to improve readability.
20510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20511      # Now convert it back to Unix-stile (cygpath)
20512      input_path=`$CYGPATH -u "$shortmode_path"`
20513      new_path="$input_path"
20514    fi
20515  fi
20516
20517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20518  if test "x$test_cygdrive_prefix" = x; then
20519    # As a simple fix, exclude /usr/bin since it's not a real path.
20520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20522      # a path prefixed by /cygdrive for fixpath to work.
20523      new_path="$CYGWIN_ROOT_PATH$input_path"
20524    fi
20525  fi
20526
20527
20528  if test "x$path" != "x$new_path"; then
20529    BOOT_JDK="$new_path"
20530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20532  fi
20533
20534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20535
20536  path="$BOOT_JDK"
20537  has_colon=`$ECHO $path | $GREP ^.:`
20538  new_path="$path"
20539  if test "x$has_colon" = x; then
20540    # Not in mixed or Windows style, start by that.
20541    new_path=`cmd //c echo $path`
20542  fi
20543
20544
20545  input_path="$new_path"
20546  # Check if we need to convert this using DOS-style short mode. If the path
20547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20548  # take no chances and rewrite it.
20549  # Note: m4 eats our [], so we need to use [ and ] instead.
20550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20551  if test "x$has_forbidden_chars" != x; then
20552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20554  fi
20555
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566  if test "x$path" != "x$new_path"; then
20567    BOOT_JDK="$new_path"
20568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20570  fi
20571
20572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20574
20575  else
20576    # We're on a posix platform. Hooray! :)
20577    path="$BOOT_JDK"
20578    has_space=`$ECHO "$path" | $GREP " "`
20579    if test "x$has_space" != x; then
20580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20583    fi
20584
20585    # Use eval to expand a potential ~
20586    eval path="$path"
20587    if test ! -f "$path" && test ! -d "$path"; then
20588      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20589    fi
20590
20591    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20592  fi
20593
20594              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20595$as_echo_n "checking for Boot JDK... " >&6; }
20596              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20597$as_echo "$BOOT_JDK" >&6; }
20598              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20599$as_echo_n "checking Boot JDK version... " >&6; }
20600              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20602$as_echo "$BOOT_JDK_VERSION" >&6; }
20603            fi # end check jdk version
20604          fi # end check rt.jar
20605        fi # end check javac
20606      fi # end check java
20607    fi # end check boot jdk found
20608  fi
20609
20610
20611  if test "x$BOOT_JDK_FOUND" = xno; then
20612    # Now execute the test
20613
20614  if test -x /usr/libexec/java_home; then
20615    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20616    BOOT_JDK_FOUND=maybe
20617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20618$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20619  fi
20620
20621
20622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20624      # Do we have a bin/java?
20625      if test ! -x "$BOOT_JDK/bin/java"; then
20626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20628        BOOT_JDK_FOUND=no
20629      else
20630        # Do we have a bin/javac?
20631        if test ! -x "$BOOT_JDK/bin/javac"; then
20632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20636          BOOT_JDK_FOUND=no
20637        else
20638          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20639          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20642            BOOT_JDK_FOUND=no
20643          else
20644            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20646
20647            # Extra M4 quote needed to protect [] in grep expression.
20648            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20649            if test "x$FOUND_CORRECT_VERSION" = x; then
20650              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20652              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20653$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20654              BOOT_JDK_FOUND=no
20655            else
20656              # We're done! :-)
20657              BOOT_JDK_FOUND=yes
20658
20659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20660
20661  # Input might be given as Windows format, start by converting to
20662  # unix format.
20663  path="$BOOT_JDK"
20664  new_path=`$CYGPATH -u "$path"`
20665
20666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20669  # "foo.exe" is OK but "foo" is an error.
20670  #
20671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20672  # It is also a way to make sure we got the proper file name for the real test later on.
20673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20674  if test "x$test_shortpath" = x; then
20675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20677    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20678  fi
20679
20680  # Call helper function which possibly converts this using DOS-style short mode.
20681  # If so, the updated path is stored in $new_path.
20682
20683  input_path="$new_path"
20684  # Check if we need to convert this using DOS-style short mode. If the path
20685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20686  # take no chances and rewrite it.
20687  # Note: m4 eats our [], so we need to use [ and ] instead.
20688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20689  if test "x$has_forbidden_chars" != x; then
20690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20694      # Going to short mode and back again did indeed matter. Since short mode is
20695      # case insensitive, let's make it lowercase to improve readability.
20696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20697      # Now convert it back to Unix-stile (cygpath)
20698      input_path=`$CYGPATH -u "$shortmode_path"`
20699      new_path="$input_path"
20700    fi
20701  fi
20702
20703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20704  if test "x$test_cygdrive_prefix" = x; then
20705    # As a simple fix, exclude /usr/bin since it's not a real path.
20706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20708      # a path prefixed by /cygdrive for fixpath to work.
20709      new_path="$CYGWIN_ROOT_PATH$input_path"
20710    fi
20711  fi
20712
20713
20714  if test "x$path" != "x$new_path"; then
20715    BOOT_JDK="$new_path"
20716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20717$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20718  fi
20719
20720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20721
20722  path="$BOOT_JDK"
20723  has_colon=`$ECHO $path | $GREP ^.:`
20724  new_path="$path"
20725  if test "x$has_colon" = x; then
20726    # Not in mixed or Windows style, start by that.
20727    new_path=`cmd //c echo $path`
20728  fi
20729
20730
20731  input_path="$new_path"
20732  # Check if we need to convert this using DOS-style short mode. If the path
20733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20734  # take no chances and rewrite it.
20735  # Note: m4 eats our [], so we need to use [ and ] instead.
20736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20737  if test "x$has_forbidden_chars" != x; then
20738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20740  fi
20741
20742
20743  windows_path="$new_path"
20744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20745    unix_path=`$CYGPATH -u "$windows_path"`
20746    new_path="$unix_path"
20747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20749    new_path="$unix_path"
20750  fi
20751
20752  if test "x$path" != "x$new_path"; then
20753    BOOT_JDK="$new_path"
20754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20756  fi
20757
20758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20760
20761  else
20762    # We're on a posix platform. Hooray! :)
20763    path="$BOOT_JDK"
20764    has_space=`$ECHO "$path" | $GREP " "`
20765    if test "x$has_space" != x; then
20766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20768      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20769    fi
20770
20771    # Use eval to expand a potential ~
20772    eval path="$path"
20773    if test ! -f "$path" && test ! -d "$path"; then
20774      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20775    fi
20776
20777    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20778  fi
20779
20780              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20781$as_echo_n "checking for Boot JDK... " >&6; }
20782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20783$as_echo "$BOOT_JDK" >&6; }
20784              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20785$as_echo_n "checking Boot JDK version... " >&6; }
20786              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20787              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20788$as_echo "$BOOT_JDK_VERSION" >&6; }
20789            fi # end check jdk version
20790          fi # end check rt.jar
20791        fi # end check javac
20792      fi # end check java
20793    fi # end check boot jdk found
20794  fi
20795
20796  fi
20797
20798
20799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20801      # Do we have a bin/java?
20802      if test ! -x "$BOOT_JDK/bin/java"; then
20803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20805        BOOT_JDK_FOUND=no
20806      else
20807        # Do we have a bin/javac?
20808        if test ! -x "$BOOT_JDK/bin/javac"; then
20809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20813          BOOT_JDK_FOUND=no
20814        else
20815          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20816          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20819            BOOT_JDK_FOUND=no
20820          else
20821            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20823
20824            # Extra M4 quote needed to protect [] in grep expression.
20825            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20826            if test "x$FOUND_CORRECT_VERSION" = x; then
20827              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20829              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20830$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20831              BOOT_JDK_FOUND=no
20832            else
20833              # We're done! :-)
20834              BOOT_JDK_FOUND=yes
20835
20836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20837
20838  # Input might be given as Windows format, start by converting to
20839  # unix format.
20840  path="$BOOT_JDK"
20841  new_path=`$CYGPATH -u "$path"`
20842
20843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20846  # "foo.exe" is OK but "foo" is an error.
20847  #
20848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20849  # It is also a way to make sure we got the proper file name for the real test later on.
20850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20851  if test "x$test_shortpath" = x; then
20852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20855  fi
20856
20857  # Call helper function which possibly converts this using DOS-style short mode.
20858  # If so, the updated path is stored in $new_path.
20859
20860  input_path="$new_path"
20861  # Check if we need to convert this using DOS-style short mode. If the path
20862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20863  # take no chances and rewrite it.
20864  # Note: m4 eats our [], so we need to use [ and ] instead.
20865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20866  if test "x$has_forbidden_chars" != x; then
20867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20871      # Going to short mode and back again did indeed matter. Since short mode is
20872      # case insensitive, let's make it lowercase to improve readability.
20873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20874      # Now convert it back to Unix-stile (cygpath)
20875      input_path=`$CYGPATH -u "$shortmode_path"`
20876      new_path="$input_path"
20877    fi
20878  fi
20879
20880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20881  if test "x$test_cygdrive_prefix" = x; then
20882    # As a simple fix, exclude /usr/bin since it's not a real path.
20883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20885      # a path prefixed by /cygdrive for fixpath to work.
20886      new_path="$CYGWIN_ROOT_PATH$input_path"
20887    fi
20888  fi
20889
20890
20891  if test "x$path" != "x$new_path"; then
20892    BOOT_JDK="$new_path"
20893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20895  fi
20896
20897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898
20899  path="$BOOT_JDK"
20900  has_colon=`$ECHO $path | $GREP ^.:`
20901  new_path="$path"
20902  if test "x$has_colon" = x; then
20903    # Not in mixed or Windows style, start by that.
20904    new_path=`cmd //c echo $path`
20905  fi
20906
20907
20908  input_path="$new_path"
20909  # Check if we need to convert this using DOS-style short mode. If the path
20910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20911  # take no chances and rewrite it.
20912  # Note: m4 eats our [], so we need to use [ and ] instead.
20913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20914  if test "x$has_forbidden_chars" != x; then
20915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20917  fi
20918
20919
20920  windows_path="$new_path"
20921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20922    unix_path=`$CYGPATH -u "$windows_path"`
20923    new_path="$unix_path"
20924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20926    new_path="$unix_path"
20927  fi
20928
20929  if test "x$path" != "x$new_path"; then
20930    BOOT_JDK="$new_path"
20931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20933  fi
20934
20935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20937
20938  else
20939    # We're on a posix platform. Hooray! :)
20940    path="$BOOT_JDK"
20941    has_space=`$ECHO "$path" | $GREP " "`
20942    if test "x$has_space" != x; then
20943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20946    fi
20947
20948    # Use eval to expand a potential ~
20949    eval path="$path"
20950    if test ! -f "$path" && test ! -d "$path"; then
20951      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20952    fi
20953
20954    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20955  fi
20956
20957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20958$as_echo_n "checking for Boot JDK... " >&6; }
20959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20960$as_echo "$BOOT_JDK" >&6; }
20961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20962$as_echo_n "checking Boot JDK version... " >&6; }
20963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20965$as_echo "$BOOT_JDK_VERSION" >&6; }
20966            fi # end check jdk version
20967          fi # end check rt.jar
20968        fi # end check javac
20969      fi # end check java
20970    fi # end check boot jdk found
20971  fi
20972
20973
20974  # Test: Is $JAVA_HOME set?
20975
20976  if test "x$BOOT_JDK_FOUND" = xno; then
20977    # Now execute the test
20978
20979  if test "x$JAVA_HOME" != x; then
20980    JAVA_HOME_PROCESSED="$JAVA_HOME"
20981
20982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20983
20984  # Input might be given as Windows format, start by converting to
20985  # unix format.
20986  path="$JAVA_HOME_PROCESSED"
20987  new_path=`$CYGPATH -u "$path"`
20988
20989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20992  # "foo.exe" is OK but "foo" is an error.
20993  #
20994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20995  # It is also a way to make sure we got the proper file name for the real test later on.
20996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20997  if test "x$test_shortpath" = x; then
20998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20999$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21000    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21001  fi
21002
21003  # Call helper function which possibly converts this using DOS-style short mode.
21004  # If so, the updated path is stored in $new_path.
21005
21006  input_path="$new_path"
21007  # Check if we need to convert this using DOS-style short mode. If the path
21008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21009  # take no chances and rewrite it.
21010  # Note: m4 eats our [], so we need to use [ and ] instead.
21011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21012  if test "x$has_forbidden_chars" != x; then
21013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21017      # Going to short mode and back again did indeed matter. Since short mode is
21018      # case insensitive, let's make it lowercase to improve readability.
21019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21020      # Now convert it back to Unix-stile (cygpath)
21021      input_path=`$CYGPATH -u "$shortmode_path"`
21022      new_path="$input_path"
21023    fi
21024  fi
21025
21026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21027  if test "x$test_cygdrive_prefix" = x; then
21028    # As a simple fix, exclude /usr/bin since it's not a real path.
21029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21031      # a path prefixed by /cygdrive for fixpath to work.
21032      new_path="$CYGWIN_ROOT_PATH$input_path"
21033    fi
21034  fi
21035
21036
21037  if test "x$path" != "x$new_path"; then
21038    JAVA_HOME_PROCESSED="$new_path"
21039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21040$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21041  fi
21042
21043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21044
21045  path="$JAVA_HOME_PROCESSED"
21046  has_colon=`$ECHO $path | $GREP ^.:`
21047  new_path="$path"
21048  if test "x$has_colon" = x; then
21049    # Not in mixed or Windows style, start by that.
21050    new_path=`cmd //c echo $path`
21051  fi
21052
21053
21054  input_path="$new_path"
21055  # Check if we need to convert this using DOS-style short mode. If the path
21056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21057  # take no chances and rewrite it.
21058  # Note: m4 eats our [], so we need to use [ and ] instead.
21059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21060  if test "x$has_forbidden_chars" != x; then
21061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21063  fi
21064
21065
21066  windows_path="$new_path"
21067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21068    unix_path=`$CYGPATH -u "$windows_path"`
21069    new_path="$unix_path"
21070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21072    new_path="$unix_path"
21073  fi
21074
21075  if test "x$path" != "x$new_path"; then
21076    JAVA_HOME_PROCESSED="$new_path"
21077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21078$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21079  fi
21080
21081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21083
21084  else
21085    # We're on a posix platform. Hooray! :)
21086    path="$JAVA_HOME_PROCESSED"
21087    has_space=`$ECHO "$path" | $GREP " "`
21088    if test "x$has_space" != x; then
21089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21090$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21092    fi
21093
21094    # Use eval to expand a potential ~
21095    eval path="$path"
21096    if test ! -f "$path" && test ! -d "$path"; then
21097      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21098    fi
21099
21100    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21101  fi
21102
21103    if test ! -d "$JAVA_HOME_PROCESSED"; then
21104      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21105$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21106    else
21107      # Aha, the user has set a JAVA_HOME
21108      # let us use that as the Boot JDK.
21109      BOOT_JDK="$JAVA_HOME_PROCESSED"
21110      BOOT_JDK_FOUND=maybe
21111      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21112$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21113    fi
21114  fi
21115
21116
21117    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21118    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21119      # Do we have a bin/java?
21120      if test ! -x "$BOOT_JDK/bin/java"; then
21121        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21123        BOOT_JDK_FOUND=no
21124      else
21125        # Do we have a bin/javac?
21126        if test ! -x "$BOOT_JDK/bin/javac"; then
21127          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21129          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21130$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21131          BOOT_JDK_FOUND=no
21132        else
21133          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21134          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21135            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21137            BOOT_JDK_FOUND=no
21138          else
21139            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21140            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21141
21142            # Extra M4 quote needed to protect [] in grep expression.
21143            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21144            if test "x$FOUND_CORRECT_VERSION" = x; then
21145              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21147              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21148$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21149              BOOT_JDK_FOUND=no
21150            else
21151              # We're done! :-)
21152              BOOT_JDK_FOUND=yes
21153
21154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21155
21156  # Input might be given as Windows format, start by converting to
21157  # unix format.
21158  path="$BOOT_JDK"
21159  new_path=`$CYGPATH -u "$path"`
21160
21161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21164  # "foo.exe" is OK but "foo" is an error.
21165  #
21166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21167  # It is also a way to make sure we got the proper file name for the real test later on.
21168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21169  if test "x$test_shortpath" = x; then
21170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21172    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21173  fi
21174
21175  # Call helper function which possibly converts this using DOS-style short mode.
21176  # If so, the updated path is stored in $new_path.
21177
21178  input_path="$new_path"
21179  # Check if we need to convert this using DOS-style short mode. If the path
21180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21181  # take no chances and rewrite it.
21182  # Note: m4 eats our [], so we need to use [ and ] instead.
21183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21184  if test "x$has_forbidden_chars" != x; then
21185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21189      # Going to short mode and back again did indeed matter. Since short mode is
21190      # case insensitive, let's make it lowercase to improve readability.
21191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21192      # Now convert it back to Unix-stile (cygpath)
21193      input_path=`$CYGPATH -u "$shortmode_path"`
21194      new_path="$input_path"
21195    fi
21196  fi
21197
21198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21199  if test "x$test_cygdrive_prefix" = x; then
21200    # As a simple fix, exclude /usr/bin since it's not a real path.
21201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21203      # a path prefixed by /cygdrive for fixpath to work.
21204      new_path="$CYGWIN_ROOT_PATH$input_path"
21205    fi
21206  fi
21207
21208
21209  if test "x$path" != "x$new_path"; then
21210    BOOT_JDK="$new_path"
21211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21213  fi
21214
21215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21216
21217  path="$BOOT_JDK"
21218  has_colon=`$ECHO $path | $GREP ^.:`
21219  new_path="$path"
21220  if test "x$has_colon" = x; then
21221    # Not in mixed or Windows style, start by that.
21222    new_path=`cmd //c echo $path`
21223  fi
21224
21225
21226  input_path="$new_path"
21227  # Check if we need to convert this using DOS-style short mode. If the path
21228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21229  # take no chances and rewrite it.
21230  # Note: m4 eats our [], so we need to use [ and ] instead.
21231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21232  if test "x$has_forbidden_chars" != x; then
21233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21235  fi
21236
21237
21238  windows_path="$new_path"
21239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21240    unix_path=`$CYGPATH -u "$windows_path"`
21241    new_path="$unix_path"
21242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21244    new_path="$unix_path"
21245  fi
21246
21247  if test "x$path" != "x$new_path"; then
21248    BOOT_JDK="$new_path"
21249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21251  fi
21252
21253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21255
21256  else
21257    # We're on a posix platform. Hooray! :)
21258    path="$BOOT_JDK"
21259    has_space=`$ECHO "$path" | $GREP " "`
21260    if test "x$has_space" != x; then
21261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21263      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21264    fi
21265
21266    # Use eval to expand a potential ~
21267    eval path="$path"
21268    if test ! -f "$path" && test ! -d "$path"; then
21269      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21270    fi
21271
21272    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21273  fi
21274
21275              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21276$as_echo_n "checking for Boot JDK... " >&6; }
21277              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21278$as_echo "$BOOT_JDK" >&6; }
21279              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21280$as_echo_n "checking Boot JDK version... " >&6; }
21281              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21282              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21283$as_echo "$BOOT_JDK_VERSION" >&6; }
21284            fi # end check jdk version
21285          fi # end check rt.jar
21286        fi # end check javac
21287      fi # end check java
21288    fi # end check boot jdk found
21289  fi
21290
21291
21292  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21293
21294  if test "x$BOOT_JDK_FOUND" = xno; then
21295    # Now execute the test
21296
21297  # Extract the first word of "javac", so it can be a program name with args.
21298set dummy javac; ac_word=$2
21299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21300$as_echo_n "checking for $ac_word... " >&6; }
21301if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21302  $as_echo_n "(cached) " >&6
21303else
21304  case $JAVAC_CHECK in
21305  [\\/]* | ?:[\\/]*)
21306  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21307  ;;
21308  *)
21309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21310for as_dir in $PATH
21311do
21312  IFS=$as_save_IFS
21313  test -z "$as_dir" && as_dir=.
21314    for ac_exec_ext in '' $ac_executable_extensions; do
21315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21316    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21318    break 2
21319  fi
21320done
21321  done
21322IFS=$as_save_IFS
21323
21324  ;;
21325esac
21326fi
21327JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21328if test -n "$JAVAC_CHECK"; then
21329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21330$as_echo "$JAVAC_CHECK" >&6; }
21331else
21332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21333$as_echo "no" >&6; }
21334fi
21335
21336
21337  # Extract the first word of "java", so it can be a program name with args.
21338set dummy java; ac_word=$2
21339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21340$as_echo_n "checking for $ac_word... " >&6; }
21341if ${ac_cv_path_JAVA_CHECK+:} false; then :
21342  $as_echo_n "(cached) " >&6
21343else
21344  case $JAVA_CHECK in
21345  [\\/]* | ?:[\\/]*)
21346  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21347  ;;
21348  *)
21349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21350for as_dir in $PATH
21351do
21352  IFS=$as_save_IFS
21353  test -z "$as_dir" && as_dir=.
21354    for ac_exec_ext in '' $ac_executable_extensions; do
21355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21356    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21358    break 2
21359  fi
21360done
21361  done
21362IFS=$as_save_IFS
21363
21364  ;;
21365esac
21366fi
21367JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21368if test -n "$JAVA_CHECK"; then
21369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21370$as_echo "$JAVA_CHECK" >&6; }
21371else
21372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21373$as_echo "no" >&6; }
21374fi
21375
21376
21377  BINARY="$JAVAC_CHECK"
21378  if test "x$JAVAC_CHECK" = x; then
21379    BINARY="$JAVA_CHECK"
21380  fi
21381  if test "x$BINARY" != x; then
21382    # So there is a java(c) binary, it might be part of a JDK.
21383    # Lets find the JDK/JRE directory by following symbolic links.
21384    # Linux/GNU systems often have links from /usr/bin/java to
21385    # /etc/alternatives/java to the real JDK binary.
21386
21387  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21388    # Follow a chain of symbolic links. Use readlink
21389    # where it exists, else fall back to horribly
21390    # complicated shell code.
21391    if test "x$READLINK_TESTED" != yes; then
21392      # On MacOSX there is a readlink tool with a different
21393      # purpose than the GNU readlink tool. Check the found readlink.
21394      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21395      if test "x$ISGNU" = x; then
21396        # A readlink that we do not know how to use.
21397        # Are there other non-GNU readlinks out there?
21398        READLINK_TESTED=yes
21399        READLINK=
21400      fi
21401    fi
21402
21403    if test "x$READLINK" != x; then
21404      BINARY=`$READLINK -f $BINARY`
21405    else
21406      # Save the current directory for restoring afterwards
21407      STARTDIR=$PWD
21408      COUNTER=0
21409      sym_link_dir=`$DIRNAME $BINARY`
21410      sym_link_file=`$BASENAME $BINARY`
21411      cd $sym_link_dir
21412      # Use -P flag to resolve symlinks in directories.
21413      cd `$THEPWDCMD -P`
21414      sym_link_dir=`$THEPWDCMD -P`
21415      # Resolve file symlinks
21416      while test $COUNTER -lt 20; do
21417        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21418        if test "x$ISLINK" == x; then
21419          # This is not a symbolic link! We are done!
21420          break
21421        fi
21422        # Again resolve directory symlinks since the target of the just found
21423        # link could be in a different directory
21424        cd `$DIRNAME $ISLINK`
21425        sym_link_dir=`$THEPWDCMD -P`
21426        sym_link_file=`$BASENAME $ISLINK`
21427        let COUNTER=COUNTER+1
21428      done
21429      cd $STARTDIR
21430      BINARY=$sym_link_dir/$sym_link_file
21431    fi
21432  fi
21433
21434    BOOT_JDK=`dirname "$BINARY"`
21435    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21436    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21437      # Looks like we found ourselves an JDK
21438      BOOT_JDK_FOUND=maybe
21439      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21440$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21441    fi
21442  fi
21443
21444
21445    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21446    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21447      # Do we have a bin/java?
21448      if test ! -x "$BOOT_JDK/bin/java"; then
21449        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21451        BOOT_JDK_FOUND=no
21452      else
21453        # Do we have a bin/javac?
21454        if test ! -x "$BOOT_JDK/bin/javac"; then
21455          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21457          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21458$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21459          BOOT_JDK_FOUND=no
21460        else
21461          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21462          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21465            BOOT_JDK_FOUND=no
21466          else
21467            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21469
21470            # Extra M4 quote needed to protect [] in grep expression.
21471            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21472            if test "x$FOUND_CORRECT_VERSION" = x; then
21473              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21475              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21476$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21477              BOOT_JDK_FOUND=no
21478            else
21479              # We're done! :-)
21480              BOOT_JDK_FOUND=yes
21481
21482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21483
21484  # Input might be given as Windows format, start by converting to
21485  # unix format.
21486  path="$BOOT_JDK"
21487  new_path=`$CYGPATH -u "$path"`
21488
21489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21492  # "foo.exe" is OK but "foo" is an error.
21493  #
21494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21495  # It is also a way to make sure we got the proper file name for the real test later on.
21496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21497  if test "x$test_shortpath" = x; then
21498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21501  fi
21502
21503  # Call helper function which possibly converts this using DOS-style short mode.
21504  # If so, the updated path is stored in $new_path.
21505
21506  input_path="$new_path"
21507  # Check if we need to convert this using DOS-style short mode. If the path
21508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21509  # take no chances and rewrite it.
21510  # Note: m4 eats our [], so we need to use [ and ] instead.
21511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21512  if test "x$has_forbidden_chars" != x; then
21513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21517      # Going to short mode and back again did indeed matter. Since short mode is
21518      # case insensitive, let's make it lowercase to improve readability.
21519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21520      # Now convert it back to Unix-stile (cygpath)
21521      input_path=`$CYGPATH -u "$shortmode_path"`
21522      new_path="$input_path"
21523    fi
21524  fi
21525
21526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21527  if test "x$test_cygdrive_prefix" = x; then
21528    # As a simple fix, exclude /usr/bin since it's not a real path.
21529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21531      # a path prefixed by /cygdrive for fixpath to work.
21532      new_path="$CYGWIN_ROOT_PATH$input_path"
21533    fi
21534  fi
21535
21536
21537  if test "x$path" != "x$new_path"; then
21538    BOOT_JDK="$new_path"
21539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21541  fi
21542
21543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21544
21545  path="$BOOT_JDK"
21546  has_colon=`$ECHO $path | $GREP ^.:`
21547  new_path="$path"
21548  if test "x$has_colon" = x; then
21549    # Not in mixed or Windows style, start by that.
21550    new_path=`cmd //c echo $path`
21551  fi
21552
21553
21554  input_path="$new_path"
21555  # Check if we need to convert this using DOS-style short mode. If the path
21556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21557  # take no chances and rewrite it.
21558  # Note: m4 eats our [], so we need to use [ and ] instead.
21559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21560  if test "x$has_forbidden_chars" != x; then
21561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21563  fi
21564
21565
21566  windows_path="$new_path"
21567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21568    unix_path=`$CYGPATH -u "$windows_path"`
21569    new_path="$unix_path"
21570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21572    new_path="$unix_path"
21573  fi
21574
21575  if test "x$path" != "x$new_path"; then
21576    BOOT_JDK="$new_path"
21577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21579  fi
21580
21581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21583
21584  else
21585    # We're on a posix platform. Hooray! :)
21586    path="$BOOT_JDK"
21587    has_space=`$ECHO "$path" | $GREP " "`
21588    if test "x$has_space" != x; then
21589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21591      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21592    fi
21593
21594    # Use eval to expand a potential ~
21595    eval path="$path"
21596    if test ! -f "$path" && test ! -d "$path"; then
21597      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21598    fi
21599
21600    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21601  fi
21602
21603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21604$as_echo_n "checking for Boot JDK... " >&6; }
21605              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21606$as_echo "$BOOT_JDK" >&6; }
21607              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21608$as_echo_n "checking Boot JDK version... " >&6; }
21609              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21610              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21611$as_echo "$BOOT_JDK_VERSION" >&6; }
21612            fi # end check jdk version
21613          fi # end check rt.jar
21614        fi # end check javac
21615      fi # end check java
21616    fi # end check boot jdk found
21617  fi
21618
21619
21620  # Test: Is there a JDK installed in default, well-known locations?
21621
21622  if test "x$BOOT_JDK_FOUND" = xno; then
21623    # Now execute the test
21624
21625  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21626
21627  if test "x$BOOT_JDK_FOUND" = xno; then
21628    # Now execute the test
21629
21630  if test "x$ProgramW6432" != x; then
21631    VIRTUAL_DIR="$ProgramW6432/Java"
21632
21633  windows_path="$VIRTUAL_DIR"
21634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21635    unix_path=`$CYGPATH -u "$windows_path"`
21636    VIRTUAL_DIR="$unix_path"
21637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21639    VIRTUAL_DIR="$unix_path"
21640  fi
21641
21642
21643  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21644  BOOT_JDK_SUFFIX=""
21645  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21646  if test "x$ALL_JDKS_FOUND" != x; then
21647    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21648
21649  if test "x$BOOT_JDK_FOUND" = xno; then
21650    # Now execute the test
21651
21652        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21653        if test -d "$BOOT_JDK"; then
21654          BOOT_JDK_FOUND=maybe
21655          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21656$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21657        fi
21658
21659
21660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21662      # Do we have a bin/java?
21663      if test ! -x "$BOOT_JDK/bin/java"; then
21664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21666        BOOT_JDK_FOUND=no
21667      else
21668        # Do we have a bin/javac?
21669        if test ! -x "$BOOT_JDK/bin/javac"; then
21670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21674          BOOT_JDK_FOUND=no
21675        else
21676          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21677          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21680            BOOT_JDK_FOUND=no
21681          else
21682            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21684
21685            # Extra M4 quote needed to protect [] in grep expression.
21686            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21687            if test "x$FOUND_CORRECT_VERSION" = x; then
21688              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21690              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21691$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21692              BOOT_JDK_FOUND=no
21693            else
21694              # We're done! :-)
21695              BOOT_JDK_FOUND=yes
21696
21697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21698
21699  # Input might be given as Windows format, start by converting to
21700  # unix format.
21701  path="$BOOT_JDK"
21702  new_path=`$CYGPATH -u "$path"`
21703
21704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21707  # "foo.exe" is OK but "foo" is an error.
21708  #
21709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21710  # It is also a way to make sure we got the proper file name for the real test later on.
21711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21712  if test "x$test_shortpath" = x; then
21713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21716  fi
21717
21718  # Call helper function which possibly converts this using DOS-style short mode.
21719  # If so, the updated path is stored in $new_path.
21720
21721  input_path="$new_path"
21722  # Check if we need to convert this using DOS-style short mode. If the path
21723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21724  # take no chances and rewrite it.
21725  # Note: m4 eats our [], so we need to use [ and ] instead.
21726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21727  if test "x$has_forbidden_chars" != x; then
21728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21732      # Going to short mode and back again did indeed matter. Since short mode is
21733      # case insensitive, let's make it lowercase to improve readability.
21734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21735      # Now convert it back to Unix-stile (cygpath)
21736      input_path=`$CYGPATH -u "$shortmode_path"`
21737      new_path="$input_path"
21738    fi
21739  fi
21740
21741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21742  if test "x$test_cygdrive_prefix" = x; then
21743    # As a simple fix, exclude /usr/bin since it's not a real path.
21744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21746      # a path prefixed by /cygdrive for fixpath to work.
21747      new_path="$CYGWIN_ROOT_PATH$input_path"
21748    fi
21749  fi
21750
21751
21752  if test "x$path" != "x$new_path"; then
21753    BOOT_JDK="$new_path"
21754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21756  fi
21757
21758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21759
21760  path="$BOOT_JDK"
21761  has_colon=`$ECHO $path | $GREP ^.:`
21762  new_path="$path"
21763  if test "x$has_colon" = x; then
21764    # Not in mixed or Windows style, start by that.
21765    new_path=`cmd //c echo $path`
21766  fi
21767
21768
21769  input_path="$new_path"
21770  # Check if we need to convert this using DOS-style short mode. If the path
21771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21772  # take no chances and rewrite it.
21773  # Note: m4 eats our [], so we need to use [ and ] instead.
21774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21775  if test "x$has_forbidden_chars" != x; then
21776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21778  fi
21779
21780
21781  windows_path="$new_path"
21782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21783    unix_path=`$CYGPATH -u "$windows_path"`
21784    new_path="$unix_path"
21785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21787    new_path="$unix_path"
21788  fi
21789
21790  if test "x$path" != "x$new_path"; then
21791    BOOT_JDK="$new_path"
21792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21794  fi
21795
21796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21798
21799  else
21800    # We're on a posix platform. Hooray! :)
21801    path="$BOOT_JDK"
21802    has_space=`$ECHO "$path" | $GREP " "`
21803    if test "x$has_space" != x; then
21804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21806      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21807    fi
21808
21809    # Use eval to expand a potential ~
21810    eval path="$path"
21811    if test ! -f "$path" && test ! -d "$path"; then
21812      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21813    fi
21814
21815    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21816  fi
21817
21818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21819$as_echo_n "checking for Boot JDK... " >&6; }
21820              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21821$as_echo "$BOOT_JDK" >&6; }
21822              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21823$as_echo_n "checking Boot JDK version... " >&6; }
21824              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21826$as_echo "$BOOT_JDK_VERSION" >&6; }
21827            fi # end check jdk version
21828          fi # end check rt.jar
21829        fi # end check javac
21830      fi # end check java
21831    fi # end check boot jdk found
21832  fi
21833
21834    done
21835  fi
21836
21837  fi
21838
21839
21840    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21841    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21842      # Do we have a bin/java?
21843      if test ! -x "$BOOT_JDK/bin/java"; then
21844        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21846        BOOT_JDK_FOUND=no
21847      else
21848        # Do we have a bin/javac?
21849        if test ! -x "$BOOT_JDK/bin/javac"; then
21850          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21852          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21853$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21854          BOOT_JDK_FOUND=no
21855        else
21856          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21857          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21858            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21860            BOOT_JDK_FOUND=no
21861          else
21862            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21863            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21864
21865            # Extra M4 quote needed to protect [] in grep expression.
21866            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21867            if test "x$FOUND_CORRECT_VERSION" = x; then
21868              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21870              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21871$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21872              BOOT_JDK_FOUND=no
21873            else
21874              # We're done! :-)
21875              BOOT_JDK_FOUND=yes
21876
21877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21878
21879  # Input might be given as Windows format, start by converting to
21880  # unix format.
21881  path="$BOOT_JDK"
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21887  # "foo.exe" is OK but "foo" is an error.
21888  #
21889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21890  # It is also a way to make sure we got the proper file name for the real test later on.
21891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21892  if test "x$test_shortpath" = x; then
21893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21896  fi
21897
21898  # Call helper function which possibly converts this using DOS-style short mode.
21899  # If so, the updated path is stored in $new_path.
21900
21901  input_path="$new_path"
21902  # Check if we need to convert this using DOS-style short mode. If the path
21903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21904  # take no chances and rewrite it.
21905  # Note: m4 eats our [], so we need to use [ and ] instead.
21906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21907  if test "x$has_forbidden_chars" != x; then
21908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21912      # Going to short mode and back again did indeed matter. Since short mode is
21913      # case insensitive, let's make it lowercase to improve readability.
21914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21915      # Now convert it back to Unix-stile (cygpath)
21916      input_path=`$CYGPATH -u "$shortmode_path"`
21917      new_path="$input_path"
21918    fi
21919  fi
21920
21921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21922  if test "x$test_cygdrive_prefix" = x; then
21923    # As a simple fix, exclude /usr/bin since it's not a real path.
21924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21926      # a path prefixed by /cygdrive for fixpath to work.
21927      new_path="$CYGWIN_ROOT_PATH$input_path"
21928    fi
21929  fi
21930
21931
21932  if test "x$path" != "x$new_path"; then
21933    BOOT_JDK="$new_path"
21934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21936  fi
21937
21938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21939
21940  path="$BOOT_JDK"
21941  has_colon=`$ECHO $path | $GREP ^.:`
21942  new_path="$path"
21943  if test "x$has_colon" = x; then
21944    # Not in mixed or Windows style, start by that.
21945    new_path=`cmd //c echo $path`
21946  fi
21947
21948
21949  input_path="$new_path"
21950  # Check if we need to convert this using DOS-style short mode. If the path
21951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21952  # take no chances and rewrite it.
21953  # Note: m4 eats our [], so we need to use [ and ] instead.
21954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21955  if test "x$has_forbidden_chars" != x; then
21956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21958  fi
21959
21960
21961  windows_path="$new_path"
21962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21963    unix_path=`$CYGPATH -u "$windows_path"`
21964    new_path="$unix_path"
21965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21967    new_path="$unix_path"
21968  fi
21969
21970  if test "x$path" != "x$new_path"; then
21971    BOOT_JDK="$new_path"
21972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21974  fi
21975
21976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21978
21979  else
21980    # We're on a posix platform. Hooray! :)
21981    path="$BOOT_JDK"
21982    has_space=`$ECHO "$path" | $GREP " "`
21983    if test "x$has_space" != x; then
21984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21987    fi
21988
21989    # Use eval to expand a potential ~
21990    eval path="$path"
21991    if test ! -f "$path" && test ! -d "$path"; then
21992      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21993    fi
21994
21995    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21996  fi
21997
21998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21999$as_echo_n "checking for Boot JDK... " >&6; }
22000              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22001$as_echo "$BOOT_JDK" >&6; }
22002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22003$as_echo_n "checking Boot JDK version... " >&6; }
22004              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22005              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22006$as_echo "$BOOT_JDK_VERSION" >&6; }
22007            fi # end check jdk version
22008          fi # end check rt.jar
22009        fi # end check javac
22010      fi # end check java
22011    fi # end check boot jdk found
22012  fi
22013
22014
22015  if test "x$BOOT_JDK_FOUND" = xno; then
22016    # Now execute the test
22017
22018  if test "x$PROGRAMW6432" != x; then
22019    VIRTUAL_DIR="$PROGRAMW6432/Java"
22020
22021  windows_path="$VIRTUAL_DIR"
22022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22023    unix_path=`$CYGPATH -u "$windows_path"`
22024    VIRTUAL_DIR="$unix_path"
22025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22027    VIRTUAL_DIR="$unix_path"
22028  fi
22029
22030
22031  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22032  BOOT_JDK_SUFFIX=""
22033  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22034  if test "x$ALL_JDKS_FOUND" != x; then
22035    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22036
22037  if test "x$BOOT_JDK_FOUND" = xno; then
22038    # Now execute the test
22039
22040        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22041        if test -d "$BOOT_JDK"; then
22042          BOOT_JDK_FOUND=maybe
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22044$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22045        fi
22046
22047
22048    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22049    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22050      # Do we have a bin/java?
22051      if test ! -x "$BOOT_JDK/bin/java"; then
22052        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22054        BOOT_JDK_FOUND=no
22055      else
22056        # Do we have a bin/javac?
22057        if test ! -x "$BOOT_JDK/bin/javac"; then
22058          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22060          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22061$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22062          BOOT_JDK_FOUND=no
22063        else
22064          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22065          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22066            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22068            BOOT_JDK_FOUND=no
22069          else
22070            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22071            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22072
22073            # Extra M4 quote needed to protect [] in grep expression.
22074            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22075            if test "x$FOUND_CORRECT_VERSION" = x; then
22076              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22078              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22079$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22080              BOOT_JDK_FOUND=no
22081            else
22082              # We're done! :-)
22083              BOOT_JDK_FOUND=yes
22084
22085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22086
22087  # Input might be given as Windows format, start by converting to
22088  # unix format.
22089  path="$BOOT_JDK"
22090  new_path=`$CYGPATH -u "$path"`
22091
22092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22095  # "foo.exe" is OK but "foo" is an error.
22096  #
22097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22098  # It is also a way to make sure we got the proper file name for the real test later on.
22099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22100  if test "x$test_shortpath" = x; then
22101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22103    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22104  fi
22105
22106  # Call helper function which possibly converts this using DOS-style short mode.
22107  # If so, the updated path is stored in $new_path.
22108
22109  input_path="$new_path"
22110  # Check if we need to convert this using DOS-style short mode. If the path
22111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22112  # take no chances and rewrite it.
22113  # Note: m4 eats our [], so we need to use [ and ] instead.
22114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22115  if test "x$has_forbidden_chars" != x; then
22116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22120      # Going to short mode and back again did indeed matter. Since short mode is
22121      # case insensitive, let's make it lowercase to improve readability.
22122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22123      # Now convert it back to Unix-stile (cygpath)
22124      input_path=`$CYGPATH -u "$shortmode_path"`
22125      new_path="$input_path"
22126    fi
22127  fi
22128
22129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22130  if test "x$test_cygdrive_prefix" = x; then
22131    # As a simple fix, exclude /usr/bin since it's not a real path.
22132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22134      # a path prefixed by /cygdrive for fixpath to work.
22135      new_path="$CYGWIN_ROOT_PATH$input_path"
22136    fi
22137  fi
22138
22139
22140  if test "x$path" != "x$new_path"; then
22141    BOOT_JDK="$new_path"
22142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22144  fi
22145
22146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22147
22148  path="$BOOT_JDK"
22149  has_colon=`$ECHO $path | $GREP ^.:`
22150  new_path="$path"
22151  if test "x$has_colon" = x; then
22152    # Not in mixed or Windows style, start by that.
22153    new_path=`cmd //c echo $path`
22154  fi
22155
22156
22157  input_path="$new_path"
22158  # Check if we need to convert this using DOS-style short mode. If the path
22159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22160  # take no chances and rewrite it.
22161  # Note: m4 eats our [], so we need to use [ and ] instead.
22162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22163  if test "x$has_forbidden_chars" != x; then
22164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22166  fi
22167
22168
22169  windows_path="$new_path"
22170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22171    unix_path=`$CYGPATH -u "$windows_path"`
22172    new_path="$unix_path"
22173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22175    new_path="$unix_path"
22176  fi
22177
22178  if test "x$path" != "x$new_path"; then
22179    BOOT_JDK="$new_path"
22180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22182  fi
22183
22184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22186
22187  else
22188    # We're on a posix platform. Hooray! :)
22189    path="$BOOT_JDK"
22190    has_space=`$ECHO "$path" | $GREP " "`
22191    if test "x$has_space" != x; then
22192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22194      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22195    fi
22196
22197    # Use eval to expand a potential ~
22198    eval path="$path"
22199    if test ! -f "$path" && test ! -d "$path"; then
22200      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22201    fi
22202
22203    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22204  fi
22205
22206              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22207$as_echo_n "checking for Boot JDK... " >&6; }
22208              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22209$as_echo "$BOOT_JDK" >&6; }
22210              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22211$as_echo_n "checking Boot JDK version... " >&6; }
22212              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22213              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22214$as_echo "$BOOT_JDK_VERSION" >&6; }
22215            fi # end check jdk version
22216          fi # end check rt.jar
22217        fi # end check javac
22218      fi # end check java
22219    fi # end check boot jdk found
22220  fi
22221
22222    done
22223  fi
22224
22225  fi
22226
22227
22228    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22229    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22230      # Do we have a bin/java?
22231      if test ! -x "$BOOT_JDK/bin/java"; then
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22234        BOOT_JDK_FOUND=no
22235      else
22236        # Do we have a bin/javac?
22237        if test ! -x "$BOOT_JDK/bin/javac"; then
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22240          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22241$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22242          BOOT_JDK_FOUND=no
22243        else
22244          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22245          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22246            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22248            BOOT_JDK_FOUND=no
22249          else
22250            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22251            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22252
22253            # Extra M4 quote needed to protect [] in grep expression.
22254            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22255            if test "x$FOUND_CORRECT_VERSION" = x; then
22256              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22258              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22259$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22260              BOOT_JDK_FOUND=no
22261            else
22262              # We're done! :-)
22263              BOOT_JDK_FOUND=yes
22264
22265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22266
22267  # Input might be given as Windows format, start by converting to
22268  # unix format.
22269  path="$BOOT_JDK"
22270  new_path=`$CYGPATH -u "$path"`
22271
22272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22275  # "foo.exe" is OK but "foo" is an error.
22276  #
22277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22278  # It is also a way to make sure we got the proper file name for the real test later on.
22279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22280  if test "x$test_shortpath" = x; then
22281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22283    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22284  fi
22285
22286  # Call helper function which possibly converts this using DOS-style short mode.
22287  # If so, the updated path is stored in $new_path.
22288
22289  input_path="$new_path"
22290  # Check if we need to convert this using DOS-style short mode. If the path
22291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22292  # take no chances and rewrite it.
22293  # Note: m4 eats our [], so we need to use [ and ] instead.
22294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22295  if test "x$has_forbidden_chars" != x; then
22296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22300      # Going to short mode and back again did indeed matter. Since short mode is
22301      # case insensitive, let's make it lowercase to improve readability.
22302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22303      # Now convert it back to Unix-stile (cygpath)
22304      input_path=`$CYGPATH -u "$shortmode_path"`
22305      new_path="$input_path"
22306    fi
22307  fi
22308
22309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22310  if test "x$test_cygdrive_prefix" = x; then
22311    # As a simple fix, exclude /usr/bin since it's not a real path.
22312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22314      # a path prefixed by /cygdrive for fixpath to work.
22315      new_path="$CYGWIN_ROOT_PATH$input_path"
22316    fi
22317  fi
22318
22319
22320  if test "x$path" != "x$new_path"; then
22321    BOOT_JDK="$new_path"
22322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22324  fi
22325
22326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22327
22328  path="$BOOT_JDK"
22329  has_colon=`$ECHO $path | $GREP ^.:`
22330  new_path="$path"
22331  if test "x$has_colon" = x; then
22332    # Not in mixed or Windows style, start by that.
22333    new_path=`cmd //c echo $path`
22334  fi
22335
22336
22337  input_path="$new_path"
22338  # Check if we need to convert this using DOS-style short mode. If the path
22339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22340  # take no chances and rewrite it.
22341  # Note: m4 eats our [], so we need to use [ and ] instead.
22342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22343  if test "x$has_forbidden_chars" != x; then
22344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22346  fi
22347
22348
22349  windows_path="$new_path"
22350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351    unix_path=`$CYGPATH -u "$windows_path"`
22352    new_path="$unix_path"
22353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22355    new_path="$unix_path"
22356  fi
22357
22358  if test "x$path" != "x$new_path"; then
22359    BOOT_JDK="$new_path"
22360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22362  fi
22363
22364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22366
22367  else
22368    # We're on a posix platform. Hooray! :)
22369    path="$BOOT_JDK"
22370    has_space=`$ECHO "$path" | $GREP " "`
22371    if test "x$has_space" != x; then
22372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22373$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22374      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22375    fi
22376
22377    # Use eval to expand a potential ~
22378    eval path="$path"
22379    if test ! -f "$path" && test ! -d "$path"; then
22380      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22381    fi
22382
22383    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22384  fi
22385
22386              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22387$as_echo_n "checking for Boot JDK... " >&6; }
22388              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22389$as_echo "$BOOT_JDK" >&6; }
22390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22391$as_echo_n "checking Boot JDK version... " >&6; }
22392              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22393              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22394$as_echo "$BOOT_JDK_VERSION" >&6; }
22395            fi # end check jdk version
22396          fi # end check rt.jar
22397        fi # end check javac
22398      fi # end check java
22399    fi # end check boot jdk found
22400  fi
22401
22402
22403  if test "x$BOOT_JDK_FOUND" = xno; then
22404    # Now execute the test
22405
22406  if test "x$PROGRAMFILES" != x; then
22407    VIRTUAL_DIR="$PROGRAMFILES/Java"
22408
22409  windows_path="$VIRTUAL_DIR"
22410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22411    unix_path=`$CYGPATH -u "$windows_path"`
22412    VIRTUAL_DIR="$unix_path"
22413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22415    VIRTUAL_DIR="$unix_path"
22416  fi
22417
22418
22419  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22420  BOOT_JDK_SUFFIX=""
22421  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22422  if test "x$ALL_JDKS_FOUND" != x; then
22423    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22424
22425  if test "x$BOOT_JDK_FOUND" = xno; then
22426    # Now execute the test
22427
22428        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22429        if test -d "$BOOT_JDK"; then
22430          BOOT_JDK_FOUND=maybe
22431          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22432$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22433        fi
22434
22435
22436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22438      # Do we have a bin/java?
22439      if test ! -x "$BOOT_JDK/bin/java"; then
22440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22442        BOOT_JDK_FOUND=no
22443      else
22444        # Do we have a bin/javac?
22445        if test ! -x "$BOOT_JDK/bin/javac"; then
22446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22450          BOOT_JDK_FOUND=no
22451        else
22452          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22453          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22456            BOOT_JDK_FOUND=no
22457          else
22458            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22459            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22460
22461            # Extra M4 quote needed to protect [] in grep expression.
22462            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22463            if test "x$FOUND_CORRECT_VERSION" = x; then
22464              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22466              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22467$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22468              BOOT_JDK_FOUND=no
22469            else
22470              # We're done! :-)
22471              BOOT_JDK_FOUND=yes
22472
22473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22474
22475  # Input might be given as Windows format, start by converting to
22476  # unix format.
22477  path="$BOOT_JDK"
22478  new_path=`$CYGPATH -u "$path"`
22479
22480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22483  # "foo.exe" is OK but "foo" is an error.
22484  #
22485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22486  # It is also a way to make sure we got the proper file name for the real test later on.
22487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22488  if test "x$test_shortpath" = x; then
22489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22492  fi
22493
22494  # Call helper function which possibly converts this using DOS-style short mode.
22495  # If so, the updated path is stored in $new_path.
22496
22497  input_path="$new_path"
22498  # Check if we need to convert this using DOS-style short mode. If the path
22499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22500  # take no chances and rewrite it.
22501  # Note: m4 eats our [], so we need to use [ and ] instead.
22502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22503  if test "x$has_forbidden_chars" != x; then
22504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22508      # Going to short mode and back again did indeed matter. Since short mode is
22509      # case insensitive, let's make it lowercase to improve readability.
22510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22511      # Now convert it back to Unix-stile (cygpath)
22512      input_path=`$CYGPATH -u "$shortmode_path"`
22513      new_path="$input_path"
22514    fi
22515  fi
22516
22517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22518  if test "x$test_cygdrive_prefix" = x; then
22519    # As a simple fix, exclude /usr/bin since it's not a real path.
22520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22522      # a path prefixed by /cygdrive for fixpath to work.
22523      new_path="$CYGWIN_ROOT_PATH$input_path"
22524    fi
22525  fi
22526
22527
22528  if test "x$path" != "x$new_path"; then
22529    BOOT_JDK="$new_path"
22530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22532  fi
22533
22534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22535
22536  path="$BOOT_JDK"
22537  has_colon=`$ECHO $path | $GREP ^.:`
22538  new_path="$path"
22539  if test "x$has_colon" = x; then
22540    # Not in mixed or Windows style, start by that.
22541    new_path=`cmd //c echo $path`
22542  fi
22543
22544
22545  input_path="$new_path"
22546  # Check if we need to convert this using DOS-style short mode. If the path
22547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22548  # take no chances and rewrite it.
22549  # Note: m4 eats our [], so we need to use [ and ] instead.
22550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22551  if test "x$has_forbidden_chars" != x; then
22552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22554  fi
22555
22556
22557  windows_path="$new_path"
22558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22559    unix_path=`$CYGPATH -u "$windows_path"`
22560    new_path="$unix_path"
22561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22563    new_path="$unix_path"
22564  fi
22565
22566  if test "x$path" != "x$new_path"; then
22567    BOOT_JDK="$new_path"
22568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22570  fi
22571
22572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22574
22575  else
22576    # We're on a posix platform. Hooray! :)
22577    path="$BOOT_JDK"
22578    has_space=`$ECHO "$path" | $GREP " "`
22579    if test "x$has_space" != x; then
22580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22583    fi
22584
22585    # Use eval to expand a potential ~
22586    eval path="$path"
22587    if test ! -f "$path" && test ! -d "$path"; then
22588      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22589    fi
22590
22591    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22592  fi
22593
22594              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22595$as_echo_n "checking for Boot JDK... " >&6; }
22596              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22597$as_echo "$BOOT_JDK" >&6; }
22598              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22599$as_echo_n "checking Boot JDK version... " >&6; }
22600              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22602$as_echo "$BOOT_JDK_VERSION" >&6; }
22603            fi # end check jdk version
22604          fi # end check rt.jar
22605        fi # end check javac
22606      fi # end check java
22607    fi # end check boot jdk found
22608  fi
22609
22610    done
22611  fi
22612
22613  fi
22614
22615
22616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22618      # Do we have a bin/java?
22619      if test ! -x "$BOOT_JDK/bin/java"; then
22620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22622        BOOT_JDK_FOUND=no
22623      else
22624        # Do we have a bin/javac?
22625        if test ! -x "$BOOT_JDK/bin/javac"; then
22626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22630          BOOT_JDK_FOUND=no
22631        else
22632          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22633          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22636            BOOT_JDK_FOUND=no
22637          else
22638            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22639            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22640
22641            # Extra M4 quote needed to protect [] in grep expression.
22642            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22643            if test "x$FOUND_CORRECT_VERSION" = x; then
22644              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22646              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22647$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22648              BOOT_JDK_FOUND=no
22649            else
22650              # We're done! :-)
22651              BOOT_JDK_FOUND=yes
22652
22653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22654
22655  # Input might be given as Windows format, start by converting to
22656  # unix format.
22657  path="$BOOT_JDK"
22658  new_path=`$CYGPATH -u "$path"`
22659
22660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22663  # "foo.exe" is OK but "foo" is an error.
22664  #
22665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22666  # It is also a way to make sure we got the proper file name for the real test later on.
22667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22668  if test "x$test_shortpath" = x; then
22669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22672  fi
22673
22674  # Call helper function which possibly converts this using DOS-style short mode.
22675  # If so, the updated path is stored in $new_path.
22676
22677  input_path="$new_path"
22678  # Check if we need to convert this using DOS-style short mode. If the path
22679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22680  # take no chances and rewrite it.
22681  # Note: m4 eats our [], so we need to use [ and ] instead.
22682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22683  if test "x$has_forbidden_chars" != x; then
22684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22688      # Going to short mode and back again did indeed matter. Since short mode is
22689      # case insensitive, let's make it lowercase to improve readability.
22690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22691      # Now convert it back to Unix-stile (cygpath)
22692      input_path=`$CYGPATH -u "$shortmode_path"`
22693      new_path="$input_path"
22694    fi
22695  fi
22696
22697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22698  if test "x$test_cygdrive_prefix" = x; then
22699    # As a simple fix, exclude /usr/bin since it's not a real path.
22700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22702      # a path prefixed by /cygdrive for fixpath to work.
22703      new_path="$CYGWIN_ROOT_PATH$input_path"
22704    fi
22705  fi
22706
22707
22708  if test "x$path" != "x$new_path"; then
22709    BOOT_JDK="$new_path"
22710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22712  fi
22713
22714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22715
22716  path="$BOOT_JDK"
22717  has_colon=`$ECHO $path | $GREP ^.:`
22718  new_path="$path"
22719  if test "x$has_colon" = x; then
22720    # Not in mixed or Windows style, start by that.
22721    new_path=`cmd //c echo $path`
22722  fi
22723
22724
22725  input_path="$new_path"
22726  # Check if we need to convert this using DOS-style short mode. If the path
22727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22728  # take no chances and rewrite it.
22729  # Note: m4 eats our [], so we need to use [ and ] instead.
22730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22731  if test "x$has_forbidden_chars" != x; then
22732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22734  fi
22735
22736
22737  windows_path="$new_path"
22738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22739    unix_path=`$CYGPATH -u "$windows_path"`
22740    new_path="$unix_path"
22741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22743    new_path="$unix_path"
22744  fi
22745
22746  if test "x$path" != "x$new_path"; then
22747    BOOT_JDK="$new_path"
22748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22750  fi
22751
22752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22754
22755  else
22756    # We're on a posix platform. Hooray! :)
22757    path="$BOOT_JDK"
22758    has_space=`$ECHO "$path" | $GREP " "`
22759    if test "x$has_space" != x; then
22760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22762      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22763    fi
22764
22765    # Use eval to expand a potential ~
22766    eval path="$path"
22767    if test ! -f "$path" && test ! -d "$path"; then
22768      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22769    fi
22770
22771    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22772  fi
22773
22774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22775$as_echo_n "checking for Boot JDK... " >&6; }
22776              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22777$as_echo "$BOOT_JDK" >&6; }
22778              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22779$as_echo_n "checking Boot JDK version... " >&6; }
22780              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22781              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22782$as_echo "$BOOT_JDK_VERSION" >&6; }
22783            fi # end check jdk version
22784          fi # end check rt.jar
22785        fi # end check javac
22786      fi # end check java
22787    fi # end check boot jdk found
22788  fi
22789
22790
22791  if test "x$BOOT_JDK_FOUND" = xno; then
22792    # Now execute the test
22793
22794  if test "x$ProgramFiles" != x; then
22795    VIRTUAL_DIR="$ProgramFiles/Java"
22796
22797  windows_path="$VIRTUAL_DIR"
22798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22799    unix_path=`$CYGPATH -u "$windows_path"`
22800    VIRTUAL_DIR="$unix_path"
22801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22803    VIRTUAL_DIR="$unix_path"
22804  fi
22805
22806
22807  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22808  BOOT_JDK_SUFFIX=""
22809  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22810  if test "x$ALL_JDKS_FOUND" != x; then
22811    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22812
22813  if test "x$BOOT_JDK_FOUND" = xno; then
22814    # Now execute the test
22815
22816        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22817        if test -d "$BOOT_JDK"; then
22818          BOOT_JDK_FOUND=maybe
22819          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22820$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22821        fi
22822
22823
22824    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22825    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22826      # Do we have a bin/java?
22827      if test ! -x "$BOOT_JDK/bin/java"; then
22828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22830        BOOT_JDK_FOUND=no
22831      else
22832        # Do we have a bin/javac?
22833        if test ! -x "$BOOT_JDK/bin/javac"; then
22834          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22836          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22837$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22838          BOOT_JDK_FOUND=no
22839        else
22840          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22841          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22842            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22844            BOOT_JDK_FOUND=no
22845          else
22846            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22847            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22848
22849            # Extra M4 quote needed to protect [] in grep expression.
22850            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22851            if test "x$FOUND_CORRECT_VERSION" = x; then
22852              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22854              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22855$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22856              BOOT_JDK_FOUND=no
22857            else
22858              # We're done! :-)
22859              BOOT_JDK_FOUND=yes
22860
22861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22862
22863  # Input might be given as Windows format, start by converting to
22864  # unix format.
22865  path="$BOOT_JDK"
22866  new_path=`$CYGPATH -u "$path"`
22867
22868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22871  # "foo.exe" is OK but "foo" is an error.
22872  #
22873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22874  # It is also a way to make sure we got the proper file name for the real test later on.
22875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22876  if test "x$test_shortpath" = x; then
22877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22879    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22880  fi
22881
22882  # Call helper function which possibly converts this using DOS-style short mode.
22883  # If so, the updated path is stored in $new_path.
22884
22885  input_path="$new_path"
22886  # Check if we need to convert this using DOS-style short mode. If the path
22887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22888  # take no chances and rewrite it.
22889  # Note: m4 eats our [], so we need to use [ and ] instead.
22890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22891  if test "x$has_forbidden_chars" != x; then
22892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22896      # Going to short mode and back again did indeed matter. Since short mode is
22897      # case insensitive, let's make it lowercase to improve readability.
22898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22899      # Now convert it back to Unix-stile (cygpath)
22900      input_path=`$CYGPATH -u "$shortmode_path"`
22901      new_path="$input_path"
22902    fi
22903  fi
22904
22905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22906  if test "x$test_cygdrive_prefix" = x; then
22907    # As a simple fix, exclude /usr/bin since it's not a real path.
22908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22910      # a path prefixed by /cygdrive for fixpath to work.
22911      new_path="$CYGWIN_ROOT_PATH$input_path"
22912    fi
22913  fi
22914
22915
22916  if test "x$path" != "x$new_path"; then
22917    BOOT_JDK="$new_path"
22918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22920  fi
22921
22922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923
22924  path="$BOOT_JDK"
22925  has_colon=`$ECHO $path | $GREP ^.:`
22926  new_path="$path"
22927  if test "x$has_colon" = x; then
22928    # Not in mixed or Windows style, start by that.
22929    new_path=`cmd //c echo $path`
22930  fi
22931
22932
22933  input_path="$new_path"
22934  # Check if we need to convert this using DOS-style short mode. If the path
22935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22936  # take no chances and rewrite it.
22937  # Note: m4 eats our [], so we need to use [ and ] instead.
22938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22939  if test "x$has_forbidden_chars" != x; then
22940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22942  fi
22943
22944
22945  windows_path="$new_path"
22946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22947    unix_path=`$CYGPATH -u "$windows_path"`
22948    new_path="$unix_path"
22949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22951    new_path="$unix_path"
22952  fi
22953
22954  if test "x$path" != "x$new_path"; then
22955    BOOT_JDK="$new_path"
22956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22958  fi
22959
22960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22962
22963  else
22964    # We're on a posix platform. Hooray! :)
22965    path="$BOOT_JDK"
22966    has_space=`$ECHO "$path" | $GREP " "`
22967    if test "x$has_space" != x; then
22968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22970      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22971    fi
22972
22973    # Use eval to expand a potential ~
22974    eval path="$path"
22975    if test ! -f "$path" && test ! -d "$path"; then
22976      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22977    fi
22978
22979    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22980  fi
22981
22982              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22983$as_echo_n "checking for Boot JDK... " >&6; }
22984              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22985$as_echo "$BOOT_JDK" >&6; }
22986              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22987$as_echo_n "checking Boot JDK version... " >&6; }
22988              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22989              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22990$as_echo "$BOOT_JDK_VERSION" >&6; }
22991            fi # end check jdk version
22992          fi # end check rt.jar
22993        fi # end check javac
22994      fi # end check java
22995    fi # end check boot jdk found
22996  fi
22997
22998    done
22999  fi
23000
23001  fi
23002
23003
23004    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23005    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23006      # Do we have a bin/java?
23007      if test ! -x "$BOOT_JDK/bin/java"; then
23008        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23010        BOOT_JDK_FOUND=no
23011      else
23012        # Do we have a bin/javac?
23013        if test ! -x "$BOOT_JDK/bin/javac"; then
23014          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23016          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23017$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23018          BOOT_JDK_FOUND=no
23019        else
23020          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23021          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23022            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23024            BOOT_JDK_FOUND=no
23025          else
23026            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23027            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23028
23029            # Extra M4 quote needed to protect [] in grep expression.
23030            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23031            if test "x$FOUND_CORRECT_VERSION" = x; then
23032              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23034              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23035$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23036              BOOT_JDK_FOUND=no
23037            else
23038              # We're done! :-)
23039              BOOT_JDK_FOUND=yes
23040
23041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23042
23043  # Input might be given as Windows format, start by converting to
23044  # unix format.
23045  path="$BOOT_JDK"
23046  new_path=`$CYGPATH -u "$path"`
23047
23048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23051  # "foo.exe" is OK but "foo" is an error.
23052  #
23053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23054  # It is also a way to make sure we got the proper file name for the real test later on.
23055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23056  if test "x$test_shortpath" = x; then
23057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23060  fi
23061
23062  # Call helper function which possibly converts this using DOS-style short mode.
23063  # If so, the updated path is stored in $new_path.
23064
23065  input_path="$new_path"
23066  # Check if we need to convert this using DOS-style short mode. If the path
23067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23068  # take no chances and rewrite it.
23069  # Note: m4 eats our [], so we need to use [ and ] instead.
23070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23071  if test "x$has_forbidden_chars" != x; then
23072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23076      # Going to short mode and back again did indeed matter. Since short mode is
23077      # case insensitive, let's make it lowercase to improve readability.
23078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23079      # Now convert it back to Unix-stile (cygpath)
23080      input_path=`$CYGPATH -u "$shortmode_path"`
23081      new_path="$input_path"
23082    fi
23083  fi
23084
23085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23086  if test "x$test_cygdrive_prefix" = x; then
23087    # As a simple fix, exclude /usr/bin since it's not a real path.
23088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23090      # a path prefixed by /cygdrive for fixpath to work.
23091      new_path="$CYGWIN_ROOT_PATH$input_path"
23092    fi
23093  fi
23094
23095
23096  if test "x$path" != "x$new_path"; then
23097    BOOT_JDK="$new_path"
23098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23100  fi
23101
23102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23103
23104  path="$BOOT_JDK"
23105  has_colon=`$ECHO $path | $GREP ^.:`
23106  new_path="$path"
23107  if test "x$has_colon" = x; then
23108    # Not in mixed or Windows style, start by that.
23109    new_path=`cmd //c echo $path`
23110  fi
23111
23112
23113  input_path="$new_path"
23114  # Check if we need to convert this using DOS-style short mode. If the path
23115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23116  # take no chances and rewrite it.
23117  # Note: m4 eats our [], so we need to use [ and ] instead.
23118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23119  if test "x$has_forbidden_chars" != x; then
23120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23122  fi
23123
23124
23125  windows_path="$new_path"
23126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23127    unix_path=`$CYGPATH -u "$windows_path"`
23128    new_path="$unix_path"
23129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23131    new_path="$unix_path"
23132  fi
23133
23134  if test "x$path" != "x$new_path"; then
23135    BOOT_JDK="$new_path"
23136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23138  fi
23139
23140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23142
23143  else
23144    # We're on a posix platform. Hooray! :)
23145    path="$BOOT_JDK"
23146    has_space=`$ECHO "$path" | $GREP " "`
23147    if test "x$has_space" != x; then
23148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23150      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23151    fi
23152
23153    # Use eval to expand a potential ~
23154    eval path="$path"
23155    if test ! -f "$path" && test ! -d "$path"; then
23156      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23157    fi
23158
23159    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23160  fi
23161
23162              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23163$as_echo_n "checking for Boot JDK... " >&6; }
23164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23165$as_echo "$BOOT_JDK" >&6; }
23166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23167$as_echo_n "checking Boot JDK version... " >&6; }
23168              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23169              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23170$as_echo "$BOOT_JDK_VERSION" >&6; }
23171            fi # end check jdk version
23172          fi # end check rt.jar
23173        fi # end check javac
23174      fi # end check java
23175    fi # end check boot jdk found
23176  fi
23177
23178
23179  if test "x$BOOT_JDK_FOUND" = xno; then
23180    # Now execute the test
23181
23182  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23183  BOOT_JDK_SUFFIX=""
23184  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23185  if test "x$ALL_JDKS_FOUND" != x; then
23186    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23187
23188  if test "x$BOOT_JDK_FOUND" = xno; then
23189    # Now execute the test
23190
23191        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23192        if test -d "$BOOT_JDK"; then
23193          BOOT_JDK_FOUND=maybe
23194          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23195$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23196        fi
23197
23198
23199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23201      # Do we have a bin/java?
23202      if test ! -x "$BOOT_JDK/bin/java"; then
23203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23205        BOOT_JDK_FOUND=no
23206      else
23207        # Do we have a bin/javac?
23208        if test ! -x "$BOOT_JDK/bin/javac"; then
23209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23213          BOOT_JDK_FOUND=no
23214        else
23215          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23216          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23219            BOOT_JDK_FOUND=no
23220          else
23221            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23223
23224            # Extra M4 quote needed to protect [] in grep expression.
23225            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23226            if test "x$FOUND_CORRECT_VERSION" = x; then
23227              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23229              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23230$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23231              BOOT_JDK_FOUND=no
23232            else
23233              # We're done! :-)
23234              BOOT_JDK_FOUND=yes
23235
23236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237
23238  # Input might be given as Windows format, start by converting to
23239  # unix format.
23240  path="$BOOT_JDK"
23241  new_path=`$CYGPATH -u "$path"`
23242
23243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23246  # "foo.exe" is OK but "foo" is an error.
23247  #
23248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23249  # It is also a way to make sure we got the proper file name for the real test later on.
23250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23251  if test "x$test_shortpath" = x; then
23252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23253$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23254    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23255  fi
23256
23257  # Call helper function which possibly converts this using DOS-style short mode.
23258  # If so, the updated path is stored in $new_path.
23259
23260  input_path="$new_path"
23261  # Check if we need to convert this using DOS-style short mode. If the path
23262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23263  # take no chances and rewrite it.
23264  # Note: m4 eats our [], so we need to use [ and ] instead.
23265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23266  if test "x$has_forbidden_chars" != x; then
23267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23271      # Going to short mode and back again did indeed matter. Since short mode is
23272      # case insensitive, let's make it lowercase to improve readability.
23273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23274      # Now convert it back to Unix-stile (cygpath)
23275      input_path=`$CYGPATH -u "$shortmode_path"`
23276      new_path="$input_path"
23277    fi
23278  fi
23279
23280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23281  if test "x$test_cygdrive_prefix" = x; then
23282    # As a simple fix, exclude /usr/bin since it's not a real path.
23283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23285      # a path prefixed by /cygdrive for fixpath to work.
23286      new_path="$CYGWIN_ROOT_PATH$input_path"
23287    fi
23288  fi
23289
23290
23291  if test "x$path" != "x$new_path"; then
23292    BOOT_JDK="$new_path"
23293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23295  fi
23296
23297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23298
23299  path="$BOOT_JDK"
23300  has_colon=`$ECHO $path | $GREP ^.:`
23301  new_path="$path"
23302  if test "x$has_colon" = x; then
23303    # Not in mixed or Windows style, start by that.
23304    new_path=`cmd //c echo $path`
23305  fi
23306
23307
23308  input_path="$new_path"
23309  # Check if we need to convert this using DOS-style short mode. If the path
23310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23311  # take no chances and rewrite it.
23312  # Note: m4 eats our [], so we need to use [ and ] instead.
23313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23314  if test "x$has_forbidden_chars" != x; then
23315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23317  fi
23318
23319
23320  windows_path="$new_path"
23321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23322    unix_path=`$CYGPATH -u "$windows_path"`
23323    new_path="$unix_path"
23324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23326    new_path="$unix_path"
23327  fi
23328
23329  if test "x$path" != "x$new_path"; then
23330    BOOT_JDK="$new_path"
23331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23333  fi
23334
23335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23337
23338  else
23339    # We're on a posix platform. Hooray! :)
23340    path="$BOOT_JDK"
23341    has_space=`$ECHO "$path" | $GREP " "`
23342    if test "x$has_space" != x; then
23343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23346    fi
23347
23348    # Use eval to expand a potential ~
23349    eval path="$path"
23350    if test ! -f "$path" && test ! -d "$path"; then
23351      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23352    fi
23353
23354    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23355  fi
23356
23357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23358$as_echo_n "checking for Boot JDK... " >&6; }
23359              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23360$as_echo "$BOOT_JDK" >&6; }
23361              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23362$as_echo_n "checking Boot JDK version... " >&6; }
23363              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23364              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23365$as_echo "$BOOT_JDK_VERSION" >&6; }
23366            fi # end check jdk version
23367          fi # end check rt.jar
23368        fi # end check javac
23369      fi # end check java
23370    fi # end check boot jdk found
23371  fi
23372
23373    done
23374  fi
23375
23376
23377    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23378    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23379      # Do we have a bin/java?
23380      if test ! -x "$BOOT_JDK/bin/java"; then
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23383        BOOT_JDK_FOUND=no
23384      else
23385        # Do we have a bin/javac?
23386        if test ! -x "$BOOT_JDK/bin/javac"; then
23387          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23389          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23390$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23391          BOOT_JDK_FOUND=no
23392        else
23393          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23394          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23397            BOOT_JDK_FOUND=no
23398          else
23399            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23400            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23401
23402            # Extra M4 quote needed to protect [] in grep expression.
23403            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23404            if test "x$FOUND_CORRECT_VERSION" = x; then
23405              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23407              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23408$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23409              BOOT_JDK_FOUND=no
23410            else
23411              # We're done! :-)
23412              BOOT_JDK_FOUND=yes
23413
23414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23415
23416  # Input might be given as Windows format, start by converting to
23417  # unix format.
23418  path="$BOOT_JDK"
23419  new_path=`$CYGPATH -u "$path"`
23420
23421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23424  # "foo.exe" is OK but "foo" is an error.
23425  #
23426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23427  # It is also a way to make sure we got the proper file name for the real test later on.
23428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23429  if test "x$test_shortpath" = x; then
23430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23431$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23432    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23433  fi
23434
23435  # Call helper function which possibly converts this using DOS-style short mode.
23436  # If so, the updated path is stored in $new_path.
23437
23438  input_path="$new_path"
23439  # Check if we need to convert this using DOS-style short mode. If the path
23440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23441  # take no chances and rewrite it.
23442  # Note: m4 eats our [], so we need to use [ and ] instead.
23443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23444  if test "x$has_forbidden_chars" != x; then
23445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23449      # Going to short mode and back again did indeed matter. Since short mode is
23450      # case insensitive, let's make it lowercase to improve readability.
23451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23452      # Now convert it back to Unix-stile (cygpath)
23453      input_path=`$CYGPATH -u "$shortmode_path"`
23454      new_path="$input_path"
23455    fi
23456  fi
23457
23458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23459  if test "x$test_cygdrive_prefix" = x; then
23460    # As a simple fix, exclude /usr/bin since it's not a real path.
23461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23463      # a path prefixed by /cygdrive for fixpath to work.
23464      new_path="$CYGWIN_ROOT_PATH$input_path"
23465    fi
23466  fi
23467
23468
23469  if test "x$path" != "x$new_path"; then
23470    BOOT_JDK="$new_path"
23471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23473  fi
23474
23475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23476
23477  path="$BOOT_JDK"
23478  has_colon=`$ECHO $path | $GREP ^.:`
23479  new_path="$path"
23480  if test "x$has_colon" = x; then
23481    # Not in mixed or Windows style, start by that.
23482    new_path=`cmd //c echo $path`
23483  fi
23484
23485
23486  input_path="$new_path"
23487  # Check if we need to convert this using DOS-style short mode. If the path
23488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23489  # take no chances and rewrite it.
23490  # Note: m4 eats our [], so we need to use [ and ] instead.
23491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23492  if test "x$has_forbidden_chars" != x; then
23493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23495  fi
23496
23497
23498  windows_path="$new_path"
23499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23500    unix_path=`$CYGPATH -u "$windows_path"`
23501    new_path="$unix_path"
23502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23504    new_path="$unix_path"
23505  fi
23506
23507  if test "x$path" != "x$new_path"; then
23508    BOOT_JDK="$new_path"
23509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23511  fi
23512
23513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23515
23516  else
23517    # We're on a posix platform. Hooray! :)
23518    path="$BOOT_JDK"
23519    has_space=`$ECHO "$path" | $GREP " "`
23520    if test "x$has_space" != x; then
23521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23524    fi
23525
23526    # Use eval to expand a potential ~
23527    eval path="$path"
23528    if test ! -f "$path" && test ! -d "$path"; then
23529      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23530    fi
23531
23532    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23533  fi
23534
23535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23536$as_echo_n "checking for Boot JDK... " >&6; }
23537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23538$as_echo "$BOOT_JDK" >&6; }
23539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23540$as_echo_n "checking Boot JDK version... " >&6; }
23541              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23543$as_echo "$BOOT_JDK_VERSION" >&6; }
23544            fi # end check jdk version
23545          fi # end check rt.jar
23546        fi # end check javac
23547      fi # end check java
23548    fi # end check boot jdk found
23549  fi
23550
23551  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23552
23553  if test "x$BOOT_JDK_FOUND" = xno; then
23554    # Now execute the test
23555
23556  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23557  BOOT_JDK_SUFFIX="/Contents/Home"
23558  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23559  if test "x$ALL_JDKS_FOUND" != x; then
23560    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23561
23562  if test "x$BOOT_JDK_FOUND" = xno; then
23563    # Now execute the test
23564
23565        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23566        if test -d "$BOOT_JDK"; then
23567          BOOT_JDK_FOUND=maybe
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23569$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23570        fi
23571
23572
23573    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23574    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23575      # Do we have a bin/java?
23576      if test ! -x "$BOOT_JDK/bin/java"; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23579        BOOT_JDK_FOUND=no
23580      else
23581        # Do we have a bin/javac?
23582        if test ! -x "$BOOT_JDK/bin/javac"; then
23583          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23585          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23586$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23587          BOOT_JDK_FOUND=no
23588        else
23589          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23590          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23593            BOOT_JDK_FOUND=no
23594          else
23595            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23596            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23597
23598            # Extra M4 quote needed to protect [] in grep expression.
23599            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23600            if test "x$FOUND_CORRECT_VERSION" = x; then
23601              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23603              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23604$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23605              BOOT_JDK_FOUND=no
23606            else
23607              # We're done! :-)
23608              BOOT_JDK_FOUND=yes
23609
23610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23611
23612  # Input might be given as Windows format, start by converting to
23613  # unix format.
23614  path="$BOOT_JDK"
23615  new_path=`$CYGPATH -u "$path"`
23616
23617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23620  # "foo.exe" is OK but "foo" is an error.
23621  #
23622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23623  # It is also a way to make sure we got the proper file name for the real test later on.
23624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23625  if test "x$test_shortpath" = x; then
23626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23628    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23629  fi
23630
23631  # Call helper function which possibly converts this using DOS-style short mode.
23632  # If so, the updated path is stored in $new_path.
23633
23634  input_path="$new_path"
23635  # Check if we need to convert this using DOS-style short mode. If the path
23636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23637  # take no chances and rewrite it.
23638  # Note: m4 eats our [], so we need to use [ and ] instead.
23639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23640  if test "x$has_forbidden_chars" != x; then
23641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23645      # Going to short mode and back again did indeed matter. Since short mode is
23646      # case insensitive, let's make it lowercase to improve readability.
23647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23648      # Now convert it back to Unix-stile (cygpath)
23649      input_path=`$CYGPATH -u "$shortmode_path"`
23650      new_path="$input_path"
23651    fi
23652  fi
23653
23654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23655  if test "x$test_cygdrive_prefix" = x; then
23656    # As a simple fix, exclude /usr/bin since it's not a real path.
23657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23659      # a path prefixed by /cygdrive for fixpath to work.
23660      new_path="$CYGWIN_ROOT_PATH$input_path"
23661    fi
23662  fi
23663
23664
23665  if test "x$path" != "x$new_path"; then
23666    BOOT_JDK="$new_path"
23667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23669  fi
23670
23671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23672
23673  path="$BOOT_JDK"
23674  has_colon=`$ECHO $path | $GREP ^.:`
23675  new_path="$path"
23676  if test "x$has_colon" = x; then
23677    # Not in mixed or Windows style, start by that.
23678    new_path=`cmd //c echo $path`
23679  fi
23680
23681
23682  input_path="$new_path"
23683  # Check if we need to convert this using DOS-style short mode. If the path
23684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23685  # take no chances and rewrite it.
23686  # Note: m4 eats our [], so we need to use [ and ] instead.
23687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23688  if test "x$has_forbidden_chars" != x; then
23689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23691  fi
23692
23693
23694  windows_path="$new_path"
23695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23696    unix_path=`$CYGPATH -u "$windows_path"`
23697    new_path="$unix_path"
23698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23700    new_path="$unix_path"
23701  fi
23702
23703  if test "x$path" != "x$new_path"; then
23704    BOOT_JDK="$new_path"
23705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23707  fi
23708
23709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23711
23712  else
23713    # We're on a posix platform. Hooray! :)
23714    path="$BOOT_JDK"
23715    has_space=`$ECHO "$path" | $GREP " "`
23716    if test "x$has_space" != x; then
23717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23719      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23720    fi
23721
23722    # Use eval to expand a potential ~
23723    eval path="$path"
23724    if test ! -f "$path" && test ! -d "$path"; then
23725      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23726    fi
23727
23728    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23729  fi
23730
23731              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23732$as_echo_n "checking for Boot JDK... " >&6; }
23733              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23734$as_echo "$BOOT_JDK" >&6; }
23735              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23736$as_echo_n "checking Boot JDK version... " >&6; }
23737              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23738              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23739$as_echo "$BOOT_JDK_VERSION" >&6; }
23740            fi # end check jdk version
23741          fi # end check rt.jar
23742        fi # end check javac
23743      fi # end check java
23744    fi # end check boot jdk found
23745  fi
23746
23747    done
23748  fi
23749
23750
23751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23753      # Do we have a bin/java?
23754      if test ! -x "$BOOT_JDK/bin/java"; then
23755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23757        BOOT_JDK_FOUND=no
23758      else
23759        # Do we have a bin/javac?
23760        if test ! -x "$BOOT_JDK/bin/javac"; then
23761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23765          BOOT_JDK_FOUND=no
23766        else
23767          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23768          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23771            BOOT_JDK_FOUND=no
23772          else
23773            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23775
23776            # Extra M4 quote needed to protect [] in grep expression.
23777            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23778            if test "x$FOUND_CORRECT_VERSION" = x; then
23779              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23781              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23782$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23783              BOOT_JDK_FOUND=no
23784            else
23785              # We're done! :-)
23786              BOOT_JDK_FOUND=yes
23787
23788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  path="$BOOT_JDK"
23793  new_path=`$CYGPATH -u "$path"`
23794
23795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23798  # "foo.exe" is OK but "foo" is an error.
23799  #
23800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23801  # It is also a way to make sure we got the proper file name for the real test later on.
23802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23803  if test "x$test_shortpath" = x; then
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23807  fi
23808
23809  # Call helper function which possibly converts this using DOS-style short mode.
23810  # If so, the updated path is stored in $new_path.
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23823      # Going to short mode and back again did indeed matter. Since short mode is
23824      # case insensitive, let's make it lowercase to improve readability.
23825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23826      # Now convert it back to Unix-stile (cygpath)
23827      input_path=`$CYGPATH -u "$shortmode_path"`
23828      new_path="$input_path"
23829    fi
23830  fi
23831
23832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23833  if test "x$test_cygdrive_prefix" = x; then
23834    # As a simple fix, exclude /usr/bin since it's not a real path.
23835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23837      # a path prefixed by /cygdrive for fixpath to work.
23838      new_path="$CYGWIN_ROOT_PATH$input_path"
23839    fi
23840  fi
23841
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850
23851  path="$BOOT_JDK"
23852  has_colon=`$ECHO $path | $GREP ^.:`
23853  new_path="$path"
23854  if test "x$has_colon" = x; then
23855    # Not in mixed or Windows style, start by that.
23856    new_path=`cmd //c echo $path`
23857  fi
23858
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869  fi
23870
23871
23872  windows_path="$new_path"
23873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874    unix_path=`$CYGPATH -u "$windows_path"`
23875    new_path="$unix_path"
23876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23878    new_path="$unix_path"
23879  fi
23880
23881  if test "x$path" != "x$new_path"; then
23882    BOOT_JDK="$new_path"
23883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23885  fi
23886
23887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23889
23890  else
23891    # We're on a posix platform. Hooray! :)
23892    path="$BOOT_JDK"
23893    has_space=`$ECHO "$path" | $GREP " "`
23894    if test "x$has_space" != x; then
23895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23897      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23898    fi
23899
23900    # Use eval to expand a potential ~
23901    eval path="$path"
23902    if test ! -f "$path" && test ! -d "$path"; then
23903      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23904    fi
23905
23906    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23907  fi
23908
23909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23910$as_echo_n "checking for Boot JDK... " >&6; }
23911              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23912$as_echo "$BOOT_JDK" >&6; }
23913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23914$as_echo_n "checking Boot JDK version... " >&6; }
23915              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23917$as_echo "$BOOT_JDK_VERSION" >&6; }
23918            fi # end check jdk version
23919          fi # end check rt.jar
23920        fi # end check javac
23921      fi # end check java
23922    fi # end check boot jdk found
23923  fi
23924
23925
23926  if test "x$BOOT_JDK_FOUND" = xno; then
23927    # Now execute the test
23928
23929  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23930  BOOT_JDK_SUFFIX="/Contents/Home"
23931  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23932  if test "x$ALL_JDKS_FOUND" != x; then
23933    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23934
23935  if test "x$BOOT_JDK_FOUND" = xno; then
23936    # Now execute the test
23937
23938        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23939        if test -d "$BOOT_JDK"; then
23940          BOOT_JDK_FOUND=maybe
23941          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23942$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23943        fi
23944
23945
23946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23948      # Do we have a bin/java?
23949      if test ! -x "$BOOT_JDK/bin/java"; then
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23952        BOOT_JDK_FOUND=no
23953      else
23954        # Do we have a bin/javac?
23955        if test ! -x "$BOOT_JDK/bin/javac"; then
23956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23960          BOOT_JDK_FOUND=no
23961        else
23962          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23963          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23964            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23966            BOOT_JDK_FOUND=no
23967          else
23968            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23970
23971            # Extra M4 quote needed to protect [] in grep expression.
23972            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23973            if test "x$FOUND_CORRECT_VERSION" = x; then
23974              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23976              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23977$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23978              BOOT_JDK_FOUND=no
23979            else
23980              # We're done! :-)
23981              BOOT_JDK_FOUND=yes
23982
23983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23984
23985  # Input might be given as Windows format, start by converting to
23986  # unix format.
23987  path="$BOOT_JDK"
23988  new_path=`$CYGPATH -u "$path"`
23989
23990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23993  # "foo.exe" is OK but "foo" is an error.
23994  #
23995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23996  # It is also a way to make sure we got the proper file name for the real test later on.
23997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23998  if test "x$test_shortpath" = x; then
23999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24002  fi
24003
24004  # Call helper function which possibly converts this using DOS-style short mode.
24005  # If so, the updated path is stored in $new_path.
24006
24007  input_path="$new_path"
24008  # Check if we need to convert this using DOS-style short mode. If the path
24009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24010  # take no chances and rewrite it.
24011  # Note: m4 eats our [], so we need to use [ and ] instead.
24012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24013  if test "x$has_forbidden_chars" != x; then
24014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24018      # Going to short mode and back again did indeed matter. Since short mode is
24019      # case insensitive, let's make it lowercase to improve readability.
24020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24021      # Now convert it back to Unix-stile (cygpath)
24022      input_path=`$CYGPATH -u "$shortmode_path"`
24023      new_path="$input_path"
24024    fi
24025  fi
24026
24027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24028  if test "x$test_cygdrive_prefix" = x; then
24029    # As a simple fix, exclude /usr/bin since it's not a real path.
24030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24032      # a path prefixed by /cygdrive for fixpath to work.
24033      new_path="$CYGWIN_ROOT_PATH$input_path"
24034    fi
24035  fi
24036
24037
24038  if test "x$path" != "x$new_path"; then
24039    BOOT_JDK="$new_path"
24040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24042  fi
24043
24044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24045
24046  path="$BOOT_JDK"
24047  has_colon=`$ECHO $path | $GREP ^.:`
24048  new_path="$path"
24049  if test "x$has_colon" = x; then
24050    # Not in mixed or Windows style, start by that.
24051    new_path=`cmd //c echo $path`
24052  fi
24053
24054
24055  input_path="$new_path"
24056  # Check if we need to convert this using DOS-style short mode. If the path
24057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24058  # take no chances and rewrite it.
24059  # Note: m4 eats our [], so we need to use [ and ] instead.
24060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24061  if test "x$has_forbidden_chars" != x; then
24062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24064  fi
24065
24066
24067  windows_path="$new_path"
24068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24069    unix_path=`$CYGPATH -u "$windows_path"`
24070    new_path="$unix_path"
24071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24073    new_path="$unix_path"
24074  fi
24075
24076  if test "x$path" != "x$new_path"; then
24077    BOOT_JDK="$new_path"
24078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24080  fi
24081
24082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24084
24085  else
24086    # We're on a posix platform. Hooray! :)
24087    path="$BOOT_JDK"
24088    has_space=`$ECHO "$path" | $GREP " "`
24089    if test "x$has_space" != x; then
24090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24093    fi
24094
24095    # Use eval to expand a potential ~
24096    eval path="$path"
24097    if test ! -f "$path" && test ! -d "$path"; then
24098      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24099    fi
24100
24101    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24102  fi
24103
24104              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24105$as_echo_n "checking for Boot JDK... " >&6; }
24106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24107$as_echo "$BOOT_JDK" >&6; }
24108              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24109$as_echo_n "checking Boot JDK version... " >&6; }
24110              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24111              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24112$as_echo "$BOOT_JDK_VERSION" >&6; }
24113            fi # end check jdk version
24114          fi # end check rt.jar
24115        fi # end check javac
24116      fi # end check java
24117    fi # end check boot jdk found
24118  fi
24119
24120    done
24121  fi
24122
24123
24124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24126      # Do we have a bin/java?
24127      if test ! -x "$BOOT_JDK/bin/java"; then
24128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24130        BOOT_JDK_FOUND=no
24131      else
24132        # Do we have a bin/javac?
24133        if test ! -x "$BOOT_JDK/bin/javac"; then
24134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24138          BOOT_JDK_FOUND=no
24139        else
24140          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24141          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24144            BOOT_JDK_FOUND=no
24145          else
24146            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24148
24149            # Extra M4 quote needed to protect [] in grep expression.
24150            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24151            if test "x$FOUND_CORRECT_VERSION" = x; then
24152              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24154              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24155$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24156              BOOT_JDK_FOUND=no
24157            else
24158              # We're done! :-)
24159              BOOT_JDK_FOUND=yes
24160
24161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24162
24163  # Input might be given as Windows format, start by converting to
24164  # unix format.
24165  path="$BOOT_JDK"
24166  new_path=`$CYGPATH -u "$path"`
24167
24168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24171  # "foo.exe" is OK but "foo" is an error.
24172  #
24173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24174  # It is also a way to make sure we got the proper file name for the real test later on.
24175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24176  if test "x$test_shortpath" = x; then
24177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24180  fi
24181
24182  # Call helper function which possibly converts this using DOS-style short mode.
24183  # If so, the updated path is stored in $new_path.
24184
24185  input_path="$new_path"
24186  # Check if we need to convert this using DOS-style short mode. If the path
24187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24188  # take no chances and rewrite it.
24189  # Note: m4 eats our [], so we need to use [ and ] instead.
24190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24191  if test "x$has_forbidden_chars" != x; then
24192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24196      # Going to short mode and back again did indeed matter. Since short mode is
24197      # case insensitive, let's make it lowercase to improve readability.
24198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24199      # Now convert it back to Unix-stile (cygpath)
24200      input_path=`$CYGPATH -u "$shortmode_path"`
24201      new_path="$input_path"
24202    fi
24203  fi
24204
24205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24206  if test "x$test_cygdrive_prefix" = x; then
24207    # As a simple fix, exclude /usr/bin since it's not a real path.
24208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24210      # a path prefixed by /cygdrive for fixpath to work.
24211      new_path="$CYGWIN_ROOT_PATH$input_path"
24212    fi
24213  fi
24214
24215
24216  if test "x$path" != "x$new_path"; then
24217    BOOT_JDK="$new_path"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24220  fi
24221
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223
24224  path="$BOOT_JDK"
24225  has_colon=`$ECHO $path | $GREP ^.:`
24226  new_path="$path"
24227  if test "x$has_colon" = x; then
24228    # Not in mixed or Windows style, start by that.
24229    new_path=`cmd //c echo $path`
24230  fi
24231
24232
24233  input_path="$new_path"
24234  # Check if we need to convert this using DOS-style short mode. If the path
24235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24236  # take no chances and rewrite it.
24237  # Note: m4 eats our [], so we need to use [ and ] instead.
24238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24239  if test "x$has_forbidden_chars" != x; then
24240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24242  fi
24243
24244
24245  windows_path="$new_path"
24246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24247    unix_path=`$CYGPATH -u "$windows_path"`
24248    new_path="$unix_path"
24249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24251    new_path="$unix_path"
24252  fi
24253
24254  if test "x$path" != "x$new_path"; then
24255    BOOT_JDK="$new_path"
24256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24258  fi
24259
24260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24262
24263  else
24264    # We're on a posix platform. Hooray! :)
24265    path="$BOOT_JDK"
24266    has_space=`$ECHO "$path" | $GREP " "`
24267    if test "x$has_space" != x; then
24268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24270      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24271    fi
24272
24273    # Use eval to expand a potential ~
24274    eval path="$path"
24275    if test ! -f "$path" && test ! -d "$path"; then
24276      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24277    fi
24278
24279    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24280  fi
24281
24282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24283$as_echo_n "checking for Boot JDK... " >&6; }
24284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24285$as_echo "$BOOT_JDK" >&6; }
24286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24287$as_echo_n "checking Boot JDK version... " >&6; }
24288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24290$as_echo "$BOOT_JDK_VERSION" >&6; }
24291            fi # end check jdk version
24292          fi # end check rt.jar
24293        fi # end check javac
24294      fi # end check java
24295    fi # end check boot jdk found
24296  fi
24297
24298  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24299
24300  if test "x$BOOT_JDK_FOUND" = xno; then
24301    # Now execute the test
24302
24303  BOOT_JDK_PREFIX="/usr/lib/jvm"
24304  BOOT_JDK_SUFFIX=""
24305  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24306  if test "x$ALL_JDKS_FOUND" != x; then
24307    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24308
24309  if test "x$BOOT_JDK_FOUND" = xno; then
24310    # Now execute the test
24311
24312        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24313        if test -d "$BOOT_JDK"; then
24314          BOOT_JDK_FOUND=maybe
24315          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24316$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24317        fi
24318
24319
24320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24322      # Do we have a bin/java?
24323      if test ! -x "$BOOT_JDK/bin/java"; then
24324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24326        BOOT_JDK_FOUND=no
24327      else
24328        # Do we have a bin/javac?
24329        if test ! -x "$BOOT_JDK/bin/javac"; then
24330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24334          BOOT_JDK_FOUND=no
24335        else
24336          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24337          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24338            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24340            BOOT_JDK_FOUND=no
24341          else
24342            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24344
24345            # Extra M4 quote needed to protect [] in grep expression.
24346            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24347            if test "x$FOUND_CORRECT_VERSION" = x; then
24348              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24350              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24351$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24352              BOOT_JDK_FOUND=no
24353            else
24354              # We're done! :-)
24355              BOOT_JDK_FOUND=yes
24356
24357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24358
24359  # Input might be given as Windows format, start by converting to
24360  # unix format.
24361  path="$BOOT_JDK"
24362  new_path=`$CYGPATH -u "$path"`
24363
24364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24367  # "foo.exe" is OK but "foo" is an error.
24368  #
24369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24370  # It is also a way to make sure we got the proper file name for the real test later on.
24371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24372  if test "x$test_shortpath" = x; then
24373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24376  fi
24377
24378  # Call helper function which possibly converts this using DOS-style short mode.
24379  # If so, the updated path is stored in $new_path.
24380
24381  input_path="$new_path"
24382  # Check if we need to convert this using DOS-style short mode. If the path
24383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24384  # take no chances and rewrite it.
24385  # Note: m4 eats our [], so we need to use [ and ] instead.
24386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24387  if test "x$has_forbidden_chars" != x; then
24388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24392      # Going to short mode and back again did indeed matter. Since short mode is
24393      # case insensitive, let's make it lowercase to improve readability.
24394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24395      # Now convert it back to Unix-stile (cygpath)
24396      input_path=`$CYGPATH -u "$shortmode_path"`
24397      new_path="$input_path"
24398    fi
24399  fi
24400
24401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24402  if test "x$test_cygdrive_prefix" = x; then
24403    # As a simple fix, exclude /usr/bin since it's not a real path.
24404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24406      # a path prefixed by /cygdrive for fixpath to work.
24407      new_path="$CYGWIN_ROOT_PATH$input_path"
24408    fi
24409  fi
24410
24411
24412  if test "x$path" != "x$new_path"; then
24413    BOOT_JDK="$new_path"
24414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24416  fi
24417
24418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24419
24420  path="$BOOT_JDK"
24421  has_colon=`$ECHO $path | $GREP ^.:`
24422  new_path="$path"
24423  if test "x$has_colon" = x; then
24424    # Not in mixed or Windows style, start by that.
24425    new_path=`cmd //c echo $path`
24426  fi
24427
24428
24429  input_path="$new_path"
24430  # Check if we need to convert this using DOS-style short mode. If the path
24431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24432  # take no chances and rewrite it.
24433  # Note: m4 eats our [], so we need to use [ and ] instead.
24434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24435  if test "x$has_forbidden_chars" != x; then
24436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24438  fi
24439
24440
24441  windows_path="$new_path"
24442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24443    unix_path=`$CYGPATH -u "$windows_path"`
24444    new_path="$unix_path"
24445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24447    new_path="$unix_path"
24448  fi
24449
24450  if test "x$path" != "x$new_path"; then
24451    BOOT_JDK="$new_path"
24452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24454  fi
24455
24456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24458
24459  else
24460    # We're on a posix platform. Hooray! :)
24461    path="$BOOT_JDK"
24462    has_space=`$ECHO "$path" | $GREP " "`
24463    if test "x$has_space" != x; then
24464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24467    fi
24468
24469    # Use eval to expand a potential ~
24470    eval path="$path"
24471    if test ! -f "$path" && test ! -d "$path"; then
24472      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24473    fi
24474
24475    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24476  fi
24477
24478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24479$as_echo_n "checking for Boot JDK... " >&6; }
24480              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24481$as_echo "$BOOT_JDK" >&6; }
24482              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24483$as_echo_n "checking Boot JDK version... " >&6; }
24484              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24485              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24486$as_echo "$BOOT_JDK_VERSION" >&6; }
24487            fi # end check jdk version
24488          fi # end check rt.jar
24489        fi # end check javac
24490      fi # end check java
24491    fi # end check boot jdk found
24492  fi
24493
24494    done
24495  fi
24496
24497
24498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24500      # Do we have a bin/java?
24501      if test ! -x "$BOOT_JDK/bin/java"; then
24502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24504        BOOT_JDK_FOUND=no
24505      else
24506        # Do we have a bin/javac?
24507        if test ! -x "$BOOT_JDK/bin/javac"; then
24508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24512          BOOT_JDK_FOUND=no
24513        else
24514          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24515          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24518            BOOT_JDK_FOUND=no
24519          else
24520            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24522
24523            # Extra M4 quote needed to protect [] in grep expression.
24524            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24525            if test "x$FOUND_CORRECT_VERSION" = x; then
24526              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24528              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24529$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24530              BOOT_JDK_FOUND=no
24531            else
24532              # We're done! :-)
24533              BOOT_JDK_FOUND=yes
24534
24535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536
24537  # Input might be given as Windows format, start by converting to
24538  # unix format.
24539  path="$BOOT_JDK"
24540  new_path=`$CYGPATH -u "$path"`
24541
24542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24545  # "foo.exe" is OK but "foo" is an error.
24546  #
24547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24548  # It is also a way to make sure we got the proper file name for the real test later on.
24549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24550  if test "x$test_shortpath" = x; then
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24554  fi
24555
24556  # Call helper function which possibly converts this using DOS-style short mode.
24557  # If so, the updated path is stored in $new_path.
24558
24559  input_path="$new_path"
24560  # Check if we need to convert this using DOS-style short mode. If the path
24561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24562  # take no chances and rewrite it.
24563  # Note: m4 eats our [], so we need to use [ and ] instead.
24564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24565  if test "x$has_forbidden_chars" != x; then
24566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24570      # Going to short mode and back again did indeed matter. Since short mode is
24571      # case insensitive, let's make it lowercase to improve readability.
24572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24573      # Now convert it back to Unix-stile (cygpath)
24574      input_path=`$CYGPATH -u "$shortmode_path"`
24575      new_path="$input_path"
24576    fi
24577  fi
24578
24579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24580  if test "x$test_cygdrive_prefix" = x; then
24581    # As a simple fix, exclude /usr/bin since it's not a real path.
24582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24584      # a path prefixed by /cygdrive for fixpath to work.
24585      new_path="$CYGWIN_ROOT_PATH$input_path"
24586    fi
24587  fi
24588
24589
24590  if test "x$path" != "x$new_path"; then
24591    BOOT_JDK="$new_path"
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24594  fi
24595
24596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24597
24598  path="$BOOT_JDK"
24599  has_colon=`$ECHO $path | $GREP ^.:`
24600  new_path="$path"
24601  if test "x$has_colon" = x; then
24602    # Not in mixed or Windows style, start by that.
24603    new_path=`cmd //c echo $path`
24604  fi
24605
24606
24607  input_path="$new_path"
24608  # Check if we need to convert this using DOS-style short mode. If the path
24609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24610  # take no chances and rewrite it.
24611  # Note: m4 eats our [], so we need to use [ and ] instead.
24612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24613  if test "x$has_forbidden_chars" != x; then
24614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24616  fi
24617
24618
24619  windows_path="$new_path"
24620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24621    unix_path=`$CYGPATH -u "$windows_path"`
24622    new_path="$unix_path"
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24625    new_path="$unix_path"
24626  fi
24627
24628  if test "x$path" != "x$new_path"; then
24629    BOOT_JDK="$new_path"
24630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24632  fi
24633
24634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24636
24637  else
24638    # We're on a posix platform. Hooray! :)
24639    path="$BOOT_JDK"
24640    has_space=`$ECHO "$path" | $GREP " "`
24641    if test "x$has_space" != x; then
24642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24645    fi
24646
24647    # Use eval to expand a potential ~
24648    eval path="$path"
24649    if test ! -f "$path" && test ! -d "$path"; then
24650      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24651    fi
24652
24653    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24654  fi
24655
24656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24657$as_echo_n "checking for Boot JDK... " >&6; }
24658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24659$as_echo "$BOOT_JDK" >&6; }
24660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24661$as_echo_n "checking Boot JDK version... " >&6; }
24662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24664$as_echo "$BOOT_JDK_VERSION" >&6; }
24665            fi # end check jdk version
24666          fi # end check rt.jar
24667        fi # end check javac
24668      fi # end check java
24669    fi # end check boot jdk found
24670  fi
24671
24672  fi
24673
24674
24675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24677      # Do we have a bin/java?
24678      if test ! -x "$BOOT_JDK/bin/java"; then
24679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24681        BOOT_JDK_FOUND=no
24682      else
24683        # Do we have a bin/javac?
24684        if test ! -x "$BOOT_JDK/bin/javac"; then
24685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24689          BOOT_JDK_FOUND=no
24690        else
24691          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24692          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24695            BOOT_JDK_FOUND=no
24696          else
24697            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24699
24700            # Extra M4 quote needed to protect [] in grep expression.
24701            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24702            if test "x$FOUND_CORRECT_VERSION" = x; then
24703              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24705              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24706$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24707              BOOT_JDK_FOUND=no
24708            else
24709              # We're done! :-)
24710              BOOT_JDK_FOUND=yes
24711
24712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24713
24714  # Input might be given as Windows format, start by converting to
24715  # unix format.
24716  path="$BOOT_JDK"
24717  new_path=`$CYGPATH -u "$path"`
24718
24719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24722  # "foo.exe" is OK but "foo" is an error.
24723  #
24724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24725  # It is also a way to make sure we got the proper file name for the real test later on.
24726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24727  if test "x$test_shortpath" = x; then
24728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24731  fi
24732
24733  # Call helper function which possibly converts this using DOS-style short mode.
24734  # If so, the updated path is stored in $new_path.
24735
24736  input_path="$new_path"
24737  # Check if we need to convert this using DOS-style short mode. If the path
24738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24739  # take no chances and rewrite it.
24740  # Note: m4 eats our [], so we need to use [ and ] instead.
24741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24742  if test "x$has_forbidden_chars" != x; then
24743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24747      # Going to short mode and back again did indeed matter. Since short mode is
24748      # case insensitive, let's make it lowercase to improve readability.
24749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24750      # Now convert it back to Unix-stile (cygpath)
24751      input_path=`$CYGPATH -u "$shortmode_path"`
24752      new_path="$input_path"
24753    fi
24754  fi
24755
24756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24757  if test "x$test_cygdrive_prefix" = x; then
24758    # As a simple fix, exclude /usr/bin since it's not a real path.
24759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24761      # a path prefixed by /cygdrive for fixpath to work.
24762      new_path="$CYGWIN_ROOT_PATH$input_path"
24763    fi
24764  fi
24765
24766
24767  if test "x$path" != "x$new_path"; then
24768    BOOT_JDK="$new_path"
24769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24771  fi
24772
24773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24774
24775  path="$BOOT_JDK"
24776  has_colon=`$ECHO $path | $GREP ^.:`
24777  new_path="$path"
24778  if test "x$has_colon" = x; then
24779    # Not in mixed or Windows style, start by that.
24780    new_path=`cmd //c echo $path`
24781  fi
24782
24783
24784  input_path="$new_path"
24785  # Check if we need to convert this using DOS-style short mode. If the path
24786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24787  # take no chances and rewrite it.
24788  # Note: m4 eats our [], so we need to use [ and ] instead.
24789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24790  if test "x$has_forbidden_chars" != x; then
24791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24793  fi
24794
24795
24796  windows_path="$new_path"
24797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798    unix_path=`$CYGPATH -u "$windows_path"`
24799    new_path="$unix_path"
24800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24802    new_path="$unix_path"
24803  fi
24804
24805  if test "x$path" != "x$new_path"; then
24806    BOOT_JDK="$new_path"
24807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24809  fi
24810
24811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24813
24814  else
24815    # We're on a posix platform. Hooray! :)
24816    path="$BOOT_JDK"
24817    has_space=`$ECHO "$path" | $GREP " "`
24818    if test "x$has_space" != x; then
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24821      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24822    fi
24823
24824    # Use eval to expand a potential ~
24825    eval path="$path"
24826    if test ! -f "$path" && test ! -d "$path"; then
24827      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24828    fi
24829
24830    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24831  fi
24832
24833              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24834$as_echo_n "checking for Boot JDK... " >&6; }
24835              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24836$as_echo "$BOOT_JDK" >&6; }
24837              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24838$as_echo_n "checking Boot JDK version... " >&6; }
24839              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24840              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24841$as_echo "$BOOT_JDK_VERSION" >&6; }
24842            fi # end check jdk version
24843          fi # end check rt.jar
24844        fi # end check javac
24845      fi # end check java
24846    fi # end check boot jdk found
24847  fi
24848
24849
24850  # If we haven't found anything yet, we've truly lost. Give up.
24851  if test "x$BOOT_JDK_FOUND" = xno; then
24852
24853  # Print a helpful message on how to acquire the necessary build dependency.
24854  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24855  MISSING_DEPENDENCY=openjdk
24856
24857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24858    cygwin_help $MISSING_DEPENDENCY
24859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24860    msys_help $MISSING_DEPENDENCY
24861  else
24862    PKGHANDLER_COMMAND=
24863
24864    case $PKGHANDLER in
24865      apt-get)
24866        apt_help     $MISSING_DEPENDENCY ;;
24867      yum)
24868        yum_help     $MISSING_DEPENDENCY ;;
24869      port)
24870        port_help    $MISSING_DEPENDENCY ;;
24871      pkgutil)
24872        pkgutil_help $MISSING_DEPENDENCY ;;
24873      pkgadd)
24874        pkgadd_help  $MISSING_DEPENDENCY ;;
24875    esac
24876
24877    if test "x$PKGHANDLER_COMMAND" != x; then
24878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24879    fi
24880  fi
24881
24882    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24883$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24884    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24885$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24886    as_fn_error $? "Cannot continue" "$LINENO" 5
24887  fi
24888
24889  # Setup proper paths for what we found
24890  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24891  if test ! -f "$BOOT_RTJAR"; then
24892    # On MacOSX it is called classes.jar
24893    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24894    if test -f "$BOOT_RTJAR"; then
24895      # Remove the ..
24896      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24897    fi
24898  fi
24899  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24900  BOOT_JDK="$BOOT_JDK"
24901
24902
24903
24904
24905  # Setup tools from the Boot JDK.
24906
24907  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
24908
24909  # Publish this variable in the help.
24910
24911
24912  if test "x$JAVA" = x; then
24913    # The variable is not set by user, try to locate tool using the code snippet
24914
24915      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24916$as_echo_n "checking for java in Boot JDK... " >&6; }
24917      JAVA=$BOOT_JDK/bin/java
24918      if test ! -x $JAVA; then
24919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24920$as_echo "not found" >&6; }
24921        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24922$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24923        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24924      fi
24925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24926$as_echo "ok" >&6; }
24927
24928
24929  else
24930    # The variable is set, but is it from the command line or the environment?
24931
24932    # Try to remove the string !JAVA! from our list.
24933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
24934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24935      # If it failed, the variable was not from the command line. Ignore it,
24936      # but warn the user (except for BASH, which is always set by the calling BASH).
24937      if test "xJAVA" != xBASH; then
24938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
24939$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
24940      fi
24941      # Try to locate tool using the code snippet
24942
24943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24944$as_echo_n "checking for java in Boot JDK... " >&6; }
24945      JAVA=$BOOT_JDK/bin/java
24946      if test ! -x $JAVA; then
24947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24948$as_echo "not found" >&6; }
24949        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24950$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24951        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24952      fi
24953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24954$as_echo "ok" >&6; }
24955
24956
24957    else
24958      # If it succeeded, then it was overridden by the user. We will use it
24959      # for the tool.
24960
24961      # First remove it from the list of overridden variables, so we can test
24962      # for unknown variables in the end.
24963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24964
24965      # Check if the provided tool contains a complete path.
24966      tool_specified="$JAVA"
24967      tool_basename="${tool_specified##*/}"
24968      if test "x$tool_basename" = "x$tool_specified"; then
24969        # A command without a complete path is provided, search $PATH.
24970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
24971$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
24972        # Extract the first word of "$tool_basename", so it can be a program name with args.
24973set dummy $tool_basename; ac_word=$2
24974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24975$as_echo_n "checking for $ac_word... " >&6; }
24976if ${ac_cv_path_JAVA+:} false; then :
24977  $as_echo_n "(cached) " >&6
24978else
24979  case $JAVA in
24980  [\\/]* | ?:[\\/]*)
24981  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
24982  ;;
24983  *)
24984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24985for as_dir in $PATH
24986do
24987  IFS=$as_save_IFS
24988  test -z "$as_dir" && as_dir=.
24989    for ac_exec_ext in '' $ac_executable_extensions; do
24990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24991    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
24992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24993    break 2
24994  fi
24995done
24996  done
24997IFS=$as_save_IFS
24998
24999  ;;
25000esac
25001fi
25002JAVA=$ac_cv_path_JAVA
25003if test -n "$JAVA"; then
25004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25005$as_echo "$JAVA" >&6; }
25006else
25007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25008$as_echo "no" >&6; }
25009fi
25010
25011
25012        if test "x$JAVA" = x; then
25013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25014        fi
25015      else
25016        # Otherwise we believe it is a complete path. Use it as it is.
25017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25018$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25020$as_echo_n "checking for JAVA... " >&6; }
25021        if test ! -x "$tool_specified"; then
25022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25023$as_echo "not found" >&6; }
25024          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25025        fi
25026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25027$as_echo "$tool_specified" >&6; }
25028      fi
25029    fi
25030  fi
25031
25032
25033
25034  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25035
25036  # Publish this variable in the help.
25037
25038
25039  if test "x$JAVAC" = x; then
25040    # The variable is not set by user, try to locate tool using the code snippet
25041
25042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25043$as_echo_n "checking for javac in Boot JDK... " >&6; }
25044      JAVAC=$BOOT_JDK/bin/javac
25045      if test ! -x $JAVAC; then
25046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25047$as_echo "not found" >&6; }
25048        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25049$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25050        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25051      fi
25052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25053$as_echo "ok" >&6; }
25054
25055
25056  else
25057    # The variable is set, but is it from the command line or the environment?
25058
25059    # Try to remove the string !JAVAC! from our list.
25060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25062      # If it failed, the variable was not from the command line. Ignore it,
25063      # but warn the user (except for BASH, which is always set by the calling BASH).
25064      if test "xJAVAC" != xBASH; then
25065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25066$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25067      fi
25068      # Try to locate tool using the code snippet
25069
25070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25071$as_echo_n "checking for javac in Boot JDK... " >&6; }
25072      JAVAC=$BOOT_JDK/bin/javac
25073      if test ! -x $JAVAC; then
25074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25075$as_echo "not found" >&6; }
25076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25078        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25079      fi
25080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25081$as_echo "ok" >&6; }
25082
25083
25084    else
25085      # If it succeeded, then it was overridden by the user. We will use it
25086      # for the tool.
25087
25088      # First remove it from the list of overridden variables, so we can test
25089      # for unknown variables in the end.
25090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25091
25092      # Check if the provided tool contains a complete path.
25093      tool_specified="$JAVAC"
25094      tool_basename="${tool_specified##*/}"
25095      if test "x$tool_basename" = "x$tool_specified"; then
25096        # A command without a complete path is provided, search $PATH.
25097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25098$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25099        # Extract the first word of "$tool_basename", so it can be a program name with args.
25100set dummy $tool_basename; ac_word=$2
25101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25102$as_echo_n "checking for $ac_word... " >&6; }
25103if ${ac_cv_path_JAVAC+:} false; then :
25104  $as_echo_n "(cached) " >&6
25105else
25106  case $JAVAC in
25107  [\\/]* | ?:[\\/]*)
25108  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25109  ;;
25110  *)
25111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25112for as_dir in $PATH
25113do
25114  IFS=$as_save_IFS
25115  test -z "$as_dir" && as_dir=.
25116    for ac_exec_ext in '' $ac_executable_extensions; do
25117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25118    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25120    break 2
25121  fi
25122done
25123  done
25124IFS=$as_save_IFS
25125
25126  ;;
25127esac
25128fi
25129JAVAC=$ac_cv_path_JAVAC
25130if test -n "$JAVAC"; then
25131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25132$as_echo "$JAVAC" >&6; }
25133else
25134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25135$as_echo "no" >&6; }
25136fi
25137
25138
25139        if test "x$JAVAC" = x; then
25140          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25141        fi
25142      else
25143        # Otherwise we believe it is a complete path. Use it as it is.
25144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25145$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25147$as_echo_n "checking for JAVAC... " >&6; }
25148        if test ! -x "$tool_specified"; then
25149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25150$as_echo "not found" >&6; }
25151          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25152        fi
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25154$as_echo "$tool_specified" >&6; }
25155      fi
25156    fi
25157  fi
25158
25159
25160
25161  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25162
25163  # Publish this variable in the help.
25164
25165
25166  if test "x$JAVAH" = x; then
25167    # The variable is not set by user, try to locate tool using the code snippet
25168
25169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25170$as_echo_n "checking for javah in Boot JDK... " >&6; }
25171      JAVAH=$BOOT_JDK/bin/javah
25172      if test ! -x $JAVAH; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25174$as_echo "not found" >&6; }
25175        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25176$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25177        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25178      fi
25179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25180$as_echo "ok" >&6; }
25181
25182
25183  else
25184    # The variable is set, but is it from the command line or the environment?
25185
25186    # Try to remove the string !JAVAH! from our list.
25187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25189      # If it failed, the variable was not from the command line. Ignore it,
25190      # but warn the user (except for BASH, which is always set by the calling BASH).
25191      if test "xJAVAH" != xBASH; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25193$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25194      fi
25195      # Try to locate tool using the code snippet
25196
25197      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25198$as_echo_n "checking for javah in Boot JDK... " >&6; }
25199      JAVAH=$BOOT_JDK/bin/javah
25200      if test ! -x $JAVAH; then
25201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25202$as_echo "not found" >&6; }
25203        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25204$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25205        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25206      fi
25207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25208$as_echo "ok" >&6; }
25209
25210
25211    else
25212      # If it succeeded, then it was overridden by the user. We will use it
25213      # for the tool.
25214
25215      # First remove it from the list of overridden variables, so we can test
25216      # for unknown variables in the end.
25217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25218
25219      # Check if the provided tool contains a complete path.
25220      tool_specified="$JAVAH"
25221      tool_basename="${tool_specified##*/}"
25222      if test "x$tool_basename" = "x$tool_specified"; then
25223        # A command without a complete path is provided, search $PATH.
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25225$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25226        # Extract the first word of "$tool_basename", so it can be a program name with args.
25227set dummy $tool_basename; ac_word=$2
25228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25229$as_echo_n "checking for $ac_word... " >&6; }
25230if ${ac_cv_path_JAVAH+:} false; then :
25231  $as_echo_n "(cached) " >&6
25232else
25233  case $JAVAH in
25234  [\\/]* | ?:[\\/]*)
25235  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25236  ;;
25237  *)
25238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25239for as_dir in $PATH
25240do
25241  IFS=$as_save_IFS
25242  test -z "$as_dir" && as_dir=.
25243    for ac_exec_ext in '' $ac_executable_extensions; do
25244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25245    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25247    break 2
25248  fi
25249done
25250  done
25251IFS=$as_save_IFS
25252
25253  ;;
25254esac
25255fi
25256JAVAH=$ac_cv_path_JAVAH
25257if test -n "$JAVAH"; then
25258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25259$as_echo "$JAVAH" >&6; }
25260else
25261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25262$as_echo "no" >&6; }
25263fi
25264
25265
25266        if test "x$JAVAH" = x; then
25267          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25268        fi
25269      else
25270        # Otherwise we believe it is a complete path. Use it as it is.
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25272$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25274$as_echo_n "checking for JAVAH... " >&6; }
25275        if test ! -x "$tool_specified"; then
25276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25277$as_echo "not found" >&6; }
25278          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25279        fi
25280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25281$as_echo "$tool_specified" >&6; }
25282      fi
25283    fi
25284  fi
25285
25286
25287
25288  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25289
25290  # Publish this variable in the help.
25291
25292
25293  if test "x$JAR" = x; then
25294    # The variable is not set by user, try to locate tool using the code snippet
25295
25296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25297$as_echo_n "checking for jar in Boot JDK... " >&6; }
25298      JAR=$BOOT_JDK/bin/jar
25299      if test ! -x $JAR; then
25300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25301$as_echo "not found" >&6; }
25302        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25303$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25304        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25305      fi
25306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25307$as_echo "ok" >&6; }
25308
25309
25310  else
25311    # The variable is set, but is it from the command line or the environment?
25312
25313    # Try to remove the string !JAR! from our list.
25314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25316      # If it failed, the variable was not from the command line. Ignore it,
25317      # but warn the user (except for BASH, which is always set by the calling BASH).
25318      if test "xJAR" != xBASH; then
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25320$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25321      fi
25322      # Try to locate tool using the code snippet
25323
25324      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25325$as_echo_n "checking for jar in Boot JDK... " >&6; }
25326      JAR=$BOOT_JDK/bin/jar
25327      if test ! -x $JAR; then
25328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25329$as_echo "not found" >&6; }
25330        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25331$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25332        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25333      fi
25334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25335$as_echo "ok" >&6; }
25336
25337
25338    else
25339      # If it succeeded, then it was overridden by the user. We will use it
25340      # for the tool.
25341
25342      # First remove it from the list of overridden variables, so we can test
25343      # for unknown variables in the end.
25344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25345
25346      # Check if the provided tool contains a complete path.
25347      tool_specified="$JAR"
25348      tool_basename="${tool_specified##*/}"
25349      if test "x$tool_basename" = "x$tool_specified"; then
25350        # A command without a complete path is provided, search $PATH.
25351        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25352$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25353        # Extract the first word of "$tool_basename", so it can be a program name with args.
25354set dummy $tool_basename; ac_word=$2
25355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25356$as_echo_n "checking for $ac_word... " >&6; }
25357if ${ac_cv_path_JAR+:} false; then :
25358  $as_echo_n "(cached) " >&6
25359else
25360  case $JAR in
25361  [\\/]* | ?:[\\/]*)
25362  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25363  ;;
25364  *)
25365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25366for as_dir in $PATH
25367do
25368  IFS=$as_save_IFS
25369  test -z "$as_dir" && as_dir=.
25370    for ac_exec_ext in '' $ac_executable_extensions; do
25371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25372    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25374    break 2
25375  fi
25376done
25377  done
25378IFS=$as_save_IFS
25379
25380  ;;
25381esac
25382fi
25383JAR=$ac_cv_path_JAR
25384if test -n "$JAR"; then
25385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25386$as_echo "$JAR" >&6; }
25387else
25388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25389$as_echo "no" >&6; }
25390fi
25391
25392
25393        if test "x$JAR" = x; then
25394          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25395        fi
25396      else
25397        # Otherwise we believe it is a complete path. Use it as it is.
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25399$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25401$as_echo_n "checking for JAR... " >&6; }
25402        if test ! -x "$tool_specified"; then
25403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25404$as_echo "not found" >&6; }
25405          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25406        fi
25407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25408$as_echo "$tool_specified" >&6; }
25409      fi
25410    fi
25411  fi
25412
25413
25414
25415  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25416
25417  # Publish this variable in the help.
25418
25419
25420  if test "x$NATIVE2ASCII" = x; then
25421    # The variable is not set by user, try to locate tool using the code snippet
25422
25423      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25424$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25425      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25426      if test ! -x $NATIVE2ASCII; then
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25428$as_echo "not found" >&6; }
25429        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25430$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25431        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25432      fi
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25434$as_echo "ok" >&6; }
25435
25436
25437  else
25438    # The variable is set, but is it from the command line or the environment?
25439
25440    # Try to remove the string !NATIVE2ASCII! from our list.
25441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25443      # If it failed, the variable was not from the command line. Ignore it,
25444      # but warn the user (except for BASH, which is always set by the calling BASH).
25445      if test "xNATIVE2ASCII" != xBASH; then
25446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25447$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25448      fi
25449      # Try to locate tool using the code snippet
25450
25451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25452$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25453      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25454      if test ! -x $NATIVE2ASCII; then
25455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25456$as_echo "not found" >&6; }
25457        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25458$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25459        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25460      fi
25461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25462$as_echo "ok" >&6; }
25463
25464
25465    else
25466      # If it succeeded, then it was overridden by the user. We will use it
25467      # for the tool.
25468
25469      # First remove it from the list of overridden variables, so we can test
25470      # for unknown variables in the end.
25471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25472
25473      # Check if the provided tool contains a complete path.
25474      tool_specified="$NATIVE2ASCII"
25475      tool_basename="${tool_specified##*/}"
25476      if test "x$tool_basename" = "x$tool_specified"; then
25477        # A command without a complete path is provided, search $PATH.
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25479$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25480        # Extract the first word of "$tool_basename", so it can be a program name with args.
25481set dummy $tool_basename; ac_word=$2
25482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25483$as_echo_n "checking for $ac_word... " >&6; }
25484if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25485  $as_echo_n "(cached) " >&6
25486else
25487  case $NATIVE2ASCII in
25488  [\\/]* | ?:[\\/]*)
25489  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25490  ;;
25491  *)
25492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25493for as_dir in $PATH
25494do
25495  IFS=$as_save_IFS
25496  test -z "$as_dir" && as_dir=.
25497    for ac_exec_ext in '' $ac_executable_extensions; do
25498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25499    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25501    break 2
25502  fi
25503done
25504  done
25505IFS=$as_save_IFS
25506
25507  ;;
25508esac
25509fi
25510NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25511if test -n "$NATIVE2ASCII"; then
25512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25513$as_echo "$NATIVE2ASCII" >&6; }
25514else
25515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25516$as_echo "no" >&6; }
25517fi
25518
25519
25520        if test "x$NATIVE2ASCII" = x; then
25521          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25522        fi
25523      else
25524        # Otherwise we believe it is a complete path. Use it as it is.
25525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25526$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25528$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25529        if test ! -x "$tool_specified"; then
25530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25531$as_echo "not found" >&6; }
25532          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25533        fi
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25535$as_echo "$tool_specified" >&6; }
25536      fi
25537    fi
25538  fi
25539
25540
25541
25542  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25543
25544  # Publish this variable in the help.
25545
25546
25547  if test "x$JARSIGNER" = x; then
25548    # The variable is not set by user, try to locate tool using the code snippet
25549
25550      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25551$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25552      JARSIGNER=$BOOT_JDK/bin/jarsigner
25553      if test ! -x $JARSIGNER; then
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25555$as_echo "not found" >&6; }
25556        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25557$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25558        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25559      fi
25560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25561$as_echo "ok" >&6; }
25562
25563
25564  else
25565    # The variable is set, but is it from the command line or the environment?
25566
25567    # Try to remove the string !JARSIGNER! from our list.
25568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25570      # If it failed, the variable was not from the command line. Ignore it,
25571      # but warn the user (except for BASH, which is always set by the calling BASH).
25572      if test "xJARSIGNER" != xBASH; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25574$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25575      fi
25576      # Try to locate tool using the code snippet
25577
25578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25579$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25580      JARSIGNER=$BOOT_JDK/bin/jarsigner
25581      if test ! -x $JARSIGNER; then
25582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25583$as_echo "not found" >&6; }
25584        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25585$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25586        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25587      fi
25588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25589$as_echo "ok" >&6; }
25590
25591
25592    else
25593      # If it succeeded, then it was overridden by the user. We will use it
25594      # for the tool.
25595
25596      # First remove it from the list of overridden variables, so we can test
25597      # for unknown variables in the end.
25598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25599
25600      # Check if the provided tool contains a complete path.
25601      tool_specified="$JARSIGNER"
25602      tool_basename="${tool_specified##*/}"
25603      if test "x$tool_basename" = "x$tool_specified"; then
25604        # A command without a complete path is provided, search $PATH.
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25606$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25607        # Extract the first word of "$tool_basename", so it can be a program name with args.
25608set dummy $tool_basename; ac_word=$2
25609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25610$as_echo_n "checking for $ac_word... " >&6; }
25611if ${ac_cv_path_JARSIGNER+:} false; then :
25612  $as_echo_n "(cached) " >&6
25613else
25614  case $JARSIGNER in
25615  [\\/]* | ?:[\\/]*)
25616  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25617  ;;
25618  *)
25619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25620for as_dir in $PATH
25621do
25622  IFS=$as_save_IFS
25623  test -z "$as_dir" && as_dir=.
25624    for ac_exec_ext in '' $ac_executable_extensions; do
25625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25626    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25628    break 2
25629  fi
25630done
25631  done
25632IFS=$as_save_IFS
25633
25634  ;;
25635esac
25636fi
25637JARSIGNER=$ac_cv_path_JARSIGNER
25638if test -n "$JARSIGNER"; then
25639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25640$as_echo "$JARSIGNER" >&6; }
25641else
25642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25643$as_echo "no" >&6; }
25644fi
25645
25646
25647        if test "x$JARSIGNER" = x; then
25648          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25649        fi
25650      else
25651        # Otherwise we believe it is a complete path. Use it as it is.
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25653$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25655$as_echo_n "checking for JARSIGNER... " >&6; }
25656        if test ! -x "$tool_specified"; then
25657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25658$as_echo "not found" >&6; }
25659          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25660        fi
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25662$as_echo "$tool_specified" >&6; }
25663      fi
25664    fi
25665  fi
25666
25667
25668
25669  # Finally, set some other options...
25670
25671  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25672  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25673
25674
25675
25676
25677  ##############################################################################
25678  #
25679  # Specify options for anything that is run with the Boot JDK.
25680  #
25681
25682# Check whether --with-boot-jdk-jvmargs was given.
25683if test "${with_boot_jdk_jvmargs+set}" = set; then :
25684  withval=$with_boot_jdk_jvmargs;
25685fi
25686
25687
25688  if test "x$with_boot_jdk_jvmargs" = x; then
25689    # Not all JVM:s accept the same arguments on the command line.
25690    # OpenJDK specific increase in thread stack for JDK build,
25691    # well more specifically, when running javac.
25692    if test "x$BUILD_NUM_BITS" = x32; then
25693      STACK_SIZE=768
25694    else
25695      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25696      # since 64-bit pointers are pushed on the stach. Apparently, we need
25697      # to increase the stack space when javacing the JDK....
25698      STACK_SIZE=1536
25699    fi
25700
25701    # Minimum amount of heap memory.
25702
25703  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25704  $ECHO "Command: $JAVA -Xms64M -version" >&5
25705  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25706  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25707  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25708  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25709    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25710    JVM_ARG_OK=true
25711  else
25712    $ECHO "Arg failed:" >&5
25713    $ECHO "$OUTPUT" >&5
25714    JVM_ARG_OK=false
25715  fi
25716
25717    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25718      # Why does macosx need more heap? Its the huge JDK batch.
25719
25720  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25721  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25722  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25723  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25724  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25725  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25726    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25727    JVM_ARG_OK=true
25728  else
25729    $ECHO "Arg failed:" >&5
25730    $ECHO "$OUTPUT" >&5
25731    JVM_ARG_OK=false
25732  fi
25733
25734    else
25735
25736  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25737  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25738  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25739  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25740  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25741  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25742    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25743    JVM_ARG_OK=true
25744  else
25745    $ECHO "Arg failed:" >&5
25746    $ECHO "$OUTPUT" >&5
25747    JVM_ARG_OK=false
25748  fi
25749
25750    fi
25751    # When is adding -client something that speeds up the JVM?
25752    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25753
25754  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25755  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25756  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25757  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25758  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25759  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25760    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25761    JVM_ARG_OK=true
25762  else
25763    $ECHO "Arg failed:" >&5
25764    $ECHO "$OUTPUT" >&5
25765    JVM_ARG_OK=false
25766  fi
25767
25768    # Disable special log output when a debug build is used as Boot JDK...
25769
25770  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25771  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25772  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25773  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25774  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25775  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25776    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25777    JVM_ARG_OK=true
25778  else
25779    $ECHO "Arg failed:" >&5
25780    $ECHO "$OUTPUT" >&5
25781    JVM_ARG_OK=false
25782  fi
25783
25784  fi
25785
25786  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25787
25788
25789
25790###############################################################################
25791#
25792# Configure the sources to use. We can add or override individual directories.
25793#
25794###############################################################################
25795
25796
25797  # Where are the sources. Any of these can be overridden
25798  # using --with-override-corba and the likes.
25799  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25800  CORBA_TOPDIR="$SRC_ROOT/corba"
25801  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25802  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25803  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25804  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25805  JDK_TOPDIR="$SRC_ROOT/jdk"
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816  ###############################################################################
25817  #
25818  # Pickup additional source for a component from outside of the source root
25819  # or override source for a component.
25820  #
25821
25822# Check whether --with-add-source-root was given.
25823if test "${with_add_source_root+set}" = set; then :
25824  withval=$with_add_source_root;
25825fi
25826
25827
25828
25829# Check whether --with-override-source-root was given.
25830if test "${with_override_source_root+set}" = set; then :
25831  withval=$with_override_source_root;
25832fi
25833
25834
25835
25836# Check whether --with-adds-and-overrides was given.
25837if test "${with_adds_and_overrides+set}" = set; then :
25838  withval=$with_adds_and_overrides;
25839fi
25840
25841
25842  if test "x$with_adds_and_overrides" != x; then
25843    with_add_source_root="$with_adds_and_overrides/adds"
25844    with_override_source_root="$with_adds_and_overrides/overrides"
25845  fi
25846
25847  if test "x$with_add_source_root" != x; then
25848    if ! test -d $with_add_source_root; then
25849      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25850    fi
25851    CURDIR="$PWD"
25852    cd "$with_add_source_root"
25853    ADD_SRC_ROOT="`pwd`"
25854    cd "$CURDIR"
25855    # Verify that the addon source root does not have any root makefiles.
25856    # If it does, then it is usually an error, prevent this.
25857    if test -f $with_add_source_root/langtools/make/Makefile; then
25858      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
25859    fi
25860    if test -f $with_add_source_root/corba/make/Makefile; then
25861      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
25862    fi
25863    if test -f $with_add_source_root/jaxp/make/Makefile; then
25864      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
25865    fi
25866    if test -f $with_add_source_root/jaxws/make/Makefile; then
25867      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
25868    fi
25869    if test -f $with_add_source_root/hotspot/make/Makefile; then
25870      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
25871    fi
25872    if test -f $with_add_source_root/nashorn/make/Makefile; then
25873      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
25874    fi
25875    if test -f $with_add_source_root/jdk/make/Makefile; then
25876      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
25877    fi
25878  fi
25879
25880
25881  if test "x$with_override_source_root" != x; then
25882    if ! test -d $with_override_source_root; then
25883      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25884    fi
25885    CURDIR="$PWD"
25886    cd "$with_override_source_root"
25887    OVERRIDE_SRC_ROOT="`pwd`"
25888    cd "$CURDIR"
25889    if test -f $with_override_source_root/langtools/make/Makefile; then
25890      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
25891    fi
25892    if test -f $with_override_source_root/corba/make/Makefile; then
25893      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
25894    fi
25895    if test -f $with_override_source_root/jaxp/make/Makefile; then
25896      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
25897    fi
25898    if test -f $with_override_source_root/jaxws/make/Makefile; then
25899      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
25900    fi
25901    if test -f $with_override_source_root/hotspot/make/Makefile; then
25902      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
25903    fi
25904    if test -f $with_override_source_root/nashorn/make/Makefile; then
25905      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
25906    fi
25907    if test -f $with_override_source_root/jdk/make/Makefile; then
25908      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
25909    fi
25910  fi
25911
25912
25913  ###############################################################################
25914  #
25915  # Override a repo completely, this is used for example when you have 3 small
25916  # development sandboxes of the langtools sources and want to avoid having 3 full
25917  # OpenJDK sources checked out on disk.
25918  #
25919  # Assuming that the 3 langtools sandboxes are located here:
25920  # /home/fredrik/sandbox1/langtools
25921  # /home/fredrik/sandbox2/langtools
25922  # /home/fredrik/sandbox3/langtools
25923  #
25924  # From the source root you create build subdirs manually:
25925  #     mkdir -p build1 build2 build3
25926  # in each build directory run:
25927  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25928  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25929  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25930  #
25931
25932
25933# Check whether --with-override-langtools was given.
25934if test "${with_override_langtools+set}" = set; then :
25935  withval=$with_override_langtools;
25936fi
25937
25938
25939
25940# Check whether --with-override-corba was given.
25941if test "${with_override_corba+set}" = set; then :
25942  withval=$with_override_corba;
25943fi
25944
25945
25946
25947# Check whether --with-override-jaxp was given.
25948if test "${with_override_jaxp+set}" = set; then :
25949  withval=$with_override_jaxp;
25950fi
25951
25952
25953
25954# Check whether --with-override-jaxws was given.
25955if test "${with_override_jaxws+set}" = set; then :
25956  withval=$with_override_jaxws;
25957fi
25958
25959
25960
25961# Check whether --with-override-hotspot was given.
25962if test "${with_override_hotspot+set}" = set; then :
25963  withval=$with_override_hotspot;
25964fi
25965
25966
25967
25968# Check whether --with-override-nashorn was given.
25969if test "${with_override_nashorn+set}" = set; then :
25970  withval=$with_override_nashorn;
25971fi
25972
25973
25974
25975# Check whether --with-override-jdk was given.
25976if test "${with_override_jdk+set}" = set; then :
25977  withval=$with_override_jdk;
25978fi
25979
25980
25981  if test "x$with_override_langtools" != x; then
25982    CURDIR="$PWD"
25983    cd "$with_override_langtools"
25984    LANGTOOLS_TOPDIR="`pwd`"
25985    cd "$CURDIR"
25986    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25987      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25988    fi
25989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25990$as_echo_n "checking if langtools should be overridden... " >&6; }
25991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25992$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25993  fi
25994  if test "x$with_override_corba" != x; then
25995    CURDIR="$PWD"
25996    cd "$with_override_corba"
25997    CORBA_TOPDIR="`pwd`"
25998    cd "$CURDIR"
25999    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26000      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26001    fi
26002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26003$as_echo_n "checking if corba should be overridden... " >&6; }
26004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26005$as_echo "yes with $CORBA_TOPDIR" >&6; }
26006  fi
26007  if test "x$with_override_jaxp" != x; then
26008    CURDIR="$PWD"
26009    cd "$with_override_jaxp"
26010    JAXP_TOPDIR="`pwd`"
26011    cd "$CURDIR"
26012    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26013      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26014    fi
26015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26016$as_echo_n "checking if jaxp should be overridden... " >&6; }
26017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26018$as_echo "yes with $JAXP_TOPDIR" >&6; }
26019  fi
26020  if test "x$with_override_jaxws" != x; then
26021    CURDIR="$PWD"
26022    cd "$with_override_jaxws"
26023    JAXWS_TOPDIR="`pwd`"
26024    cd "$CURDIR"
26025    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26026      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26027    fi
26028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26029$as_echo_n "checking if jaxws should be overridden... " >&6; }
26030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26031$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26032  fi
26033  if test "x$with_override_hotspot" != x; then
26034    CURDIR="$PWD"
26035    cd "$with_override_hotspot"
26036    HOTSPOT_TOPDIR="`pwd`"
26037    cd "$CURDIR"
26038    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26039      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26040    fi
26041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26042$as_echo_n "checking if hotspot should be overridden... " >&6; }
26043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26044$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26045  fi
26046  if test "x$with_override_nashorn" != x; then
26047    CURDIR="$PWD"
26048    cd "$with_override_nashorn"
26049    NASHORN_TOPDIR="`pwd`"
26050    cd "$CURDIR"
26051    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26052      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26053    fi
26054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26055$as_echo_n "checking if nashorn should be overridden... " >&6; }
26056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26057$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26058  fi
26059  if test "x$with_override_jdk" != x; then
26060    CURDIR="$PWD"
26061    cd "$with_override_jdk"
26062    JDK_TOPDIR="`pwd`"
26063    cd "$CURDIR"
26064    if ! test -f $JDK_TOPDIR/make/Makefile; then
26065      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26066    fi
26067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26068$as_echo_n "checking if JDK should be overridden... " >&6; }
26069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26070$as_echo "yes with $JDK_TOPDIR" >&6; }
26071  fi
26072
26073
26074  BUILD_OUTPUT="$OUTPUT_ROOT"
26075
26076
26077  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26078  BUILD_HOTSPOT=true
26079
26080
26081
26082# Check whether --with-import-hotspot was given.
26083if test "${with_import_hotspot+set}" = set; then :
26084  withval=$with_import_hotspot;
26085fi
26086
26087  if test "x$with_import_hotspot" != x; then
26088    CURDIR="$PWD"
26089    cd "$with_import_hotspot"
26090    HOTSPOT_DIST="`pwd`"
26091    cd "$CURDIR"
26092    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26093      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26094    fi
26095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26096$as_echo_n "checking if hotspot should be imported... " >&6; }
26097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26098$as_echo "yes from $HOTSPOT_DIST" >&6; }
26099    BUILD_HOTSPOT=false
26100  fi
26101
26102  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26103
26104
26105###############################################################################
26106#
26107# Setup the toolchain (compilers etc), i.e. the tools that need to be
26108# cross-compilation aware.
26109#
26110###############################################################################
26111
26112
26113  ###############################################################################
26114  #
26115  # Configure the development tool paths and potential sysroot.
26116  #
26117  ac_ext=cpp
26118ac_cpp='$CXXCPP $CPPFLAGS'
26119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26122
26123
26124  # The option used to specify the target .o,.a or .so file.
26125  # When compiling, how to specify the to be created object file.
26126  CC_OUT_OPTION='-o$(SPACE)'
26127  # When linking, how to specify the to be created executable.
26128  EXE_OUT_OPTION='-o$(SPACE)'
26129  # When linking, how to specify the to be created dynamically linkable library.
26130  LD_OUT_OPTION='-o$(SPACE)'
26131  # When archiving, how to specify the to be create static archive for object files.
26132  AR_OUT_OPTION='rcs$(SPACE)'
26133
26134
26135
26136
26137
26138# Locate the actual tools
26139
26140
26141# Check whether --with-jtreg was given.
26142if test "${with_jtreg+set}" = set; then :
26143  withval=$with_jtreg;
26144else
26145  with_jtreg=no
26146fi
26147
26148
26149  if test "x$with_jtreg" = xno; then
26150    # jtreg disabled
26151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26152$as_echo_n "checking for jtreg... " >&6; }
26153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26154$as_echo "no" >&6; }
26155  else
26156    if test "x$with_jtreg" != xyes; then
26157      # with path specified.
26158      JT_HOME="$with_jtreg"
26159    fi
26160
26161    if test "x$JT_HOME" != x; then
26162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26163$as_echo_n "checking for jtreg... " >&6; }
26164
26165      # use JT_HOME enviroment var.
26166
26167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26168
26169  # Input might be given as Windows format, start by converting to
26170  # unix format.
26171  path="$JT_HOME"
26172  new_path=`$CYGPATH -u "$path"`
26173
26174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26177  # "foo.exe" is OK but "foo" is an error.
26178  #
26179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26180  # It is also a way to make sure we got the proper file name for the real test later on.
26181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26182  if test "x$test_shortpath" = x; then
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26184$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26185    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
26186  fi
26187
26188  # Call helper function which possibly converts this using DOS-style short mode.
26189  # If so, the updated path is stored in $new_path.
26190
26191  input_path="$new_path"
26192  # Check if we need to convert this using DOS-style short mode. If the path
26193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26194  # take no chances and rewrite it.
26195  # Note: m4 eats our [], so we need to use [ and ] instead.
26196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26197  if test "x$has_forbidden_chars" != x; then
26198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26202      # Going to short mode and back again did indeed matter. Since short mode is
26203      # case insensitive, let's make it lowercase to improve readability.
26204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26205      # Now convert it back to Unix-stile (cygpath)
26206      input_path=`$CYGPATH -u "$shortmode_path"`
26207      new_path="$input_path"
26208    fi
26209  fi
26210
26211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26212  if test "x$test_cygdrive_prefix" = x; then
26213    # As a simple fix, exclude /usr/bin since it's not a real path.
26214    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26216      # a path prefixed by /cygdrive for fixpath to work.
26217      new_path="$CYGWIN_ROOT_PATH$input_path"
26218    fi
26219  fi
26220
26221
26222  if test "x$path" != "x$new_path"; then
26223    JT_HOME="$new_path"
26224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26225$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26226  fi
26227
26228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26229
26230  path="$JT_HOME"
26231  has_colon=`$ECHO $path | $GREP ^.:`
26232  new_path="$path"
26233  if test "x$has_colon" = x; then
26234    # Not in mixed or Windows style, start by that.
26235    new_path=`cmd //c echo $path`
26236  fi
26237
26238
26239  input_path="$new_path"
26240  # Check if we need to convert this using DOS-style short mode. If the path
26241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26242  # take no chances and rewrite it.
26243  # Note: m4 eats our [], so we need to use [ and ] instead.
26244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26245  if test "x$has_forbidden_chars" != x; then
26246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26248  fi
26249
26250
26251  windows_path="$new_path"
26252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26253    unix_path=`$CYGPATH -u "$windows_path"`
26254    new_path="$unix_path"
26255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26257    new_path="$unix_path"
26258  fi
26259
26260  if test "x$path" != "x$new_path"; then
26261    JT_HOME="$new_path"
26262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26263$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26264  fi
26265
26266  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26267  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26268
26269  else
26270    # We're on a posix platform. Hooray! :)
26271    path="$JT_HOME"
26272    has_space=`$ECHO "$path" | $GREP " "`
26273    if test "x$has_space" != x; then
26274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26275$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26276      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26277    fi
26278
26279    # Use eval to expand a potential ~
26280    eval path="$path"
26281    if test ! -f "$path" && test ! -d "$path"; then
26282      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
26283    fi
26284
26285    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
26286  fi
26287
26288
26289      # jtreg win32 script works for everybody
26290      JTREGEXE="$JT_HOME/win32/bin/jtreg"
26291
26292      if test ! -f "$JTREGEXE"; then
26293        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
26294      fi
26295
26296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26297$as_echo "$JTREGEXE" >&6; }
26298    else
26299      # try to find jtreg on path
26300
26301
26302
26303  # Publish this variable in the help.
26304
26305
26306  if test "x$JTREGEXE" = x; then
26307    # The variable is not set by user, try to locate tool using the code snippet
26308    for ac_prog in jtreg
26309do
26310  # Extract the first word of "$ac_prog", so it can be a program name with args.
26311set dummy $ac_prog; ac_word=$2
26312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26313$as_echo_n "checking for $ac_word... " >&6; }
26314if ${ac_cv_path_JTREGEXE+:} false; then :
26315  $as_echo_n "(cached) " >&6
26316else
26317  case $JTREGEXE in
26318  [\\/]* | ?:[\\/]*)
26319  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26320  ;;
26321  *)
26322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26323for as_dir in $PATH
26324do
26325  IFS=$as_save_IFS
26326  test -z "$as_dir" && as_dir=.
26327    for ac_exec_ext in '' $ac_executable_extensions; do
26328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26329    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26331    break 2
26332  fi
26333done
26334  done
26335IFS=$as_save_IFS
26336
26337  ;;
26338esac
26339fi
26340JTREGEXE=$ac_cv_path_JTREGEXE
26341if test -n "$JTREGEXE"; then
26342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26343$as_echo "$JTREGEXE" >&6; }
26344else
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26346$as_echo "no" >&6; }
26347fi
26348
26349
26350  test -n "$JTREGEXE" && break
26351done
26352
26353  else
26354    # The variable is set, but is it from the command line or the environment?
26355
26356    # Try to remove the string !JTREGEXE! from our list.
26357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
26358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26359      # If it failed, the variable was not from the command line. Ignore it,
26360      # but warn the user (except for BASH, which is always set by the calling BASH).
26361      if test "xJTREGEXE" != xBASH; then
26362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
26363$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
26364      fi
26365      # Try to locate tool using the code snippet
26366      for ac_prog in jtreg
26367do
26368  # Extract the first word of "$ac_prog", so it can be a program name with args.
26369set dummy $ac_prog; ac_word=$2
26370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26371$as_echo_n "checking for $ac_word... " >&6; }
26372if ${ac_cv_path_JTREGEXE+:} false; then :
26373  $as_echo_n "(cached) " >&6
26374else
26375  case $JTREGEXE in
26376  [\\/]* | ?:[\\/]*)
26377  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26378  ;;
26379  *)
26380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26381for as_dir in $PATH
26382do
26383  IFS=$as_save_IFS
26384  test -z "$as_dir" && as_dir=.
26385    for ac_exec_ext in '' $ac_executable_extensions; do
26386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26387    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26389    break 2
26390  fi
26391done
26392  done
26393IFS=$as_save_IFS
26394
26395  ;;
26396esac
26397fi
26398JTREGEXE=$ac_cv_path_JTREGEXE
26399if test -n "$JTREGEXE"; then
26400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26401$as_echo "$JTREGEXE" >&6; }
26402else
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26404$as_echo "no" >&6; }
26405fi
26406
26407
26408  test -n "$JTREGEXE" && break
26409done
26410
26411    else
26412      # If it succeeded, then it was overridden by the user. We will use it
26413      # for the tool.
26414
26415      # First remove it from the list of overridden variables, so we can test
26416      # for unknown variables in the end.
26417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26418
26419      # Check if the provided tool contains a complete path.
26420      tool_specified="$JTREGEXE"
26421      tool_basename="${tool_specified##*/}"
26422      if test "x$tool_basename" = "x$tool_specified"; then
26423        # A command without a complete path is provided, search $PATH.
26424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
26425$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
26426        # Extract the first word of "$tool_basename", so it can be a program name with args.
26427set dummy $tool_basename; ac_word=$2
26428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26429$as_echo_n "checking for $ac_word... " >&6; }
26430if ${ac_cv_path_JTREGEXE+:} false; then :
26431  $as_echo_n "(cached) " >&6
26432else
26433  case $JTREGEXE in
26434  [\\/]* | ?:[\\/]*)
26435  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26436  ;;
26437  *)
26438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26439for as_dir in $PATH
26440do
26441  IFS=$as_save_IFS
26442  test -z "$as_dir" && as_dir=.
26443    for ac_exec_ext in '' $ac_executable_extensions; do
26444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26445    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26447    break 2
26448  fi
26449done
26450  done
26451IFS=$as_save_IFS
26452
26453  ;;
26454esac
26455fi
26456JTREGEXE=$ac_cv_path_JTREGEXE
26457if test -n "$JTREGEXE"; then
26458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26459$as_echo "$JTREGEXE" >&6; }
26460else
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26462$as_echo "no" >&6; }
26463fi
26464
26465
26466        if test "x$JTREGEXE" = x; then
26467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26468        fi
26469      else
26470        # Otherwise we believe it is a complete path. Use it as it is.
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
26472$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
26474$as_echo_n "checking for JTREGEXE... " >&6; }
26475        if test ! -x "$tool_specified"; then
26476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26477$as_echo "not found" >&6; }
26478          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
26479        fi
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26481$as_echo "$tool_specified" >&6; }
26482      fi
26483    fi
26484  fi
26485
26486
26487
26488  if test "x$JTREGEXE" = x; then
26489    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
26490  fi
26491
26492
26493      JT_HOME="`$DIRNAME $JTREGEXE`"
26494    fi
26495  fi
26496
26497
26498
26499
26500
26501  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
26502
26503  # Store path to cygwin link.exe to help excluding it when searching for
26504  # VS linker. This must be done before changing the PATH when looking for VS.
26505  # Extract the first word of "link", so it can be a program name with args.
26506set dummy link; ac_word=$2
26507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26508$as_echo_n "checking for $ac_word... " >&6; }
26509if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26510  $as_echo_n "(cached) " >&6
26511else
26512  case $CYGWIN_LINK in
26513  [\\/]* | ?:[\\/]*)
26514  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26515  ;;
26516  *)
26517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26518for as_dir in $PATH
26519do
26520  IFS=$as_save_IFS
26521  test -z "$as_dir" && as_dir=.
26522    for ac_exec_ext in '' $ac_executable_extensions; do
26523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26524    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26526    break 2
26527  fi
26528done
26529  done
26530IFS=$as_save_IFS
26531
26532  ;;
26533esac
26534fi
26535CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26536if test -n "$CYGWIN_LINK"; then
26537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26538$as_echo "$CYGWIN_LINK" >&6; }
26539else
26540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26541$as_echo "no" >&6; }
26542fi
26543
26544
26545  if test "x$CYGWIN_LINK" != x; then
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26547$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26548    "$CYGWIN_LINK" --version > /dev/null
26549    if test $? -eq 0 ; then
26550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26551$as_echo "yes" >&6; }
26552    else
26553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26554$as_echo "no" >&6; }
26555      # This might be the VS linker. Don't exclude it later on.
26556      CYGWIN_LINK=""
26557    fi
26558  fi
26559
26560  # First-hand choice is to locate and run the vsvars bat file.
26561
26562  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26563    VCVARSFILE="vc/bin/vcvars32.bat"
26564  else
26565    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26566  fi
26567
26568  VS_ENV_CMD=""
26569  VS_ENV_ARGS=""
26570  if test "x$with_toolsdir" != x; then
26571
26572  if test "x$VS_ENV_CMD" = x; then
26573    VS100BASE="$with_toolsdir/../.."
26574    METHOD="--with-tools-dir"
26575
26576  windows_path="$VS100BASE"
26577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26578    unix_path=`$CYGPATH -u "$windows_path"`
26579    VS100BASE="$unix_path"
26580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26582    VS100BASE="$unix_path"
26583  fi
26584
26585    if test -d "$VS100BASE"; then
26586      if test -f "$VS100BASE/$VCVARSFILE"; then
26587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26588$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26589        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26590      else
26591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26592$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26594$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26595      fi
26596    fi
26597  fi
26598
26599  fi
26600
26601  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26602    # Having specified an argument which is incorrect will produce an instant failure;
26603    # we should not go on looking
26604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26605$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26606    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26607$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26608    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26609  fi
26610
26611  if test "x$VS100COMNTOOLS" != x; then
26612
26613  if test "x$VS_ENV_CMD" = x; then
26614    VS100BASE="$VS100COMNTOOLS/../.."
26615    METHOD="VS100COMNTOOLS variable"
26616
26617  windows_path="$VS100BASE"
26618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619    unix_path=`$CYGPATH -u "$windows_path"`
26620    VS100BASE="$unix_path"
26621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623    VS100BASE="$unix_path"
26624  fi
26625
26626    if test -d "$VS100BASE"; then
26627      if test -f "$VS100BASE/$VCVARSFILE"; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26629$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26630        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26631      else
26632        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26633$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26635$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26636      fi
26637    fi
26638  fi
26639
26640  fi
26641  if test "x$PROGRAMFILES" != x; then
26642
26643  if test "x$VS_ENV_CMD" = x; then
26644    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26645    METHOD="well-known name"
26646
26647  windows_path="$VS100BASE"
26648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26649    unix_path=`$CYGPATH -u "$windows_path"`
26650    VS100BASE="$unix_path"
26651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26653    VS100BASE="$unix_path"
26654  fi
26655
26656    if test -d "$VS100BASE"; then
26657      if test -f "$VS100BASE/$VCVARSFILE"; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26659$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26660        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26661      else
26662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26663$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26665$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26666      fi
26667    fi
26668  fi
26669
26670  fi
26671
26672  if test "x$VS_ENV_CMD" = x; then
26673    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26674    METHOD="well-known name"
26675
26676  windows_path="$VS100BASE"
26677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26678    unix_path=`$CYGPATH -u "$windows_path"`
26679    VS100BASE="$unix_path"
26680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26682    VS100BASE="$unix_path"
26683  fi
26684
26685    if test -d "$VS100BASE"; then
26686      if test -f "$VS100BASE/$VCVARSFILE"; then
26687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26688$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26689        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26690      else
26691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26692$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26693        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26694$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26695      fi
26696    fi
26697  fi
26698
26699
26700  if test "x$VS_ENV_CMD" = x; then
26701    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26702    METHOD="well-known name"
26703
26704  windows_path="$VS100BASE"
26705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26706    unix_path=`$CYGPATH -u "$windows_path"`
26707    VS100BASE="$unix_path"
26708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26710    VS100BASE="$unix_path"
26711  fi
26712
26713    if test -d "$VS100BASE"; then
26714      if test -f "$VS100BASE/$VCVARSFILE"; then
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26716$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26717        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26718      else
26719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26720$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26721        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26722$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26723      fi
26724    fi
26725  fi
26726
26727
26728  if test "x$ProgramW6432" != x; then
26729
26730  if test "x$VS_ENV_CMD" = x; then
26731    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26732    METHOD="well-known name"
26733
26734  windows_path="$WIN_SDK_BASE"
26735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26736    unix_path=`$CYGPATH -u "$windows_path"`
26737    WIN_SDK_BASE="$unix_path"
26738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26740    WIN_SDK_BASE="$unix_path"
26741  fi
26742
26743    if test -d "$WIN_SDK_BASE"; then
26744      # There have been cases of partial or broken SDK installations. A missing
26745      # lib dir is not going to work.
26746      if test ! -d "$WIN_SDK_BASE/../lib"; then
26747        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26748$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26749        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26750$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26751      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26753$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26754        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26755        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26756          VS_ENV_ARGS="/x86"
26757        else
26758          VS_ENV_ARGS="/x64"
26759        fi
26760      else
26761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26762$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26764$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26765      fi
26766    fi
26767  fi
26768
26769  fi
26770  if test "x$PROGRAMW6432" != x; then
26771
26772  if test "x$VS_ENV_CMD" = x; then
26773    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26774    METHOD="well-known name"
26775
26776  windows_path="$WIN_SDK_BASE"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    unix_path=`$CYGPATH -u "$windows_path"`
26779    WIN_SDK_BASE="$unix_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26782    WIN_SDK_BASE="$unix_path"
26783  fi
26784
26785    if test -d "$WIN_SDK_BASE"; then
26786      # There have been cases of partial or broken SDK installations. A missing
26787      # lib dir is not going to work.
26788      if test ! -d "$WIN_SDK_BASE/../lib"; then
26789        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26790$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26791        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26792$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26793      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26795$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26796        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26797        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26798          VS_ENV_ARGS="/x86"
26799        else
26800          VS_ENV_ARGS="/x64"
26801        fi
26802      else
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26804$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26805        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26806$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26807      fi
26808    fi
26809  fi
26810
26811  fi
26812  if test "x$PROGRAMFILES" != x; then
26813
26814  if test "x$VS_ENV_CMD" = x; then
26815    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26816    METHOD="well-known name"
26817
26818  windows_path="$WIN_SDK_BASE"
26819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26820    unix_path=`$CYGPATH -u "$windows_path"`
26821    WIN_SDK_BASE="$unix_path"
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26824    WIN_SDK_BASE="$unix_path"
26825  fi
26826
26827    if test -d "$WIN_SDK_BASE"; then
26828      # There have been cases of partial or broken SDK installations. A missing
26829      # lib dir is not going to work.
26830      if test ! -d "$WIN_SDK_BASE/../lib"; then
26831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26832$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26833        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26834$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26835      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26837$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26838        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26839        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26840          VS_ENV_ARGS="/x86"
26841        else
26842          VS_ENV_ARGS="/x64"
26843        fi
26844      else
26845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26846$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26848$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26849      fi
26850    fi
26851  fi
26852
26853  fi
26854
26855  if test "x$VS_ENV_CMD" = x; then
26856    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26857    METHOD="well-known name"
26858
26859  windows_path="$WIN_SDK_BASE"
26860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26861    unix_path=`$CYGPATH -u "$windows_path"`
26862    WIN_SDK_BASE="$unix_path"
26863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26865    WIN_SDK_BASE="$unix_path"
26866  fi
26867
26868    if test -d "$WIN_SDK_BASE"; then
26869      # There have been cases of partial or broken SDK installations. A missing
26870      # lib dir is not going to work.
26871      if test ! -d "$WIN_SDK_BASE/../lib"; then
26872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26873$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26875$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26876      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26878$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26879        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26880        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26881          VS_ENV_ARGS="/x86"
26882        else
26883          VS_ENV_ARGS="/x64"
26884        fi
26885      else
26886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26887$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26889$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26890      fi
26891    fi
26892  fi
26893
26894
26895  if test "x$VS_ENV_CMD" = x; then
26896    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26897    METHOD="well-known name"
26898
26899  windows_path="$WIN_SDK_BASE"
26900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26901    unix_path=`$CYGPATH -u "$windows_path"`
26902    WIN_SDK_BASE="$unix_path"
26903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26905    WIN_SDK_BASE="$unix_path"
26906  fi
26907
26908    if test -d "$WIN_SDK_BASE"; then
26909      # There have been cases of partial or broken SDK installations. A missing
26910      # lib dir is not going to work.
26911      if test ! -d "$WIN_SDK_BASE/../lib"; then
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26913$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26914        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26915$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26916      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26918$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26919        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26920        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26921          VS_ENV_ARGS="/x86"
26922        else
26923          VS_ENV_ARGS="/x64"
26924        fi
26925      else
26926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26927$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26929$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26930      fi
26931    fi
26932  fi
26933
26934
26935  if test "x$VS_ENV_CMD" != x; then
26936    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26937
26938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26939
26940  # First separate the path from the arguments. This will split at the first
26941  # space.
26942  complete="$VS_ENV_CMD"
26943  path="${complete%% *}"
26944  tmp="$complete EOL"
26945  arguments="${tmp#* }"
26946
26947  # Input might be given as Windows format, start by converting to
26948  # unix format.
26949  new_path=`$CYGPATH -u "$path"`
26950
26951  # Now try to locate executable using which
26952  new_path=`$WHICH "$new_path" 2> /dev/null`
26953  # bat and cmd files are not always considered executable in cygwin causing which
26954  # to not find them
26955  if test "x$new_path" = x \
26956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26958    new_path=`$CYGPATH -u "$path"`
26959  fi
26960  if test "x$new_path" = x; then
26961    # Oops. Which didn't find the executable.
26962    # The splitting of arguments from the executable at a space might have been incorrect,
26963    # since paths with space are more likely in Windows. Give it another try with the whole
26964    # argument.
26965    path="$complete"
26966    arguments="EOL"
26967    new_path=`$CYGPATH -u "$path"`
26968    new_path=`$WHICH "$new_path" 2> /dev/null`
26969    # bat and cmd files are not always considered executable in cygwin causing which
26970    # to not find them
26971    if test "x$new_path" = x \
26972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26974      new_path=`$CYGPATH -u "$path"`
26975    fi
26976    if test "x$new_path" = x; then
26977      # It's still not found. Now this is an unrecoverable error.
26978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26979$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26980      has_space=`$ECHO "$complete" | $GREP " "`
26981      if test "x$has_space" != x; then
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26984      fi
26985      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26986    fi
26987  fi
26988
26989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26992  # "foo.exe" is OK but "foo" is an error.
26993  #
26994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26995  # It is also a way to make sure we got the proper file name for the real test later on.
26996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26997  if test "x$test_shortpath" = x; then
26998    # Short path failed, file does not exist as specified.
26999    # Try adding .exe or .cmd
27000    if test -f "${new_path}.exe"; then
27001      input_to_shortpath="${new_path}.exe"
27002    elif test -f "${new_path}.cmd"; then
27003      input_to_shortpath="${new_path}.cmd"
27004    else
27005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27006$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27009      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27010    fi
27011  else
27012    input_to_shortpath="$new_path"
27013  fi
27014
27015  # Call helper function which possibly converts this using DOS-style short mode.
27016  # If so, the updated path is stored in $new_path.
27017  new_path="$input_to_shortpath"
27018
27019  input_path="$input_to_shortpath"
27020  # Check if we need to convert this using DOS-style short mode. If the path
27021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27022  # take no chances and rewrite it.
27023  # Note: m4 eats our [], so we need to use [ and ] instead.
27024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27025  if test "x$has_forbidden_chars" != x; then
27026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27030      # Going to short mode and back again did indeed matter. Since short mode is
27031      # case insensitive, let's make it lowercase to improve readability.
27032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27033      # Now convert it back to Unix-stile (cygpath)
27034      input_path=`$CYGPATH -u "$shortmode_path"`
27035      new_path="$input_path"
27036    fi
27037  fi
27038
27039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27040  if test "x$test_cygdrive_prefix" = x; then
27041    # As a simple fix, exclude /usr/bin since it's not a real path.
27042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27044      # a path prefixed by /cygdrive for fixpath to work.
27045      new_path="$CYGWIN_ROOT_PATH$input_path"
27046    fi
27047  fi
27048
27049  # remove trailing .exe if any
27050  new_path="${new_path/%.exe/}"
27051
27052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27053
27054  # First separate the path from the arguments. This will split at the first
27055  # space.
27056  complete="$VS_ENV_CMD"
27057  path="${complete%% *}"
27058  tmp="$complete EOL"
27059  arguments="${tmp#* }"
27060
27061  # Input might be given as Windows format, start by converting to
27062  # unix format.
27063  new_path="$path"
27064
27065  windows_path="$new_path"
27066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27067    unix_path=`$CYGPATH -u "$windows_path"`
27068    new_path="$unix_path"
27069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27071    new_path="$unix_path"
27072  fi
27073
27074
27075  # Now try to locate executable using which
27076  new_path=`$WHICH "$new_path" 2> /dev/null`
27077
27078  if test "x$new_path" = x; then
27079    # Oops. Which didn't find the executable.
27080    # The splitting of arguments from the executable at a space might have been incorrect,
27081    # since paths with space are more likely in Windows. Give it another try with the whole
27082    # argument.
27083    path="$complete"
27084    arguments="EOL"
27085    new_path="$path"
27086
27087  windows_path="$new_path"
27088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27089    unix_path=`$CYGPATH -u "$windows_path"`
27090    new_path="$unix_path"
27091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27093    new_path="$unix_path"
27094  fi
27095
27096
27097    new_path=`$WHICH "$new_path" 2> /dev/null`
27098
27099    if test "x$new_path" = x; then
27100      # It's still not found. Now this is an unrecoverable error.
27101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27102$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27103      has_space=`$ECHO "$complete" | $GREP " "`
27104      if test "x$has_space" != x; then
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27107      fi
27108      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27109    fi
27110  fi
27111
27112  # Now new_path has a complete unix path to the binary
27113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27114    # Keep paths in /bin as-is, but remove trailing .exe if any
27115    new_path="${new_path/%.exe/}"
27116    # Do not save /bin paths to all_fixpath_prefixes!
27117  else
27118    # Not in mixed or Windows style, start by that.
27119    new_path=`cmd //c echo $new_path`
27120
27121  input_path="$new_path"
27122  # Check if we need to convert this using DOS-style short mode. If the path
27123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27124  # take no chances and rewrite it.
27125  # Note: m4 eats our [], so we need to use [ and ] instead.
27126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27127  if test "x$has_forbidden_chars" != x; then
27128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27130  fi
27131
27132    # Output is in $new_path
27133
27134  windows_path="$new_path"
27135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136    unix_path=`$CYGPATH -u "$windows_path"`
27137    new_path="$unix_path"
27138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27140    new_path="$unix_path"
27141  fi
27142
27143    # remove trailing .exe if any
27144    new_path="${new_path/%.exe/}"
27145
27146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27148  fi
27149
27150  else
27151    # We're on a posix platform. Hooray! :)
27152    # First separate the path from the arguments. This will split at the first
27153    # space.
27154    complete="$VS_ENV_CMD"
27155    path="${complete%% *}"
27156    tmp="$complete EOL"
27157    arguments="${tmp#* }"
27158
27159    # Cannot rely on the command "which" here since it doesn't always work.
27160    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27161    if test -z "$is_absolute_path"; then
27162      # Path to executable is not absolute. Find it.
27163      IFS_save="$IFS"
27164      IFS=:
27165      for p in $PATH; do
27166        if test -f "$p/$path" && test -x "$p/$path"; then
27167          new_path="$p/$path"
27168          break
27169        fi
27170      done
27171      IFS="$IFS_save"
27172    else
27173      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
27174$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
27175      new_path="$path"
27176    fi
27177
27178    if test "x$new_path" = x; then
27179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27180$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27181      has_space=`$ECHO "$complete" | $GREP " "`
27182      if test "x$has_space" != x; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27185      fi
27186      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27187    fi
27188  fi
27189
27190  # Now join together the path and the arguments once again
27191  if test "x$arguments" != xEOL; then
27192    new_complete="$new_path ${arguments% *}"
27193  else
27194    new_complete="$new_path"
27195  fi
27196
27197  if test "x$complete" != "x$new_complete"; then
27198    VS_ENV_CMD="$new_complete"
27199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27200$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27201  fi
27202
27203
27204    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27205    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27206$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27207    cd $OUTPUT_ROOT
27208    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27209    # to autoconf standards.
27210
27211    #----
27212
27213    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27214    # but calculate the difference in Cygwin environment before/after running it and then
27215    # apply the diff.
27216
27217    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27218      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27219      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27220      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27221    else
27222      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27223      _dosbash=`cmd //c echo \`which bash\``
27224    fi
27225
27226    # generate the set of exported vars before/after the vs10 setup
27227    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27228    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27229    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27230    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27231
27232    # Now execute the newly created bat file.
27233    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27234    cmd /c localdevenvtmp.bat | cat
27235
27236    # apply the diff (less some non-vs10 vars named by "!")
27237    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27238    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27239    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27240
27241    # cleanup
27242    $RM localdevenvtmp*
27243    #----
27244    cd $CURDIR
27245    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27247$as_echo "no" >&6; }
27248      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27249$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27250      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27251$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27252      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27253$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27254      as_fn_error $? "Cannot continue" "$LINENO" 5
27255    fi
27256
27257    # Now set all paths and other env variables. This will allow the rest of
27258    # the configure script to find and run the compiler in the proper way.
27259    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27260$as_echo "$as_me: Setting extracted environment variables" >&6;}
27261    . $OUTPUT_ROOT/localdevenv.sh
27262  else
27263    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27264    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27265$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27266  fi
27267
27268  # At this point, we should have corrent variables in the environment, or we can't continue.
27269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27270$as_echo_n "checking for Visual Studio variables... " >&6; }
27271
27272  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27273    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27275$as_echo "present but broken" >&6; }
27276      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27277    else
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27279$as_echo "ok" >&6; }
27280      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27281      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27282      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27283      # Remove any paths containing # (typically F#) as that messes up make
27284      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27285      VS_PATH="$PATH"
27286
27287
27288
27289    fi
27290  else
27291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27292$as_echo "not found" >&6; }
27293
27294    if test "x$VS_ENV_CMD" = x; then
27295      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27296$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27297      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27298$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27299    else
27300      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27301$as_echo "$as_me: Running the extraction script failed." >&6;}
27302    fi
27303    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27304$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27305    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27306$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27307    as_fn_error $? "Cannot continue" "$LINENO" 5
27308  fi
27309
27310
27311
27312# Check whether --with-msvcr-dll was given.
27313if test "${with_msvcr_dll+set}" = set; then :
27314  withval=$with_msvcr_dll;
27315fi
27316
27317
27318  if test "x$with_msvcr_dll" != x; then
27319    # If given explicitely by user, do not probe. If not present, fail directly.
27320
27321  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
27322  METHOD="--with-msvcr-dll"
27323  if test -e "$POSSIBLE_MSVCR_DLL"; then
27324    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27325$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27326
27327    # Need to check if the found msvcr is correct architecture
27328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27329$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27330    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27331    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27332      CORRECT_MSVCR_ARCH=386
27333    else
27334      CORRECT_MSVCR_ARCH=x86-64
27335    fi
27336    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27338$as_echo "ok" >&6; }
27339      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27341$as_echo_n "checking for msvcr100.dll... " >&6; }
27342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27343$as_echo "$MSVCR_DLL" >&6; }
27344    else
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27346$as_echo "incorrect, ignoring" >&6; }
27347      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27348$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27349    fi
27350  fi
27351
27352    if test "x$MSVCR_DLL" = x; then
27353      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
27354    fi
27355  fi
27356
27357  if test "x$MSVCR_DLL" = x; then
27358    # Probe: Using well-known location from Visual Studio 10.0
27359    if test "x$VCINSTALLDIR" != x; then
27360      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
27361
27362  windows_path="$CYGWIN_VC_INSTALL_DIR"
27363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27364    unix_path=`$CYGPATH -u "$windows_path"`
27365    CYGWIN_VC_INSTALL_DIR="$unix_path"
27366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27368    CYGWIN_VC_INSTALL_DIR="$unix_path"
27369  fi
27370
27371      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27372        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
27373      else
27374        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
27375      fi
27376
27377  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27378  METHOD="well-known location in VCINSTALLDIR"
27379  if test -e "$POSSIBLE_MSVCR_DLL"; then
27380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27381$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27382
27383    # Need to check if the found msvcr is correct architecture
27384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27385$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27386    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27387    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27388      CORRECT_MSVCR_ARCH=386
27389    else
27390      CORRECT_MSVCR_ARCH=x86-64
27391    fi
27392    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27394$as_echo "ok" >&6; }
27395      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27397$as_echo_n "checking for msvcr100.dll... " >&6; }
27398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27399$as_echo "$MSVCR_DLL" >&6; }
27400    else
27401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27402$as_echo "incorrect, ignoring" >&6; }
27403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27404$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27405    fi
27406  fi
27407
27408    fi
27409  fi
27410
27411  if test "x$MSVCR_DLL" = x; then
27412    # Probe: Check in the Boot JDK directory.
27413    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
27414
27415  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27416  METHOD="well-known location in Boot JDK"
27417  if test -e "$POSSIBLE_MSVCR_DLL"; then
27418    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27419$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27420
27421    # Need to check if the found msvcr is correct architecture
27422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27423$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27424    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27425    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27426      CORRECT_MSVCR_ARCH=386
27427    else
27428      CORRECT_MSVCR_ARCH=x86-64
27429    fi
27430    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27432$as_echo "ok" >&6; }
27433      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27435$as_echo_n "checking for msvcr100.dll... " >&6; }
27436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27437$as_echo "$MSVCR_DLL" >&6; }
27438    else
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27440$as_echo "incorrect, ignoring" >&6; }
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27442$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27443    fi
27444  fi
27445
27446  fi
27447
27448  if test "x$MSVCR_DLL" = x; then
27449    # Probe: Look in the Windows system32 directory
27450    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
27451
27452  windows_path="$CYGWIN_SYSTEMROOT"
27453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454    unix_path=`$CYGPATH -u "$windows_path"`
27455    CYGWIN_SYSTEMROOT="$unix_path"
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458    CYGWIN_SYSTEMROOT="$unix_path"
27459  fi
27460
27461    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
27462
27463  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27464  METHOD="well-known location in SYSTEMROOT"
27465  if test -e "$POSSIBLE_MSVCR_DLL"; then
27466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27467$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27468
27469    # Need to check if the found msvcr is correct architecture
27470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27471$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27472    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27473    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27474      CORRECT_MSVCR_ARCH=386
27475    else
27476      CORRECT_MSVCR_ARCH=x86-64
27477    fi
27478    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27480$as_echo "ok" >&6; }
27481      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27482      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27483$as_echo_n "checking for msvcr100.dll... " >&6; }
27484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27485$as_echo "$MSVCR_DLL" >&6; }
27486    else
27487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27488$as_echo "incorrect, ignoring" >&6; }
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27490$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27491    fi
27492  fi
27493
27494  fi
27495
27496  if test "x$MSVCR_DLL" = x; then
27497    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
27498    if test "x$VS100COMNTOOLS" != x; then
27499      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
27500
27501  windows_path="$CYGWIN_VS_TOOLS_DIR"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    CYGWIN_VS_TOOLS_DIR="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    CYGWIN_VS_TOOLS_DIR="$unix_path"
27508  fi
27509
27510      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27511        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
27512      else
27513        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
27514      fi
27515
27516  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27517  METHOD="search of VS100COMNTOOLS"
27518  if test -e "$POSSIBLE_MSVCR_DLL"; then
27519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27520$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27521
27522    # Need to check if the found msvcr is correct architecture
27523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27524$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27525    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27526    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27527      CORRECT_MSVCR_ARCH=386
27528    else
27529      CORRECT_MSVCR_ARCH=x86-64
27530    fi
27531    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27533$as_echo "ok" >&6; }
27534      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27536$as_echo_n "checking for msvcr100.dll... " >&6; }
27537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27538$as_echo "$MSVCR_DLL" >&6; }
27539    else
27540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27541$as_echo "incorrect, ignoring" >&6; }
27542      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27543$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27544    fi
27545  fi
27546
27547    fi
27548  fi
27549
27550  if test "x$MSVCR_DLL" = x; then
27551    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
27552    # (This was the original behaviour; kept since it might turn up something)
27553    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
27554      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27555        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
27556      else
27557        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
27558        if test "x$POSSIBLE_MSVCR_DLL" = x; then
27559          # We're grasping at straws now...
27560          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
27561        fi
27562      fi
27563
27564
27565  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27566  METHOD="search of VCINSTALLDIR"
27567  if test -e "$POSSIBLE_MSVCR_DLL"; then
27568    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27569$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27570
27571    # Need to check if the found msvcr is correct architecture
27572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27573$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27574    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27575    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27576      CORRECT_MSVCR_ARCH=386
27577    else
27578      CORRECT_MSVCR_ARCH=x86-64
27579    fi
27580    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27582$as_echo "ok" >&6; }
27583      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27585$as_echo_n "checking for msvcr100.dll... " >&6; }
27586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27587$as_echo "$MSVCR_DLL" >&6; }
27588    else
27589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27590$as_echo "incorrect, ignoring" >&6; }
27591      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27592$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27593    fi
27594  fi
27595
27596    fi
27597  fi
27598
27599  if test "x$MSVCR_DLL" = x; then
27600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27601$as_echo_n "checking for msvcr100.dll... " >&6; }
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27603$as_echo "no" >&6; }
27604    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
27605  fi
27606
27607
27608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27609
27610  # Input might be given as Windows format, start by converting to
27611  # unix format.
27612  path="$MSVCR_DLL"
27613  new_path=`$CYGPATH -u "$path"`
27614
27615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27618  # "foo.exe" is OK but "foo" is an error.
27619  #
27620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27621  # It is also a way to make sure we got the proper file name for the real test later on.
27622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27623  if test "x$test_shortpath" = x; then
27624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27625$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27626    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
27627  fi
27628
27629  # Call helper function which possibly converts this using DOS-style short mode.
27630  # If so, the updated path is stored in $new_path.
27631
27632  input_path="$new_path"
27633  # Check if we need to convert this using DOS-style short mode. If the path
27634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27635  # take no chances and rewrite it.
27636  # Note: m4 eats our [], so we need to use [ and ] instead.
27637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27638  if test "x$has_forbidden_chars" != x; then
27639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27643      # Going to short mode and back again did indeed matter. Since short mode is
27644      # case insensitive, let's make it lowercase to improve readability.
27645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27646      # Now convert it back to Unix-stile (cygpath)
27647      input_path=`$CYGPATH -u "$shortmode_path"`
27648      new_path="$input_path"
27649    fi
27650  fi
27651
27652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27653  if test "x$test_cygdrive_prefix" = x; then
27654    # As a simple fix, exclude /usr/bin since it's not a real path.
27655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27657      # a path prefixed by /cygdrive for fixpath to work.
27658      new_path="$CYGWIN_ROOT_PATH$input_path"
27659    fi
27660  fi
27661
27662
27663  if test "x$path" != "x$new_path"; then
27664    MSVCR_DLL="$new_path"
27665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27666$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27667  fi
27668
27669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27670
27671  path="$MSVCR_DLL"
27672  has_colon=`$ECHO $path | $GREP ^.:`
27673  new_path="$path"
27674  if test "x$has_colon" = x; then
27675    # Not in mixed or Windows style, start by that.
27676    new_path=`cmd //c echo $path`
27677  fi
27678
27679
27680  input_path="$new_path"
27681  # Check if we need to convert this using DOS-style short mode. If the path
27682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27683  # take no chances and rewrite it.
27684  # Note: m4 eats our [], so we need to use [ and ] instead.
27685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27686  if test "x$has_forbidden_chars" != x; then
27687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27689  fi
27690
27691
27692  windows_path="$new_path"
27693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694    unix_path=`$CYGPATH -u "$windows_path"`
27695    new_path="$unix_path"
27696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27698    new_path="$unix_path"
27699  fi
27700
27701  if test "x$path" != "x$new_path"; then
27702    MSVCR_DLL="$new_path"
27703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27704$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27705  fi
27706
27707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27709
27710  else
27711    # We're on a posix platform. Hooray! :)
27712    path="$MSVCR_DLL"
27713    has_space=`$ECHO "$path" | $GREP " "`
27714    if test "x$has_space" != x; then
27715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27716$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27717      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27718    fi
27719
27720    # Use eval to expand a potential ~
27721    eval path="$path"
27722    if test ! -f "$path" && test ! -d "$path"; then
27723      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
27724    fi
27725
27726    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
27727  fi
27728
27729
27730
27731
27732# Check whether --with-dxsdk was given.
27733if test "${with_dxsdk+set}" = set; then :
27734  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
27735$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
27736fi
27737
27738
27739
27740
27741# Check whether --with-dxsdk-lib was given.
27742if test "${with_dxsdk_lib+set}" = set; then :
27743  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
27744$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
27745fi
27746
27747
27748
27749
27750# Check whether --with-dxsdk-include was given.
27751if test "${with_dxsdk_include+set}" = set; then :
27752  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
27753$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
27754fi
27755
27756
27757  fi
27758
27759
27760
27761  # If --build AND --host is set, then the configure script will find any
27762  # cross compilation tools in the PATH. Cross compilation tools
27763  # follows the cross compilation standard where they are prefixed with ${host}.
27764  # For example the binary i686-sun-solaris2.10-gcc
27765  # will cross compile for i686-sun-solaris2.10
27766  # If neither of build and host is not set, then build=host and the
27767  # default compiler found in the path will be used.
27768  # Setting only --host, does not seem to be really supported.
27769  # Please set both --build and --host if you want to cross compile.
27770
27771  if test "x$COMPILE_TYPE" = "xcross"; then
27772    # Now we to find a C/C++ compiler that can build executables for the build
27773    # platform. We can't use the AC_PROG_CC macro, since it can only be used
27774    # once. Also, we need to do this before adding a tools dir to the path,
27775    # otherwise we might pick up cross-compilers which don't use standard naming.
27776    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
27777    # to wait until they are properly discovered.
27778
27779
27780  # Publish this variable in the help.
27781
27782
27783  if test "x$BUILD_CC" = x; then
27784    # The variable is not set by user, try to locate tool using the code snippet
27785    for ac_prog in cl cc gcc
27786do
27787  # Extract the first word of "$ac_prog", so it can be a program name with args.
27788set dummy $ac_prog; ac_word=$2
27789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27790$as_echo_n "checking for $ac_word... " >&6; }
27791if ${ac_cv_path_BUILD_CC+:} false; then :
27792  $as_echo_n "(cached) " >&6
27793else
27794  case $BUILD_CC in
27795  [\\/]* | ?:[\\/]*)
27796  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27797  ;;
27798  *)
27799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27800for as_dir in $PATH
27801do
27802  IFS=$as_save_IFS
27803  test -z "$as_dir" && as_dir=.
27804    for ac_exec_ext in '' $ac_executable_extensions; do
27805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27806    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27808    break 2
27809  fi
27810done
27811  done
27812IFS=$as_save_IFS
27813
27814  ;;
27815esac
27816fi
27817BUILD_CC=$ac_cv_path_BUILD_CC
27818if test -n "$BUILD_CC"; then
27819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27820$as_echo "$BUILD_CC" >&6; }
27821else
27822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27823$as_echo "no" >&6; }
27824fi
27825
27826
27827  test -n "$BUILD_CC" && break
27828done
27829
27830  else
27831    # The variable is set, but is it from the command line or the environment?
27832
27833    # Try to remove the string !BUILD_CC! from our list.
27834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
27835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27836      # If it failed, the variable was not from the command line. Ignore it,
27837      # but warn the user (except for BASH, which is always set by the calling BASH).
27838      if test "xBUILD_CC" != xBASH; then
27839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
27840$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
27841      fi
27842      # Try to locate tool using the code snippet
27843      for ac_prog in cl cc gcc
27844do
27845  # Extract the first word of "$ac_prog", so it can be a program name with args.
27846set dummy $ac_prog; ac_word=$2
27847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27848$as_echo_n "checking for $ac_word... " >&6; }
27849if ${ac_cv_path_BUILD_CC+:} false; then :
27850  $as_echo_n "(cached) " >&6
27851else
27852  case $BUILD_CC in
27853  [\\/]* | ?:[\\/]*)
27854  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27855  ;;
27856  *)
27857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27858for as_dir in $PATH
27859do
27860  IFS=$as_save_IFS
27861  test -z "$as_dir" && as_dir=.
27862    for ac_exec_ext in '' $ac_executable_extensions; do
27863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27864    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27866    break 2
27867  fi
27868done
27869  done
27870IFS=$as_save_IFS
27871
27872  ;;
27873esac
27874fi
27875BUILD_CC=$ac_cv_path_BUILD_CC
27876if test -n "$BUILD_CC"; then
27877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27878$as_echo "$BUILD_CC" >&6; }
27879else
27880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27881$as_echo "no" >&6; }
27882fi
27883
27884
27885  test -n "$BUILD_CC" && break
27886done
27887
27888    else
27889      # If it succeeded, then it was overridden by the user. We will use it
27890      # for the tool.
27891
27892      # First remove it from the list of overridden variables, so we can test
27893      # for unknown variables in the end.
27894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27895
27896      # Check if the provided tool contains a complete path.
27897      tool_specified="$BUILD_CC"
27898      tool_basename="${tool_specified##*/}"
27899      if test "x$tool_basename" = "x$tool_specified"; then
27900        # A command without a complete path is provided, search $PATH.
27901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
27902$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
27903        # Extract the first word of "$tool_basename", so it can be a program name with args.
27904set dummy $tool_basename; ac_word=$2
27905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27906$as_echo_n "checking for $ac_word... " >&6; }
27907if ${ac_cv_path_BUILD_CC+:} false; then :
27908  $as_echo_n "(cached) " >&6
27909else
27910  case $BUILD_CC in
27911  [\\/]* | ?:[\\/]*)
27912  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27913  ;;
27914  *)
27915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27916for as_dir in $PATH
27917do
27918  IFS=$as_save_IFS
27919  test -z "$as_dir" && as_dir=.
27920    for ac_exec_ext in '' $ac_executable_extensions; do
27921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27922    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27924    break 2
27925  fi
27926done
27927  done
27928IFS=$as_save_IFS
27929
27930  ;;
27931esac
27932fi
27933BUILD_CC=$ac_cv_path_BUILD_CC
27934if test -n "$BUILD_CC"; then
27935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27936$as_echo "$BUILD_CC" >&6; }
27937else
27938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27939$as_echo "no" >&6; }
27940fi
27941
27942
27943        if test "x$BUILD_CC" = x; then
27944          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27945        fi
27946      else
27947        # Otherwise we believe it is a complete path. Use it as it is.
27948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
27949$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
27950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
27951$as_echo_n "checking for BUILD_CC... " >&6; }
27952        if test ! -x "$tool_specified"; then
27953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27954$as_echo "not found" >&6; }
27955          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
27956        fi
27957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27958$as_echo "$tool_specified" >&6; }
27959      fi
27960    fi
27961  fi
27962
27963
27964
27965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27966
27967  # First separate the path from the arguments. This will split at the first
27968  # space.
27969  complete="$BUILD_CC"
27970  path="${complete%% *}"
27971  tmp="$complete EOL"
27972  arguments="${tmp#* }"
27973
27974  # Input might be given as Windows format, start by converting to
27975  # unix format.
27976  new_path=`$CYGPATH -u "$path"`
27977
27978  # Now try to locate executable using which
27979  new_path=`$WHICH "$new_path" 2> /dev/null`
27980  # bat and cmd files are not always considered executable in cygwin causing which
27981  # to not find them
27982  if test "x$new_path" = x \
27983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27985    new_path=`$CYGPATH -u "$path"`
27986  fi
27987  if test "x$new_path" = x; then
27988    # Oops. Which didn't find the executable.
27989    # The splitting of arguments from the executable at a space might have been incorrect,
27990    # since paths with space are more likely in Windows. Give it another try with the whole
27991    # argument.
27992    path="$complete"
27993    arguments="EOL"
27994    new_path=`$CYGPATH -u "$path"`
27995    new_path=`$WHICH "$new_path" 2> /dev/null`
27996    # bat and cmd files are not always considered executable in cygwin causing which
27997    # to not find them
27998    if test "x$new_path" = x \
27999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28001      new_path=`$CYGPATH -u "$path"`
28002    fi
28003    if test "x$new_path" = x; then
28004      # It's still not found. Now this is an unrecoverable error.
28005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28006$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28007      has_space=`$ECHO "$complete" | $GREP " "`
28008      if test "x$has_space" != x; then
28009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28011      fi
28012      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28013    fi
28014  fi
28015
28016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28019  # "foo.exe" is OK but "foo" is an error.
28020  #
28021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28022  # It is also a way to make sure we got the proper file name for the real test later on.
28023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28024  if test "x$test_shortpath" = x; then
28025    # Short path failed, file does not exist as specified.
28026    # Try adding .exe or .cmd
28027    if test -f "${new_path}.exe"; then
28028      input_to_shortpath="${new_path}.exe"
28029    elif test -f "${new_path}.cmd"; then
28030      input_to_shortpath="${new_path}.cmd"
28031    else
28032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
28033$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
28034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28036      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28037    fi
28038  else
28039    input_to_shortpath="$new_path"
28040  fi
28041
28042  # Call helper function which possibly converts this using DOS-style short mode.
28043  # If so, the updated path is stored in $new_path.
28044  new_path="$input_to_shortpath"
28045
28046  input_path="$input_to_shortpath"
28047  # Check if we need to convert this using DOS-style short mode. If the path
28048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28049  # take no chances and rewrite it.
28050  # Note: m4 eats our [], so we need to use [ and ] instead.
28051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28052  if test "x$has_forbidden_chars" != x; then
28053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28057      # Going to short mode and back again did indeed matter. Since short mode is
28058      # case insensitive, let's make it lowercase to improve readability.
28059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28060      # Now convert it back to Unix-stile (cygpath)
28061      input_path=`$CYGPATH -u "$shortmode_path"`
28062      new_path="$input_path"
28063    fi
28064  fi
28065
28066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28067  if test "x$test_cygdrive_prefix" = x; then
28068    # As a simple fix, exclude /usr/bin since it's not a real path.
28069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28071      # a path prefixed by /cygdrive for fixpath to work.
28072      new_path="$CYGWIN_ROOT_PATH$input_path"
28073    fi
28074  fi
28075
28076  # remove trailing .exe if any
28077  new_path="${new_path/%.exe/}"
28078
28079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28080
28081  # First separate the path from the arguments. This will split at the first
28082  # space.
28083  complete="$BUILD_CC"
28084  path="${complete%% *}"
28085  tmp="$complete EOL"
28086  arguments="${tmp#* }"
28087
28088  # Input might be given as Windows format, start by converting to
28089  # unix format.
28090  new_path="$path"
28091
28092  windows_path="$new_path"
28093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28094    unix_path=`$CYGPATH -u "$windows_path"`
28095    new_path="$unix_path"
28096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28098    new_path="$unix_path"
28099  fi
28100
28101
28102  # Now try to locate executable using which
28103  new_path=`$WHICH "$new_path" 2> /dev/null`
28104
28105  if test "x$new_path" = x; then
28106    # Oops. Which didn't find the executable.
28107    # The splitting of arguments from the executable at a space might have been incorrect,
28108    # since paths with space are more likely in Windows. Give it another try with the whole
28109    # argument.
28110    path="$complete"
28111    arguments="EOL"
28112    new_path="$path"
28113
28114  windows_path="$new_path"
28115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28116    unix_path=`$CYGPATH -u "$windows_path"`
28117    new_path="$unix_path"
28118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28120    new_path="$unix_path"
28121  fi
28122
28123
28124    new_path=`$WHICH "$new_path" 2> /dev/null`
28125
28126    if test "x$new_path" = x; then
28127      # It's still not found. Now this is an unrecoverable error.
28128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28129$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28130      has_space=`$ECHO "$complete" | $GREP " "`
28131      if test "x$has_space" != x; then
28132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28134      fi
28135      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28136    fi
28137  fi
28138
28139  # Now new_path has a complete unix path to the binary
28140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28141    # Keep paths in /bin as-is, but remove trailing .exe if any
28142    new_path="${new_path/%.exe/}"
28143    # Do not save /bin paths to all_fixpath_prefixes!
28144  else
28145    # Not in mixed or Windows style, start by that.
28146    new_path=`cmd //c echo $new_path`
28147
28148  input_path="$new_path"
28149  # Check if we need to convert this using DOS-style short mode. If the path
28150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151  # take no chances and rewrite it.
28152  # Note: m4 eats our [], so we need to use [ and ] instead.
28153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28154  if test "x$has_forbidden_chars" != x; then
28155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157  fi
28158
28159    # Output is in $new_path
28160
28161  windows_path="$new_path"
28162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28163    unix_path=`$CYGPATH -u "$windows_path"`
28164    new_path="$unix_path"
28165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28167    new_path="$unix_path"
28168  fi
28169
28170    # remove trailing .exe if any
28171    new_path="${new_path/%.exe/}"
28172
28173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28175  fi
28176
28177  else
28178    # We're on a posix platform. Hooray! :)
28179    # First separate the path from the arguments. This will split at the first
28180    # space.
28181    complete="$BUILD_CC"
28182    path="${complete%% *}"
28183    tmp="$complete EOL"
28184    arguments="${tmp#* }"
28185
28186    # Cannot rely on the command "which" here since it doesn't always work.
28187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28188    if test -z "$is_absolute_path"; then
28189      # Path to executable is not absolute. Find it.
28190      IFS_save="$IFS"
28191      IFS=:
28192      for p in $PATH; do
28193        if test -f "$p/$path" && test -x "$p/$path"; then
28194          new_path="$p/$path"
28195          break
28196        fi
28197      done
28198      IFS="$IFS_save"
28199    else
28200      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
28201$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
28202      new_path="$path"
28203    fi
28204
28205    if test "x$new_path" = x; then
28206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28207$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28208      has_space=`$ECHO "$complete" | $GREP " "`
28209      if test "x$has_space" != x; then
28210        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28212      fi
28213      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28214    fi
28215  fi
28216
28217  # Now join together the path and the arguments once again
28218  if test "x$arguments" != xEOL; then
28219    new_complete="$new_path ${arguments% *}"
28220  else
28221    new_complete="$new_path"
28222  fi
28223
28224  if test "x$complete" != "x$new_complete"; then
28225    BUILD_CC="$new_complete"
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
28227$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
28228  fi
28229
28230
28231
28232  # Publish this variable in the help.
28233
28234
28235  if test "x$BUILD_CXX" = x; then
28236    # The variable is not set by user, try to locate tool using the code snippet
28237    for ac_prog in cl CC g++
28238do
28239  # Extract the first word of "$ac_prog", so it can be a program name with args.
28240set dummy $ac_prog; ac_word=$2
28241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28242$as_echo_n "checking for $ac_word... " >&6; }
28243if ${ac_cv_path_BUILD_CXX+:} false; then :
28244  $as_echo_n "(cached) " >&6
28245else
28246  case $BUILD_CXX in
28247  [\\/]* | ?:[\\/]*)
28248  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28249  ;;
28250  *)
28251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28252for as_dir in $PATH
28253do
28254  IFS=$as_save_IFS
28255  test -z "$as_dir" && as_dir=.
28256    for ac_exec_ext in '' $ac_executable_extensions; do
28257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28258    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28260    break 2
28261  fi
28262done
28263  done
28264IFS=$as_save_IFS
28265
28266  ;;
28267esac
28268fi
28269BUILD_CXX=$ac_cv_path_BUILD_CXX
28270if test -n "$BUILD_CXX"; then
28271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28272$as_echo "$BUILD_CXX" >&6; }
28273else
28274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28275$as_echo "no" >&6; }
28276fi
28277
28278
28279  test -n "$BUILD_CXX" && break
28280done
28281
28282  else
28283    # The variable is set, but is it from the command line or the environment?
28284
28285    # Try to remove the string !BUILD_CXX! from our list.
28286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
28287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28288      # If it failed, the variable was not from the command line. Ignore it,
28289      # but warn the user (except for BASH, which is always set by the calling BASH).
28290      if test "xBUILD_CXX" != xBASH; then
28291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
28292$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
28293      fi
28294      # Try to locate tool using the code snippet
28295      for ac_prog in cl CC g++
28296do
28297  # Extract the first word of "$ac_prog", so it can be a program name with args.
28298set dummy $ac_prog; ac_word=$2
28299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28300$as_echo_n "checking for $ac_word... " >&6; }
28301if ${ac_cv_path_BUILD_CXX+:} false; then :
28302  $as_echo_n "(cached) " >&6
28303else
28304  case $BUILD_CXX in
28305  [\\/]* | ?:[\\/]*)
28306  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28307  ;;
28308  *)
28309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28310for as_dir in $PATH
28311do
28312  IFS=$as_save_IFS
28313  test -z "$as_dir" && as_dir=.
28314    for ac_exec_ext in '' $ac_executable_extensions; do
28315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28316    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28318    break 2
28319  fi
28320done
28321  done
28322IFS=$as_save_IFS
28323
28324  ;;
28325esac
28326fi
28327BUILD_CXX=$ac_cv_path_BUILD_CXX
28328if test -n "$BUILD_CXX"; then
28329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28330$as_echo "$BUILD_CXX" >&6; }
28331else
28332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28333$as_echo "no" >&6; }
28334fi
28335
28336
28337  test -n "$BUILD_CXX" && break
28338done
28339
28340    else
28341      # If it succeeded, then it was overridden by the user. We will use it
28342      # for the tool.
28343
28344      # First remove it from the list of overridden variables, so we can test
28345      # for unknown variables in the end.
28346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28347
28348      # Check if the provided tool contains a complete path.
28349      tool_specified="$BUILD_CXX"
28350      tool_basename="${tool_specified##*/}"
28351      if test "x$tool_basename" = "x$tool_specified"; then
28352        # A command without a complete path is provided, search $PATH.
28353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
28354$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
28355        # Extract the first word of "$tool_basename", so it can be a program name with args.
28356set dummy $tool_basename; ac_word=$2
28357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28358$as_echo_n "checking for $ac_word... " >&6; }
28359if ${ac_cv_path_BUILD_CXX+:} false; then :
28360  $as_echo_n "(cached) " >&6
28361else
28362  case $BUILD_CXX in
28363  [\\/]* | ?:[\\/]*)
28364  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28365  ;;
28366  *)
28367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28368for as_dir in $PATH
28369do
28370  IFS=$as_save_IFS
28371  test -z "$as_dir" && as_dir=.
28372    for ac_exec_ext in '' $ac_executable_extensions; do
28373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28374    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28376    break 2
28377  fi
28378done
28379  done
28380IFS=$as_save_IFS
28381
28382  ;;
28383esac
28384fi
28385BUILD_CXX=$ac_cv_path_BUILD_CXX
28386if test -n "$BUILD_CXX"; then
28387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28388$as_echo "$BUILD_CXX" >&6; }
28389else
28390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28391$as_echo "no" >&6; }
28392fi
28393
28394
28395        if test "x$BUILD_CXX" = x; then
28396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28397        fi
28398      else
28399        # Otherwise we believe it is a complete path. Use it as it is.
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
28401$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
28402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
28403$as_echo_n "checking for BUILD_CXX... " >&6; }
28404        if test ! -x "$tool_specified"; then
28405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28406$as_echo "not found" >&6; }
28407          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
28408        fi
28409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28410$as_echo "$tool_specified" >&6; }
28411      fi
28412    fi
28413  fi
28414
28415
28416
28417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28418
28419  # First separate the path from the arguments. This will split at the first
28420  # space.
28421  complete="$BUILD_CXX"
28422  path="${complete%% *}"
28423  tmp="$complete EOL"
28424  arguments="${tmp#* }"
28425
28426  # Input might be given as Windows format, start by converting to
28427  # unix format.
28428  new_path=`$CYGPATH -u "$path"`
28429
28430  # Now try to locate executable using which
28431  new_path=`$WHICH "$new_path" 2> /dev/null`
28432  # bat and cmd files are not always considered executable in cygwin causing which
28433  # to not find them
28434  if test "x$new_path" = x \
28435      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28436      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28437    new_path=`$CYGPATH -u "$path"`
28438  fi
28439  if test "x$new_path" = x; then
28440    # Oops. Which didn't find the executable.
28441    # The splitting of arguments from the executable at a space might have been incorrect,
28442    # since paths with space are more likely in Windows. Give it another try with the whole
28443    # argument.
28444    path="$complete"
28445    arguments="EOL"
28446    new_path=`$CYGPATH -u "$path"`
28447    new_path=`$WHICH "$new_path" 2> /dev/null`
28448    # bat and cmd files are not always considered executable in cygwin causing which
28449    # to not find them
28450    if test "x$new_path" = x \
28451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28453      new_path=`$CYGPATH -u "$path"`
28454    fi
28455    if test "x$new_path" = x; then
28456      # It's still not found. Now this is an unrecoverable error.
28457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28458$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28459      has_space=`$ECHO "$complete" | $GREP " "`
28460      if test "x$has_space" != x; then
28461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28463      fi
28464      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28465    fi
28466  fi
28467
28468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28471  # "foo.exe" is OK but "foo" is an error.
28472  #
28473  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28474  # It is also a way to make sure we got the proper file name for the real test later on.
28475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28476  if test "x$test_shortpath" = x; then
28477    # Short path failed, file does not exist as specified.
28478    # Try adding .exe or .cmd
28479    if test -f "${new_path}.exe"; then
28480      input_to_shortpath="${new_path}.exe"
28481    elif test -f "${new_path}.cmd"; then
28482      input_to_shortpath="${new_path}.cmd"
28483    else
28484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
28485$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
28486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28488      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28489    fi
28490  else
28491    input_to_shortpath="$new_path"
28492  fi
28493
28494  # Call helper function which possibly converts this using DOS-style short mode.
28495  # If so, the updated path is stored in $new_path.
28496  new_path="$input_to_shortpath"
28497
28498  input_path="$input_to_shortpath"
28499  # Check if we need to convert this using DOS-style short mode. If the path
28500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28501  # take no chances and rewrite it.
28502  # Note: m4 eats our [], so we need to use [ and ] instead.
28503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28504  if test "x$has_forbidden_chars" != x; then
28505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28509      # Going to short mode and back again did indeed matter. Since short mode is
28510      # case insensitive, let's make it lowercase to improve readability.
28511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28512      # Now convert it back to Unix-stile (cygpath)
28513      input_path=`$CYGPATH -u "$shortmode_path"`
28514      new_path="$input_path"
28515    fi
28516  fi
28517
28518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28519  if test "x$test_cygdrive_prefix" = x; then
28520    # As a simple fix, exclude /usr/bin since it's not a real path.
28521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28523      # a path prefixed by /cygdrive for fixpath to work.
28524      new_path="$CYGWIN_ROOT_PATH$input_path"
28525    fi
28526  fi
28527
28528  # remove trailing .exe if any
28529  new_path="${new_path/%.exe/}"
28530
28531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28532
28533  # First separate the path from the arguments. This will split at the first
28534  # space.
28535  complete="$BUILD_CXX"
28536  path="${complete%% *}"
28537  tmp="$complete EOL"
28538  arguments="${tmp#* }"
28539
28540  # Input might be given as Windows format, start by converting to
28541  # unix format.
28542  new_path="$path"
28543
28544  windows_path="$new_path"
28545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28546    unix_path=`$CYGPATH -u "$windows_path"`
28547    new_path="$unix_path"
28548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28550    new_path="$unix_path"
28551  fi
28552
28553
28554  # Now try to locate executable using which
28555  new_path=`$WHICH "$new_path" 2> /dev/null`
28556
28557  if test "x$new_path" = x; then
28558    # Oops. Which didn't find the executable.
28559    # The splitting of arguments from the executable at a space might have been incorrect,
28560    # since paths with space are more likely in Windows. Give it another try with the whole
28561    # argument.
28562    path="$complete"
28563    arguments="EOL"
28564    new_path="$path"
28565
28566  windows_path="$new_path"
28567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28568    unix_path=`$CYGPATH -u "$windows_path"`
28569    new_path="$unix_path"
28570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28572    new_path="$unix_path"
28573  fi
28574
28575
28576    new_path=`$WHICH "$new_path" 2> /dev/null`
28577
28578    if test "x$new_path" = x; then
28579      # It's still not found. Now this is an unrecoverable error.
28580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28581$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28582      has_space=`$ECHO "$complete" | $GREP " "`
28583      if test "x$has_space" != x; then
28584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28586      fi
28587      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28588    fi
28589  fi
28590
28591  # Now new_path has a complete unix path to the binary
28592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28593    # Keep paths in /bin as-is, but remove trailing .exe if any
28594    new_path="${new_path/%.exe/}"
28595    # Do not save /bin paths to all_fixpath_prefixes!
28596  else
28597    # Not in mixed or Windows style, start by that.
28598    new_path=`cmd //c echo $new_path`
28599
28600  input_path="$new_path"
28601  # Check if we need to convert this using DOS-style short mode. If the path
28602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28603  # take no chances and rewrite it.
28604  # Note: m4 eats our [], so we need to use [ and ] instead.
28605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28606  if test "x$has_forbidden_chars" != x; then
28607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28609  fi
28610
28611    # Output is in $new_path
28612
28613  windows_path="$new_path"
28614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28615    unix_path=`$CYGPATH -u "$windows_path"`
28616    new_path="$unix_path"
28617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28619    new_path="$unix_path"
28620  fi
28621
28622    # remove trailing .exe if any
28623    new_path="${new_path/%.exe/}"
28624
28625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28627  fi
28628
28629  else
28630    # We're on a posix platform. Hooray! :)
28631    # First separate the path from the arguments. This will split at the first
28632    # space.
28633    complete="$BUILD_CXX"
28634    path="${complete%% *}"
28635    tmp="$complete EOL"
28636    arguments="${tmp#* }"
28637
28638    # Cannot rely on the command "which" here since it doesn't always work.
28639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28640    if test -z "$is_absolute_path"; then
28641      # Path to executable is not absolute. Find it.
28642      IFS_save="$IFS"
28643      IFS=:
28644      for p in $PATH; do
28645        if test -f "$p/$path" && test -x "$p/$path"; then
28646          new_path="$p/$path"
28647          break
28648        fi
28649      done
28650      IFS="$IFS_save"
28651    else
28652      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
28653$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
28654      new_path="$path"
28655    fi
28656
28657    if test "x$new_path" = x; then
28658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28659$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28660      has_space=`$ECHO "$complete" | $GREP " "`
28661      if test "x$has_space" != x; then
28662        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28664      fi
28665      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28666    fi
28667  fi
28668
28669  # Now join together the path and the arguments once again
28670  if test "x$arguments" != xEOL; then
28671    new_complete="$new_path ${arguments% *}"
28672  else
28673    new_complete="$new_path"
28674  fi
28675
28676  if test "x$complete" != "x$new_complete"; then
28677    BUILD_CXX="$new_complete"
28678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
28679$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
28680  fi
28681
28682
28683
28684  # Publish this variable in the help.
28685
28686
28687  if test "x$BUILD_LD" = x; then
28688    # The variable is not set by user, try to locate tool using the code snippet
28689    for ac_prog in ld
28690do
28691  # Extract the first word of "$ac_prog", so it can be a program name with args.
28692set dummy $ac_prog; ac_word=$2
28693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28694$as_echo_n "checking for $ac_word... " >&6; }
28695if ${ac_cv_path_BUILD_LD+:} false; then :
28696  $as_echo_n "(cached) " >&6
28697else
28698  case $BUILD_LD in
28699  [\\/]* | ?:[\\/]*)
28700  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28701  ;;
28702  *)
28703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28704for as_dir in $PATH
28705do
28706  IFS=$as_save_IFS
28707  test -z "$as_dir" && as_dir=.
28708    for ac_exec_ext in '' $ac_executable_extensions; do
28709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28710    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28712    break 2
28713  fi
28714done
28715  done
28716IFS=$as_save_IFS
28717
28718  ;;
28719esac
28720fi
28721BUILD_LD=$ac_cv_path_BUILD_LD
28722if test -n "$BUILD_LD"; then
28723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28724$as_echo "$BUILD_LD" >&6; }
28725else
28726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28727$as_echo "no" >&6; }
28728fi
28729
28730
28731  test -n "$BUILD_LD" && break
28732done
28733
28734  else
28735    # The variable is set, but is it from the command line or the environment?
28736
28737    # Try to remove the string !BUILD_LD! from our list.
28738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
28739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28740      # If it failed, the variable was not from the command line. Ignore it,
28741      # but warn the user (except for BASH, which is always set by the calling BASH).
28742      if test "xBUILD_LD" != xBASH; then
28743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
28744$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
28745      fi
28746      # Try to locate tool using the code snippet
28747      for ac_prog in ld
28748do
28749  # Extract the first word of "$ac_prog", so it can be a program name with args.
28750set dummy $ac_prog; ac_word=$2
28751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28752$as_echo_n "checking for $ac_word... " >&6; }
28753if ${ac_cv_path_BUILD_LD+:} false; then :
28754  $as_echo_n "(cached) " >&6
28755else
28756  case $BUILD_LD in
28757  [\\/]* | ?:[\\/]*)
28758  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28759  ;;
28760  *)
28761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28762for as_dir in $PATH
28763do
28764  IFS=$as_save_IFS
28765  test -z "$as_dir" && as_dir=.
28766    for ac_exec_ext in '' $ac_executable_extensions; do
28767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28768    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28770    break 2
28771  fi
28772done
28773  done
28774IFS=$as_save_IFS
28775
28776  ;;
28777esac
28778fi
28779BUILD_LD=$ac_cv_path_BUILD_LD
28780if test -n "$BUILD_LD"; then
28781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28782$as_echo "$BUILD_LD" >&6; }
28783else
28784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28785$as_echo "no" >&6; }
28786fi
28787
28788
28789  test -n "$BUILD_LD" && break
28790done
28791
28792    else
28793      # If it succeeded, then it was overridden by the user. We will use it
28794      # for the tool.
28795
28796      # First remove it from the list of overridden variables, so we can test
28797      # for unknown variables in the end.
28798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28799
28800      # Check if the provided tool contains a complete path.
28801      tool_specified="$BUILD_LD"
28802      tool_basename="${tool_specified##*/}"
28803      if test "x$tool_basename" = "x$tool_specified"; then
28804        # A command without a complete path is provided, search $PATH.
28805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
28806$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
28807        # Extract the first word of "$tool_basename", so it can be a program name with args.
28808set dummy $tool_basename; ac_word=$2
28809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28810$as_echo_n "checking for $ac_word... " >&6; }
28811if ${ac_cv_path_BUILD_LD+:} false; then :
28812  $as_echo_n "(cached) " >&6
28813else
28814  case $BUILD_LD in
28815  [\\/]* | ?:[\\/]*)
28816  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28817  ;;
28818  *)
28819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28820for as_dir in $PATH
28821do
28822  IFS=$as_save_IFS
28823  test -z "$as_dir" && as_dir=.
28824    for ac_exec_ext in '' $ac_executable_extensions; do
28825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28826    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28828    break 2
28829  fi
28830done
28831  done
28832IFS=$as_save_IFS
28833
28834  ;;
28835esac
28836fi
28837BUILD_LD=$ac_cv_path_BUILD_LD
28838if test -n "$BUILD_LD"; then
28839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28840$as_echo "$BUILD_LD" >&6; }
28841else
28842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28843$as_echo "no" >&6; }
28844fi
28845
28846
28847        if test "x$BUILD_LD" = x; then
28848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28849        fi
28850      else
28851        # Otherwise we believe it is a complete path. Use it as it is.
28852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
28853$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
28854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
28855$as_echo_n "checking for BUILD_LD... " >&6; }
28856        if test ! -x "$tool_specified"; then
28857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28858$as_echo "not found" >&6; }
28859          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
28860        fi
28861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28862$as_echo "$tool_specified" >&6; }
28863      fi
28864    fi
28865  fi
28866
28867
28868
28869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28870
28871  # First separate the path from the arguments. This will split at the first
28872  # space.
28873  complete="$BUILD_LD"
28874  path="${complete%% *}"
28875  tmp="$complete EOL"
28876  arguments="${tmp#* }"
28877
28878  # Input might be given as Windows format, start by converting to
28879  # unix format.
28880  new_path=`$CYGPATH -u "$path"`
28881
28882  # Now try to locate executable using which
28883  new_path=`$WHICH "$new_path" 2> /dev/null`
28884  # bat and cmd files are not always considered executable in cygwin causing which
28885  # to not find them
28886  if test "x$new_path" = x \
28887      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28888      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28889    new_path=`$CYGPATH -u "$path"`
28890  fi
28891  if test "x$new_path" = x; then
28892    # Oops. Which didn't find the executable.
28893    # The splitting of arguments from the executable at a space might have been incorrect,
28894    # since paths with space are more likely in Windows. Give it another try with the whole
28895    # argument.
28896    path="$complete"
28897    arguments="EOL"
28898    new_path=`$CYGPATH -u "$path"`
28899    new_path=`$WHICH "$new_path" 2> /dev/null`
28900    # bat and cmd files are not always considered executable in cygwin causing which
28901    # to not find them
28902    if test "x$new_path" = x \
28903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28905      new_path=`$CYGPATH -u "$path"`
28906    fi
28907    if test "x$new_path" = x; then
28908      # It's still not found. Now this is an unrecoverable error.
28909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
28910$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
28911      has_space=`$ECHO "$complete" | $GREP " "`
28912      if test "x$has_space" != x; then
28913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28915      fi
28916      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28917    fi
28918  fi
28919
28920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28923  # "foo.exe" is OK but "foo" is an error.
28924  #
28925  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28926  # It is also a way to make sure we got the proper file name for the real test later on.
28927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28928  if test "x$test_shortpath" = x; then
28929    # Short path failed, file does not exist as specified.
28930    # Try adding .exe or .cmd
28931    if test -f "${new_path}.exe"; then
28932      input_to_shortpath="${new_path}.exe"
28933    elif test -f "${new_path}.cmd"; then
28934      input_to_shortpath="${new_path}.cmd"
28935    else
28936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
28937$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
28938      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28940      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28941    fi
28942  else
28943    input_to_shortpath="$new_path"
28944  fi
28945
28946  # Call helper function which possibly converts this using DOS-style short mode.
28947  # If so, the updated path is stored in $new_path.
28948  new_path="$input_to_shortpath"
28949
28950  input_path="$input_to_shortpath"
28951  # Check if we need to convert this using DOS-style short mode. If the path
28952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28953  # take no chances and rewrite it.
28954  # Note: m4 eats our [], so we need to use [ and ] instead.
28955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28956  if test "x$has_forbidden_chars" != x; then
28957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28961      # Going to short mode and back again did indeed matter. Since short mode is
28962      # case insensitive, let's make it lowercase to improve readability.
28963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28964      # Now convert it back to Unix-stile (cygpath)
28965      input_path=`$CYGPATH -u "$shortmode_path"`
28966      new_path="$input_path"
28967    fi
28968  fi
28969
28970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28971  if test "x$test_cygdrive_prefix" = x; then
28972    # As a simple fix, exclude /usr/bin since it's not a real path.
28973    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28975      # a path prefixed by /cygdrive for fixpath to work.
28976      new_path="$CYGWIN_ROOT_PATH$input_path"
28977    fi
28978  fi
28979
28980  # remove trailing .exe if any
28981  new_path="${new_path/%.exe/}"
28982
28983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28984
28985  # First separate the path from the arguments. This will split at the first
28986  # space.
28987  complete="$BUILD_LD"
28988  path="${complete%% *}"
28989  tmp="$complete EOL"
28990  arguments="${tmp#* }"
28991
28992  # Input might be given as Windows format, start by converting to
28993  # unix format.
28994  new_path="$path"
28995
28996  windows_path="$new_path"
28997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28998    unix_path=`$CYGPATH -u "$windows_path"`
28999    new_path="$unix_path"
29000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29002    new_path="$unix_path"
29003  fi
29004
29005
29006  # Now try to locate executable using which
29007  new_path=`$WHICH "$new_path" 2> /dev/null`
29008
29009  if test "x$new_path" = x; then
29010    # Oops. Which didn't find the executable.
29011    # The splitting of arguments from the executable at a space might have been incorrect,
29012    # since paths with space are more likely in Windows. Give it another try with the whole
29013    # argument.
29014    path="$complete"
29015    arguments="EOL"
29016    new_path="$path"
29017
29018  windows_path="$new_path"
29019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29020    unix_path=`$CYGPATH -u "$windows_path"`
29021    new_path="$unix_path"
29022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29024    new_path="$unix_path"
29025  fi
29026
29027
29028    new_path=`$WHICH "$new_path" 2> /dev/null`
29029
29030    if test "x$new_path" = x; then
29031      # It's still not found. Now this is an unrecoverable error.
29032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29033$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29034      has_space=`$ECHO "$complete" | $GREP " "`
29035      if test "x$has_space" != x; then
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29038      fi
29039      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29040    fi
29041  fi
29042
29043  # Now new_path has a complete unix path to the binary
29044  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29045    # Keep paths in /bin as-is, but remove trailing .exe if any
29046    new_path="${new_path/%.exe/}"
29047    # Do not save /bin paths to all_fixpath_prefixes!
29048  else
29049    # Not in mixed or Windows style, start by that.
29050    new_path=`cmd //c echo $new_path`
29051
29052  input_path="$new_path"
29053  # Check if we need to convert this using DOS-style short mode. If the path
29054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29055  # take no chances and rewrite it.
29056  # Note: m4 eats our [], so we need to use [ and ] instead.
29057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29058  if test "x$has_forbidden_chars" != x; then
29059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29061  fi
29062
29063    # Output is in $new_path
29064
29065  windows_path="$new_path"
29066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29067    unix_path=`$CYGPATH -u "$windows_path"`
29068    new_path="$unix_path"
29069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29071    new_path="$unix_path"
29072  fi
29073
29074    # remove trailing .exe if any
29075    new_path="${new_path/%.exe/}"
29076
29077    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29078    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29079  fi
29080
29081  else
29082    # We're on a posix platform. Hooray! :)
29083    # First separate the path from the arguments. This will split at the first
29084    # space.
29085    complete="$BUILD_LD"
29086    path="${complete%% *}"
29087    tmp="$complete EOL"
29088    arguments="${tmp#* }"
29089
29090    # Cannot rely on the command "which" here since it doesn't always work.
29091    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29092    if test -z "$is_absolute_path"; then
29093      # Path to executable is not absolute. Find it.
29094      IFS_save="$IFS"
29095      IFS=:
29096      for p in $PATH; do
29097        if test -f "$p/$path" && test -x "$p/$path"; then
29098          new_path="$p/$path"
29099          break
29100        fi
29101      done
29102      IFS="$IFS_save"
29103    else
29104      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
29105$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
29106      new_path="$path"
29107    fi
29108
29109    if test "x$new_path" = x; then
29110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29111$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29112      has_space=`$ECHO "$complete" | $GREP " "`
29113      if test "x$has_space" != x; then
29114        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29116      fi
29117      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29118    fi
29119  fi
29120
29121  # Now join together the path and the arguments once again
29122  if test "x$arguments" != xEOL; then
29123    new_complete="$new_path ${arguments% *}"
29124  else
29125    new_complete="$new_path"
29126  fi
29127
29128  if test "x$complete" != "x$new_complete"; then
29129    BUILD_LD="$new_complete"
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
29131$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
29132  fi
29133
29134  fi
29135
29136
29137
29138
29139  # If a devkit is found on the builddeps server, then prepend its path to the
29140  # PATH variable. If there are cross compilers available in the devkit, these
29141  # will be found by AC_PROG_CC et al.
29142  DEVKIT=
29143
29144
29145  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29146    # Source the builddeps file again, to make sure it uses the latest variables!
29147    . $builddepsfile
29148    # Look for a target and build machine specific resource!
29149    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29150    if test "x$resource" = x; then
29151      # Ok, lets instead look for a target specific resource
29152      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
29153    fi
29154    if test "x$resource" = x; then
29155      # Ok, lets instead look for a build specific resource
29156      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
29157    fi
29158    if test "x$resource" = x; then
29159      # Ok, lets instead look for a generic resource
29160      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
29161      resource=${builddep_devkit}
29162    fi
29163    if test "x$resource" != x; then
29164      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
29165$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
29166      # If the resource in the builddeps.conf file is an existing directory,
29167      # for example /java/linux/cups
29168      if test -d ${resource}; then
29169        depdir=${resource}
29170      else
29171
29172  # devkit is for example mymodule
29173  # $resource is for example libs/general/libmymod_1_2_3.zip
29174  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29175  # $with_builddeps_dir is for example /localhome/builddeps
29176  # depdir is the name of the variable into which we store the depdir, eg MYMOD
29177  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29178  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29179  filename=`basename $resource`
29180  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29181  filebase=${filename%%.*}
29182  extension=${filename#*.}
29183  installdir=$with_builddeps_dir/$filebase
29184  if test ! -f $installdir/$filename.unpacked; then
29185    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
29186$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29187    if test ! -d $installdir; then
29188      mkdir -p $installdir
29189    fi
29190    if test ! -d $installdir; then
29191      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29192    fi
29193    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
29194    touch $tmpfile
29195    if test ! -f $tmpfile; then
29196      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29197    fi
29198
29199  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29200  # $tmpfile is the local file name for the downloaded file.
29201  VALID_TOOL=no
29202  if test "x$BDEPS_FTP" = xwget; then
29203    VALID_TOOL=yes
29204    wget -O $tmpfile $with_builddeps_server/$resource
29205  fi
29206  if test "x$BDEPS_FTP" = xlftp; then
29207    VALID_TOOL=yes
29208    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29209  fi
29210  if test "x$BDEPS_FTP" = xftp; then
29211    VALID_TOOL=yes
29212    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29213    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29214    FTPUSERPWD=${FTPSERVER%%@*}
29215    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29216      FTPUSER=${userpwd%%:*}
29217      FTPPWD=${userpwd#*@}
29218      FTPSERVER=${FTPSERVER#*@}
29219    else
29220      FTPUSER=ftp
29221      FTPPWD=ftp
29222    fi
29223    # the "pass" command does not work on some
29224    # ftp clients (read ftp.exe) but if it works,
29225    # passive mode is better!
29226    ( \
29227        echo "user $FTPUSER $FTPPWD"        ; \
29228        echo "pass"                         ; \
29229        echo "bin"                          ; \
29230        echo "get $FTPPATH $tmpfile"              ; \
29231    ) | ftp -in $FTPSERVER
29232  fi
29233  if test "x$VALID_TOOL" != xyes; then
29234    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29235  fi
29236
29237    mv $tmpfile $installdir/$filename
29238    if test ! -s $installdir/$filename; then
29239      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29240    fi
29241    case "$extension" in
29242      zip)  echo "Unzipping $installdir/$filename..."
29243        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29244        ;;
29245      tar.gz) echo "Untaring $installdir/$filename..."
29246        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29247        ;;
29248      tgz) echo "Untaring $installdir/$filename..."
29249        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29250        ;;
29251      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29252        ;;
29253    esac
29254  fi
29255  if test -f $installdir/$filename.unpacked; then
29256    depdir=$installdir
29257  fi
29258
29259      fi
29260      # Source the builddeps file again, because in the previous command, the depdir
29261      # was updated to point at the current build dependency install directory.
29262      . $builddepsfile
29263      # Now extract variables from the builddeps.conf files.
29264      theroot=${builddep_devkit_ROOT}
29265      thecflags=${builddep_devkit_CFLAGS}
29266      thelibs=${builddep_devkit_LIBS}
29267      if test "x$depdir" = x; then
29268        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
29269      fi
29270      DEVKIT=$depdir
29271      if test "x$theroot" != x; then
29272        DEVKIT="$theroot"
29273      fi
29274      if test "x$thecflags" != x; then
29275        DEVKIT_CFLAGS="$thecflags"
29276      fi
29277      if test "x$thelibs" != x; then
29278        DEVKIT_LIBS="$thelibs"
29279      fi
29280
29281        # Found devkit
29282        PATH="$DEVKIT/bin:$PATH"
29283        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
29284        if test "x$x_includes" = "xNONE"; then
29285          x_includes="$SYS_ROOT/usr/include/X11"
29286        fi
29287        if test "x$x_libraries" = "xNONE"; then
29288          x_libraries="$SYS_ROOT/usr/lib"
29289        fi
29290
29291
29292    fi
29293
29294  fi
29295
29296
29297  # Store the CFLAGS etal passed to the configure script.
29298  ORG_CFLAGS="$CFLAGS"
29299  ORG_CXXFLAGS="$CXXFLAGS"
29300  ORG_OBJCFLAGS="$OBJCFLAGS"
29301
29302  # autoconf magic only relies on PATH, so update it if tools dir is specified
29303  OLD_PATH="$PATH"
29304  if test "x$TOOLS_DIR" != x; then
29305    PATH=$TOOLS_DIR:$PATH
29306  fi
29307
29308
29309  ### Locate C compiler (CC)
29310
29311  # On windows, only cl.exe is supported.
29312  # On Solaris, cc is preferred to gcc.
29313  # Elsewhere, gcc is preferred to cc.
29314
29315  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29316    COMPILER_CHECK_LIST="cl"
29317  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29318    COMPILER_CHECK_LIST="cc gcc"
29319  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29320    # Do not probe for cc on AIX.
29321    COMPILER_CHECK_LIST="xlc_r"
29322  else
29323    COMPILER_CHECK_LIST="gcc cc"
29324  fi
29325
29326
29327  COMPILER_NAME=C
29328  SEARCH_LIST="$COMPILER_CHECK_LIST"
29329
29330  if test "x$CC" != x; then
29331    # User has supplied compiler name already, always let that override.
29332    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29333$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29334    if test "x`basename $CC`" = "x$CC"; then
29335      # A command without a complete path is provided, search $PATH.
29336
29337      for ac_prog in $CC
29338do
29339  # Extract the first word of "$ac_prog", so it can be a program name with args.
29340set dummy $ac_prog; ac_word=$2
29341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29342$as_echo_n "checking for $ac_word... " >&6; }
29343if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29344  $as_echo_n "(cached) " >&6
29345else
29346  case $POTENTIAL_CC in
29347  [\\/]* | ?:[\\/]*)
29348  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29349  ;;
29350  *)
29351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29352for as_dir in $PATH
29353do
29354  IFS=$as_save_IFS
29355  test -z "$as_dir" && as_dir=.
29356    for ac_exec_ext in '' $ac_executable_extensions; do
29357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29358    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29360    break 2
29361  fi
29362done
29363  done
29364IFS=$as_save_IFS
29365
29366  ;;
29367esac
29368fi
29369POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29370if test -n "$POTENTIAL_CC"; then
29371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29372$as_echo "$POTENTIAL_CC" >&6; }
29373else
29374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29375$as_echo "no" >&6; }
29376fi
29377
29378
29379  test -n "$POTENTIAL_CC" && break
29380done
29381
29382      if test "x$POTENTIAL_CC" != x; then
29383        CC=$POTENTIAL_CC
29384      else
29385        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29386      fi
29387    else
29388      # Otherwise it might already be a complete path
29389      if test ! -x "$CC"; then
29390        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29391      fi
29392    fi
29393  else
29394    # No user supplied value. Locate compiler ourselves
29395    CC=
29396    # If TOOLS_DIR is set, check for all compiler names in there first
29397    # before checking the rest of the PATH.
29398    if test -n "$TOOLS_DIR"; then
29399      PATH_save="$PATH"
29400      PATH="$TOOLS_DIR"
29401      for ac_prog in $SEARCH_LIST
29402do
29403  # Extract the first word of "$ac_prog", so it can be a program name with args.
29404set dummy $ac_prog; ac_word=$2
29405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29406$as_echo_n "checking for $ac_word... " >&6; }
29407if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
29408  $as_echo_n "(cached) " >&6
29409else
29410  case $TOOLS_DIR_CC in
29411  [\\/]* | ?:[\\/]*)
29412  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
29413  ;;
29414  *)
29415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29416for as_dir in $PATH
29417do
29418  IFS=$as_save_IFS
29419  test -z "$as_dir" && as_dir=.
29420    for ac_exec_ext in '' $ac_executable_extensions; do
29421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29422    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
29423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29424    break 2
29425  fi
29426done
29427  done
29428IFS=$as_save_IFS
29429
29430  ;;
29431esac
29432fi
29433TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
29434if test -n "$TOOLS_DIR_CC"; then
29435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
29436$as_echo "$TOOLS_DIR_CC" >&6; }
29437else
29438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29439$as_echo "no" >&6; }
29440fi
29441
29442
29443  test -n "$TOOLS_DIR_CC" && break
29444done
29445
29446      CC=$TOOLS_DIR_CC
29447      PATH="$PATH_save"
29448    fi
29449
29450    # AC_PATH_PROGS can't be run multiple times with the same variable,
29451    # so create a new name for this run.
29452    if test "x$CC" = x; then
29453      for ac_prog in $SEARCH_LIST
29454do
29455  # Extract the first word of "$ac_prog", so it can be a program name with args.
29456set dummy $ac_prog; ac_word=$2
29457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29458$as_echo_n "checking for $ac_word... " >&6; }
29459if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29460  $as_echo_n "(cached) " >&6
29461else
29462  case $POTENTIAL_CC in
29463  [\\/]* | ?:[\\/]*)
29464  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29465  ;;
29466  *)
29467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29468for as_dir in $PATH
29469do
29470  IFS=$as_save_IFS
29471  test -z "$as_dir" && as_dir=.
29472    for ac_exec_ext in '' $ac_executable_extensions; do
29473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29474    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29476    break 2
29477  fi
29478done
29479  done
29480IFS=$as_save_IFS
29481
29482  ;;
29483esac
29484fi
29485POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29486if test -n "$POTENTIAL_CC"; then
29487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29488$as_echo "$POTENTIAL_CC" >&6; }
29489else
29490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29491$as_echo "no" >&6; }
29492fi
29493
29494
29495  test -n "$POTENTIAL_CC" && break
29496done
29497
29498      CC=$POTENTIAL_CC
29499    fi
29500
29501    if test "x$CC" = x; then
29502
29503  # Print a helpful message on how to acquire the necessary build dependency.
29504  # devkit is the help tag: freetype, cups, pulse, alsa etc
29505  MISSING_DEPENDENCY=devkit
29506
29507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29508    cygwin_help $MISSING_DEPENDENCY
29509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29510    msys_help $MISSING_DEPENDENCY
29511  else
29512    PKGHANDLER_COMMAND=
29513
29514    case $PKGHANDLER in
29515      apt-get)
29516        apt_help     $MISSING_DEPENDENCY ;;
29517      yum)
29518        yum_help     $MISSING_DEPENDENCY ;;
29519      port)
29520        port_help    $MISSING_DEPENDENCY ;;
29521      pkgutil)
29522        pkgutil_help $MISSING_DEPENDENCY ;;
29523      pkgadd)
29524        pkgadd_help  $MISSING_DEPENDENCY ;;
29525    esac
29526
29527    if test "x$PKGHANDLER_COMMAND" != x; then
29528      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29529    fi
29530  fi
29531
29532      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29533    fi
29534  fi
29535
29536  # Now we have a compiler binary in CC. Make sure it's okay.
29537
29538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29539
29540  # First separate the path from the arguments. This will split at the first
29541  # space.
29542  complete="$CC"
29543  path="${complete%% *}"
29544  tmp="$complete EOL"
29545  arguments="${tmp#* }"
29546
29547  # Input might be given as Windows format, start by converting to
29548  # unix format.
29549  new_path=`$CYGPATH -u "$path"`
29550
29551  # Now try to locate executable using which
29552  new_path=`$WHICH "$new_path" 2> /dev/null`
29553  # bat and cmd files are not always considered executable in cygwin causing which
29554  # to not find them
29555  if test "x$new_path" = x \
29556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29558    new_path=`$CYGPATH -u "$path"`
29559  fi
29560  if test "x$new_path" = x; then
29561    # Oops. Which didn't find the executable.
29562    # The splitting of arguments from the executable at a space might have been incorrect,
29563    # since paths with space are more likely in Windows. Give it another try with the whole
29564    # argument.
29565    path="$complete"
29566    arguments="EOL"
29567    new_path=`$CYGPATH -u "$path"`
29568    new_path=`$WHICH "$new_path" 2> /dev/null`
29569    # bat and cmd files are not always considered executable in cygwin causing which
29570    # to not find them
29571    if test "x$new_path" = x \
29572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29574      new_path=`$CYGPATH -u "$path"`
29575    fi
29576    if test "x$new_path" = x; then
29577      # It's still not found. Now this is an unrecoverable error.
29578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29579$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29580      has_space=`$ECHO "$complete" | $GREP " "`
29581      if test "x$has_space" != x; then
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29584      fi
29585      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29586    fi
29587  fi
29588
29589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29592  # "foo.exe" is OK but "foo" is an error.
29593  #
29594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29595  # It is also a way to make sure we got the proper file name for the real test later on.
29596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29597  if test "x$test_shortpath" = x; then
29598    # Short path failed, file does not exist as specified.
29599    # Try adding .exe or .cmd
29600    if test -f "${new_path}.exe"; then
29601      input_to_shortpath="${new_path}.exe"
29602    elif test -f "${new_path}.cmd"; then
29603      input_to_shortpath="${new_path}.cmd"
29604    else
29605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29606$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29609      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29610    fi
29611  else
29612    input_to_shortpath="$new_path"
29613  fi
29614
29615  # Call helper function which possibly converts this using DOS-style short mode.
29616  # If so, the updated path is stored in $new_path.
29617  new_path="$input_to_shortpath"
29618
29619  input_path="$input_to_shortpath"
29620  # Check if we need to convert this using DOS-style short mode. If the path
29621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29622  # take no chances and rewrite it.
29623  # Note: m4 eats our [], so we need to use [ and ] instead.
29624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29625  if test "x$has_forbidden_chars" != x; then
29626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29630      # Going to short mode and back again did indeed matter. Since short mode is
29631      # case insensitive, let's make it lowercase to improve readability.
29632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29633      # Now convert it back to Unix-stile (cygpath)
29634      input_path=`$CYGPATH -u "$shortmode_path"`
29635      new_path="$input_path"
29636    fi
29637  fi
29638
29639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29640  if test "x$test_cygdrive_prefix" = x; then
29641    # As a simple fix, exclude /usr/bin since it's not a real path.
29642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29644      # a path prefixed by /cygdrive for fixpath to work.
29645      new_path="$CYGWIN_ROOT_PATH$input_path"
29646    fi
29647  fi
29648
29649  # remove trailing .exe if any
29650  new_path="${new_path/%.exe/}"
29651
29652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29653
29654  # First separate the path from the arguments. This will split at the first
29655  # space.
29656  complete="$CC"
29657  path="${complete%% *}"
29658  tmp="$complete EOL"
29659  arguments="${tmp#* }"
29660
29661  # Input might be given as Windows format, start by converting to
29662  # unix format.
29663  new_path="$path"
29664
29665  windows_path="$new_path"
29666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29667    unix_path=`$CYGPATH -u "$windows_path"`
29668    new_path="$unix_path"
29669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29671    new_path="$unix_path"
29672  fi
29673
29674
29675  # Now try to locate executable using which
29676  new_path=`$WHICH "$new_path" 2> /dev/null`
29677
29678  if test "x$new_path" = x; then
29679    # Oops. Which didn't find the executable.
29680    # The splitting of arguments from the executable at a space might have been incorrect,
29681    # since paths with space are more likely in Windows. Give it another try with the whole
29682    # argument.
29683    path="$complete"
29684    arguments="EOL"
29685    new_path="$path"
29686
29687  windows_path="$new_path"
29688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29689    unix_path=`$CYGPATH -u "$windows_path"`
29690    new_path="$unix_path"
29691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29693    new_path="$unix_path"
29694  fi
29695
29696
29697    new_path=`$WHICH "$new_path" 2> /dev/null`
29698
29699    if test "x$new_path" = x; then
29700      # It's still not found. Now this is an unrecoverable error.
29701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29702$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29703      has_space=`$ECHO "$complete" | $GREP " "`
29704      if test "x$has_space" != x; then
29705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29707      fi
29708      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29709    fi
29710  fi
29711
29712  # Now new_path has a complete unix path to the binary
29713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29714    # Keep paths in /bin as-is, but remove trailing .exe if any
29715    new_path="${new_path/%.exe/}"
29716    # Do not save /bin paths to all_fixpath_prefixes!
29717  else
29718    # Not in mixed or Windows style, start by that.
29719    new_path=`cmd //c echo $new_path`
29720
29721  input_path="$new_path"
29722  # Check if we need to convert this using DOS-style short mode. If the path
29723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29724  # take no chances and rewrite it.
29725  # Note: m4 eats our [], so we need to use [ and ] instead.
29726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29727  if test "x$has_forbidden_chars" != x; then
29728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29730  fi
29731
29732    # Output is in $new_path
29733
29734  windows_path="$new_path"
29735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29736    unix_path=`$CYGPATH -u "$windows_path"`
29737    new_path="$unix_path"
29738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29740    new_path="$unix_path"
29741  fi
29742
29743    # remove trailing .exe if any
29744    new_path="${new_path/%.exe/}"
29745
29746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29748  fi
29749
29750  else
29751    # We're on a posix platform. Hooray! :)
29752    # First separate the path from the arguments. This will split at the first
29753    # space.
29754    complete="$CC"
29755    path="${complete%% *}"
29756    tmp="$complete EOL"
29757    arguments="${tmp#* }"
29758
29759    # Cannot rely on the command "which" here since it doesn't always work.
29760    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29761    if test -z "$is_absolute_path"; then
29762      # Path to executable is not absolute. Find it.
29763      IFS_save="$IFS"
29764      IFS=:
29765      for p in $PATH; do
29766        if test -f "$p/$path" && test -x "$p/$path"; then
29767          new_path="$p/$path"
29768          break
29769        fi
29770      done
29771      IFS="$IFS_save"
29772    else
29773      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
29774$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
29775      new_path="$path"
29776    fi
29777
29778    if test "x$new_path" = x; then
29779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29780$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29781      has_space=`$ECHO "$complete" | $GREP " "`
29782      if test "x$has_space" != x; then
29783        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29785      fi
29786      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29787    fi
29788  fi
29789
29790  # Now join together the path and the arguments once again
29791  if test "x$arguments" != xEOL; then
29792    new_complete="$new_path ${arguments% *}"
29793  else
29794    new_complete="$new_path"
29795  fi
29796
29797  if test "x$complete" != "x$new_complete"; then
29798    CC="$new_complete"
29799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29800$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29801  fi
29802
29803  TEST_COMPILER="$CC"
29804  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29805  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29806  if test "x$OPENJDK_BUILD_OS" != xaix; then
29807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29808$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29809
29810  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29811    # Follow a chain of symbolic links. Use readlink
29812    # where it exists, else fall back to horribly
29813    # complicated shell code.
29814    if test "x$READLINK_TESTED" != yes; then
29815      # On MacOSX there is a readlink tool with a different
29816      # purpose than the GNU readlink tool. Check the found readlink.
29817      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29818      if test "x$ISGNU" = x; then
29819        # A readlink that we do not know how to use.
29820        # Are there other non-GNU readlinks out there?
29821        READLINK_TESTED=yes
29822        READLINK=
29823      fi
29824    fi
29825
29826    if test "x$READLINK" != x; then
29827      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29828    else
29829      # Save the current directory for restoring afterwards
29830      STARTDIR=$PWD
29831      COUNTER=0
29832      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29833      sym_link_file=`$BASENAME $TEST_COMPILER`
29834      cd $sym_link_dir
29835      # Use -P flag to resolve symlinks in directories.
29836      cd `$THEPWDCMD -P`
29837      sym_link_dir=`$THEPWDCMD -P`
29838      # Resolve file symlinks
29839      while test $COUNTER -lt 20; do
29840        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29841        if test "x$ISLINK" == x; then
29842          # This is not a symbolic link! We are done!
29843          break
29844        fi
29845        # Again resolve directory symlinks since the target of the just found
29846        # link could be in a different directory
29847        cd `$DIRNAME $ISLINK`
29848        sym_link_dir=`$THEPWDCMD -P`
29849        sym_link_file=`$BASENAME $ISLINK`
29850        let COUNTER=COUNTER+1
29851      done
29852      cd $STARTDIR
29853      TEST_COMPILER=$sym_link_dir/$sym_link_file
29854    fi
29855  fi
29856
29857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29858$as_echo "$TEST_COMPILER" >&6; }
29859  fi
29860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29861$as_echo_n "checking if CC is disguised ccache... " >&6; }
29862
29863  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29864  if test "x$COMPILER_BASENAME" = "xccache"; then
29865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29866$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29867    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29868    # We want to control ccache invocation ourselves, so ignore this cc and try
29869    # searching again.
29870
29871    # Remove the path to the fake ccache cc from the PATH
29872    RETRY_COMPILER_SAVED_PATH="$PATH"
29873    COMPILER_DIRNAME=`$DIRNAME $CC`
29874    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29875
29876    # Try again looking for our compiler
29877    if test -n "$ac_tool_prefix"; then
29878  for ac_prog in $COMPILER_CHECK_LIST
29879  do
29880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29883$as_echo_n "checking for $ac_word... " >&6; }
29884if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29885  $as_echo_n "(cached) " >&6
29886else
29887  if test -n "$PROPER_COMPILER_CC"; then
29888  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29889else
29890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29891for as_dir in $PATH
29892do
29893  IFS=$as_save_IFS
29894  test -z "$as_dir" && as_dir=.
29895    for ac_exec_ext in '' $ac_executable_extensions; do
29896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29897    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29899    break 2
29900  fi
29901done
29902  done
29903IFS=$as_save_IFS
29904
29905fi
29906fi
29907PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29908if test -n "$PROPER_COMPILER_CC"; then
29909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29910$as_echo "$PROPER_COMPILER_CC" >&6; }
29911else
29912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29913$as_echo "no" >&6; }
29914fi
29915
29916
29917    test -n "$PROPER_COMPILER_CC" && break
29918  done
29919fi
29920if test -z "$PROPER_COMPILER_CC"; then
29921  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29922  for ac_prog in $COMPILER_CHECK_LIST
29923do
29924  # Extract the first word of "$ac_prog", so it can be a program name with args.
29925set dummy $ac_prog; ac_word=$2
29926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29927$as_echo_n "checking for $ac_word... " >&6; }
29928if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29929  $as_echo_n "(cached) " >&6
29930else
29931  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29932  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29933else
29934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29935for as_dir in $PATH
29936do
29937  IFS=$as_save_IFS
29938  test -z "$as_dir" && as_dir=.
29939    for ac_exec_ext in '' $ac_executable_extensions; do
29940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29941    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29943    break 2
29944  fi
29945done
29946  done
29947IFS=$as_save_IFS
29948
29949fi
29950fi
29951ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29952if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29954$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29955else
29956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29957$as_echo "no" >&6; }
29958fi
29959
29960
29961  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29962done
29963
29964  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29965    PROPER_COMPILER_CC=""
29966  else
29967    case $cross_compiling:$ac_tool_warned in
29968yes:)
29969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29971ac_tool_warned=yes ;;
29972esac
29973    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29974  fi
29975fi
29976
29977
29978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29979
29980  # First separate the path from the arguments. This will split at the first
29981  # space.
29982  complete="$PROPER_COMPILER_CC"
29983  path="${complete%% *}"
29984  tmp="$complete EOL"
29985  arguments="${tmp#* }"
29986
29987  # Input might be given as Windows format, start by converting to
29988  # unix format.
29989  new_path=`$CYGPATH -u "$path"`
29990
29991  # Now try to locate executable using which
29992  new_path=`$WHICH "$new_path" 2> /dev/null`
29993  # bat and cmd files are not always considered executable in cygwin causing which
29994  # to not find them
29995  if test "x$new_path" = x \
29996      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29997      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29998    new_path=`$CYGPATH -u "$path"`
29999  fi
30000  if test "x$new_path" = x; then
30001    # Oops. Which didn't find the executable.
30002    # The splitting of arguments from the executable at a space might have been incorrect,
30003    # since paths with space are more likely in Windows. Give it another try with the whole
30004    # argument.
30005    path="$complete"
30006    arguments="EOL"
30007    new_path=`$CYGPATH -u "$path"`
30008    new_path=`$WHICH "$new_path" 2> /dev/null`
30009    # bat and cmd files are not always considered executable in cygwin causing which
30010    # to not find them
30011    if test "x$new_path" = x \
30012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30014      new_path=`$CYGPATH -u "$path"`
30015    fi
30016    if test "x$new_path" = x; then
30017      # It's still not found. Now this is an unrecoverable error.
30018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30019$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30020      has_space=`$ECHO "$complete" | $GREP " "`
30021      if test "x$has_space" != x; then
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30024      fi
30025      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30026    fi
30027  fi
30028
30029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30032  # "foo.exe" is OK but "foo" is an error.
30033  #
30034  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30035  # It is also a way to make sure we got the proper file name for the real test later on.
30036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30037  if test "x$test_shortpath" = x; then
30038    # Short path failed, file does not exist as specified.
30039    # Try adding .exe or .cmd
30040    if test -f "${new_path}.exe"; then
30041      input_to_shortpath="${new_path}.exe"
30042    elif test -f "${new_path}.cmd"; then
30043      input_to_shortpath="${new_path}.cmd"
30044    else
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
30046$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
30047      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30048$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30049      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30050    fi
30051  else
30052    input_to_shortpath="$new_path"
30053  fi
30054
30055  # Call helper function which possibly converts this using DOS-style short mode.
30056  # If so, the updated path is stored in $new_path.
30057  new_path="$input_to_shortpath"
30058
30059  input_path="$input_to_shortpath"
30060  # Check if we need to convert this using DOS-style short mode. If the path
30061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30062  # take no chances and rewrite it.
30063  # Note: m4 eats our [], so we need to use [ and ] instead.
30064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30065  if test "x$has_forbidden_chars" != x; then
30066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30070      # Going to short mode and back again did indeed matter. Since short mode is
30071      # case insensitive, let's make it lowercase to improve readability.
30072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30073      # Now convert it back to Unix-stile (cygpath)
30074      input_path=`$CYGPATH -u "$shortmode_path"`
30075      new_path="$input_path"
30076    fi
30077  fi
30078
30079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30080  if test "x$test_cygdrive_prefix" = x; then
30081    # As a simple fix, exclude /usr/bin since it's not a real path.
30082    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30084      # a path prefixed by /cygdrive for fixpath to work.
30085      new_path="$CYGWIN_ROOT_PATH$input_path"
30086    fi
30087  fi
30088
30089  # remove trailing .exe if any
30090  new_path="${new_path/%.exe/}"
30091
30092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30093
30094  # First separate the path from the arguments. This will split at the first
30095  # space.
30096  complete="$PROPER_COMPILER_CC"
30097  path="${complete%% *}"
30098  tmp="$complete EOL"
30099  arguments="${tmp#* }"
30100
30101  # Input might be given as Windows format, start by converting to
30102  # unix format.
30103  new_path="$path"
30104
30105  windows_path="$new_path"
30106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30107    unix_path=`$CYGPATH -u "$windows_path"`
30108    new_path="$unix_path"
30109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30111    new_path="$unix_path"
30112  fi
30113
30114
30115  # Now try to locate executable using which
30116  new_path=`$WHICH "$new_path" 2> /dev/null`
30117
30118  if test "x$new_path" = x; then
30119    # Oops. Which didn't find the executable.
30120    # The splitting of arguments from the executable at a space might have been incorrect,
30121    # since paths with space are more likely in Windows. Give it another try with the whole
30122    # argument.
30123    path="$complete"
30124    arguments="EOL"
30125    new_path="$path"
30126
30127  windows_path="$new_path"
30128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30129    unix_path=`$CYGPATH -u "$windows_path"`
30130    new_path="$unix_path"
30131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30133    new_path="$unix_path"
30134  fi
30135
30136
30137    new_path=`$WHICH "$new_path" 2> /dev/null`
30138
30139    if test "x$new_path" = x; then
30140      # It's still not found. Now this is an unrecoverable error.
30141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30142$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30143      has_space=`$ECHO "$complete" | $GREP " "`
30144      if test "x$has_space" != x; then
30145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30147      fi
30148      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30149    fi
30150  fi
30151
30152  # Now new_path has a complete unix path to the binary
30153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30154    # Keep paths in /bin as-is, but remove trailing .exe if any
30155    new_path="${new_path/%.exe/}"
30156    # Do not save /bin paths to all_fixpath_prefixes!
30157  else
30158    # Not in mixed or Windows style, start by that.
30159    new_path=`cmd //c echo $new_path`
30160
30161  input_path="$new_path"
30162  # Check if we need to convert this using DOS-style short mode. If the path
30163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30164  # take no chances and rewrite it.
30165  # Note: m4 eats our [], so we need to use [ and ] instead.
30166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30167  if test "x$has_forbidden_chars" != x; then
30168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30170  fi
30171
30172    # Output is in $new_path
30173
30174  windows_path="$new_path"
30175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30176    unix_path=`$CYGPATH -u "$windows_path"`
30177    new_path="$unix_path"
30178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30180    new_path="$unix_path"
30181  fi
30182
30183    # remove trailing .exe if any
30184    new_path="${new_path/%.exe/}"
30185
30186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30188  fi
30189
30190  else
30191    # We're on a posix platform. Hooray! :)
30192    # First separate the path from the arguments. This will split at the first
30193    # space.
30194    complete="$PROPER_COMPILER_CC"
30195    path="${complete%% *}"
30196    tmp="$complete EOL"
30197    arguments="${tmp#* }"
30198
30199    # Cannot rely on the command "which" here since it doesn't always work.
30200    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30201    if test -z "$is_absolute_path"; then
30202      # Path to executable is not absolute. Find it.
30203      IFS_save="$IFS"
30204      IFS=:
30205      for p in $PATH; do
30206        if test -f "$p/$path" && test -x "$p/$path"; then
30207          new_path="$p/$path"
30208          break
30209        fi
30210      done
30211      IFS="$IFS_save"
30212    else
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
30214$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
30215      new_path="$path"
30216    fi
30217
30218    if test "x$new_path" = x; then
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30220$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30221      has_space=`$ECHO "$complete" | $GREP " "`
30222      if test "x$has_space" != x; then
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30225      fi
30226      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30227    fi
30228  fi
30229
30230  # Now join together the path and the arguments once again
30231  if test "x$arguments" != xEOL; then
30232    new_complete="$new_path ${arguments% *}"
30233  else
30234    new_complete="$new_path"
30235  fi
30236
30237  if test "x$complete" != "x$new_complete"; then
30238    PROPER_COMPILER_CC="$new_complete"
30239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30240$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30241  fi
30242
30243    PATH="$RETRY_COMPILER_SAVED_PATH"
30244
30245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30246$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30247
30248  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30249    # Follow a chain of symbolic links. Use readlink
30250    # where it exists, else fall back to horribly
30251    # complicated shell code.
30252    if test "x$READLINK_TESTED" != yes; then
30253      # On MacOSX there is a readlink tool with a different
30254      # purpose than the GNU readlink tool. Check the found readlink.
30255      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30256      if test "x$ISGNU" = x; then
30257        # A readlink that we do not know how to use.
30258        # Are there other non-GNU readlinks out there?
30259        READLINK_TESTED=yes
30260        READLINK=
30261      fi
30262    fi
30263
30264    if test "x$READLINK" != x; then
30265      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30266    else
30267      # Save the current directory for restoring afterwards
30268      STARTDIR=$PWD
30269      COUNTER=0
30270      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30271      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30272      cd $sym_link_dir
30273      # Use -P flag to resolve symlinks in directories.
30274      cd `$THEPWDCMD -P`
30275      sym_link_dir=`$THEPWDCMD -P`
30276      # Resolve file symlinks
30277      while test $COUNTER -lt 20; do
30278        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30279        if test "x$ISLINK" == x; then
30280          # This is not a symbolic link! We are done!
30281          break
30282        fi
30283        # Again resolve directory symlinks since the target of the just found
30284        # link could be in a different directory
30285        cd `$DIRNAME $ISLINK`
30286        sym_link_dir=`$THEPWDCMD -P`
30287        sym_link_file=`$BASENAME $ISLINK`
30288        let COUNTER=COUNTER+1
30289      done
30290      cd $STARTDIR
30291      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30292    fi
30293  fi
30294
30295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30296$as_echo "$PROPER_COMPILER_CC" >&6; }
30297    CC="$PROPER_COMPILER_CC"
30298  else
30299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30300$as_echo "no, keeping CC" >&6; }
30301  fi
30302
30303
30304  COMPILER=$CC
30305  COMPILER_NAME=$COMPILER_NAME
30306
30307  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30308    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30309    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30310    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30311    if test $? -ne 0; then
30312      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30313
30314      { $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
30315$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30316      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30317$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30318      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30319    else
30320      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30321      COMPILER_VENDOR="Sun Studio"
30322    fi
30323  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30324      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30325      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30326      if test $? -ne 0; then
30327        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30328      else
30329        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30330        COMPILER_VENDOR='IBM'
30331      fi
30332  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30333    # First line typically looks something like:
30334    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30335    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30336    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30337    COMPILER_VENDOR="Microsoft CL.EXE"
30338    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30339    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30340      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30341        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30342      fi
30343    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30344      if test "x$COMPILER_CPU_TEST" != "xx64"; then
30345        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30346      fi
30347    fi
30348  else
30349    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30350    # Check that this is likely to be GCC.
30351    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30352    if test $? -ne 0; then
30353      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30354$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30355      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30356$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30357      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30358    fi
30359
30360    # First line typically looks something like:
30361    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30362    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30363    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30364  fi
30365  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30366  CC_VERSION="$COMPILER_VERSION"
30367  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30368  CC_VENDOR="$COMPILER_VENDOR"
30369
30370  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30371$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30372
30373
30374  # Now that we have resolved CC ourself, let autoconf have its go at it
30375  ac_ext=c
30376ac_cpp='$CPP $CPPFLAGS'
30377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30379ac_compiler_gnu=$ac_cv_c_compiler_gnu
30380if test -n "$ac_tool_prefix"; then
30381  for ac_prog in $CC
30382  do
30383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30386$as_echo_n "checking for $ac_word... " >&6; }
30387if ${ac_cv_prog_CC+:} false; then :
30388  $as_echo_n "(cached) " >&6
30389else
30390  if test -n "$CC"; then
30391  ac_cv_prog_CC="$CC" # Let the user override the test.
30392else
30393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30394for as_dir in $PATH
30395do
30396  IFS=$as_save_IFS
30397  test -z "$as_dir" && as_dir=.
30398    for ac_exec_ext in '' $ac_executable_extensions; do
30399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30400    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30402    break 2
30403  fi
30404done
30405  done
30406IFS=$as_save_IFS
30407
30408fi
30409fi
30410CC=$ac_cv_prog_CC
30411if test -n "$CC"; then
30412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30413$as_echo "$CC" >&6; }
30414else
30415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30416$as_echo "no" >&6; }
30417fi
30418
30419
30420    test -n "$CC" && break
30421  done
30422fi
30423if test -z "$CC"; then
30424  ac_ct_CC=$CC
30425  for ac_prog in $CC
30426do
30427  # Extract the first word of "$ac_prog", so it can be a program name with args.
30428set dummy $ac_prog; ac_word=$2
30429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30430$as_echo_n "checking for $ac_word... " >&6; }
30431if ${ac_cv_prog_ac_ct_CC+:} false; then :
30432  $as_echo_n "(cached) " >&6
30433else
30434  if test -n "$ac_ct_CC"; then
30435  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30436else
30437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30438for as_dir in $PATH
30439do
30440  IFS=$as_save_IFS
30441  test -z "$as_dir" && as_dir=.
30442    for ac_exec_ext in '' $ac_executable_extensions; do
30443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30444    ac_cv_prog_ac_ct_CC="$ac_prog"
30445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30446    break 2
30447  fi
30448done
30449  done
30450IFS=$as_save_IFS
30451
30452fi
30453fi
30454ac_ct_CC=$ac_cv_prog_ac_ct_CC
30455if test -n "$ac_ct_CC"; then
30456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30457$as_echo "$ac_ct_CC" >&6; }
30458else
30459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30460$as_echo "no" >&6; }
30461fi
30462
30463
30464  test -n "$ac_ct_CC" && break
30465done
30466
30467  if test "x$ac_ct_CC" = x; then
30468    CC=""
30469  else
30470    case $cross_compiling:$ac_tool_warned in
30471yes:)
30472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30474ac_tool_warned=yes ;;
30475esac
30476    CC=$ac_ct_CC
30477  fi
30478fi
30479
30480
30481test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30483as_fn_error $? "no acceptable C compiler found in \$PATH
30484See \`config.log' for more details" "$LINENO" 5; }
30485
30486# Provide some information about the compiler.
30487$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30488set X $ac_compile
30489ac_compiler=$2
30490for ac_option in --version -v -V -qversion; do
30491  { { ac_try="$ac_compiler $ac_option >&5"
30492case "(($ac_try" in
30493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30494  *) ac_try_echo=$ac_try;;
30495esac
30496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30497$as_echo "$ac_try_echo"; } >&5
30498  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30499  ac_status=$?
30500  if test -s conftest.err; then
30501    sed '10a\
30502... rest of stderr output deleted ...
30503         10q' conftest.err >conftest.er1
30504    cat conftest.er1 >&5
30505  fi
30506  rm -f conftest.er1 conftest.err
30507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30508  test $ac_status = 0; }
30509done
30510
30511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30512/* end confdefs.h.  */
30513
30514int
30515main ()
30516{
30517
30518  ;
30519  return 0;
30520}
30521_ACEOF
30522ac_clean_files_save=$ac_clean_files
30523ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30524# Try to create an executable without -o first, disregard a.out.
30525# It will help us diagnose broken compilers, and finding out an intuition
30526# of exeext.
30527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30528$as_echo_n "checking whether the C compiler works... " >&6; }
30529ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30530
30531# The possible output files:
30532ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30533
30534ac_rmfiles=
30535for ac_file in $ac_files
30536do
30537  case $ac_file in
30538    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30539    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30540  esac
30541done
30542rm -f $ac_rmfiles
30543
30544if { { ac_try="$ac_link_default"
30545case "(($ac_try" in
30546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30547  *) ac_try_echo=$ac_try;;
30548esac
30549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30550$as_echo "$ac_try_echo"; } >&5
30551  (eval "$ac_link_default") 2>&5
30552  ac_status=$?
30553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30554  test $ac_status = 0; }; then :
30555  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30556# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30557# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30558# so that the user can short-circuit this test for compilers unknown to
30559# Autoconf.
30560for ac_file in $ac_files ''
30561do
30562  test -f "$ac_file" || continue
30563  case $ac_file in
30564    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30565	;;
30566    [ab].out )
30567	# We found the default executable, but exeext='' is most
30568	# certainly right.
30569	break;;
30570    *.* )
30571	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30572	then :; else
30573	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30574	fi
30575	# We set ac_cv_exeext here because the later test for it is not
30576	# safe: cross compilers may not add the suffix if given an `-o'
30577	# argument, so we may need to know it at that point already.
30578	# Even if this section looks crufty: it has the advantage of
30579	# actually working.
30580	break;;
30581    * )
30582	break;;
30583  esac
30584done
30585test "$ac_cv_exeext" = no && ac_cv_exeext=
30586
30587else
30588  ac_file=''
30589fi
30590if test -z "$ac_file"; then :
30591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30592$as_echo "no" >&6; }
30593$as_echo "$as_me: failed program was:" >&5
30594sed 's/^/| /' conftest.$ac_ext >&5
30595
30596{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30598as_fn_error 77 "C compiler cannot create executables
30599See \`config.log' for more details" "$LINENO" 5; }
30600else
30601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30602$as_echo "yes" >&6; }
30603fi
30604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30605$as_echo_n "checking for C compiler default output file name... " >&6; }
30606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30607$as_echo "$ac_file" >&6; }
30608ac_exeext=$ac_cv_exeext
30609
30610rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30611ac_clean_files=$ac_clean_files_save
30612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30613$as_echo_n "checking for suffix of executables... " >&6; }
30614if { { ac_try="$ac_link"
30615case "(($ac_try" in
30616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30617  *) ac_try_echo=$ac_try;;
30618esac
30619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30620$as_echo "$ac_try_echo"; } >&5
30621  (eval "$ac_link") 2>&5
30622  ac_status=$?
30623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30624  test $ac_status = 0; }; then :
30625  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30626# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30627# work properly (i.e., refer to `conftest.exe'), while it won't with
30628# `rm'.
30629for ac_file in conftest.exe conftest conftest.*; do
30630  test -f "$ac_file" || continue
30631  case $ac_file in
30632    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30633    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30634	  break;;
30635    * ) break;;
30636  esac
30637done
30638else
30639  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30641as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30642See \`config.log' for more details" "$LINENO" 5; }
30643fi
30644rm -f conftest conftest$ac_cv_exeext
30645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30646$as_echo "$ac_cv_exeext" >&6; }
30647
30648rm -f conftest.$ac_ext
30649EXEEXT=$ac_cv_exeext
30650ac_exeext=$EXEEXT
30651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30652/* end confdefs.h.  */
30653#include <stdio.h>
30654int
30655main ()
30656{
30657FILE *f = fopen ("conftest.out", "w");
30658 return ferror (f) || fclose (f) != 0;
30659
30660  ;
30661  return 0;
30662}
30663_ACEOF
30664ac_clean_files="$ac_clean_files conftest.out"
30665# Check that the compiler produces executables we can run.  If not, either
30666# the compiler is broken, or we cross compile.
30667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30668$as_echo_n "checking whether we are cross compiling... " >&6; }
30669if test "$cross_compiling" != yes; then
30670  { { ac_try="$ac_link"
30671case "(($ac_try" in
30672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30673  *) ac_try_echo=$ac_try;;
30674esac
30675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30676$as_echo "$ac_try_echo"; } >&5
30677  (eval "$ac_link") 2>&5
30678  ac_status=$?
30679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30680  test $ac_status = 0; }
30681  if { ac_try='./conftest$ac_cv_exeext'
30682  { { case "(($ac_try" in
30683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30684  *) ac_try_echo=$ac_try;;
30685esac
30686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30687$as_echo "$ac_try_echo"; } >&5
30688  (eval "$ac_try") 2>&5
30689  ac_status=$?
30690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30691  test $ac_status = 0; }; }; then
30692    cross_compiling=no
30693  else
30694    if test "$cross_compiling" = maybe; then
30695	cross_compiling=yes
30696    else
30697	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30699as_fn_error $? "cannot run C compiled programs.
30700If you meant to cross compile, use \`--host'.
30701See \`config.log' for more details" "$LINENO" 5; }
30702    fi
30703  fi
30704fi
30705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30706$as_echo "$cross_compiling" >&6; }
30707
30708rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30709ac_clean_files=$ac_clean_files_save
30710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30711$as_echo_n "checking for suffix of object files... " >&6; }
30712if ${ac_cv_objext+:} false; then :
30713  $as_echo_n "(cached) " >&6
30714else
30715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30716/* end confdefs.h.  */
30717
30718int
30719main ()
30720{
30721
30722  ;
30723  return 0;
30724}
30725_ACEOF
30726rm -f conftest.o conftest.obj
30727if { { ac_try="$ac_compile"
30728case "(($ac_try" in
30729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30730  *) ac_try_echo=$ac_try;;
30731esac
30732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30733$as_echo "$ac_try_echo"; } >&5
30734  (eval "$ac_compile") 2>&5
30735  ac_status=$?
30736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30737  test $ac_status = 0; }; then :
30738  for ac_file in conftest.o conftest.obj conftest.*; do
30739  test -f "$ac_file" || continue;
30740  case $ac_file in
30741    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30742    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30743       break;;
30744  esac
30745done
30746else
30747  $as_echo "$as_me: failed program was:" >&5
30748sed 's/^/| /' conftest.$ac_ext >&5
30749
30750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30752as_fn_error $? "cannot compute suffix of object files: cannot compile
30753See \`config.log' for more details" "$LINENO" 5; }
30754fi
30755rm -f conftest.$ac_cv_objext conftest.$ac_ext
30756fi
30757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30758$as_echo "$ac_cv_objext" >&6; }
30759OBJEXT=$ac_cv_objext
30760ac_objext=$OBJEXT
30761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30762$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30763if ${ac_cv_c_compiler_gnu+:} false; then :
30764  $as_echo_n "(cached) " >&6
30765else
30766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30767/* end confdefs.h.  */
30768
30769int
30770main ()
30771{
30772#ifndef __GNUC__
30773       choke me
30774#endif
30775
30776  ;
30777  return 0;
30778}
30779_ACEOF
30780if ac_fn_c_try_compile "$LINENO"; then :
30781  ac_compiler_gnu=yes
30782else
30783  ac_compiler_gnu=no
30784fi
30785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30786ac_cv_c_compiler_gnu=$ac_compiler_gnu
30787
30788fi
30789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30790$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30791if test $ac_compiler_gnu = yes; then
30792  GCC=yes
30793else
30794  GCC=
30795fi
30796ac_test_CFLAGS=${CFLAGS+set}
30797ac_save_CFLAGS=$CFLAGS
30798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30799$as_echo_n "checking whether $CC accepts -g... " >&6; }
30800if ${ac_cv_prog_cc_g+:} false; then :
30801  $as_echo_n "(cached) " >&6
30802else
30803  ac_save_c_werror_flag=$ac_c_werror_flag
30804   ac_c_werror_flag=yes
30805   ac_cv_prog_cc_g=no
30806   CFLAGS="-g"
30807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30808/* end confdefs.h.  */
30809
30810int
30811main ()
30812{
30813
30814  ;
30815  return 0;
30816}
30817_ACEOF
30818if ac_fn_c_try_compile "$LINENO"; then :
30819  ac_cv_prog_cc_g=yes
30820else
30821  CFLAGS=""
30822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30823/* end confdefs.h.  */
30824
30825int
30826main ()
30827{
30828
30829  ;
30830  return 0;
30831}
30832_ACEOF
30833if ac_fn_c_try_compile "$LINENO"; then :
30834
30835else
30836  ac_c_werror_flag=$ac_save_c_werror_flag
30837	 CFLAGS="-g"
30838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30839/* end confdefs.h.  */
30840
30841int
30842main ()
30843{
30844
30845  ;
30846  return 0;
30847}
30848_ACEOF
30849if ac_fn_c_try_compile "$LINENO"; then :
30850  ac_cv_prog_cc_g=yes
30851fi
30852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30853fi
30854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30855fi
30856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30857   ac_c_werror_flag=$ac_save_c_werror_flag
30858fi
30859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30860$as_echo "$ac_cv_prog_cc_g" >&6; }
30861if test "$ac_test_CFLAGS" = set; then
30862  CFLAGS=$ac_save_CFLAGS
30863elif test $ac_cv_prog_cc_g = yes; then
30864  if test "$GCC" = yes; then
30865    CFLAGS="-g -O2"
30866  else
30867    CFLAGS="-g"
30868  fi
30869else
30870  if test "$GCC" = yes; then
30871    CFLAGS="-O2"
30872  else
30873    CFLAGS=
30874  fi
30875fi
30876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30877$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30878if ${ac_cv_prog_cc_c89+:} false; then :
30879  $as_echo_n "(cached) " >&6
30880else
30881  ac_cv_prog_cc_c89=no
30882ac_save_CC=$CC
30883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884/* end confdefs.h.  */
30885#include <stdarg.h>
30886#include <stdio.h>
30887struct stat;
30888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30889struct buf { int x; };
30890FILE * (*rcsopen) (struct buf *, struct stat *, int);
30891static char *e (p, i)
30892     char **p;
30893     int i;
30894{
30895  return p[i];
30896}
30897static char *f (char * (*g) (char **, int), char **p, ...)
30898{
30899  char *s;
30900  va_list v;
30901  va_start (v,p);
30902  s = g (p, va_arg (v,int));
30903  va_end (v);
30904  return s;
30905}
30906
30907/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30908   function prototypes and stuff, but not '\xHH' hex character constants.
30909   These don't provoke an error unfortunately, instead are silently treated
30910   as 'x'.  The following induces an error, until -std is added to get
30911   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30912   array size at least.  It's necessary to write '\x00'==0 to get something
30913   that's true only with -std.  */
30914int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30915
30916/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30917   inside strings and character constants.  */
30918#define FOO(x) 'x'
30919int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30920
30921int test (int i, double x);
30922struct s1 {int (*f) (int a);};
30923struct s2 {int (*f) (double a);};
30924int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30925int argc;
30926char **argv;
30927int
30928main ()
30929{
30930return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30931  ;
30932  return 0;
30933}
30934_ACEOF
30935for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30936	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30937do
30938  CC="$ac_save_CC $ac_arg"
30939  if ac_fn_c_try_compile "$LINENO"; then :
30940  ac_cv_prog_cc_c89=$ac_arg
30941fi
30942rm -f core conftest.err conftest.$ac_objext
30943  test "x$ac_cv_prog_cc_c89" != "xno" && break
30944done
30945rm -f conftest.$ac_ext
30946CC=$ac_save_CC
30947
30948fi
30949# AC_CACHE_VAL
30950case "x$ac_cv_prog_cc_c89" in
30951  x)
30952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30953$as_echo "none needed" >&6; } ;;
30954  xno)
30955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30956$as_echo "unsupported" >&6; } ;;
30957  *)
30958    CC="$CC $ac_cv_prog_cc_c89"
30959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30960$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30961esac
30962if test "x$ac_cv_prog_cc_c89" != xno; then :
30963
30964fi
30965
30966ac_ext=cpp
30967ac_cpp='$CXXCPP $CPPFLAGS'
30968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30971
30972
30973  # Option used to tell the compiler whether to create 32- or 64-bit executables
30974  # Notice that CC contains the full compiler path at this point.
30975  case $CC in
30976    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
30977    *)      COMPILER_TARGET_BITS_FLAG="-m";;
30978  esac
30979
30980
30981  ### Locate C++ compiler (CXX)
30982
30983  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30984    COMPILER_CHECK_LIST="cl"
30985  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
30986    COMPILER_CHECK_LIST="CC g++"
30987  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
30988    # Do not probe for CC on AIX .
30989    COMPILER_CHECK_LIST="xlC_r"
30990  else
30991    COMPILER_CHECK_LIST="g++ CC"
30992  fi
30993
30994
30995  COMPILER_NAME=C++
30996  SEARCH_LIST="$COMPILER_CHECK_LIST"
30997
30998  if test "x$CXX" != x; then
30999    # User has supplied compiler name already, always let that override.
31000    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
31001$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
31002    if test "x`basename $CXX`" = "x$CXX"; then
31003      # A command without a complete path is provided, search $PATH.
31004
31005      for ac_prog in $CXX
31006do
31007  # Extract the first word of "$ac_prog", so it can be a program name with args.
31008set dummy $ac_prog; ac_word=$2
31009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31010$as_echo_n "checking for $ac_word... " >&6; }
31011if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31012  $as_echo_n "(cached) " >&6
31013else
31014  case $POTENTIAL_CXX in
31015  [\\/]* | ?:[\\/]*)
31016  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31017  ;;
31018  *)
31019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31020for as_dir in $PATH
31021do
31022  IFS=$as_save_IFS
31023  test -z "$as_dir" && as_dir=.
31024    for ac_exec_ext in '' $ac_executable_extensions; do
31025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31026    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31028    break 2
31029  fi
31030done
31031  done
31032IFS=$as_save_IFS
31033
31034  ;;
31035esac
31036fi
31037POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31038if test -n "$POTENTIAL_CXX"; then
31039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31040$as_echo "$POTENTIAL_CXX" >&6; }
31041else
31042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31043$as_echo "no" >&6; }
31044fi
31045
31046
31047  test -n "$POTENTIAL_CXX" && break
31048done
31049
31050      if test "x$POTENTIAL_CXX" != x; then
31051        CXX=$POTENTIAL_CXX
31052      else
31053        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
31054      fi
31055    else
31056      # Otherwise it might already be a complete path
31057      if test ! -x "$CXX"; then
31058        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
31059      fi
31060    fi
31061  else
31062    # No user supplied value. Locate compiler ourselves
31063    CXX=
31064    # If TOOLS_DIR is set, check for all compiler names in there first
31065    # before checking the rest of the PATH.
31066    if test -n "$TOOLS_DIR"; then
31067      PATH_save="$PATH"
31068      PATH="$TOOLS_DIR"
31069      for ac_prog in $SEARCH_LIST
31070do
31071  # Extract the first word of "$ac_prog", so it can be a program name with args.
31072set dummy $ac_prog; ac_word=$2
31073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31074$as_echo_n "checking for $ac_word... " >&6; }
31075if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
31076  $as_echo_n "(cached) " >&6
31077else
31078  case $TOOLS_DIR_CXX in
31079  [\\/]* | ?:[\\/]*)
31080  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
31081  ;;
31082  *)
31083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31084for as_dir in $PATH
31085do
31086  IFS=$as_save_IFS
31087  test -z "$as_dir" && as_dir=.
31088    for ac_exec_ext in '' $ac_executable_extensions; do
31089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31090    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
31091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31092    break 2
31093  fi
31094done
31095  done
31096IFS=$as_save_IFS
31097
31098  ;;
31099esac
31100fi
31101TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
31102if test -n "$TOOLS_DIR_CXX"; then
31103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
31104$as_echo "$TOOLS_DIR_CXX" >&6; }
31105else
31106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31107$as_echo "no" >&6; }
31108fi
31109
31110
31111  test -n "$TOOLS_DIR_CXX" && break
31112done
31113
31114      CXX=$TOOLS_DIR_CXX
31115      PATH="$PATH_save"
31116    fi
31117
31118    # AC_PATH_PROGS can't be run multiple times with the same variable,
31119    # so create a new name for this run.
31120    if test "x$CXX" = x; then
31121      for ac_prog in $SEARCH_LIST
31122do
31123  # Extract the first word of "$ac_prog", so it can be a program name with args.
31124set dummy $ac_prog; ac_word=$2
31125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31126$as_echo_n "checking for $ac_word... " >&6; }
31127if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31128  $as_echo_n "(cached) " >&6
31129else
31130  case $POTENTIAL_CXX in
31131  [\\/]* | ?:[\\/]*)
31132  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31133  ;;
31134  *)
31135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31136for as_dir in $PATH
31137do
31138  IFS=$as_save_IFS
31139  test -z "$as_dir" && as_dir=.
31140    for ac_exec_ext in '' $ac_executable_extensions; do
31141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31142    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31144    break 2
31145  fi
31146done
31147  done
31148IFS=$as_save_IFS
31149
31150  ;;
31151esac
31152fi
31153POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31154if test -n "$POTENTIAL_CXX"; then
31155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31156$as_echo "$POTENTIAL_CXX" >&6; }
31157else
31158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31159$as_echo "no" >&6; }
31160fi
31161
31162
31163  test -n "$POTENTIAL_CXX" && break
31164done
31165
31166      CXX=$POTENTIAL_CXX
31167    fi
31168
31169    if test "x$CXX" = x; then
31170
31171  # Print a helpful message on how to acquire the necessary build dependency.
31172  # devkit is the help tag: freetype, cups, pulse, alsa etc
31173  MISSING_DEPENDENCY=devkit
31174
31175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31176    cygwin_help $MISSING_DEPENDENCY
31177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31178    msys_help $MISSING_DEPENDENCY
31179  else
31180    PKGHANDLER_COMMAND=
31181
31182    case $PKGHANDLER in
31183      apt-get)
31184        apt_help     $MISSING_DEPENDENCY ;;
31185      yum)
31186        yum_help     $MISSING_DEPENDENCY ;;
31187      port)
31188        port_help    $MISSING_DEPENDENCY ;;
31189      pkgutil)
31190        pkgutil_help $MISSING_DEPENDENCY ;;
31191      pkgadd)
31192        pkgadd_help  $MISSING_DEPENDENCY ;;
31193    esac
31194
31195    if test "x$PKGHANDLER_COMMAND" != x; then
31196      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31197    fi
31198  fi
31199
31200      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31201    fi
31202  fi
31203
31204  # Now we have a compiler binary in CXX. Make sure it's okay.
31205
31206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31207
31208  # First separate the path from the arguments. This will split at the first
31209  # space.
31210  complete="$CXX"
31211  path="${complete%% *}"
31212  tmp="$complete EOL"
31213  arguments="${tmp#* }"
31214
31215  # Input might be given as Windows format, start by converting to
31216  # unix format.
31217  new_path=`$CYGPATH -u "$path"`
31218
31219  # Now try to locate executable using which
31220  new_path=`$WHICH "$new_path" 2> /dev/null`
31221  # bat and cmd files are not always considered executable in cygwin causing which
31222  # to not find them
31223  if test "x$new_path" = x \
31224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31226    new_path=`$CYGPATH -u "$path"`
31227  fi
31228  if test "x$new_path" = x; then
31229    # Oops. Which didn't find the executable.
31230    # The splitting of arguments from the executable at a space might have been incorrect,
31231    # since paths with space are more likely in Windows. Give it another try with the whole
31232    # argument.
31233    path="$complete"
31234    arguments="EOL"
31235    new_path=`$CYGPATH -u "$path"`
31236    new_path=`$WHICH "$new_path" 2> /dev/null`
31237    # bat and cmd files are not always considered executable in cygwin causing which
31238    # to not find them
31239    if test "x$new_path" = x \
31240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31242      new_path=`$CYGPATH -u "$path"`
31243    fi
31244    if test "x$new_path" = x; then
31245      # It's still not found. Now this is an unrecoverable error.
31246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31247$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31248      has_space=`$ECHO "$complete" | $GREP " "`
31249      if test "x$has_space" != x; then
31250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31252      fi
31253      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31254    fi
31255  fi
31256
31257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31260  # "foo.exe" is OK but "foo" is an error.
31261  #
31262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31263  # It is also a way to make sure we got the proper file name for the real test later on.
31264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31265  if test "x$test_shortpath" = x; then
31266    # Short path failed, file does not exist as specified.
31267    # Try adding .exe or .cmd
31268    if test -f "${new_path}.exe"; then
31269      input_to_shortpath="${new_path}.exe"
31270    elif test -f "${new_path}.cmd"; then
31271      input_to_shortpath="${new_path}.cmd"
31272    else
31273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31274$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31277      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31278    fi
31279  else
31280    input_to_shortpath="$new_path"
31281  fi
31282
31283  # Call helper function which possibly converts this using DOS-style short mode.
31284  # If so, the updated path is stored in $new_path.
31285  new_path="$input_to_shortpath"
31286
31287  input_path="$input_to_shortpath"
31288  # Check if we need to convert this using DOS-style short mode. If the path
31289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31290  # take no chances and rewrite it.
31291  # Note: m4 eats our [], so we need to use [ and ] instead.
31292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31293  if test "x$has_forbidden_chars" != x; then
31294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31298      # Going to short mode and back again did indeed matter. Since short mode is
31299      # case insensitive, let's make it lowercase to improve readability.
31300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31301      # Now convert it back to Unix-stile (cygpath)
31302      input_path=`$CYGPATH -u "$shortmode_path"`
31303      new_path="$input_path"
31304    fi
31305  fi
31306
31307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31308  if test "x$test_cygdrive_prefix" = x; then
31309    # As a simple fix, exclude /usr/bin since it's not a real path.
31310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31312      # a path prefixed by /cygdrive for fixpath to work.
31313      new_path="$CYGWIN_ROOT_PATH$input_path"
31314    fi
31315  fi
31316
31317  # remove trailing .exe if any
31318  new_path="${new_path/%.exe/}"
31319
31320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31321
31322  # First separate the path from the arguments. This will split at the first
31323  # space.
31324  complete="$CXX"
31325  path="${complete%% *}"
31326  tmp="$complete EOL"
31327  arguments="${tmp#* }"
31328
31329  # Input might be given as Windows format, start by converting to
31330  # unix format.
31331  new_path="$path"
31332
31333  windows_path="$new_path"
31334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31335    unix_path=`$CYGPATH -u "$windows_path"`
31336    new_path="$unix_path"
31337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31339    new_path="$unix_path"
31340  fi
31341
31342
31343  # Now try to locate executable using which
31344  new_path=`$WHICH "$new_path" 2> /dev/null`
31345
31346  if test "x$new_path" = x; then
31347    # Oops. Which didn't find the executable.
31348    # The splitting of arguments from the executable at a space might have been incorrect,
31349    # since paths with space are more likely in Windows. Give it another try with the whole
31350    # argument.
31351    path="$complete"
31352    arguments="EOL"
31353    new_path="$path"
31354
31355  windows_path="$new_path"
31356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31357    unix_path=`$CYGPATH -u "$windows_path"`
31358    new_path="$unix_path"
31359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31361    new_path="$unix_path"
31362  fi
31363
31364
31365    new_path=`$WHICH "$new_path" 2> /dev/null`
31366
31367    if test "x$new_path" = x; then
31368      # It's still not found. Now this is an unrecoverable error.
31369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31370$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31371      has_space=`$ECHO "$complete" | $GREP " "`
31372      if test "x$has_space" != x; then
31373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31375      fi
31376      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31377    fi
31378  fi
31379
31380  # Now new_path has a complete unix path to the binary
31381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31382    # Keep paths in /bin as-is, but remove trailing .exe if any
31383    new_path="${new_path/%.exe/}"
31384    # Do not save /bin paths to all_fixpath_prefixes!
31385  else
31386    # Not in mixed or Windows style, start by that.
31387    new_path=`cmd //c echo $new_path`
31388
31389  input_path="$new_path"
31390  # Check if we need to convert this using DOS-style short mode. If the path
31391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31392  # take no chances and rewrite it.
31393  # Note: m4 eats our [], so we need to use [ and ] instead.
31394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31395  if test "x$has_forbidden_chars" != x; then
31396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31398  fi
31399
31400    # Output is in $new_path
31401
31402  windows_path="$new_path"
31403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31404    unix_path=`$CYGPATH -u "$windows_path"`
31405    new_path="$unix_path"
31406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31408    new_path="$unix_path"
31409  fi
31410
31411    # remove trailing .exe if any
31412    new_path="${new_path/%.exe/}"
31413
31414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31416  fi
31417
31418  else
31419    # We're on a posix platform. Hooray! :)
31420    # First separate the path from the arguments. This will split at the first
31421    # space.
31422    complete="$CXX"
31423    path="${complete%% *}"
31424    tmp="$complete EOL"
31425    arguments="${tmp#* }"
31426
31427    # Cannot rely on the command "which" here since it doesn't always work.
31428    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31429    if test -z "$is_absolute_path"; then
31430      # Path to executable is not absolute. Find it.
31431      IFS_save="$IFS"
31432      IFS=:
31433      for p in $PATH; do
31434        if test -f "$p/$path" && test -x "$p/$path"; then
31435          new_path="$p/$path"
31436          break
31437        fi
31438      done
31439      IFS="$IFS_save"
31440    else
31441      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
31442$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
31443      new_path="$path"
31444    fi
31445
31446    if test "x$new_path" = x; then
31447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31448$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31449      has_space=`$ECHO "$complete" | $GREP " "`
31450      if test "x$has_space" != x; then
31451        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31453      fi
31454      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31455    fi
31456  fi
31457
31458  # Now join together the path and the arguments once again
31459  if test "x$arguments" != xEOL; then
31460    new_complete="$new_path ${arguments% *}"
31461  else
31462    new_complete="$new_path"
31463  fi
31464
31465  if test "x$complete" != "x$new_complete"; then
31466    CXX="$new_complete"
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31468$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31469  fi
31470
31471  TEST_COMPILER="$CXX"
31472  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31473  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31474  if test "x$OPENJDK_BUILD_OS" != xaix; then
31475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31476$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31477
31478  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31479    # Follow a chain of symbolic links. Use readlink
31480    # where it exists, else fall back to horribly
31481    # complicated shell code.
31482    if test "x$READLINK_TESTED" != yes; then
31483      # On MacOSX there is a readlink tool with a different
31484      # purpose than the GNU readlink tool. Check the found readlink.
31485      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31486      if test "x$ISGNU" = x; then
31487        # A readlink that we do not know how to use.
31488        # Are there other non-GNU readlinks out there?
31489        READLINK_TESTED=yes
31490        READLINK=
31491      fi
31492    fi
31493
31494    if test "x$READLINK" != x; then
31495      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31496    else
31497      # Save the current directory for restoring afterwards
31498      STARTDIR=$PWD
31499      COUNTER=0
31500      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31501      sym_link_file=`$BASENAME $TEST_COMPILER`
31502      cd $sym_link_dir
31503      # Use -P flag to resolve symlinks in directories.
31504      cd `$THEPWDCMD -P`
31505      sym_link_dir=`$THEPWDCMD -P`
31506      # Resolve file symlinks
31507      while test $COUNTER -lt 20; do
31508        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31509        if test "x$ISLINK" == x; then
31510          # This is not a symbolic link! We are done!
31511          break
31512        fi
31513        # Again resolve directory symlinks since the target of the just found
31514        # link could be in a different directory
31515        cd `$DIRNAME $ISLINK`
31516        sym_link_dir=`$THEPWDCMD -P`
31517        sym_link_file=`$BASENAME $ISLINK`
31518        let COUNTER=COUNTER+1
31519      done
31520      cd $STARTDIR
31521      TEST_COMPILER=$sym_link_dir/$sym_link_file
31522    fi
31523  fi
31524
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31526$as_echo "$TEST_COMPILER" >&6; }
31527  fi
31528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31529$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31530
31531  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31532  if test "x$COMPILER_BASENAME" = "xccache"; then
31533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31534$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31535    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31536    # We want to control ccache invocation ourselves, so ignore this cc and try
31537    # searching again.
31538
31539    # Remove the path to the fake ccache cc from the PATH
31540    RETRY_COMPILER_SAVED_PATH="$PATH"
31541    COMPILER_DIRNAME=`$DIRNAME $CXX`
31542    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31543
31544    # Try again looking for our compiler
31545    if test -n "$ac_tool_prefix"; then
31546  for ac_prog in $COMPILER_CHECK_LIST
31547  do
31548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31551$as_echo_n "checking for $ac_word... " >&6; }
31552if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31553  $as_echo_n "(cached) " >&6
31554else
31555  if test -n "$PROPER_COMPILER_CXX"; then
31556  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31557else
31558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31559for as_dir in $PATH
31560do
31561  IFS=$as_save_IFS
31562  test -z "$as_dir" && as_dir=.
31563    for ac_exec_ext in '' $ac_executable_extensions; do
31564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31565    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31567    break 2
31568  fi
31569done
31570  done
31571IFS=$as_save_IFS
31572
31573fi
31574fi
31575PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31576if test -n "$PROPER_COMPILER_CXX"; then
31577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31578$as_echo "$PROPER_COMPILER_CXX" >&6; }
31579else
31580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31581$as_echo "no" >&6; }
31582fi
31583
31584
31585    test -n "$PROPER_COMPILER_CXX" && break
31586  done
31587fi
31588if test -z "$PROPER_COMPILER_CXX"; then
31589  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31590  for ac_prog in $COMPILER_CHECK_LIST
31591do
31592  # Extract the first word of "$ac_prog", so it can be a program name with args.
31593set dummy $ac_prog; ac_word=$2
31594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31595$as_echo_n "checking for $ac_word... " >&6; }
31596if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31597  $as_echo_n "(cached) " >&6
31598else
31599  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31600  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31601else
31602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31603for as_dir in $PATH
31604do
31605  IFS=$as_save_IFS
31606  test -z "$as_dir" && as_dir=.
31607    for ac_exec_ext in '' $ac_executable_extensions; do
31608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31609    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31611    break 2
31612  fi
31613done
31614  done
31615IFS=$as_save_IFS
31616
31617fi
31618fi
31619ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31620if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31622$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31623else
31624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31625$as_echo "no" >&6; }
31626fi
31627
31628
31629  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31630done
31631
31632  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31633    PROPER_COMPILER_CXX=""
31634  else
31635    case $cross_compiling:$ac_tool_warned in
31636yes:)
31637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31639ac_tool_warned=yes ;;
31640esac
31641    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31642  fi
31643fi
31644
31645
31646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31647
31648  # First separate the path from the arguments. This will split at the first
31649  # space.
31650  complete="$PROPER_COMPILER_CXX"
31651  path="${complete%% *}"
31652  tmp="$complete EOL"
31653  arguments="${tmp#* }"
31654
31655  # Input might be given as Windows format, start by converting to
31656  # unix format.
31657  new_path=`$CYGPATH -u "$path"`
31658
31659  # Now try to locate executable using which
31660  new_path=`$WHICH "$new_path" 2> /dev/null`
31661  # bat and cmd files are not always considered executable in cygwin causing which
31662  # to not find them
31663  if test "x$new_path" = x \
31664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31666    new_path=`$CYGPATH -u "$path"`
31667  fi
31668  if test "x$new_path" = x; then
31669    # Oops. Which didn't find the executable.
31670    # The splitting of arguments from the executable at a space might have been incorrect,
31671    # since paths with space are more likely in Windows. Give it another try with the whole
31672    # argument.
31673    path="$complete"
31674    arguments="EOL"
31675    new_path=`$CYGPATH -u "$path"`
31676    new_path=`$WHICH "$new_path" 2> /dev/null`
31677    # bat and cmd files are not always considered executable in cygwin causing which
31678    # to not find them
31679    if test "x$new_path" = x \
31680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31682      new_path=`$CYGPATH -u "$path"`
31683    fi
31684    if test "x$new_path" = x; then
31685      # It's still not found. Now this is an unrecoverable error.
31686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31687$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31688      has_space=`$ECHO "$complete" | $GREP " "`
31689      if test "x$has_space" != x; then
31690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31692      fi
31693      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31694    fi
31695  fi
31696
31697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31700  # "foo.exe" is OK but "foo" is an error.
31701  #
31702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31703  # It is also a way to make sure we got the proper file name for the real test later on.
31704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31705  if test "x$test_shortpath" = x; then
31706    # Short path failed, file does not exist as specified.
31707    # Try adding .exe or .cmd
31708    if test -f "${new_path}.exe"; then
31709      input_to_shortpath="${new_path}.exe"
31710    elif test -f "${new_path}.cmd"; then
31711      input_to_shortpath="${new_path}.cmd"
31712    else
31713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31714$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31717      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31718    fi
31719  else
31720    input_to_shortpath="$new_path"
31721  fi
31722
31723  # Call helper function which possibly converts this using DOS-style short mode.
31724  # If so, the updated path is stored in $new_path.
31725  new_path="$input_to_shortpath"
31726
31727  input_path="$input_to_shortpath"
31728  # Check if we need to convert this using DOS-style short mode. If the path
31729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31730  # take no chances and rewrite it.
31731  # Note: m4 eats our [], so we need to use [ and ] instead.
31732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31733  if test "x$has_forbidden_chars" != x; then
31734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31738      # Going to short mode and back again did indeed matter. Since short mode is
31739      # case insensitive, let's make it lowercase to improve readability.
31740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31741      # Now convert it back to Unix-stile (cygpath)
31742      input_path=`$CYGPATH -u "$shortmode_path"`
31743      new_path="$input_path"
31744    fi
31745  fi
31746
31747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31748  if test "x$test_cygdrive_prefix" = x; then
31749    # As a simple fix, exclude /usr/bin since it's not a real path.
31750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31752      # a path prefixed by /cygdrive for fixpath to work.
31753      new_path="$CYGWIN_ROOT_PATH$input_path"
31754    fi
31755  fi
31756
31757  # remove trailing .exe if any
31758  new_path="${new_path/%.exe/}"
31759
31760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31761
31762  # First separate the path from the arguments. This will split at the first
31763  # space.
31764  complete="$PROPER_COMPILER_CXX"
31765  path="${complete%% *}"
31766  tmp="$complete EOL"
31767  arguments="${tmp#* }"
31768
31769  # Input might be given as Windows format, start by converting to
31770  # unix format.
31771  new_path="$path"
31772
31773  windows_path="$new_path"
31774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775    unix_path=`$CYGPATH -u "$windows_path"`
31776    new_path="$unix_path"
31777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31779    new_path="$unix_path"
31780  fi
31781
31782
31783  # Now try to locate executable using which
31784  new_path=`$WHICH "$new_path" 2> /dev/null`
31785
31786  if test "x$new_path" = x; then
31787    # Oops. Which didn't find the executable.
31788    # The splitting of arguments from the executable at a space might have been incorrect,
31789    # since paths with space are more likely in Windows. Give it another try with the whole
31790    # argument.
31791    path="$complete"
31792    arguments="EOL"
31793    new_path="$path"
31794
31795  windows_path="$new_path"
31796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31797    unix_path=`$CYGPATH -u "$windows_path"`
31798    new_path="$unix_path"
31799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31801    new_path="$unix_path"
31802  fi
31803
31804
31805    new_path=`$WHICH "$new_path" 2> /dev/null`
31806
31807    if test "x$new_path" = x; then
31808      # It's still not found. Now this is an unrecoverable error.
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31810$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31811      has_space=`$ECHO "$complete" | $GREP " "`
31812      if test "x$has_space" != x; then
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31815      fi
31816      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31817    fi
31818  fi
31819
31820  # Now new_path has a complete unix path to the binary
31821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31822    # Keep paths in /bin as-is, but remove trailing .exe if any
31823    new_path="${new_path/%.exe/}"
31824    # Do not save /bin paths to all_fixpath_prefixes!
31825  else
31826    # Not in mixed or Windows style, start by that.
31827    new_path=`cmd //c echo $new_path`
31828
31829  input_path="$new_path"
31830  # Check if we need to convert this using DOS-style short mode. If the path
31831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31832  # take no chances and rewrite it.
31833  # Note: m4 eats our [], so we need to use [ and ] instead.
31834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31835  if test "x$has_forbidden_chars" != x; then
31836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31838  fi
31839
31840    # Output is in $new_path
31841
31842  windows_path="$new_path"
31843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31844    unix_path=`$CYGPATH -u "$windows_path"`
31845    new_path="$unix_path"
31846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31848    new_path="$unix_path"
31849  fi
31850
31851    # remove trailing .exe if any
31852    new_path="${new_path/%.exe/}"
31853
31854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31856  fi
31857
31858  else
31859    # We're on a posix platform. Hooray! :)
31860    # First separate the path from the arguments. This will split at the first
31861    # space.
31862    complete="$PROPER_COMPILER_CXX"
31863    path="${complete%% *}"
31864    tmp="$complete EOL"
31865    arguments="${tmp#* }"
31866
31867    # Cannot rely on the command "which" here since it doesn't always work.
31868    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31869    if test -z "$is_absolute_path"; then
31870      # Path to executable is not absolute. Find it.
31871      IFS_save="$IFS"
31872      IFS=:
31873      for p in $PATH; do
31874        if test -f "$p/$path" && test -x "$p/$path"; then
31875          new_path="$p/$path"
31876          break
31877        fi
31878      done
31879      IFS="$IFS_save"
31880    else
31881      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
31882$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
31883      new_path="$path"
31884    fi
31885
31886    if test "x$new_path" = x; then
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31888$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31889      has_space=`$ECHO "$complete" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31893      fi
31894      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31895    fi
31896  fi
31897
31898  # Now join together the path and the arguments once again
31899  if test "x$arguments" != xEOL; then
31900    new_complete="$new_path ${arguments% *}"
31901  else
31902    new_complete="$new_path"
31903  fi
31904
31905  if test "x$complete" != "x$new_complete"; then
31906    PROPER_COMPILER_CXX="$new_complete"
31907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31908$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31909  fi
31910
31911    PATH="$RETRY_COMPILER_SAVED_PATH"
31912
31913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31914$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31915
31916  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31917    # Follow a chain of symbolic links. Use readlink
31918    # where it exists, else fall back to horribly
31919    # complicated shell code.
31920    if test "x$READLINK_TESTED" != yes; then
31921      # On MacOSX there is a readlink tool with a different
31922      # purpose than the GNU readlink tool. Check the found readlink.
31923      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31924      if test "x$ISGNU" = x; then
31925        # A readlink that we do not know how to use.
31926        # Are there other non-GNU readlinks out there?
31927        READLINK_TESTED=yes
31928        READLINK=
31929      fi
31930    fi
31931
31932    if test "x$READLINK" != x; then
31933      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31934    else
31935      # Save the current directory for restoring afterwards
31936      STARTDIR=$PWD
31937      COUNTER=0
31938      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31939      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31940      cd $sym_link_dir
31941      # Use -P flag to resolve symlinks in directories.
31942      cd `$THEPWDCMD -P`
31943      sym_link_dir=`$THEPWDCMD -P`
31944      # Resolve file symlinks
31945      while test $COUNTER -lt 20; do
31946        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31947        if test "x$ISLINK" == x; then
31948          # This is not a symbolic link! We are done!
31949          break
31950        fi
31951        # Again resolve directory symlinks since the target of the just found
31952        # link could be in a different directory
31953        cd `$DIRNAME $ISLINK`
31954        sym_link_dir=`$THEPWDCMD -P`
31955        sym_link_file=`$BASENAME $ISLINK`
31956        let COUNTER=COUNTER+1
31957      done
31958      cd $STARTDIR
31959      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31960    fi
31961  fi
31962
31963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31964$as_echo "$PROPER_COMPILER_CXX" >&6; }
31965    CXX="$PROPER_COMPILER_CXX"
31966  else
31967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31968$as_echo "no, keeping CXX" >&6; }
31969  fi
31970
31971
31972  COMPILER=$CXX
31973  COMPILER_NAME=$COMPILER_NAME
31974
31975  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31976    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
31977    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
31978    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31979    if test $? -ne 0; then
31980      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
31981
31982      { $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
31983$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
31984      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
31985$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
31986      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31987    else
31988      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
31989      COMPILER_VENDOR="Sun Studio"
31990    fi
31991  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
31992      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
31993      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
31994      if test $? -ne 0; then
31995        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
31996      else
31997        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
31998        COMPILER_VENDOR='IBM'
31999      fi
32000  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
32001    # First line typically looks something like:
32002    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32003    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32004    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
32005    COMPILER_VENDOR="Microsoft CL.EXE"
32006    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
32007    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
32008      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
32009        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
32010      fi
32011    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
32012      if test "x$COMPILER_CPU_TEST" != "xx64"; then
32013        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
32014      fi
32015    fi
32016  else
32017    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
32018    # Check that this is likely to be GCC.
32019    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
32020    if test $? -ne 0; then
32021      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
32022$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
32023      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
32024$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
32025      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32026    fi
32027
32028    # First line typically looks something like:
32029    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
32030    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
32031    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
32032  fi
32033  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
32034  CXX_VERSION="$COMPILER_VERSION"
32035  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
32036  CXX_VENDOR="$COMPILER_VENDOR"
32037
32038  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
32039$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
32040
32041
32042  # Now that we have resolved CXX ourself, let autoconf have its go at it
32043  ac_ext=cpp
32044ac_cpp='$CXXCPP $CPPFLAGS'
32045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32048if test -z "$CXX"; then
32049  if test -n "$CCC"; then
32050    CXX=$CCC
32051  else
32052    if test -n "$ac_tool_prefix"; then
32053  for ac_prog in $CXX
32054  do
32055    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32056set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32058$as_echo_n "checking for $ac_word... " >&6; }
32059if ${ac_cv_prog_CXX+:} false; then :
32060  $as_echo_n "(cached) " >&6
32061else
32062  if test -n "$CXX"; then
32063  ac_cv_prog_CXX="$CXX" # Let the user override the test.
32064else
32065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32066for as_dir in $PATH
32067do
32068  IFS=$as_save_IFS
32069  test -z "$as_dir" && as_dir=.
32070    for ac_exec_ext in '' $ac_executable_extensions; do
32071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32072    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32074    break 2
32075  fi
32076done
32077  done
32078IFS=$as_save_IFS
32079
32080fi
32081fi
32082CXX=$ac_cv_prog_CXX
32083if test -n "$CXX"; then
32084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32085$as_echo "$CXX" >&6; }
32086else
32087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32088$as_echo "no" >&6; }
32089fi
32090
32091
32092    test -n "$CXX" && break
32093  done
32094fi
32095if test -z "$CXX"; then
32096  ac_ct_CXX=$CXX
32097  for ac_prog in $CXX
32098do
32099  # Extract the first word of "$ac_prog", so it can be a program name with args.
32100set dummy $ac_prog; ac_word=$2
32101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32102$as_echo_n "checking for $ac_word... " >&6; }
32103if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32104  $as_echo_n "(cached) " >&6
32105else
32106  if test -n "$ac_ct_CXX"; then
32107  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32108else
32109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32110for as_dir in $PATH
32111do
32112  IFS=$as_save_IFS
32113  test -z "$as_dir" && as_dir=.
32114    for ac_exec_ext in '' $ac_executable_extensions; do
32115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32116    ac_cv_prog_ac_ct_CXX="$ac_prog"
32117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32118    break 2
32119  fi
32120done
32121  done
32122IFS=$as_save_IFS
32123
32124fi
32125fi
32126ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32127if test -n "$ac_ct_CXX"; then
32128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32129$as_echo "$ac_ct_CXX" >&6; }
32130else
32131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32132$as_echo "no" >&6; }
32133fi
32134
32135
32136  test -n "$ac_ct_CXX" && break
32137done
32138
32139  if test "x$ac_ct_CXX" = x; then
32140    CXX="g++"
32141  else
32142    case $cross_compiling:$ac_tool_warned in
32143yes:)
32144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32146ac_tool_warned=yes ;;
32147esac
32148    CXX=$ac_ct_CXX
32149  fi
32150fi
32151
32152  fi
32153fi
32154# Provide some information about the compiler.
32155$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32156set X $ac_compile
32157ac_compiler=$2
32158for ac_option in --version -v -V -qversion; do
32159  { { ac_try="$ac_compiler $ac_option >&5"
32160case "(($ac_try" in
32161  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32162  *) ac_try_echo=$ac_try;;
32163esac
32164eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32165$as_echo "$ac_try_echo"; } >&5
32166  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32167  ac_status=$?
32168  if test -s conftest.err; then
32169    sed '10a\
32170... rest of stderr output deleted ...
32171         10q' conftest.err >conftest.er1
32172    cat conftest.er1 >&5
32173  fi
32174  rm -f conftest.er1 conftest.err
32175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32176  test $ac_status = 0; }
32177done
32178
32179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32180$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32181if ${ac_cv_cxx_compiler_gnu+:} false; then :
32182  $as_echo_n "(cached) " >&6
32183else
32184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32185/* end confdefs.h.  */
32186
32187int
32188main ()
32189{
32190#ifndef __GNUC__
32191       choke me
32192#endif
32193
32194  ;
32195  return 0;
32196}
32197_ACEOF
32198if ac_fn_cxx_try_compile "$LINENO"; then :
32199  ac_compiler_gnu=yes
32200else
32201  ac_compiler_gnu=no
32202fi
32203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32204ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32205
32206fi
32207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32208$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32209if test $ac_compiler_gnu = yes; then
32210  GXX=yes
32211else
32212  GXX=
32213fi
32214ac_test_CXXFLAGS=${CXXFLAGS+set}
32215ac_save_CXXFLAGS=$CXXFLAGS
32216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32217$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32218if ${ac_cv_prog_cxx_g+:} false; then :
32219  $as_echo_n "(cached) " >&6
32220else
32221  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32222   ac_cxx_werror_flag=yes
32223   ac_cv_prog_cxx_g=no
32224   CXXFLAGS="-g"
32225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32226/* end confdefs.h.  */
32227
32228int
32229main ()
32230{
32231
32232  ;
32233  return 0;
32234}
32235_ACEOF
32236if ac_fn_cxx_try_compile "$LINENO"; then :
32237  ac_cv_prog_cxx_g=yes
32238else
32239  CXXFLAGS=""
32240      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32241/* end confdefs.h.  */
32242
32243int
32244main ()
32245{
32246
32247  ;
32248  return 0;
32249}
32250_ACEOF
32251if ac_fn_cxx_try_compile "$LINENO"; then :
32252
32253else
32254  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32255	 CXXFLAGS="-g"
32256	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32257/* end confdefs.h.  */
32258
32259int
32260main ()
32261{
32262
32263  ;
32264  return 0;
32265}
32266_ACEOF
32267if ac_fn_cxx_try_compile "$LINENO"; then :
32268  ac_cv_prog_cxx_g=yes
32269fi
32270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32271fi
32272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32273fi
32274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32275   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32276fi
32277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32278$as_echo "$ac_cv_prog_cxx_g" >&6; }
32279if test "$ac_test_CXXFLAGS" = set; then
32280  CXXFLAGS=$ac_save_CXXFLAGS
32281elif test $ac_cv_prog_cxx_g = yes; then
32282  if test "$GXX" = yes; then
32283    CXXFLAGS="-g -O2"
32284  else
32285    CXXFLAGS="-g"
32286  fi
32287else
32288  if test "$GXX" = yes; then
32289    CXXFLAGS="-O2"
32290  else
32291    CXXFLAGS=
32292  fi
32293fi
32294ac_ext=cpp
32295ac_cpp='$CXXCPP $CPPFLAGS'
32296ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32297ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32298ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32299
32300
32301  ### Locate other tools
32302
32303  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32304    ac_ext=m
32305ac_cpp='$OBJCPP $CPPFLAGS'
32306ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32307ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32308ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32309if test -n "$ac_tool_prefix"; then
32310  for ac_prog in gcc objcc objc cc CC
32311  do
32312    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32313set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32315$as_echo_n "checking for $ac_word... " >&6; }
32316if ${ac_cv_prog_OBJC+:} false; then :
32317  $as_echo_n "(cached) " >&6
32318else
32319  if test -n "$OBJC"; then
32320  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32321else
32322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32323for as_dir in $PATH
32324do
32325  IFS=$as_save_IFS
32326  test -z "$as_dir" && as_dir=.
32327    for ac_exec_ext in '' $ac_executable_extensions; do
32328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32329    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32331    break 2
32332  fi
32333done
32334  done
32335IFS=$as_save_IFS
32336
32337fi
32338fi
32339OBJC=$ac_cv_prog_OBJC
32340if test -n "$OBJC"; then
32341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32342$as_echo "$OBJC" >&6; }
32343else
32344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32345$as_echo "no" >&6; }
32346fi
32347
32348
32349    test -n "$OBJC" && break
32350  done
32351fi
32352if test -z "$OBJC"; then
32353  ac_ct_OBJC=$OBJC
32354  for ac_prog in gcc objcc objc cc CC
32355do
32356  # Extract the first word of "$ac_prog", so it can be a program name with args.
32357set dummy $ac_prog; ac_word=$2
32358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32359$as_echo_n "checking for $ac_word... " >&6; }
32360if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32361  $as_echo_n "(cached) " >&6
32362else
32363  if test -n "$ac_ct_OBJC"; then
32364  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32365else
32366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32367for as_dir in $PATH
32368do
32369  IFS=$as_save_IFS
32370  test -z "$as_dir" && as_dir=.
32371    for ac_exec_ext in '' $ac_executable_extensions; do
32372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32373    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32375    break 2
32376  fi
32377done
32378  done
32379IFS=$as_save_IFS
32380
32381fi
32382fi
32383ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32384if test -n "$ac_ct_OBJC"; then
32385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32386$as_echo "$ac_ct_OBJC" >&6; }
32387else
32388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32389$as_echo "no" >&6; }
32390fi
32391
32392
32393  test -n "$ac_ct_OBJC" && break
32394done
32395
32396  if test "x$ac_ct_OBJC" = x; then
32397    OBJC="gcc"
32398  else
32399    case $cross_compiling:$ac_tool_warned in
32400yes:)
32401{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32402$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32403ac_tool_warned=yes ;;
32404esac
32405    OBJC=$ac_ct_OBJC
32406  fi
32407fi
32408
32409# Provide some information about the compiler.
32410$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32411set X $ac_compile
32412ac_compiler=$2
32413for ac_option in --version -v -V -qversion; do
32414  { { ac_try="$ac_compiler $ac_option >&5"
32415case "(($ac_try" in
32416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32417  *) ac_try_echo=$ac_try;;
32418esac
32419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32420$as_echo "$ac_try_echo"; } >&5
32421  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32422  ac_status=$?
32423  if test -s conftest.err; then
32424    sed '10a\
32425... rest of stderr output deleted ...
32426         10q' conftest.err >conftest.er1
32427    cat conftest.er1 >&5
32428  fi
32429  rm -f conftest.er1 conftest.err
32430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32431  test $ac_status = 0; }
32432done
32433
32434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32435$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32436if ${ac_cv_objc_compiler_gnu+:} false; then :
32437  $as_echo_n "(cached) " >&6
32438else
32439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32440/* end confdefs.h.  */
32441
32442int
32443main ()
32444{
32445#ifndef __GNUC__
32446       choke me
32447#endif
32448
32449  ;
32450  return 0;
32451}
32452_ACEOF
32453if ac_fn_objc_try_compile "$LINENO"; then :
32454  ac_compiler_gnu=yes
32455else
32456  ac_compiler_gnu=no
32457fi
32458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32459ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32460
32461fi
32462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32463$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32464if test $ac_compiler_gnu = yes; then
32465  GOBJC=yes
32466else
32467  GOBJC=
32468fi
32469ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32470ac_save_OBJCFLAGS=$OBJCFLAGS
32471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32472$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32473if ${ac_cv_prog_objc_g+:} false; then :
32474  $as_echo_n "(cached) " >&6
32475else
32476  ac_save_objc_werror_flag=$ac_objc_werror_flag
32477   ac_objc_werror_flag=yes
32478   ac_cv_prog_objc_g=no
32479   OBJCFLAGS="-g"
32480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32481/* end confdefs.h.  */
32482
32483int
32484main ()
32485{
32486
32487  ;
32488  return 0;
32489}
32490_ACEOF
32491if ac_fn_objc_try_compile "$LINENO"; then :
32492  ac_cv_prog_objc_g=yes
32493else
32494  OBJCFLAGS=""
32495      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32496/* end confdefs.h.  */
32497
32498int
32499main ()
32500{
32501
32502  ;
32503  return 0;
32504}
32505_ACEOF
32506if ac_fn_objc_try_compile "$LINENO"; then :
32507
32508else
32509  ac_objc_werror_flag=$ac_save_objc_werror_flag
32510	 OBJCFLAGS="-g"
32511	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32512/* end confdefs.h.  */
32513
32514int
32515main ()
32516{
32517
32518  ;
32519  return 0;
32520}
32521_ACEOF
32522if ac_fn_objc_try_compile "$LINENO"; then :
32523  ac_cv_prog_objc_g=yes
32524fi
32525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32526fi
32527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32528fi
32529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32530   ac_objc_werror_flag=$ac_save_objc_werror_flag
32531fi
32532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32533$as_echo "$ac_cv_prog_objc_g" >&6; }
32534if test "$ac_test_OBJCFLAGS" = set; then
32535  OBJCFLAGS=$ac_save_OBJCFLAGS
32536elif test $ac_cv_prog_objc_g = yes; then
32537  if test "$GOBJC" = yes; then
32538    OBJCFLAGS="-g -O2"
32539  else
32540    OBJCFLAGS="-g"
32541  fi
32542else
32543  if test "$GOBJC" = yes; then
32544    OBJCFLAGS="-O2"
32545  else
32546    OBJCFLAGS=
32547  fi
32548fi
32549ac_ext=cpp
32550ac_cpp='$CXXCPP $CPPFLAGS'
32551ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32552ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32553ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32554
32555
32556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32557
32558  # First separate the path from the arguments. This will split at the first
32559  # space.
32560  complete="$OBJC"
32561  path="${complete%% *}"
32562  tmp="$complete EOL"
32563  arguments="${tmp#* }"
32564
32565  # Input might be given as Windows format, start by converting to
32566  # unix format.
32567  new_path=`$CYGPATH -u "$path"`
32568
32569  # Now try to locate executable using which
32570  new_path=`$WHICH "$new_path" 2> /dev/null`
32571  # bat and cmd files are not always considered executable in cygwin causing which
32572  # to not find them
32573  if test "x$new_path" = x \
32574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32576    new_path=`$CYGPATH -u "$path"`
32577  fi
32578  if test "x$new_path" = x; then
32579    # Oops. Which didn't find the executable.
32580    # The splitting of arguments from the executable at a space might have been incorrect,
32581    # since paths with space are more likely in Windows. Give it another try with the whole
32582    # argument.
32583    path="$complete"
32584    arguments="EOL"
32585    new_path=`$CYGPATH -u "$path"`
32586    new_path=`$WHICH "$new_path" 2> /dev/null`
32587    # bat and cmd files are not always considered executable in cygwin causing which
32588    # to not find them
32589    if test "x$new_path" = x \
32590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32592      new_path=`$CYGPATH -u "$path"`
32593    fi
32594    if test "x$new_path" = x; then
32595      # It's still not found. Now this is an unrecoverable error.
32596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32597$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32598      has_space=`$ECHO "$complete" | $GREP " "`
32599      if test "x$has_space" != x; then
32600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32602      fi
32603      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32604    fi
32605  fi
32606
32607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32610  # "foo.exe" is OK but "foo" is an error.
32611  #
32612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32613  # It is also a way to make sure we got the proper file name for the real test later on.
32614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32615  if test "x$test_shortpath" = x; then
32616    # Short path failed, file does not exist as specified.
32617    # Try adding .exe or .cmd
32618    if test -f "${new_path}.exe"; then
32619      input_to_shortpath="${new_path}.exe"
32620    elif test -f "${new_path}.cmd"; then
32621      input_to_shortpath="${new_path}.cmd"
32622    else
32623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32624$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32627      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32628    fi
32629  else
32630    input_to_shortpath="$new_path"
32631  fi
32632
32633  # Call helper function which possibly converts this using DOS-style short mode.
32634  # If so, the updated path is stored in $new_path.
32635  new_path="$input_to_shortpath"
32636
32637  input_path="$input_to_shortpath"
32638  # Check if we need to convert this using DOS-style short mode. If the path
32639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32640  # take no chances and rewrite it.
32641  # Note: m4 eats our [], so we need to use [ and ] instead.
32642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32643  if test "x$has_forbidden_chars" != x; then
32644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32648      # Going to short mode and back again did indeed matter. Since short mode is
32649      # case insensitive, let's make it lowercase to improve readability.
32650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32651      # Now convert it back to Unix-stile (cygpath)
32652      input_path=`$CYGPATH -u "$shortmode_path"`
32653      new_path="$input_path"
32654    fi
32655  fi
32656
32657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32658  if test "x$test_cygdrive_prefix" = x; then
32659    # As a simple fix, exclude /usr/bin since it's not a real path.
32660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32662      # a path prefixed by /cygdrive for fixpath to work.
32663      new_path="$CYGWIN_ROOT_PATH$input_path"
32664    fi
32665  fi
32666
32667  # remove trailing .exe if any
32668  new_path="${new_path/%.exe/}"
32669
32670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32671
32672  # First separate the path from the arguments. This will split at the first
32673  # space.
32674  complete="$OBJC"
32675  path="${complete%% *}"
32676  tmp="$complete EOL"
32677  arguments="${tmp#* }"
32678
32679  # Input might be given as Windows format, start by converting to
32680  # unix format.
32681  new_path="$path"
32682
32683  windows_path="$new_path"
32684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32685    unix_path=`$CYGPATH -u "$windows_path"`
32686    new_path="$unix_path"
32687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32689    new_path="$unix_path"
32690  fi
32691
32692
32693  # Now try to locate executable using which
32694  new_path=`$WHICH "$new_path" 2> /dev/null`
32695
32696  if test "x$new_path" = x; then
32697    # Oops. Which didn't find the executable.
32698    # The splitting of arguments from the executable at a space might have been incorrect,
32699    # since paths with space are more likely in Windows. Give it another try with the whole
32700    # argument.
32701    path="$complete"
32702    arguments="EOL"
32703    new_path="$path"
32704
32705  windows_path="$new_path"
32706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32707    unix_path=`$CYGPATH -u "$windows_path"`
32708    new_path="$unix_path"
32709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32711    new_path="$unix_path"
32712  fi
32713
32714
32715    new_path=`$WHICH "$new_path" 2> /dev/null`
32716
32717    if test "x$new_path" = x; then
32718      # It's still not found. Now this is an unrecoverable error.
32719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32720$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32721      has_space=`$ECHO "$complete" | $GREP " "`
32722      if test "x$has_space" != x; then
32723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32725      fi
32726      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32727    fi
32728  fi
32729
32730  # Now new_path has a complete unix path to the binary
32731  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32732    # Keep paths in /bin as-is, but remove trailing .exe if any
32733    new_path="${new_path/%.exe/}"
32734    # Do not save /bin paths to all_fixpath_prefixes!
32735  else
32736    # Not in mixed or Windows style, start by that.
32737    new_path=`cmd //c echo $new_path`
32738
32739  input_path="$new_path"
32740  # Check if we need to convert this using DOS-style short mode. If the path
32741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32742  # take no chances and rewrite it.
32743  # Note: m4 eats our [], so we need to use [ and ] instead.
32744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32745  if test "x$has_forbidden_chars" != x; then
32746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32748  fi
32749
32750    # Output is in $new_path
32751
32752  windows_path="$new_path"
32753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32754    unix_path=`$CYGPATH -u "$windows_path"`
32755    new_path="$unix_path"
32756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32758    new_path="$unix_path"
32759  fi
32760
32761    # remove trailing .exe if any
32762    new_path="${new_path/%.exe/}"
32763
32764    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32765    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32766  fi
32767
32768  else
32769    # We're on a posix platform. Hooray! :)
32770    # First separate the path from the arguments. This will split at the first
32771    # space.
32772    complete="$OBJC"
32773    path="${complete%% *}"
32774    tmp="$complete EOL"
32775    arguments="${tmp#* }"
32776
32777    # Cannot rely on the command "which" here since it doesn't always work.
32778    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32779    if test -z "$is_absolute_path"; then
32780      # Path to executable is not absolute. Find it.
32781      IFS_save="$IFS"
32782      IFS=:
32783      for p in $PATH; do
32784        if test -f "$p/$path" && test -x "$p/$path"; then
32785          new_path="$p/$path"
32786          break
32787        fi
32788      done
32789      IFS="$IFS_save"
32790    else
32791      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
32792$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
32793      new_path="$path"
32794    fi
32795
32796    if test "x$new_path" = x; then
32797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32798$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32799      has_space=`$ECHO "$complete" | $GREP " "`
32800      if test "x$has_space" != x; then
32801        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32803      fi
32804      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32805    fi
32806  fi
32807
32808  # Now join together the path and the arguments once again
32809  if test "x$arguments" != xEOL; then
32810    new_complete="$new_path ${arguments% *}"
32811  else
32812    new_complete="$new_path"
32813  fi
32814
32815  if test "x$complete" != "x$new_complete"; then
32816    OBJC="$new_complete"
32817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32818$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32819  fi
32820
32821  else
32822    OBJC=
32823  fi
32824
32825  # Restore the flags to the user specified values.
32826  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
32827  CFLAGS="$ORG_CFLAGS"
32828  CXXFLAGS="$ORG_CXXFLAGS"
32829  OBJCFLAGS="$ORG_OBJCFLAGS"
32830
32831  LD="$CC"
32832  LDEXE="$CC"
32833  LDCXX="$CXX"
32834  LDEXECXX="$CXX"
32835
32836  # LDEXE is the linker to use, when creating executables.
32837
32838  # Linking C++ libraries.
32839
32840  # Linking C++ executables.
32841
32842
32843  if test "x$OPENJDK_TARGET_OS" != xwindows; then
32844
32845
32846  # Publish this variable in the help.
32847
32848
32849  if test "x$AR" = x; then
32850    # The variable is not set by user, try to locate tool using the code snippet
32851    if test -n "$ac_tool_prefix"; then
32852  for ac_prog in ar
32853  do
32854    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32855set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32857$as_echo_n "checking for $ac_word... " >&6; }
32858if ${ac_cv_prog_AR+:} false; then :
32859  $as_echo_n "(cached) " >&6
32860else
32861  if test -n "$AR"; then
32862  ac_cv_prog_AR="$AR" # Let the user override the test.
32863else
32864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32865for as_dir in $PATH
32866do
32867  IFS=$as_save_IFS
32868  test -z "$as_dir" && as_dir=.
32869    for ac_exec_ext in '' $ac_executable_extensions; do
32870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32871    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32873    break 2
32874  fi
32875done
32876  done
32877IFS=$as_save_IFS
32878
32879fi
32880fi
32881AR=$ac_cv_prog_AR
32882if test -n "$AR"; then
32883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32884$as_echo "$AR" >&6; }
32885else
32886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32887$as_echo "no" >&6; }
32888fi
32889
32890
32891    test -n "$AR" && break
32892  done
32893fi
32894if test -z "$AR"; then
32895  ac_ct_AR=$AR
32896  for ac_prog in ar
32897do
32898  # Extract the first word of "$ac_prog", so it can be a program name with args.
32899set dummy $ac_prog; ac_word=$2
32900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32901$as_echo_n "checking for $ac_word... " >&6; }
32902if ${ac_cv_prog_ac_ct_AR+:} false; then :
32903  $as_echo_n "(cached) " >&6
32904else
32905  if test -n "$ac_ct_AR"; then
32906  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32907else
32908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32909for as_dir in $PATH
32910do
32911  IFS=$as_save_IFS
32912  test -z "$as_dir" && as_dir=.
32913    for ac_exec_ext in '' $ac_executable_extensions; do
32914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32915    ac_cv_prog_ac_ct_AR="$ac_prog"
32916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32917    break 2
32918  fi
32919done
32920  done
32921IFS=$as_save_IFS
32922
32923fi
32924fi
32925ac_ct_AR=$ac_cv_prog_ac_ct_AR
32926if test -n "$ac_ct_AR"; then
32927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32928$as_echo "$ac_ct_AR" >&6; }
32929else
32930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32931$as_echo "no" >&6; }
32932fi
32933
32934
32935  test -n "$ac_ct_AR" && break
32936done
32937
32938  if test "x$ac_ct_AR" = x; then
32939    AR=""
32940  else
32941    case $cross_compiling:$ac_tool_warned in
32942yes:)
32943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32945ac_tool_warned=yes ;;
32946esac
32947    AR=$ac_ct_AR
32948  fi
32949fi
32950
32951  else
32952    # The variable is set, but is it from the command line or the environment?
32953
32954    # Try to remove the string !AR! from our list.
32955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32957      # If it failed, the variable was not from the command line. Ignore it,
32958      # but warn the user (except for BASH, which is always set by the calling BASH).
32959      if test "xAR" != xBASH; then
32960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32961$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32962      fi
32963      # Try to locate tool using the code snippet
32964      if test -n "$ac_tool_prefix"; then
32965  for ac_prog in ar
32966  do
32967    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32968set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32970$as_echo_n "checking for $ac_word... " >&6; }
32971if ${ac_cv_prog_AR+:} false; then :
32972  $as_echo_n "(cached) " >&6
32973else
32974  if test -n "$AR"; then
32975  ac_cv_prog_AR="$AR" # Let the user override the test.
32976else
32977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32978for as_dir in $PATH
32979do
32980  IFS=$as_save_IFS
32981  test -z "$as_dir" && as_dir=.
32982    for ac_exec_ext in '' $ac_executable_extensions; do
32983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32984    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32986    break 2
32987  fi
32988done
32989  done
32990IFS=$as_save_IFS
32991
32992fi
32993fi
32994AR=$ac_cv_prog_AR
32995if test -n "$AR"; then
32996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32997$as_echo "$AR" >&6; }
32998else
32999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33000$as_echo "no" >&6; }
33001fi
33002
33003
33004    test -n "$AR" && break
33005  done
33006fi
33007if test -z "$AR"; then
33008  ac_ct_AR=$AR
33009  for ac_prog in ar
33010do
33011  # Extract the first word of "$ac_prog", so it can be a program name with args.
33012set dummy $ac_prog; ac_word=$2
33013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33014$as_echo_n "checking for $ac_word... " >&6; }
33015if ${ac_cv_prog_ac_ct_AR+:} false; then :
33016  $as_echo_n "(cached) " >&6
33017else
33018  if test -n "$ac_ct_AR"; then
33019  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33020else
33021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33022for as_dir in $PATH
33023do
33024  IFS=$as_save_IFS
33025  test -z "$as_dir" && as_dir=.
33026    for ac_exec_ext in '' $ac_executable_extensions; do
33027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33028    ac_cv_prog_ac_ct_AR="$ac_prog"
33029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33030    break 2
33031  fi
33032done
33033  done
33034IFS=$as_save_IFS
33035
33036fi
33037fi
33038ac_ct_AR=$ac_cv_prog_ac_ct_AR
33039if test -n "$ac_ct_AR"; then
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33041$as_echo "$ac_ct_AR" >&6; }
33042else
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33044$as_echo "no" >&6; }
33045fi
33046
33047
33048  test -n "$ac_ct_AR" && break
33049done
33050
33051  if test "x$ac_ct_AR" = x; then
33052    AR=""
33053  else
33054    case $cross_compiling:$ac_tool_warned in
33055yes:)
33056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33058ac_tool_warned=yes ;;
33059esac
33060    AR=$ac_ct_AR
33061  fi
33062fi
33063
33064    else
33065      # If it succeeded, then it was overridden by the user. We will use it
33066      # for the tool.
33067
33068      # First remove it from the list of overridden variables, so we can test
33069      # for unknown variables in the end.
33070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33071
33072      # Check if the provided tool contains a complete path.
33073      tool_specified="$AR"
33074      tool_basename="${tool_specified##*/}"
33075      if test "x$tool_basename" = "x$tool_specified"; then
33076        # A command without a complete path is provided, search $PATH.
33077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33078$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33079        # Extract the first word of "$tool_basename", so it can be a program name with args.
33080set dummy $tool_basename; ac_word=$2
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33082$as_echo_n "checking for $ac_word... " >&6; }
33083if ${ac_cv_path_AR+:} false; then :
33084  $as_echo_n "(cached) " >&6
33085else
33086  case $AR in
33087  [\\/]* | ?:[\\/]*)
33088  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33089  ;;
33090  *)
33091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33092for as_dir in $PATH
33093do
33094  IFS=$as_save_IFS
33095  test -z "$as_dir" && as_dir=.
33096    for ac_exec_ext in '' $ac_executable_extensions; do
33097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33098    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33100    break 2
33101  fi
33102done
33103  done
33104IFS=$as_save_IFS
33105
33106  ;;
33107esac
33108fi
33109AR=$ac_cv_path_AR
33110if test -n "$AR"; then
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33112$as_echo "$AR" >&6; }
33113else
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33115$as_echo "no" >&6; }
33116fi
33117
33118
33119        if test "x$AR" = x; then
33120          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33121        fi
33122      else
33123        # Otherwise we believe it is a complete path. Use it as it is.
33124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33125$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33127$as_echo_n "checking for AR... " >&6; }
33128        if test ! -x "$tool_specified"; then
33129          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33130$as_echo "not found" >&6; }
33131          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33132        fi
33133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33134$as_echo "$tool_specified" >&6; }
33135      fi
33136    fi
33137  fi
33138
33139
33140
33141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33142
33143  # First separate the path from the arguments. This will split at the first
33144  # space.
33145  complete="$AR"
33146  path="${complete%% *}"
33147  tmp="$complete EOL"
33148  arguments="${tmp#* }"
33149
33150  # Input might be given as Windows format, start by converting to
33151  # unix format.
33152  new_path=`$CYGPATH -u "$path"`
33153
33154  # Now try to locate executable using which
33155  new_path=`$WHICH "$new_path" 2> /dev/null`
33156  # bat and cmd files are not always considered executable in cygwin causing which
33157  # to not find them
33158  if test "x$new_path" = x \
33159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33161    new_path=`$CYGPATH -u "$path"`
33162  fi
33163  if test "x$new_path" = x; then
33164    # Oops. Which didn't find the executable.
33165    # The splitting of arguments from the executable at a space might have been incorrect,
33166    # since paths with space are more likely in Windows. Give it another try with the whole
33167    # argument.
33168    path="$complete"
33169    arguments="EOL"
33170    new_path=`$CYGPATH -u "$path"`
33171    new_path=`$WHICH "$new_path" 2> /dev/null`
33172    # bat and cmd files are not always considered executable in cygwin causing which
33173    # to not find them
33174    if test "x$new_path" = x \
33175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33177      new_path=`$CYGPATH -u "$path"`
33178    fi
33179    if test "x$new_path" = x; then
33180      # It's still not found. Now this is an unrecoverable error.
33181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33182$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33183      has_space=`$ECHO "$complete" | $GREP " "`
33184      if test "x$has_space" != x; then
33185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33187      fi
33188      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33189    fi
33190  fi
33191
33192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33195  # "foo.exe" is OK but "foo" is an error.
33196  #
33197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33198  # It is also a way to make sure we got the proper file name for the real test later on.
33199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33200  if test "x$test_shortpath" = x; then
33201    # Short path failed, file does not exist as specified.
33202    # Try adding .exe or .cmd
33203    if test -f "${new_path}.exe"; then
33204      input_to_shortpath="${new_path}.exe"
33205    elif test -f "${new_path}.cmd"; then
33206      input_to_shortpath="${new_path}.cmd"
33207    else
33208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33209$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33212      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33213    fi
33214  else
33215    input_to_shortpath="$new_path"
33216  fi
33217
33218  # Call helper function which possibly converts this using DOS-style short mode.
33219  # If so, the updated path is stored in $new_path.
33220  new_path="$input_to_shortpath"
33221
33222  input_path="$input_to_shortpath"
33223  # Check if we need to convert this using DOS-style short mode. If the path
33224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33225  # take no chances and rewrite it.
33226  # Note: m4 eats our [], so we need to use [ and ] instead.
33227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33228  if test "x$has_forbidden_chars" != x; then
33229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33233      # Going to short mode and back again did indeed matter. Since short mode is
33234      # case insensitive, let's make it lowercase to improve readability.
33235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33236      # Now convert it back to Unix-stile (cygpath)
33237      input_path=`$CYGPATH -u "$shortmode_path"`
33238      new_path="$input_path"
33239    fi
33240  fi
33241
33242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33243  if test "x$test_cygdrive_prefix" = x; then
33244    # As a simple fix, exclude /usr/bin since it's not a real path.
33245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33247      # a path prefixed by /cygdrive for fixpath to work.
33248      new_path="$CYGWIN_ROOT_PATH$input_path"
33249    fi
33250  fi
33251
33252  # remove trailing .exe if any
33253  new_path="${new_path/%.exe/}"
33254
33255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33256
33257  # First separate the path from the arguments. This will split at the first
33258  # space.
33259  complete="$AR"
33260  path="${complete%% *}"
33261  tmp="$complete EOL"
33262  arguments="${tmp#* }"
33263
33264  # Input might be given as Windows format, start by converting to
33265  # unix format.
33266  new_path="$path"
33267
33268  windows_path="$new_path"
33269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270    unix_path=`$CYGPATH -u "$windows_path"`
33271    new_path="$unix_path"
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33274    new_path="$unix_path"
33275  fi
33276
33277
33278  # Now try to locate executable using which
33279  new_path=`$WHICH "$new_path" 2> /dev/null`
33280
33281  if test "x$new_path" = x; then
33282    # Oops. Which didn't find the executable.
33283    # The splitting of arguments from the executable at a space might have been incorrect,
33284    # since paths with space are more likely in Windows. Give it another try with the whole
33285    # argument.
33286    path="$complete"
33287    arguments="EOL"
33288    new_path="$path"
33289
33290  windows_path="$new_path"
33291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33292    unix_path=`$CYGPATH -u "$windows_path"`
33293    new_path="$unix_path"
33294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33296    new_path="$unix_path"
33297  fi
33298
33299
33300    new_path=`$WHICH "$new_path" 2> /dev/null`
33301
33302    if test "x$new_path" = x; then
33303      # It's still not found. Now this is an unrecoverable error.
33304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33305$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33306      has_space=`$ECHO "$complete" | $GREP " "`
33307      if test "x$has_space" != x; then
33308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33310      fi
33311      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33312    fi
33313  fi
33314
33315  # Now new_path has a complete unix path to the binary
33316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33317    # Keep paths in /bin as-is, but remove trailing .exe if any
33318    new_path="${new_path/%.exe/}"
33319    # Do not save /bin paths to all_fixpath_prefixes!
33320  else
33321    # Not in mixed or Windows style, start by that.
33322    new_path=`cmd //c echo $new_path`
33323
33324  input_path="$new_path"
33325  # Check if we need to convert this using DOS-style short mode. If the path
33326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33327  # take no chances and rewrite it.
33328  # Note: m4 eats our [], so we need to use [ and ] instead.
33329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33330  if test "x$has_forbidden_chars" != x; then
33331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33333  fi
33334
33335    # Output is in $new_path
33336
33337  windows_path="$new_path"
33338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33339    unix_path=`$CYGPATH -u "$windows_path"`
33340    new_path="$unix_path"
33341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33343    new_path="$unix_path"
33344  fi
33345
33346    # remove trailing .exe if any
33347    new_path="${new_path/%.exe/}"
33348
33349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33351  fi
33352
33353  else
33354    # We're on a posix platform. Hooray! :)
33355    # First separate the path from the arguments. This will split at the first
33356    # space.
33357    complete="$AR"
33358    path="${complete%% *}"
33359    tmp="$complete EOL"
33360    arguments="${tmp#* }"
33361
33362    # Cannot rely on the command "which" here since it doesn't always work.
33363    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33364    if test -z "$is_absolute_path"; then
33365      # Path to executable is not absolute. Find it.
33366      IFS_save="$IFS"
33367      IFS=:
33368      for p in $PATH; do
33369        if test -f "$p/$path" && test -x "$p/$path"; then
33370          new_path="$p/$path"
33371          break
33372        fi
33373      done
33374      IFS="$IFS_save"
33375    else
33376      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
33377$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
33378      new_path="$path"
33379    fi
33380
33381    if test "x$new_path" = x; then
33382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33383$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33384      has_space=`$ECHO "$complete" | $GREP " "`
33385      if test "x$has_space" != x; then
33386        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33388      fi
33389      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33390    fi
33391  fi
33392
33393  # Now join together the path and the arguments once again
33394  if test "x$arguments" != xEOL; then
33395    new_complete="$new_path ${arguments% *}"
33396  else
33397    new_complete="$new_path"
33398  fi
33399
33400  if test "x$complete" != "x$new_complete"; then
33401    AR="$new_complete"
33402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33403$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33404  fi
33405
33406  fi
33407  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
33408    ARFLAGS="-r"
33409  elif test "x$OPENJDK_TARGET_OS" = xaix; then
33410    ARFLAGS="-X64"
33411  else
33412    ARFLAGS=""
33413  fi
33414
33415
33416  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
33417  HOTSPOT_CXX="$CXX"
33418  HOTSPOT_LD="$LD"
33419
33420
33421
33422  COMPILER_NAME=gcc
33423  COMPILER_TYPE=CC
33424  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
33425
33426    # For now, assume that we are always compiling using cl.exe.
33427    CC_OUT_OPTION=-Fo
33428    EXE_OUT_OPTION=-out:
33429    LD_OUT_OPTION=-out:
33430    AR_OUT_OPTION=-out:
33431    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
33432    # program for something completely different.
33433    # Extract the first word of "link", so it can be a program name with args.
33434set dummy link; ac_word=$2
33435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33436$as_echo_n "checking for $ac_word... " >&6; }
33437if ${ac_cv_prog_WINLD+:} false; then :
33438  $as_echo_n "(cached) " >&6
33439else
33440  if test -n "$WINLD"; then
33441  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
33442else
33443  ac_prog_rejected=no
33444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33445for as_dir in $PATH
33446do
33447  IFS=$as_save_IFS
33448  test -z "$as_dir" && as_dir=.
33449    for ac_exec_ext in '' $ac_executable_extensions; do
33450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33451    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33452       ac_prog_rejected=yes
33453       continue
33454     fi
33455    ac_cv_prog_WINLD="link"
33456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33457    break 2
33458  fi
33459done
33460  done
33461IFS=$as_save_IFS
33462
33463if test $ac_prog_rejected = yes; then
33464  # We found a bogon in the path, so make sure we never use it.
33465  set dummy $ac_cv_prog_WINLD
33466  shift
33467  if test $# != 0; then
33468    # We chose a different compiler from the bogus one.
33469    # However, it has the same basename, so the bogon will be chosen
33470    # first if we set WINLD to just the basename; use the full file name.
33471    shift
33472    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
33473  fi
33474fi
33475fi
33476fi
33477WINLD=$ac_cv_prog_WINLD
33478if test -n "$WINLD"; then
33479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
33480$as_echo "$WINLD" >&6; }
33481else
33482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33483$as_echo "no" >&6; }
33484fi
33485
33486
33487    # Since we must ignore the first found link, WINLD will contain
33488    # the full path to the link.exe program.
33489
33490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33491
33492  # First separate the path from the arguments. This will split at the first
33493  # space.
33494  complete="$WINLD"
33495  path="${complete%% *}"
33496  tmp="$complete EOL"
33497  arguments="${tmp#* }"
33498
33499  # Input might be given as Windows format, start by converting to
33500  # unix format.
33501  new_path=`$CYGPATH -u "$path"`
33502
33503  # Now try to locate executable using which
33504  new_path=`$WHICH "$new_path" 2> /dev/null`
33505  # bat and cmd files are not always considered executable in cygwin causing which
33506  # to not find them
33507  if test "x$new_path" = x \
33508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33510    new_path=`$CYGPATH -u "$path"`
33511  fi
33512  if test "x$new_path" = x; then
33513    # Oops. Which didn't find the executable.
33514    # The splitting of arguments from the executable at a space might have been incorrect,
33515    # since paths with space are more likely in Windows. Give it another try with the whole
33516    # argument.
33517    path="$complete"
33518    arguments="EOL"
33519    new_path=`$CYGPATH -u "$path"`
33520    new_path=`$WHICH "$new_path" 2> /dev/null`
33521    # bat and cmd files are not always considered executable in cygwin causing which
33522    # to not find them
33523    if test "x$new_path" = x \
33524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33526      new_path=`$CYGPATH -u "$path"`
33527    fi
33528    if test "x$new_path" = x; then
33529      # It's still not found. Now this is an unrecoverable error.
33530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33531$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33532      has_space=`$ECHO "$complete" | $GREP " "`
33533      if test "x$has_space" != x; then
33534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33536      fi
33537      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33538    fi
33539  fi
33540
33541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33544  # "foo.exe" is OK but "foo" is an error.
33545  #
33546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33547  # It is also a way to make sure we got the proper file name for the real test later on.
33548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33549  if test "x$test_shortpath" = x; then
33550    # Short path failed, file does not exist as specified.
33551    # Try adding .exe or .cmd
33552    if test -f "${new_path}.exe"; then
33553      input_to_shortpath="${new_path}.exe"
33554    elif test -f "${new_path}.cmd"; then
33555      input_to_shortpath="${new_path}.cmd"
33556    else
33557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
33558$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
33559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33561      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33562    fi
33563  else
33564    input_to_shortpath="$new_path"
33565  fi
33566
33567  # Call helper function which possibly converts this using DOS-style short mode.
33568  # If so, the updated path is stored in $new_path.
33569  new_path="$input_to_shortpath"
33570
33571  input_path="$input_to_shortpath"
33572  # Check if we need to convert this using DOS-style short mode. If the path
33573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33574  # take no chances and rewrite it.
33575  # Note: m4 eats our [], so we need to use [ and ] instead.
33576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33577  if test "x$has_forbidden_chars" != x; then
33578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33582      # Going to short mode and back again did indeed matter. Since short mode is
33583      # case insensitive, let's make it lowercase to improve readability.
33584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33585      # Now convert it back to Unix-stile (cygpath)
33586      input_path=`$CYGPATH -u "$shortmode_path"`
33587      new_path="$input_path"
33588    fi
33589  fi
33590
33591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33592  if test "x$test_cygdrive_prefix" = x; then
33593    # As a simple fix, exclude /usr/bin since it's not a real path.
33594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33596      # a path prefixed by /cygdrive for fixpath to work.
33597      new_path="$CYGWIN_ROOT_PATH$input_path"
33598    fi
33599  fi
33600
33601  # remove trailing .exe if any
33602  new_path="${new_path/%.exe/}"
33603
33604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33605
33606  # First separate the path from the arguments. This will split at the first
33607  # space.
33608  complete="$WINLD"
33609  path="${complete%% *}"
33610  tmp="$complete EOL"
33611  arguments="${tmp#* }"
33612
33613  # Input might be given as Windows format, start by converting to
33614  # unix format.
33615  new_path="$path"
33616
33617  windows_path="$new_path"
33618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33619    unix_path=`$CYGPATH -u "$windows_path"`
33620    new_path="$unix_path"
33621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33623    new_path="$unix_path"
33624  fi
33625
33626
33627  # Now try to locate executable using which
33628  new_path=`$WHICH "$new_path" 2> /dev/null`
33629
33630  if test "x$new_path" = x; then
33631    # Oops. Which didn't find the executable.
33632    # The splitting of arguments from the executable at a space might have been incorrect,
33633    # since paths with space are more likely in Windows. Give it another try with the whole
33634    # argument.
33635    path="$complete"
33636    arguments="EOL"
33637    new_path="$path"
33638
33639  windows_path="$new_path"
33640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33641    unix_path=`$CYGPATH -u "$windows_path"`
33642    new_path="$unix_path"
33643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33645    new_path="$unix_path"
33646  fi
33647
33648
33649    new_path=`$WHICH "$new_path" 2> /dev/null`
33650
33651    if test "x$new_path" = x; then
33652      # It's still not found. Now this is an unrecoverable error.
33653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33654$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33655      has_space=`$ECHO "$complete" | $GREP " "`
33656      if test "x$has_space" != x; then
33657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33659      fi
33660      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33661    fi
33662  fi
33663
33664  # Now new_path has a complete unix path to the binary
33665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33666    # Keep paths in /bin as-is, but remove trailing .exe if any
33667    new_path="${new_path/%.exe/}"
33668    # Do not save /bin paths to all_fixpath_prefixes!
33669  else
33670    # Not in mixed or Windows style, start by that.
33671    new_path=`cmd //c echo $new_path`
33672
33673  input_path="$new_path"
33674  # Check if we need to convert this using DOS-style short mode. If the path
33675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33676  # take no chances and rewrite it.
33677  # Note: m4 eats our [], so we need to use [ and ] instead.
33678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33679  if test "x$has_forbidden_chars" != x; then
33680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33682  fi
33683
33684    # Output is in $new_path
33685
33686  windows_path="$new_path"
33687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33688    unix_path=`$CYGPATH -u "$windows_path"`
33689    new_path="$unix_path"
33690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33692    new_path="$unix_path"
33693  fi
33694
33695    # remove trailing .exe if any
33696    new_path="${new_path/%.exe/}"
33697
33698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33700  fi
33701
33702  else
33703    # We're on a posix platform. Hooray! :)
33704    # First separate the path from the arguments. This will split at the first
33705    # space.
33706    complete="$WINLD"
33707    path="${complete%% *}"
33708    tmp="$complete EOL"
33709    arguments="${tmp#* }"
33710
33711    # Cannot rely on the command "which" here since it doesn't always work.
33712    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33713    if test -z "$is_absolute_path"; then
33714      # Path to executable is not absolute. Find it.
33715      IFS_save="$IFS"
33716      IFS=:
33717      for p in $PATH; do
33718        if test -f "$p/$path" && test -x "$p/$path"; then
33719          new_path="$p/$path"
33720          break
33721        fi
33722      done
33723      IFS="$IFS_save"
33724    else
33725      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
33726$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
33727      new_path="$path"
33728    fi
33729
33730    if test "x$new_path" = x; then
33731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33732$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33733      has_space=`$ECHO "$complete" | $GREP " "`
33734      if test "x$has_space" != x; then
33735        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33737      fi
33738      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33739    fi
33740  fi
33741
33742  # Now join together the path and the arguments once again
33743  if test "x$arguments" != xEOL; then
33744    new_complete="$new_path ${arguments% *}"
33745  else
33746    new_complete="$new_path"
33747  fi
33748
33749  if test "x$complete" != "x$new_complete"; then
33750    WINLD="$new_complete"
33751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
33752$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
33753  fi
33754
33755    printf "Windows linker was found at $WINLD\n"
33756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33757$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33758    "$WINLD" --version > /dev/null
33759    if test $? -eq 0 ; then
33760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33761$as_echo "no" >&6; }
33762      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33763    else
33764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33765$as_echo "yes" >&6; }
33766    fi
33767    LD="$WINLD"
33768    LDEXE="$WINLD"
33769    LDCXX="$WINLD"
33770    LDEXECXX="$WINLD"
33771
33772    # Extract the first word of "mt", so it can be a program name with args.
33773set dummy mt; ac_word=$2
33774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33775$as_echo_n "checking for $ac_word... " >&6; }
33776if ${ac_cv_prog_MT+:} false; then :
33777  $as_echo_n "(cached) " >&6
33778else
33779  if test -n "$MT"; then
33780  ac_cv_prog_MT="$MT" # Let the user override the test.
33781else
33782  ac_prog_rejected=no
33783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33784for as_dir in $PATH
33785do
33786  IFS=$as_save_IFS
33787  test -z "$as_dir" && as_dir=.
33788    for ac_exec_ext in '' $ac_executable_extensions; do
33789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33790    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33791       ac_prog_rejected=yes
33792       continue
33793     fi
33794    ac_cv_prog_MT="mt"
33795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33796    break 2
33797  fi
33798done
33799  done
33800IFS=$as_save_IFS
33801
33802if test $ac_prog_rejected = yes; then
33803  # We found a bogon in the path, so make sure we never use it.
33804  set dummy $ac_cv_prog_MT
33805  shift
33806  if test $# != 0; then
33807    # We chose a different compiler from the bogus one.
33808    # However, it has the same basename, so the bogon will be chosen
33809    # first if we set MT to just the basename; use the full file name.
33810    shift
33811    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33812  fi
33813fi
33814fi
33815fi
33816MT=$ac_cv_prog_MT
33817if test -n "$MT"; then
33818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33819$as_echo "$MT" >&6; }
33820else
33821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33822$as_echo "no" >&6; }
33823fi
33824
33825
33826
33827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33828
33829  # First separate the path from the arguments. This will split at the first
33830  # space.
33831  complete="$MT"
33832  path="${complete%% *}"
33833  tmp="$complete EOL"
33834  arguments="${tmp#* }"
33835
33836  # Input might be given as Windows format, start by converting to
33837  # unix format.
33838  new_path=`$CYGPATH -u "$path"`
33839
33840  # Now try to locate executable using which
33841  new_path=`$WHICH "$new_path" 2> /dev/null`
33842  # bat and cmd files are not always considered executable in cygwin causing which
33843  # to not find them
33844  if test "x$new_path" = x \
33845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33847    new_path=`$CYGPATH -u "$path"`
33848  fi
33849  if test "x$new_path" = x; then
33850    # Oops. Which didn't find the executable.
33851    # The splitting of arguments from the executable at a space might have been incorrect,
33852    # since paths with space are more likely in Windows. Give it another try with the whole
33853    # argument.
33854    path="$complete"
33855    arguments="EOL"
33856    new_path=`$CYGPATH -u "$path"`
33857    new_path=`$WHICH "$new_path" 2> /dev/null`
33858    # bat and cmd files are not always considered executable in cygwin causing which
33859    # to not find them
33860    if test "x$new_path" = x \
33861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33863      new_path=`$CYGPATH -u "$path"`
33864    fi
33865    if test "x$new_path" = x; then
33866      # It's still not found. Now this is an unrecoverable error.
33867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33868$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33869      has_space=`$ECHO "$complete" | $GREP " "`
33870      if test "x$has_space" != x; then
33871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33873      fi
33874      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33875    fi
33876  fi
33877
33878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33881  # "foo.exe" is OK but "foo" is an error.
33882  #
33883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33884  # It is also a way to make sure we got the proper file name for the real test later on.
33885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33886  if test "x$test_shortpath" = x; then
33887    # Short path failed, file does not exist as specified.
33888    # Try adding .exe or .cmd
33889    if test -f "${new_path}.exe"; then
33890      input_to_shortpath="${new_path}.exe"
33891    elif test -f "${new_path}.cmd"; then
33892      input_to_shortpath="${new_path}.cmd"
33893    else
33894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33895$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33898      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33899    fi
33900  else
33901    input_to_shortpath="$new_path"
33902  fi
33903
33904  # Call helper function which possibly converts this using DOS-style short mode.
33905  # If so, the updated path is stored in $new_path.
33906  new_path="$input_to_shortpath"
33907
33908  input_path="$input_to_shortpath"
33909  # Check if we need to convert this using DOS-style short mode. If the path
33910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33911  # take no chances and rewrite it.
33912  # Note: m4 eats our [], so we need to use [ and ] instead.
33913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33914  if test "x$has_forbidden_chars" != x; then
33915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33919      # Going to short mode and back again did indeed matter. Since short mode is
33920      # case insensitive, let's make it lowercase to improve readability.
33921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33922      # Now convert it back to Unix-stile (cygpath)
33923      input_path=`$CYGPATH -u "$shortmode_path"`
33924      new_path="$input_path"
33925    fi
33926  fi
33927
33928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33929  if test "x$test_cygdrive_prefix" = x; then
33930    # As a simple fix, exclude /usr/bin since it's not a real path.
33931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33933      # a path prefixed by /cygdrive for fixpath to work.
33934      new_path="$CYGWIN_ROOT_PATH$input_path"
33935    fi
33936  fi
33937
33938  # remove trailing .exe if any
33939  new_path="${new_path/%.exe/}"
33940
33941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33942
33943  # First separate the path from the arguments. This will split at the first
33944  # space.
33945  complete="$MT"
33946  path="${complete%% *}"
33947  tmp="$complete EOL"
33948  arguments="${tmp#* }"
33949
33950  # Input might be given as Windows format, start by converting to
33951  # unix format.
33952  new_path="$path"
33953
33954  windows_path="$new_path"
33955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33956    unix_path=`$CYGPATH -u "$windows_path"`
33957    new_path="$unix_path"
33958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33960    new_path="$unix_path"
33961  fi
33962
33963
33964  # Now try to locate executable using which
33965  new_path=`$WHICH "$new_path" 2> /dev/null`
33966
33967  if test "x$new_path" = x; then
33968    # Oops. Which didn't find the executable.
33969    # The splitting of arguments from the executable at a space might have been incorrect,
33970    # since paths with space are more likely in Windows. Give it another try with the whole
33971    # argument.
33972    path="$complete"
33973    arguments="EOL"
33974    new_path="$path"
33975
33976  windows_path="$new_path"
33977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33978    unix_path=`$CYGPATH -u "$windows_path"`
33979    new_path="$unix_path"
33980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33982    new_path="$unix_path"
33983  fi
33984
33985
33986    new_path=`$WHICH "$new_path" 2> /dev/null`
33987
33988    if test "x$new_path" = x; then
33989      # It's still not found. Now this is an unrecoverable error.
33990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33991$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33992      has_space=`$ECHO "$complete" | $GREP " "`
33993      if test "x$has_space" != x; then
33994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33996      fi
33997      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33998    fi
33999  fi
34000
34001  # Now new_path has a complete unix path to the binary
34002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34003    # Keep paths in /bin as-is, but remove trailing .exe if any
34004    new_path="${new_path/%.exe/}"
34005    # Do not save /bin paths to all_fixpath_prefixes!
34006  else
34007    # Not in mixed or Windows style, start by that.
34008    new_path=`cmd //c echo $new_path`
34009
34010  input_path="$new_path"
34011  # Check if we need to convert this using DOS-style short mode. If the path
34012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34013  # take no chances and rewrite it.
34014  # Note: m4 eats our [], so we need to use [ and ] instead.
34015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34016  if test "x$has_forbidden_chars" != x; then
34017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34019  fi
34020
34021    # Output is in $new_path
34022
34023  windows_path="$new_path"
34024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34025    unix_path=`$CYGPATH -u "$windows_path"`
34026    new_path="$unix_path"
34027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34029    new_path="$unix_path"
34030  fi
34031
34032    # remove trailing .exe if any
34033    new_path="${new_path/%.exe/}"
34034
34035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34037  fi
34038
34039  else
34040    # We're on a posix platform. Hooray! :)
34041    # First separate the path from the arguments. This will split at the first
34042    # space.
34043    complete="$MT"
34044    path="${complete%% *}"
34045    tmp="$complete EOL"
34046    arguments="${tmp#* }"
34047
34048    # Cannot rely on the command "which" here since it doesn't always work.
34049    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34050    if test -z "$is_absolute_path"; then
34051      # Path to executable is not absolute. Find it.
34052      IFS_save="$IFS"
34053      IFS=:
34054      for p in $PATH; do
34055        if test -f "$p/$path" && test -x "$p/$path"; then
34056          new_path="$p/$path"
34057          break
34058        fi
34059      done
34060      IFS="$IFS_save"
34061    else
34062      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
34063$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
34064      new_path="$path"
34065    fi
34066
34067    if test "x$new_path" = x; then
34068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34069$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34070      has_space=`$ECHO "$complete" | $GREP " "`
34071      if test "x$has_space" != x; then
34072        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34073$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34074      fi
34075      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34076    fi
34077  fi
34078
34079  # Now join together the path and the arguments once again
34080  if test "x$arguments" != xEOL; then
34081    new_complete="$new_path ${arguments% *}"
34082  else
34083    new_complete="$new_path"
34084  fi
34085
34086  if test "x$complete" != "x$new_complete"; then
34087    MT="$new_complete"
34088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34089$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34090  fi
34091
34092    # The resource compiler
34093    # Extract the first word of "rc", so it can be a program name with args.
34094set dummy rc; ac_word=$2
34095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34096$as_echo_n "checking for $ac_word... " >&6; }
34097if ${ac_cv_prog_RC+:} false; then :
34098  $as_echo_n "(cached) " >&6
34099else
34100  if test -n "$RC"; then
34101  ac_cv_prog_RC="$RC" # Let the user override the test.
34102else
34103  ac_prog_rejected=no
34104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34105for as_dir in $PATH
34106do
34107  IFS=$as_save_IFS
34108  test -z "$as_dir" && as_dir=.
34109    for ac_exec_ext in '' $ac_executable_extensions; do
34110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34111    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34112       ac_prog_rejected=yes
34113       continue
34114     fi
34115    ac_cv_prog_RC="rc"
34116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34117    break 2
34118  fi
34119done
34120  done
34121IFS=$as_save_IFS
34122
34123if test $ac_prog_rejected = yes; then
34124  # We found a bogon in the path, so make sure we never use it.
34125  set dummy $ac_cv_prog_RC
34126  shift
34127  if test $# != 0; then
34128    # We chose a different compiler from the bogus one.
34129    # However, it has the same basename, so the bogon will be chosen
34130    # first if we set RC to just the basename; use the full file name.
34131    shift
34132    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34133  fi
34134fi
34135fi
34136fi
34137RC=$ac_cv_prog_RC
34138if test -n "$RC"; then
34139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34140$as_echo "$RC" >&6; }
34141else
34142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34143$as_echo "no" >&6; }
34144fi
34145
34146
34147
34148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34149
34150  # First separate the path from the arguments. This will split at the first
34151  # space.
34152  complete="$RC"
34153  path="${complete%% *}"
34154  tmp="$complete EOL"
34155  arguments="${tmp#* }"
34156
34157  # Input might be given as Windows format, start by converting to
34158  # unix format.
34159  new_path=`$CYGPATH -u "$path"`
34160
34161  # Now try to locate executable using which
34162  new_path=`$WHICH "$new_path" 2> /dev/null`
34163  # bat and cmd files are not always considered executable in cygwin causing which
34164  # to not find them
34165  if test "x$new_path" = x \
34166      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34167      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34168    new_path=`$CYGPATH -u "$path"`
34169  fi
34170  if test "x$new_path" = x; then
34171    # Oops. Which didn't find the executable.
34172    # The splitting of arguments from the executable at a space might have been incorrect,
34173    # since paths with space are more likely in Windows. Give it another try with the whole
34174    # argument.
34175    path="$complete"
34176    arguments="EOL"
34177    new_path=`$CYGPATH -u "$path"`
34178    new_path=`$WHICH "$new_path" 2> /dev/null`
34179    # bat and cmd files are not always considered executable in cygwin causing which
34180    # to not find them
34181    if test "x$new_path" = x \
34182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34184      new_path=`$CYGPATH -u "$path"`
34185    fi
34186    if test "x$new_path" = x; then
34187      # It's still not found. Now this is an unrecoverable error.
34188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34189$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34190      has_space=`$ECHO "$complete" | $GREP " "`
34191      if test "x$has_space" != x; then
34192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34194      fi
34195      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34196    fi
34197  fi
34198
34199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34202  # "foo.exe" is OK but "foo" is an error.
34203  #
34204  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34205  # It is also a way to make sure we got the proper file name for the real test later on.
34206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34207  if test "x$test_shortpath" = x; then
34208    # Short path failed, file does not exist as specified.
34209    # Try adding .exe or .cmd
34210    if test -f "${new_path}.exe"; then
34211      input_to_shortpath="${new_path}.exe"
34212    elif test -f "${new_path}.cmd"; then
34213      input_to_shortpath="${new_path}.cmd"
34214    else
34215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34216$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34219      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34220    fi
34221  else
34222    input_to_shortpath="$new_path"
34223  fi
34224
34225  # Call helper function which possibly converts this using DOS-style short mode.
34226  # If so, the updated path is stored in $new_path.
34227  new_path="$input_to_shortpath"
34228
34229  input_path="$input_to_shortpath"
34230  # Check if we need to convert this using DOS-style short mode. If the path
34231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34232  # take no chances and rewrite it.
34233  # Note: m4 eats our [], so we need to use [ and ] instead.
34234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34235  if test "x$has_forbidden_chars" != x; then
34236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34240      # Going to short mode and back again did indeed matter. Since short mode is
34241      # case insensitive, let's make it lowercase to improve readability.
34242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34243      # Now convert it back to Unix-stile (cygpath)
34244      input_path=`$CYGPATH -u "$shortmode_path"`
34245      new_path="$input_path"
34246    fi
34247  fi
34248
34249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34250  if test "x$test_cygdrive_prefix" = x; then
34251    # As a simple fix, exclude /usr/bin since it's not a real path.
34252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34254      # a path prefixed by /cygdrive for fixpath to work.
34255      new_path="$CYGWIN_ROOT_PATH$input_path"
34256    fi
34257  fi
34258
34259  # remove trailing .exe if any
34260  new_path="${new_path/%.exe/}"
34261
34262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34263
34264  # First separate the path from the arguments. This will split at the first
34265  # space.
34266  complete="$RC"
34267  path="${complete%% *}"
34268  tmp="$complete EOL"
34269  arguments="${tmp#* }"
34270
34271  # Input might be given as Windows format, start by converting to
34272  # unix format.
34273  new_path="$path"
34274
34275  windows_path="$new_path"
34276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34277    unix_path=`$CYGPATH -u "$windows_path"`
34278    new_path="$unix_path"
34279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34281    new_path="$unix_path"
34282  fi
34283
34284
34285  # Now try to locate executable using which
34286  new_path=`$WHICH "$new_path" 2> /dev/null`
34287
34288  if test "x$new_path" = x; then
34289    # Oops. Which didn't find the executable.
34290    # The splitting of arguments from the executable at a space might have been incorrect,
34291    # since paths with space are more likely in Windows. Give it another try with the whole
34292    # argument.
34293    path="$complete"
34294    arguments="EOL"
34295    new_path="$path"
34296
34297  windows_path="$new_path"
34298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34299    unix_path=`$CYGPATH -u "$windows_path"`
34300    new_path="$unix_path"
34301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34303    new_path="$unix_path"
34304  fi
34305
34306
34307    new_path=`$WHICH "$new_path" 2> /dev/null`
34308
34309    if test "x$new_path" = x; then
34310      # It's still not found. Now this is an unrecoverable error.
34311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34312$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34313      has_space=`$ECHO "$complete" | $GREP " "`
34314      if test "x$has_space" != x; then
34315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34317      fi
34318      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34319    fi
34320  fi
34321
34322  # Now new_path has a complete unix path to the binary
34323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34324    # Keep paths in /bin as-is, but remove trailing .exe if any
34325    new_path="${new_path/%.exe/}"
34326    # Do not save /bin paths to all_fixpath_prefixes!
34327  else
34328    # Not in mixed or Windows style, start by that.
34329    new_path=`cmd //c echo $new_path`
34330
34331  input_path="$new_path"
34332  # Check if we need to convert this using DOS-style short mode. If the path
34333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34334  # take no chances and rewrite it.
34335  # Note: m4 eats our [], so we need to use [ and ] instead.
34336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34337  if test "x$has_forbidden_chars" != x; then
34338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34340  fi
34341
34342    # Output is in $new_path
34343
34344  windows_path="$new_path"
34345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34346    unix_path=`$CYGPATH -u "$windows_path"`
34347    new_path="$unix_path"
34348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34350    new_path="$unix_path"
34351  fi
34352
34353    # remove trailing .exe if any
34354    new_path="${new_path/%.exe/}"
34355
34356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34358  fi
34359
34360  else
34361    # We're on a posix platform. Hooray! :)
34362    # First separate the path from the arguments. This will split at the first
34363    # space.
34364    complete="$RC"
34365    path="${complete%% *}"
34366    tmp="$complete EOL"
34367    arguments="${tmp#* }"
34368
34369    # Cannot rely on the command "which" here since it doesn't always work.
34370    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34371    if test -z "$is_absolute_path"; then
34372      # Path to executable is not absolute. Find it.
34373      IFS_save="$IFS"
34374      IFS=:
34375      for p in $PATH; do
34376        if test -f "$p/$path" && test -x "$p/$path"; then
34377          new_path="$p/$path"
34378          break
34379        fi
34380      done
34381      IFS="$IFS_save"
34382    else
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
34384$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
34385      new_path="$path"
34386    fi
34387
34388    if test "x$new_path" = x; then
34389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34390$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34391      has_space=`$ECHO "$complete" | $GREP " "`
34392      if test "x$has_space" != x; then
34393        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34395      fi
34396      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34397    fi
34398  fi
34399
34400  # Now join together the path and the arguments once again
34401  if test "x$arguments" != xEOL; then
34402    new_complete="$new_path ${arguments% *}"
34403  else
34404    new_complete="$new_path"
34405  fi
34406
34407  if test "x$complete" != "x$new_complete"; then
34408    RC="$new_complete"
34409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34410$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34411  fi
34412
34413
34414    # For hotspot, we need these in Windows mixed path,
34415    # so rewrite them all. Need added .exe suffix.
34416    HOTSPOT_CXX="$CXX.exe"
34417    HOTSPOT_LD="$LD.exe"
34418    HOTSPOT_MT="$MT.exe"
34419    HOTSPOT_RC="$RC.exe"
34420
34421  unix_path="$HOTSPOT_CXX"
34422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34423    windows_path=`$CYGPATH -m "$unix_path"`
34424    HOTSPOT_CXX="$windows_path"
34425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34426    windows_path=`cmd //c echo $unix_path`
34427    HOTSPOT_CXX="$windows_path"
34428  fi
34429
34430
34431  unix_path="$HOTSPOT_LD"
34432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34433    windows_path=`$CYGPATH -m "$unix_path"`
34434    HOTSPOT_LD="$windows_path"
34435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34436    windows_path=`cmd //c echo $unix_path`
34437    HOTSPOT_LD="$windows_path"
34438  fi
34439
34440
34441  unix_path="$HOTSPOT_MT"
34442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34443    windows_path=`$CYGPATH -m "$unix_path"`
34444    HOTSPOT_MT="$windows_path"
34445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34446    windows_path=`cmd //c echo $unix_path`
34447    HOTSPOT_MT="$windows_path"
34448  fi
34449
34450
34451  unix_path="$HOTSPOT_RC"
34452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34453    windows_path=`$CYGPATH -m "$unix_path"`
34454    HOTSPOT_RC="$windows_path"
34455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34456    windows_path=`cmd //c echo $unix_path`
34457    HOTSPOT_RC="$windows_path"
34458  fi
34459
34460
34461
34462
34463    RC_FLAGS="-nologo -l 0x409 -r"
34464    if test "x$VARIANT" = xOPT; then :
34465
34466    RC_FLAGS="$RC_FLAGS -d NDEBUG"
34467
34468fi
34469
34470  # The version variables used to create RC_FLAGS may be overridden
34471  # in a custom configure script, or possibly the command line.
34472  # Let those variables be expanded at make time in spec.gmk.
34473  # The \$ are escaped to the shell, and the $(...) variables
34474  # are evaluated by make.
34475  RC_FLAGS="$RC_FLAGS \
34476      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
34477      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
34478      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
34479      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
34480      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
34481      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
34482      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
34483
34484  # lib.exe is used to create static libraries.
34485  # Extract the first word of "lib", so it can be a program name with args.
34486set dummy lib; ac_word=$2
34487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34488$as_echo_n "checking for $ac_word... " >&6; }
34489if ${ac_cv_prog_WINAR+:} false; then :
34490  $as_echo_n "(cached) " >&6
34491else
34492  if test -n "$WINAR"; then
34493  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
34494else
34495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34496for as_dir in $PATH
34497do
34498  IFS=$as_save_IFS
34499  test -z "$as_dir" && as_dir=.
34500    for ac_exec_ext in '' $ac_executable_extensions; do
34501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34502    ac_cv_prog_WINAR="lib"
34503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34504    break 2
34505  fi
34506done
34507  done
34508IFS=$as_save_IFS
34509
34510fi
34511fi
34512WINAR=$ac_cv_prog_WINAR
34513if test -n "$WINAR"; then
34514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
34515$as_echo "$WINAR" >&6; }
34516else
34517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34518$as_echo "no" >&6; }
34519fi
34520
34521
34522
34523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524
34525  # First separate the path from the arguments. This will split at the first
34526  # space.
34527  complete="$WINAR"
34528  path="${complete%% *}"
34529  tmp="$complete EOL"
34530  arguments="${tmp#* }"
34531
34532  # Input might be given as Windows format, start by converting to
34533  # unix format.
34534  new_path=`$CYGPATH -u "$path"`
34535
34536  # Now try to locate executable using which
34537  new_path=`$WHICH "$new_path" 2> /dev/null`
34538  # bat and cmd files are not always considered executable in cygwin causing which
34539  # to not find them
34540  if test "x$new_path" = x \
34541      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34542      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34543    new_path=`$CYGPATH -u "$path"`
34544  fi
34545  if test "x$new_path" = x; then
34546    # Oops. Which didn't find the executable.
34547    # The splitting of arguments from the executable at a space might have been incorrect,
34548    # since paths with space are more likely in Windows. Give it another try with the whole
34549    # argument.
34550    path="$complete"
34551    arguments="EOL"
34552    new_path=`$CYGPATH -u "$path"`
34553    new_path=`$WHICH "$new_path" 2> /dev/null`
34554    # bat and cmd files are not always considered executable in cygwin causing which
34555    # to not find them
34556    if test "x$new_path" = x \
34557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34559      new_path=`$CYGPATH -u "$path"`
34560    fi
34561    if test "x$new_path" = x; then
34562      # It's still not found. Now this is an unrecoverable error.
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34564$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34565      has_space=`$ECHO "$complete" | $GREP " "`
34566      if test "x$has_space" != x; then
34567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34569      fi
34570      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34571    fi
34572  fi
34573
34574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34577  # "foo.exe" is OK but "foo" is an error.
34578  #
34579  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34580  # It is also a way to make sure we got the proper file name for the real test later on.
34581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34582  if test "x$test_shortpath" = x; then
34583    # Short path failed, file does not exist as specified.
34584    # Try adding .exe or .cmd
34585    if test -f "${new_path}.exe"; then
34586      input_to_shortpath="${new_path}.exe"
34587    elif test -f "${new_path}.cmd"; then
34588      input_to_shortpath="${new_path}.cmd"
34589    else
34590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
34591$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
34592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34594      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34595    fi
34596  else
34597    input_to_shortpath="$new_path"
34598  fi
34599
34600  # Call helper function which possibly converts this using DOS-style short mode.
34601  # If so, the updated path is stored in $new_path.
34602  new_path="$input_to_shortpath"
34603
34604  input_path="$input_to_shortpath"
34605  # Check if we need to convert this using DOS-style short mode. If the path
34606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34607  # take no chances and rewrite it.
34608  # Note: m4 eats our [], so we need to use [ and ] instead.
34609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34610  if test "x$has_forbidden_chars" != x; then
34611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34615      # Going to short mode and back again did indeed matter. Since short mode is
34616      # case insensitive, let's make it lowercase to improve readability.
34617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34618      # Now convert it back to Unix-stile (cygpath)
34619      input_path=`$CYGPATH -u "$shortmode_path"`
34620      new_path="$input_path"
34621    fi
34622  fi
34623
34624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34625  if test "x$test_cygdrive_prefix" = x; then
34626    # As a simple fix, exclude /usr/bin since it's not a real path.
34627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34629      # a path prefixed by /cygdrive for fixpath to work.
34630      new_path="$CYGWIN_ROOT_PATH$input_path"
34631    fi
34632  fi
34633
34634  # remove trailing .exe if any
34635  new_path="${new_path/%.exe/}"
34636
34637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34638
34639  # First separate the path from the arguments. This will split at the first
34640  # space.
34641  complete="$WINAR"
34642  path="${complete%% *}"
34643  tmp="$complete EOL"
34644  arguments="${tmp#* }"
34645
34646  # Input might be given as Windows format, start by converting to
34647  # unix format.
34648  new_path="$path"
34649
34650  windows_path="$new_path"
34651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34652    unix_path=`$CYGPATH -u "$windows_path"`
34653    new_path="$unix_path"
34654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34656    new_path="$unix_path"
34657  fi
34658
34659
34660  # Now try to locate executable using which
34661  new_path=`$WHICH "$new_path" 2> /dev/null`
34662
34663  if test "x$new_path" = x; then
34664    # Oops. Which didn't find the executable.
34665    # The splitting of arguments from the executable at a space might have been incorrect,
34666    # since paths with space are more likely in Windows. Give it another try with the whole
34667    # argument.
34668    path="$complete"
34669    arguments="EOL"
34670    new_path="$path"
34671
34672  windows_path="$new_path"
34673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34674    unix_path=`$CYGPATH -u "$windows_path"`
34675    new_path="$unix_path"
34676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34678    new_path="$unix_path"
34679  fi
34680
34681
34682    new_path=`$WHICH "$new_path" 2> /dev/null`
34683
34684    if test "x$new_path" = x; then
34685      # It's still not found. Now this is an unrecoverable error.
34686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34687$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34688      has_space=`$ECHO "$complete" | $GREP " "`
34689      if test "x$has_space" != x; then
34690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34692      fi
34693      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34694    fi
34695  fi
34696
34697  # Now new_path has a complete unix path to the binary
34698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34699    # Keep paths in /bin as-is, but remove trailing .exe if any
34700    new_path="${new_path/%.exe/}"
34701    # Do not save /bin paths to all_fixpath_prefixes!
34702  else
34703    # Not in mixed or Windows style, start by that.
34704    new_path=`cmd //c echo $new_path`
34705
34706  input_path="$new_path"
34707  # Check if we need to convert this using DOS-style short mode. If the path
34708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34709  # take no chances and rewrite it.
34710  # Note: m4 eats our [], so we need to use [ and ] instead.
34711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34712  if test "x$has_forbidden_chars" != x; then
34713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34715  fi
34716
34717    # Output is in $new_path
34718
34719  windows_path="$new_path"
34720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34721    unix_path=`$CYGPATH -u "$windows_path"`
34722    new_path="$unix_path"
34723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34725    new_path="$unix_path"
34726  fi
34727
34728    # remove trailing .exe if any
34729    new_path="${new_path/%.exe/}"
34730
34731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34733  fi
34734
34735  else
34736    # We're on a posix platform. Hooray! :)
34737    # First separate the path from the arguments. This will split at the first
34738    # space.
34739    complete="$WINAR"
34740    path="${complete%% *}"
34741    tmp="$complete EOL"
34742    arguments="${tmp#* }"
34743
34744    # Cannot rely on the command "which" here since it doesn't always work.
34745    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34746    if test -z "$is_absolute_path"; then
34747      # Path to executable is not absolute. Find it.
34748      IFS_save="$IFS"
34749      IFS=:
34750      for p in $PATH; do
34751        if test -f "$p/$path" && test -x "$p/$path"; then
34752          new_path="$p/$path"
34753          break
34754        fi
34755      done
34756      IFS="$IFS_save"
34757    else
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
34759$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
34760      new_path="$path"
34761    fi
34762
34763    if test "x$new_path" = x; then
34764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34765$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34766      has_space=`$ECHO "$complete" | $GREP " "`
34767      if test "x$has_space" != x; then
34768        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34770      fi
34771      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34772    fi
34773  fi
34774
34775  # Now join together the path and the arguments once again
34776  if test "x$arguments" != xEOL; then
34777    new_complete="$new_path ${arguments% *}"
34778  else
34779    new_complete="$new_path"
34780  fi
34781
34782  if test "x$complete" != "x$new_complete"; then
34783    WINAR="$new_complete"
34784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
34785$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
34786  fi
34787
34788  AR="$WINAR"
34789  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
34790
34791  # Extract the first word of "dumpbin", so it can be a program name with args.
34792set dummy dumpbin; ac_word=$2
34793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34794$as_echo_n "checking for $ac_word... " >&6; }
34795if ${ac_cv_prog_DUMPBIN+:} false; then :
34796  $as_echo_n "(cached) " >&6
34797else
34798  if test -n "$DUMPBIN"; then
34799  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34800else
34801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34802for as_dir in $PATH
34803do
34804  IFS=$as_save_IFS
34805  test -z "$as_dir" && as_dir=.
34806    for ac_exec_ext in '' $ac_executable_extensions; do
34807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34808    ac_cv_prog_DUMPBIN="dumpbin"
34809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34810    break 2
34811  fi
34812done
34813  done
34814IFS=$as_save_IFS
34815
34816fi
34817fi
34818DUMPBIN=$ac_cv_prog_DUMPBIN
34819if test -n "$DUMPBIN"; then
34820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34821$as_echo "$DUMPBIN" >&6; }
34822else
34823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34824$as_echo "no" >&6; }
34825fi
34826
34827
34828
34829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34830
34831  # First separate the path from the arguments. This will split at the first
34832  # space.
34833  complete="$DUMPBIN"
34834  path="${complete%% *}"
34835  tmp="$complete EOL"
34836  arguments="${tmp#* }"
34837
34838  # Input might be given as Windows format, start by converting to
34839  # unix format.
34840  new_path=`$CYGPATH -u "$path"`
34841
34842  # Now try to locate executable using which
34843  new_path=`$WHICH "$new_path" 2> /dev/null`
34844  # bat and cmd files are not always considered executable in cygwin causing which
34845  # to not find them
34846  if test "x$new_path" = x \
34847      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34848      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34849    new_path=`$CYGPATH -u "$path"`
34850  fi
34851  if test "x$new_path" = x; then
34852    # Oops. Which didn't find the executable.
34853    # The splitting of arguments from the executable at a space might have been incorrect,
34854    # since paths with space are more likely in Windows. Give it another try with the whole
34855    # argument.
34856    path="$complete"
34857    arguments="EOL"
34858    new_path=`$CYGPATH -u "$path"`
34859    new_path=`$WHICH "$new_path" 2> /dev/null`
34860    # bat and cmd files are not always considered executable in cygwin causing which
34861    # to not find them
34862    if test "x$new_path" = x \
34863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34865      new_path=`$CYGPATH -u "$path"`
34866    fi
34867    if test "x$new_path" = x; then
34868      # It's still not found. Now this is an unrecoverable error.
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34870$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34871      has_space=`$ECHO "$complete" | $GREP " "`
34872      if test "x$has_space" != x; then
34873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34875      fi
34876      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34877    fi
34878  fi
34879
34880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34883  # "foo.exe" is OK but "foo" is an error.
34884  #
34885  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34886  # It is also a way to make sure we got the proper file name for the real test later on.
34887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34888  if test "x$test_shortpath" = x; then
34889    # Short path failed, file does not exist as specified.
34890    # Try adding .exe or .cmd
34891    if test -f "${new_path}.exe"; then
34892      input_to_shortpath="${new_path}.exe"
34893    elif test -f "${new_path}.cmd"; then
34894      input_to_shortpath="${new_path}.cmd"
34895    else
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34897$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34899$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34900      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34901    fi
34902  else
34903    input_to_shortpath="$new_path"
34904  fi
34905
34906  # Call helper function which possibly converts this using DOS-style short mode.
34907  # If so, the updated path is stored in $new_path.
34908  new_path="$input_to_shortpath"
34909
34910  input_path="$input_to_shortpath"
34911  # Check if we need to convert this using DOS-style short mode. If the path
34912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34913  # take no chances and rewrite it.
34914  # Note: m4 eats our [], so we need to use [ and ] instead.
34915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34916  if test "x$has_forbidden_chars" != x; then
34917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34921      # Going to short mode and back again did indeed matter. Since short mode is
34922      # case insensitive, let's make it lowercase to improve readability.
34923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34924      # Now convert it back to Unix-stile (cygpath)
34925      input_path=`$CYGPATH -u "$shortmode_path"`
34926      new_path="$input_path"
34927    fi
34928  fi
34929
34930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34931  if test "x$test_cygdrive_prefix" = x; then
34932    # As a simple fix, exclude /usr/bin since it's not a real path.
34933    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34935      # a path prefixed by /cygdrive for fixpath to work.
34936      new_path="$CYGWIN_ROOT_PATH$input_path"
34937    fi
34938  fi
34939
34940  # remove trailing .exe if any
34941  new_path="${new_path/%.exe/}"
34942
34943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34944
34945  # First separate the path from the arguments. This will split at the first
34946  # space.
34947  complete="$DUMPBIN"
34948  path="${complete%% *}"
34949  tmp="$complete EOL"
34950  arguments="${tmp#* }"
34951
34952  # Input might be given as Windows format, start by converting to
34953  # unix format.
34954  new_path="$path"
34955
34956  windows_path="$new_path"
34957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34958    unix_path=`$CYGPATH -u "$windows_path"`
34959    new_path="$unix_path"
34960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34962    new_path="$unix_path"
34963  fi
34964
34965
34966  # Now try to locate executable using which
34967  new_path=`$WHICH "$new_path" 2> /dev/null`
34968
34969  if test "x$new_path" = x; then
34970    # Oops. Which didn't find the executable.
34971    # The splitting of arguments from the executable at a space might have been incorrect,
34972    # since paths with space are more likely in Windows. Give it another try with the whole
34973    # argument.
34974    path="$complete"
34975    arguments="EOL"
34976    new_path="$path"
34977
34978  windows_path="$new_path"
34979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34980    unix_path=`$CYGPATH -u "$windows_path"`
34981    new_path="$unix_path"
34982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34984    new_path="$unix_path"
34985  fi
34986
34987
34988    new_path=`$WHICH "$new_path" 2> /dev/null`
34989
34990    if test "x$new_path" = x; then
34991      # It's still not found. Now this is an unrecoverable error.
34992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34993$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34994      has_space=`$ECHO "$complete" | $GREP " "`
34995      if test "x$has_space" != x; then
34996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34998      fi
34999      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35000    fi
35001  fi
35002
35003  # Now new_path has a complete unix path to the binary
35004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35005    # Keep paths in /bin as-is, but remove trailing .exe if any
35006    new_path="${new_path/%.exe/}"
35007    # Do not save /bin paths to all_fixpath_prefixes!
35008  else
35009    # Not in mixed or Windows style, start by that.
35010    new_path=`cmd //c echo $new_path`
35011
35012  input_path="$new_path"
35013  # Check if we need to convert this using DOS-style short mode. If the path
35014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35015  # take no chances and rewrite it.
35016  # Note: m4 eats our [], so we need to use [ and ] instead.
35017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35018  if test "x$has_forbidden_chars" != x; then
35019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35021  fi
35022
35023    # Output is in $new_path
35024
35025  windows_path="$new_path"
35026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35027    unix_path=`$CYGPATH -u "$windows_path"`
35028    new_path="$unix_path"
35029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35031    new_path="$unix_path"
35032  fi
35033
35034    # remove trailing .exe if any
35035    new_path="${new_path/%.exe/}"
35036
35037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35039  fi
35040
35041  else
35042    # We're on a posix platform. Hooray! :)
35043    # First separate the path from the arguments. This will split at the first
35044    # space.
35045    complete="$DUMPBIN"
35046    path="${complete%% *}"
35047    tmp="$complete EOL"
35048    arguments="${tmp#* }"
35049
35050    # Cannot rely on the command "which" here since it doesn't always work.
35051    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35052    if test -z "$is_absolute_path"; then
35053      # Path to executable is not absolute. Find it.
35054      IFS_save="$IFS"
35055      IFS=:
35056      for p in $PATH; do
35057        if test -f "$p/$path" && test -x "$p/$path"; then
35058          new_path="$p/$path"
35059          break
35060        fi
35061      done
35062      IFS="$IFS_save"
35063    else
35064      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
35065$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
35066      new_path="$path"
35067    fi
35068
35069    if test "x$new_path" = x; then
35070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35071$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35072      has_space=`$ECHO "$complete" | $GREP " "`
35073      if test "x$has_space" != x; then
35074        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35076      fi
35077      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35078    fi
35079  fi
35080
35081  # Now join together the path and the arguments once again
35082  if test "x$arguments" != xEOL; then
35083    new_complete="$new_path ${arguments% *}"
35084  else
35085    new_complete="$new_path"
35086  fi
35087
35088  if test "x$complete" != "x$new_complete"; then
35089    DUMPBIN="$new_complete"
35090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35091$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35092  fi
35093
35094
35095      COMPILER_TYPE=CL
35096      CCXXFLAGS="$CCXXFLAGS -nologo"
35097
35098fi
35099
35100
35101
35102  ac_ext=c
35103ac_cpp='$CPP $CPPFLAGS'
35104ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35105ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35106ac_compiler_gnu=$ac_cv_c_compiler_gnu
35107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35108$as_echo_n "checking how to run the C preprocessor... " >&6; }
35109# On Suns, sometimes $CPP names a directory.
35110if test -n "$CPP" && test -d "$CPP"; then
35111  CPP=
35112fi
35113if test -z "$CPP"; then
35114  if ${ac_cv_prog_CPP+:} false; then :
35115  $as_echo_n "(cached) " >&6
35116else
35117      # Double quotes because CPP needs to be expanded
35118    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35119    do
35120      ac_preproc_ok=false
35121for ac_c_preproc_warn_flag in '' yes
35122do
35123  # Use a header file that comes with gcc, so configuring glibc
35124  # with a fresh cross-compiler works.
35125  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35126  # <limits.h> exists even on freestanding compilers.
35127  # On the NeXT, cc -E runs the code through the compiler's parser,
35128  # not just through cpp. "Syntax error" is here to catch this case.
35129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35130/* end confdefs.h.  */
35131#ifdef __STDC__
35132# include <limits.h>
35133#else
35134# include <assert.h>
35135#endif
35136		     Syntax error
35137_ACEOF
35138if ac_fn_c_try_cpp "$LINENO"; then :
35139
35140else
35141  # Broken: fails on valid input.
35142continue
35143fi
35144rm -f conftest.err conftest.i conftest.$ac_ext
35145
35146  # OK, works on sane cases.  Now check whether nonexistent headers
35147  # can be detected and how.
35148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35149/* end confdefs.h.  */
35150#include <ac_nonexistent.h>
35151_ACEOF
35152if ac_fn_c_try_cpp "$LINENO"; then :
35153  # Broken: success on invalid input.
35154continue
35155else
35156  # Passes both tests.
35157ac_preproc_ok=:
35158break
35159fi
35160rm -f conftest.err conftest.i conftest.$ac_ext
35161
35162done
35163# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35164rm -f conftest.i conftest.err conftest.$ac_ext
35165if $ac_preproc_ok; then :
35166  break
35167fi
35168
35169    done
35170    ac_cv_prog_CPP=$CPP
35171
35172fi
35173  CPP=$ac_cv_prog_CPP
35174else
35175  ac_cv_prog_CPP=$CPP
35176fi
35177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35178$as_echo "$CPP" >&6; }
35179ac_preproc_ok=false
35180for ac_c_preproc_warn_flag in '' yes
35181do
35182  # Use a header file that comes with gcc, so configuring glibc
35183  # with a fresh cross-compiler works.
35184  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35185  # <limits.h> exists even on freestanding compilers.
35186  # On the NeXT, cc -E runs the code through the compiler's parser,
35187  # not just through cpp. "Syntax error" is here to catch this case.
35188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35189/* end confdefs.h.  */
35190#ifdef __STDC__
35191# include <limits.h>
35192#else
35193# include <assert.h>
35194#endif
35195		     Syntax error
35196_ACEOF
35197if ac_fn_c_try_cpp "$LINENO"; then :
35198
35199else
35200  # Broken: fails on valid input.
35201continue
35202fi
35203rm -f conftest.err conftest.i conftest.$ac_ext
35204
35205  # OK, works on sane cases.  Now check whether nonexistent headers
35206  # can be detected and how.
35207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35208/* end confdefs.h.  */
35209#include <ac_nonexistent.h>
35210_ACEOF
35211if ac_fn_c_try_cpp "$LINENO"; then :
35212  # Broken: success on invalid input.
35213continue
35214else
35215  # Passes both tests.
35216ac_preproc_ok=:
35217break
35218fi
35219rm -f conftest.err conftest.i conftest.$ac_ext
35220
35221done
35222# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35223rm -f conftest.i conftest.err conftest.$ac_ext
35224if $ac_preproc_ok; then :
35225
35226else
35227  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35229as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35230See \`config.log' for more details" "$LINENO" 5; }
35231fi
35232
35233ac_ext=cpp
35234ac_cpp='$CXXCPP $CPPFLAGS'
35235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35238
35239
35240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35241
35242  # First separate the path from the arguments. This will split at the first
35243  # space.
35244  complete="$CPP"
35245  path="${complete%% *}"
35246  tmp="$complete EOL"
35247  arguments="${tmp#* }"
35248
35249  # Input might be given as Windows format, start by converting to
35250  # unix format.
35251  new_path=`$CYGPATH -u "$path"`
35252
35253  # Now try to locate executable using which
35254  new_path=`$WHICH "$new_path" 2> /dev/null`
35255  # bat and cmd files are not always considered executable in cygwin causing which
35256  # to not find them
35257  if test "x$new_path" = x \
35258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35260    new_path=`$CYGPATH -u "$path"`
35261  fi
35262  if test "x$new_path" = x; then
35263    # Oops. Which didn't find the executable.
35264    # The splitting of arguments from the executable at a space might have been incorrect,
35265    # since paths with space are more likely in Windows. Give it another try with the whole
35266    # argument.
35267    path="$complete"
35268    arguments="EOL"
35269    new_path=`$CYGPATH -u "$path"`
35270    new_path=`$WHICH "$new_path" 2> /dev/null`
35271    # bat and cmd files are not always considered executable in cygwin causing which
35272    # to not find them
35273    if test "x$new_path" = x \
35274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35276      new_path=`$CYGPATH -u "$path"`
35277    fi
35278    if test "x$new_path" = x; then
35279      # It's still not found. Now this is an unrecoverable error.
35280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35281$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35282      has_space=`$ECHO "$complete" | $GREP " "`
35283      if test "x$has_space" != x; then
35284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35286      fi
35287      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35288    fi
35289  fi
35290
35291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35294  # "foo.exe" is OK but "foo" is an error.
35295  #
35296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35297  # It is also a way to make sure we got the proper file name for the real test later on.
35298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35299  if test "x$test_shortpath" = x; then
35300    # Short path failed, file does not exist as specified.
35301    # Try adding .exe or .cmd
35302    if test -f "${new_path}.exe"; then
35303      input_to_shortpath="${new_path}.exe"
35304    elif test -f "${new_path}.cmd"; then
35305      input_to_shortpath="${new_path}.cmd"
35306    else
35307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35308$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35311      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35312    fi
35313  else
35314    input_to_shortpath="$new_path"
35315  fi
35316
35317  # Call helper function which possibly converts this using DOS-style short mode.
35318  # If so, the updated path is stored in $new_path.
35319  new_path="$input_to_shortpath"
35320
35321  input_path="$input_to_shortpath"
35322  # Check if we need to convert this using DOS-style short mode. If the path
35323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35324  # take no chances and rewrite it.
35325  # Note: m4 eats our [], so we need to use [ and ] instead.
35326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35327  if test "x$has_forbidden_chars" != x; then
35328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35332      # Going to short mode and back again did indeed matter. Since short mode is
35333      # case insensitive, let's make it lowercase to improve readability.
35334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35335      # Now convert it back to Unix-stile (cygpath)
35336      input_path=`$CYGPATH -u "$shortmode_path"`
35337      new_path="$input_path"
35338    fi
35339  fi
35340
35341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35342  if test "x$test_cygdrive_prefix" = x; then
35343    # As a simple fix, exclude /usr/bin since it's not a real path.
35344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35346      # a path prefixed by /cygdrive for fixpath to work.
35347      new_path="$CYGWIN_ROOT_PATH$input_path"
35348    fi
35349  fi
35350
35351  # remove trailing .exe if any
35352  new_path="${new_path/%.exe/}"
35353
35354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35355
35356  # First separate the path from the arguments. This will split at the first
35357  # space.
35358  complete="$CPP"
35359  path="${complete%% *}"
35360  tmp="$complete EOL"
35361  arguments="${tmp#* }"
35362
35363  # Input might be given as Windows format, start by converting to
35364  # unix format.
35365  new_path="$path"
35366
35367  windows_path="$new_path"
35368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35369    unix_path=`$CYGPATH -u "$windows_path"`
35370    new_path="$unix_path"
35371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35373    new_path="$unix_path"
35374  fi
35375
35376
35377  # Now try to locate executable using which
35378  new_path=`$WHICH "$new_path" 2> /dev/null`
35379
35380  if test "x$new_path" = x; then
35381    # Oops. Which didn't find the executable.
35382    # The splitting of arguments from the executable at a space might have been incorrect,
35383    # since paths with space are more likely in Windows. Give it another try with the whole
35384    # argument.
35385    path="$complete"
35386    arguments="EOL"
35387    new_path="$path"
35388
35389  windows_path="$new_path"
35390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35391    unix_path=`$CYGPATH -u "$windows_path"`
35392    new_path="$unix_path"
35393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35395    new_path="$unix_path"
35396  fi
35397
35398
35399    new_path=`$WHICH "$new_path" 2> /dev/null`
35400
35401    if test "x$new_path" = x; then
35402      # It's still not found. Now this is an unrecoverable error.
35403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35404$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35405      has_space=`$ECHO "$complete" | $GREP " "`
35406      if test "x$has_space" != x; then
35407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35409      fi
35410      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35411    fi
35412  fi
35413
35414  # Now new_path has a complete unix path to the binary
35415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35416    # Keep paths in /bin as-is, but remove trailing .exe if any
35417    new_path="${new_path/%.exe/}"
35418    # Do not save /bin paths to all_fixpath_prefixes!
35419  else
35420    # Not in mixed or Windows style, start by that.
35421    new_path=`cmd //c echo $new_path`
35422
35423  input_path="$new_path"
35424  # Check if we need to convert this using DOS-style short mode. If the path
35425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35426  # take no chances and rewrite it.
35427  # Note: m4 eats our [], so we need to use [ and ] instead.
35428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35429  if test "x$has_forbidden_chars" != x; then
35430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35432  fi
35433
35434    # Output is in $new_path
35435
35436  windows_path="$new_path"
35437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35438    unix_path=`$CYGPATH -u "$windows_path"`
35439    new_path="$unix_path"
35440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35442    new_path="$unix_path"
35443  fi
35444
35445    # remove trailing .exe if any
35446    new_path="${new_path/%.exe/}"
35447
35448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35450  fi
35451
35452  else
35453    # We're on a posix platform. Hooray! :)
35454    # First separate the path from the arguments. This will split at the first
35455    # space.
35456    complete="$CPP"
35457    path="${complete%% *}"
35458    tmp="$complete EOL"
35459    arguments="${tmp#* }"
35460
35461    # Cannot rely on the command "which" here since it doesn't always work.
35462    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35463    if test -z "$is_absolute_path"; then
35464      # Path to executable is not absolute. Find it.
35465      IFS_save="$IFS"
35466      IFS=:
35467      for p in $PATH; do
35468        if test -f "$p/$path" && test -x "$p/$path"; then
35469          new_path="$p/$path"
35470          break
35471        fi
35472      done
35473      IFS="$IFS_save"
35474    else
35475      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
35476$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
35477      new_path="$path"
35478    fi
35479
35480    if test "x$new_path" = x; then
35481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35482$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35483      has_space=`$ECHO "$complete" | $GREP " "`
35484      if test "x$has_space" != x; then
35485        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35487      fi
35488      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35489    fi
35490  fi
35491
35492  # Now join together the path and the arguments once again
35493  if test "x$arguments" != xEOL; then
35494    new_complete="$new_path ${arguments% *}"
35495  else
35496    new_complete="$new_path"
35497  fi
35498
35499  if test "x$complete" != "x$new_complete"; then
35500    CPP="$new_complete"
35501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35502$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35503  fi
35504
35505
35506  ac_ext=cpp
35507ac_cpp='$CXXCPP $CPPFLAGS'
35508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35512$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35513if test -z "$CXXCPP"; then
35514  if ${ac_cv_prog_CXXCPP+:} false; then :
35515  $as_echo_n "(cached) " >&6
35516else
35517      # Double quotes because CXXCPP needs to be expanded
35518    for CXXCPP in "$CXX -E" "/lib/cpp"
35519    do
35520      ac_preproc_ok=false
35521for ac_cxx_preproc_warn_flag in '' yes
35522do
35523  # Use a header file that comes with gcc, so configuring glibc
35524  # with a fresh cross-compiler works.
35525  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35526  # <limits.h> exists even on freestanding compilers.
35527  # On the NeXT, cc -E runs the code through the compiler's parser,
35528  # not just through cpp. "Syntax error" is here to catch this case.
35529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35530/* end confdefs.h.  */
35531#ifdef __STDC__
35532# include <limits.h>
35533#else
35534# include <assert.h>
35535#endif
35536		     Syntax error
35537_ACEOF
35538if ac_fn_cxx_try_cpp "$LINENO"; then :
35539
35540else
35541  # Broken: fails on valid input.
35542continue
35543fi
35544rm -f conftest.err conftest.i conftest.$ac_ext
35545
35546  # OK, works on sane cases.  Now check whether nonexistent headers
35547  # can be detected and how.
35548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35549/* end confdefs.h.  */
35550#include <ac_nonexistent.h>
35551_ACEOF
35552if ac_fn_cxx_try_cpp "$LINENO"; then :
35553  # Broken: success on invalid input.
35554continue
35555else
35556  # Passes both tests.
35557ac_preproc_ok=:
35558break
35559fi
35560rm -f conftest.err conftest.i conftest.$ac_ext
35561
35562done
35563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35564rm -f conftest.i conftest.err conftest.$ac_ext
35565if $ac_preproc_ok; then :
35566  break
35567fi
35568
35569    done
35570    ac_cv_prog_CXXCPP=$CXXCPP
35571
35572fi
35573  CXXCPP=$ac_cv_prog_CXXCPP
35574else
35575  ac_cv_prog_CXXCPP=$CXXCPP
35576fi
35577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35578$as_echo "$CXXCPP" >&6; }
35579ac_preproc_ok=false
35580for ac_cxx_preproc_warn_flag in '' yes
35581do
35582  # Use a header file that comes with gcc, so configuring glibc
35583  # with a fresh cross-compiler works.
35584  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35585  # <limits.h> exists even on freestanding compilers.
35586  # On the NeXT, cc -E runs the code through the compiler's parser,
35587  # not just through cpp. "Syntax error" is here to catch this case.
35588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35589/* end confdefs.h.  */
35590#ifdef __STDC__
35591# include <limits.h>
35592#else
35593# include <assert.h>
35594#endif
35595		     Syntax error
35596_ACEOF
35597if ac_fn_cxx_try_cpp "$LINENO"; then :
35598
35599else
35600  # Broken: fails on valid input.
35601continue
35602fi
35603rm -f conftest.err conftest.i conftest.$ac_ext
35604
35605  # OK, works on sane cases.  Now check whether nonexistent headers
35606  # can be detected and how.
35607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35608/* end confdefs.h.  */
35609#include <ac_nonexistent.h>
35610_ACEOF
35611if ac_fn_cxx_try_cpp "$LINENO"; then :
35612  # Broken: success on invalid input.
35613continue
35614else
35615  # Passes both tests.
35616ac_preproc_ok=:
35617break
35618fi
35619rm -f conftest.err conftest.i conftest.$ac_ext
35620
35621done
35622# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35623rm -f conftest.i conftest.err conftest.$ac_ext
35624if $ac_preproc_ok; then :
35625
35626else
35627  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35628$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35629as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35630See \`config.log' for more details" "$LINENO" 5; }
35631fi
35632
35633ac_ext=cpp
35634ac_cpp='$CXXCPP $CPPFLAGS'
35635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35638
35639
35640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35641
35642  # First separate the path from the arguments. This will split at the first
35643  # space.
35644  complete="$CXXCPP"
35645  path="${complete%% *}"
35646  tmp="$complete EOL"
35647  arguments="${tmp#* }"
35648
35649  # Input might be given as Windows format, start by converting to
35650  # unix format.
35651  new_path=`$CYGPATH -u "$path"`
35652
35653  # Now try to locate executable using which
35654  new_path=`$WHICH "$new_path" 2> /dev/null`
35655  # bat and cmd files are not always considered executable in cygwin causing which
35656  # to not find them
35657  if test "x$new_path" = x \
35658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35660    new_path=`$CYGPATH -u "$path"`
35661  fi
35662  if test "x$new_path" = x; then
35663    # Oops. Which didn't find the executable.
35664    # The splitting of arguments from the executable at a space might have been incorrect,
35665    # since paths with space are more likely in Windows. Give it another try with the whole
35666    # argument.
35667    path="$complete"
35668    arguments="EOL"
35669    new_path=`$CYGPATH -u "$path"`
35670    new_path=`$WHICH "$new_path" 2> /dev/null`
35671    # bat and cmd files are not always considered executable in cygwin causing which
35672    # to not find them
35673    if test "x$new_path" = x \
35674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35676      new_path=`$CYGPATH -u "$path"`
35677    fi
35678    if test "x$new_path" = x; then
35679      # It's still not found. Now this is an unrecoverable error.
35680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35681$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35682      has_space=`$ECHO "$complete" | $GREP " "`
35683      if test "x$has_space" != x; then
35684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35686      fi
35687      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35688    fi
35689  fi
35690
35691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35694  # "foo.exe" is OK but "foo" is an error.
35695  #
35696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35697  # It is also a way to make sure we got the proper file name for the real test later on.
35698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35699  if test "x$test_shortpath" = x; then
35700    # Short path failed, file does not exist as specified.
35701    # Try adding .exe or .cmd
35702    if test -f "${new_path}.exe"; then
35703      input_to_shortpath="${new_path}.exe"
35704    elif test -f "${new_path}.cmd"; then
35705      input_to_shortpath="${new_path}.cmd"
35706    else
35707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35708$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35711      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35712    fi
35713  else
35714    input_to_shortpath="$new_path"
35715  fi
35716
35717  # Call helper function which possibly converts this using DOS-style short mode.
35718  # If so, the updated path is stored in $new_path.
35719  new_path="$input_to_shortpath"
35720
35721  input_path="$input_to_shortpath"
35722  # Check if we need to convert this using DOS-style short mode. If the path
35723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35724  # take no chances and rewrite it.
35725  # Note: m4 eats our [], so we need to use [ and ] instead.
35726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35727  if test "x$has_forbidden_chars" != x; then
35728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35732      # Going to short mode and back again did indeed matter. Since short mode is
35733      # case insensitive, let's make it lowercase to improve readability.
35734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35735      # Now convert it back to Unix-stile (cygpath)
35736      input_path=`$CYGPATH -u "$shortmode_path"`
35737      new_path="$input_path"
35738    fi
35739  fi
35740
35741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35742  if test "x$test_cygdrive_prefix" = x; then
35743    # As a simple fix, exclude /usr/bin since it's not a real path.
35744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35746      # a path prefixed by /cygdrive for fixpath to work.
35747      new_path="$CYGWIN_ROOT_PATH$input_path"
35748    fi
35749  fi
35750
35751  # remove trailing .exe if any
35752  new_path="${new_path/%.exe/}"
35753
35754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35755
35756  # First separate the path from the arguments. This will split at the first
35757  # space.
35758  complete="$CXXCPP"
35759  path="${complete%% *}"
35760  tmp="$complete EOL"
35761  arguments="${tmp#* }"
35762
35763  # Input might be given as Windows format, start by converting to
35764  # unix format.
35765  new_path="$path"
35766
35767  windows_path="$new_path"
35768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35769    unix_path=`$CYGPATH -u "$windows_path"`
35770    new_path="$unix_path"
35771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35773    new_path="$unix_path"
35774  fi
35775
35776
35777  # Now try to locate executable using which
35778  new_path=`$WHICH "$new_path" 2> /dev/null`
35779
35780  if test "x$new_path" = x; then
35781    # Oops. Which didn't find the executable.
35782    # The splitting of arguments from the executable at a space might have been incorrect,
35783    # since paths with space are more likely in Windows. Give it another try with the whole
35784    # argument.
35785    path="$complete"
35786    arguments="EOL"
35787    new_path="$path"
35788
35789  windows_path="$new_path"
35790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35791    unix_path=`$CYGPATH -u "$windows_path"`
35792    new_path="$unix_path"
35793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35795    new_path="$unix_path"
35796  fi
35797
35798
35799    new_path=`$WHICH "$new_path" 2> /dev/null`
35800
35801    if test "x$new_path" = x; then
35802      # It's still not found. Now this is an unrecoverable error.
35803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35804$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35805      has_space=`$ECHO "$complete" | $GREP " "`
35806      if test "x$has_space" != x; then
35807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35809      fi
35810      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35811    fi
35812  fi
35813
35814  # Now new_path has a complete unix path to the binary
35815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35816    # Keep paths in /bin as-is, but remove trailing .exe if any
35817    new_path="${new_path/%.exe/}"
35818    # Do not save /bin paths to all_fixpath_prefixes!
35819  else
35820    # Not in mixed or Windows style, start by that.
35821    new_path=`cmd //c echo $new_path`
35822
35823  input_path="$new_path"
35824  # Check if we need to convert this using DOS-style short mode. If the path
35825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35826  # take no chances and rewrite it.
35827  # Note: m4 eats our [], so we need to use [ and ] instead.
35828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35829  if test "x$has_forbidden_chars" != x; then
35830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35832  fi
35833
35834    # Output is in $new_path
35835
35836  windows_path="$new_path"
35837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35838    unix_path=`$CYGPATH -u "$windows_path"`
35839    new_path="$unix_path"
35840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35842    new_path="$unix_path"
35843  fi
35844
35845    # remove trailing .exe if any
35846    new_path="${new_path/%.exe/}"
35847
35848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35850  fi
35851
35852  else
35853    # We're on a posix platform. Hooray! :)
35854    # First separate the path from the arguments. This will split at the first
35855    # space.
35856    complete="$CXXCPP"
35857    path="${complete%% *}"
35858    tmp="$complete EOL"
35859    arguments="${tmp#* }"
35860
35861    # Cannot rely on the command "which" here since it doesn't always work.
35862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35863    if test -z "$is_absolute_path"; then
35864      # Path to executable is not absolute. Find it.
35865      IFS_save="$IFS"
35866      IFS=:
35867      for p in $PATH; do
35868        if test -f "$p/$path" && test -x "$p/$path"; then
35869          new_path="$p/$path"
35870          break
35871        fi
35872      done
35873      IFS="$IFS_save"
35874    else
35875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
35876$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
35877      new_path="$path"
35878    fi
35879
35880    if test "x$new_path" = x; then
35881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35882$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35883      has_space=`$ECHO "$complete" | $GREP " "`
35884      if test "x$has_space" != x; then
35885        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35887      fi
35888      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35889    fi
35890  fi
35891
35892  # Now join together the path and the arguments once again
35893  if test "x$arguments" != xEOL; then
35894    new_complete="$new_path ${arguments% *}"
35895  else
35896    new_complete="$new_path"
35897  fi
35898
35899  if test "x$complete" != "x$new_complete"; then
35900    CXXCPP="$new_complete"
35901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35902$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35903  fi
35904
35905
35906  if test "x$COMPILE_TYPE" != "xcross"; then
35907    # If we are not cross compiling, use the same compilers for
35908    # building the build platform executables. The cross-compilation
35909    # case needed to be done earlier, but this can only be done after
35910    # the native tools have been localized.
35911    BUILD_CC="$CC"
35912    BUILD_CXX="$CXX"
35913    BUILD_LD="$LD"
35914  fi
35915
35916  # for solaris we really need solaris tools, and not gnu equivalent
35917  #   these seems to normally reside in /usr/ccs/bin so add that to path before
35918  #   starting to probe
35919  #
35920  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
35921  #         so that it can be overriden --with-tools-dir
35922  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
35923    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
35924  fi
35925
35926  # Find the right assembler.
35927  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35928
35929
35930  # Publish this variable in the help.
35931
35932
35933  if test "x$AS" = x; then
35934    # The variable is not set by user, try to locate tool using the code snippet
35935    for ac_prog in as
35936do
35937  # Extract the first word of "$ac_prog", so it can be a program name with args.
35938set dummy $ac_prog; ac_word=$2
35939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35940$as_echo_n "checking for $ac_word... " >&6; }
35941if ${ac_cv_path_AS+:} false; then :
35942  $as_echo_n "(cached) " >&6
35943else
35944  case $AS in
35945  [\\/]* | ?:[\\/]*)
35946  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35947  ;;
35948  *)
35949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35950for as_dir in $PATH
35951do
35952  IFS=$as_save_IFS
35953  test -z "$as_dir" && as_dir=.
35954    for ac_exec_ext in '' $ac_executable_extensions; do
35955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35956    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35958    break 2
35959  fi
35960done
35961  done
35962IFS=$as_save_IFS
35963
35964  ;;
35965esac
35966fi
35967AS=$ac_cv_path_AS
35968if test -n "$AS"; then
35969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35970$as_echo "$AS" >&6; }
35971else
35972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35973$as_echo "no" >&6; }
35974fi
35975
35976
35977  test -n "$AS" && break
35978done
35979
35980  else
35981    # The variable is set, but is it from the command line or the environment?
35982
35983    # Try to remove the string !AS! from our list.
35984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35986      # If it failed, the variable was not from the command line. Ignore it,
35987      # but warn the user (except for BASH, which is always set by the calling BASH).
35988      if test "xAS" != xBASH; then
35989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35990$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35991      fi
35992      # Try to locate tool using the code snippet
35993      for ac_prog in as
35994do
35995  # Extract the first word of "$ac_prog", so it can be a program name with args.
35996set dummy $ac_prog; ac_word=$2
35997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35998$as_echo_n "checking for $ac_word... " >&6; }
35999if ${ac_cv_path_AS+:} false; then :
36000  $as_echo_n "(cached) " >&6
36001else
36002  case $AS in
36003  [\\/]* | ?:[\\/]*)
36004  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36005  ;;
36006  *)
36007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36008for as_dir in $PATH
36009do
36010  IFS=$as_save_IFS
36011  test -z "$as_dir" && as_dir=.
36012    for ac_exec_ext in '' $ac_executable_extensions; do
36013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36014    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36016    break 2
36017  fi
36018done
36019  done
36020IFS=$as_save_IFS
36021
36022  ;;
36023esac
36024fi
36025AS=$ac_cv_path_AS
36026if test -n "$AS"; then
36027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36028$as_echo "$AS" >&6; }
36029else
36030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36031$as_echo "no" >&6; }
36032fi
36033
36034
36035  test -n "$AS" && break
36036done
36037
36038    else
36039      # If it succeeded, then it was overridden by the user. We will use it
36040      # for the tool.
36041
36042      # First remove it from the list of overridden variables, so we can test
36043      # for unknown variables in the end.
36044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36045
36046      # Check if the provided tool contains a complete path.
36047      tool_specified="$AS"
36048      tool_basename="${tool_specified##*/}"
36049      if test "x$tool_basename" = "x$tool_specified"; then
36050        # A command without a complete path is provided, search $PATH.
36051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36052$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36053        # Extract the first word of "$tool_basename", so it can be a program name with args.
36054set dummy $tool_basename; ac_word=$2
36055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36056$as_echo_n "checking for $ac_word... " >&6; }
36057if ${ac_cv_path_AS+:} false; then :
36058  $as_echo_n "(cached) " >&6
36059else
36060  case $AS in
36061  [\\/]* | ?:[\\/]*)
36062  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36063  ;;
36064  *)
36065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36066for as_dir in $PATH
36067do
36068  IFS=$as_save_IFS
36069  test -z "$as_dir" && as_dir=.
36070    for ac_exec_ext in '' $ac_executable_extensions; do
36071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36072    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36074    break 2
36075  fi
36076done
36077  done
36078IFS=$as_save_IFS
36079
36080  ;;
36081esac
36082fi
36083AS=$ac_cv_path_AS
36084if test -n "$AS"; then
36085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36086$as_echo "$AS" >&6; }
36087else
36088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36089$as_echo "no" >&6; }
36090fi
36091
36092
36093        if test "x$AS" = x; then
36094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36095        fi
36096      else
36097        # Otherwise we believe it is a complete path. Use it as it is.
36098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36099$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36101$as_echo_n "checking for AS... " >&6; }
36102        if test ! -x "$tool_specified"; then
36103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36104$as_echo "not found" >&6; }
36105          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36106        fi
36107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36108$as_echo "$tool_specified" >&6; }
36109      fi
36110    fi
36111  fi
36112
36113
36114
36115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36116
36117  # First separate the path from the arguments. This will split at the first
36118  # space.
36119  complete="$AS"
36120  path="${complete%% *}"
36121  tmp="$complete EOL"
36122  arguments="${tmp#* }"
36123
36124  # Input might be given as Windows format, start by converting to
36125  # unix format.
36126  new_path=`$CYGPATH -u "$path"`
36127
36128  # Now try to locate executable using which
36129  new_path=`$WHICH "$new_path" 2> /dev/null`
36130  # bat and cmd files are not always considered executable in cygwin causing which
36131  # to not find them
36132  if test "x$new_path" = x \
36133      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36134      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36135    new_path=`$CYGPATH -u "$path"`
36136  fi
36137  if test "x$new_path" = x; then
36138    # Oops. Which didn't find the executable.
36139    # The splitting of arguments from the executable at a space might have been incorrect,
36140    # since paths with space are more likely in Windows. Give it another try with the whole
36141    # argument.
36142    path="$complete"
36143    arguments="EOL"
36144    new_path=`$CYGPATH -u "$path"`
36145    new_path=`$WHICH "$new_path" 2> /dev/null`
36146    # bat and cmd files are not always considered executable in cygwin causing which
36147    # to not find them
36148    if test "x$new_path" = x \
36149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36151      new_path=`$CYGPATH -u "$path"`
36152    fi
36153    if test "x$new_path" = x; then
36154      # It's still not found. Now this is an unrecoverable error.
36155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36156$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36157      has_space=`$ECHO "$complete" | $GREP " "`
36158      if test "x$has_space" != x; then
36159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36161      fi
36162      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36163    fi
36164  fi
36165
36166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36169  # "foo.exe" is OK but "foo" is an error.
36170  #
36171  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36172  # It is also a way to make sure we got the proper file name for the real test later on.
36173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36174  if test "x$test_shortpath" = x; then
36175    # Short path failed, file does not exist as specified.
36176    # Try adding .exe or .cmd
36177    if test -f "${new_path}.exe"; then
36178      input_to_shortpath="${new_path}.exe"
36179    elif test -f "${new_path}.cmd"; then
36180      input_to_shortpath="${new_path}.cmd"
36181    else
36182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36183$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36184      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36185$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36186      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36187    fi
36188  else
36189    input_to_shortpath="$new_path"
36190  fi
36191
36192  # Call helper function which possibly converts this using DOS-style short mode.
36193  # If so, the updated path is stored in $new_path.
36194  new_path="$input_to_shortpath"
36195
36196  input_path="$input_to_shortpath"
36197  # Check if we need to convert this using DOS-style short mode. If the path
36198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36199  # take no chances and rewrite it.
36200  # Note: m4 eats our [], so we need to use [ and ] instead.
36201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36202  if test "x$has_forbidden_chars" != x; then
36203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36207      # Going to short mode and back again did indeed matter. Since short mode is
36208      # case insensitive, let's make it lowercase to improve readability.
36209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36210      # Now convert it back to Unix-stile (cygpath)
36211      input_path=`$CYGPATH -u "$shortmode_path"`
36212      new_path="$input_path"
36213    fi
36214  fi
36215
36216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36217  if test "x$test_cygdrive_prefix" = x; then
36218    # As a simple fix, exclude /usr/bin since it's not a real path.
36219    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36221      # a path prefixed by /cygdrive for fixpath to work.
36222      new_path="$CYGWIN_ROOT_PATH$input_path"
36223    fi
36224  fi
36225
36226  # remove trailing .exe if any
36227  new_path="${new_path/%.exe/}"
36228
36229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36230
36231  # First separate the path from the arguments. This will split at the first
36232  # space.
36233  complete="$AS"
36234  path="${complete%% *}"
36235  tmp="$complete EOL"
36236  arguments="${tmp#* }"
36237
36238  # Input might be given as Windows format, start by converting to
36239  # unix format.
36240  new_path="$path"
36241
36242  windows_path="$new_path"
36243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36244    unix_path=`$CYGPATH -u "$windows_path"`
36245    new_path="$unix_path"
36246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36248    new_path="$unix_path"
36249  fi
36250
36251
36252  # Now try to locate executable using which
36253  new_path=`$WHICH "$new_path" 2> /dev/null`
36254
36255  if test "x$new_path" = x; then
36256    # Oops. Which didn't find the executable.
36257    # The splitting of arguments from the executable at a space might have been incorrect,
36258    # since paths with space are more likely in Windows. Give it another try with the whole
36259    # argument.
36260    path="$complete"
36261    arguments="EOL"
36262    new_path="$path"
36263
36264  windows_path="$new_path"
36265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36266    unix_path=`$CYGPATH -u "$windows_path"`
36267    new_path="$unix_path"
36268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36270    new_path="$unix_path"
36271  fi
36272
36273
36274    new_path=`$WHICH "$new_path" 2> /dev/null`
36275
36276    if test "x$new_path" = x; then
36277      # It's still not found. Now this is an unrecoverable error.
36278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36279$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36280      has_space=`$ECHO "$complete" | $GREP " "`
36281      if test "x$has_space" != x; then
36282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36284      fi
36285      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36286    fi
36287  fi
36288
36289  # Now new_path has a complete unix path to the binary
36290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36291    # Keep paths in /bin as-is, but remove trailing .exe if any
36292    new_path="${new_path/%.exe/}"
36293    # Do not save /bin paths to all_fixpath_prefixes!
36294  else
36295    # Not in mixed or Windows style, start by that.
36296    new_path=`cmd //c echo $new_path`
36297
36298  input_path="$new_path"
36299  # Check if we need to convert this using DOS-style short mode. If the path
36300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36301  # take no chances and rewrite it.
36302  # Note: m4 eats our [], so we need to use [ and ] instead.
36303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36304  if test "x$has_forbidden_chars" != x; then
36305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36307  fi
36308
36309    # Output is in $new_path
36310
36311  windows_path="$new_path"
36312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36313    unix_path=`$CYGPATH -u "$windows_path"`
36314    new_path="$unix_path"
36315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36317    new_path="$unix_path"
36318  fi
36319
36320    # remove trailing .exe if any
36321    new_path="${new_path/%.exe/}"
36322
36323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36325  fi
36326
36327  else
36328    # We're on a posix platform. Hooray! :)
36329    # First separate the path from the arguments. This will split at the first
36330    # space.
36331    complete="$AS"
36332    path="${complete%% *}"
36333    tmp="$complete EOL"
36334    arguments="${tmp#* }"
36335
36336    # Cannot rely on the command "which" here since it doesn't always work.
36337    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36338    if test -z "$is_absolute_path"; then
36339      # Path to executable is not absolute. Find it.
36340      IFS_save="$IFS"
36341      IFS=:
36342      for p in $PATH; do
36343        if test -f "$p/$path" && test -x "$p/$path"; then
36344          new_path="$p/$path"
36345          break
36346        fi
36347      done
36348      IFS="$IFS_save"
36349    else
36350      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
36351$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
36352      new_path="$path"
36353    fi
36354
36355    if test "x$new_path" = x; then
36356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36357$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36358      has_space=`$ECHO "$complete" | $GREP " "`
36359      if test "x$has_space" != x; then
36360        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36362      fi
36363      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36364    fi
36365  fi
36366
36367  # Now join together the path and the arguments once again
36368  if test "x$arguments" != xEOL; then
36369    new_complete="$new_path ${arguments% *}"
36370  else
36371    new_complete="$new_path"
36372  fi
36373
36374  if test "x$complete" != "x$new_complete"; then
36375    AS="$new_complete"
36376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36377$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36378  fi
36379
36380  else
36381    AS="$CC -c"
36382  fi
36383
36384
36385  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36386
36387
36388  # Publish this variable in the help.
36389
36390
36391  if test "x$NM" = x; then
36392    # The variable is not set by user, try to locate tool using the code snippet
36393    for ac_prog in nm
36394do
36395  # Extract the first word of "$ac_prog", so it can be a program name with args.
36396set dummy $ac_prog; ac_word=$2
36397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36398$as_echo_n "checking for $ac_word... " >&6; }
36399if ${ac_cv_path_NM+:} false; then :
36400  $as_echo_n "(cached) " >&6
36401else
36402  case $NM in
36403  [\\/]* | ?:[\\/]*)
36404  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36405  ;;
36406  *)
36407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36408for as_dir in $PATH
36409do
36410  IFS=$as_save_IFS
36411  test -z "$as_dir" && as_dir=.
36412    for ac_exec_ext in '' $ac_executable_extensions; do
36413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36414    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36416    break 2
36417  fi
36418done
36419  done
36420IFS=$as_save_IFS
36421
36422  ;;
36423esac
36424fi
36425NM=$ac_cv_path_NM
36426if test -n "$NM"; then
36427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36428$as_echo "$NM" >&6; }
36429else
36430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36431$as_echo "no" >&6; }
36432fi
36433
36434
36435  test -n "$NM" && break
36436done
36437
36438  else
36439    # The variable is set, but is it from the command line or the environment?
36440
36441    # Try to remove the string !NM! from our list.
36442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36444      # If it failed, the variable was not from the command line. Ignore it,
36445      # but warn the user (except for BASH, which is always set by the calling BASH).
36446      if test "xNM" != xBASH; then
36447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36448$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36449      fi
36450      # Try to locate tool using the code snippet
36451      for ac_prog in nm
36452do
36453  # Extract the first word of "$ac_prog", so it can be a program name with args.
36454set dummy $ac_prog; ac_word=$2
36455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36456$as_echo_n "checking for $ac_word... " >&6; }
36457if ${ac_cv_path_NM+:} false; then :
36458  $as_echo_n "(cached) " >&6
36459else
36460  case $NM in
36461  [\\/]* | ?:[\\/]*)
36462  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36463  ;;
36464  *)
36465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36466for as_dir in $PATH
36467do
36468  IFS=$as_save_IFS
36469  test -z "$as_dir" && as_dir=.
36470    for ac_exec_ext in '' $ac_executable_extensions; do
36471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36472    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36474    break 2
36475  fi
36476done
36477  done
36478IFS=$as_save_IFS
36479
36480  ;;
36481esac
36482fi
36483NM=$ac_cv_path_NM
36484if test -n "$NM"; then
36485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36486$as_echo "$NM" >&6; }
36487else
36488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36489$as_echo "no" >&6; }
36490fi
36491
36492
36493  test -n "$NM" && break
36494done
36495
36496    else
36497      # If it succeeded, then it was overridden by the user. We will use it
36498      # for the tool.
36499
36500      # First remove it from the list of overridden variables, so we can test
36501      # for unknown variables in the end.
36502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36503
36504      # Check if the provided tool contains a complete path.
36505      tool_specified="$NM"
36506      tool_basename="${tool_specified##*/}"
36507      if test "x$tool_basename" = "x$tool_specified"; then
36508        # A command without a complete path is provided, search $PATH.
36509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36510$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36511        # Extract the first word of "$tool_basename", so it can be a program name with args.
36512set dummy $tool_basename; ac_word=$2
36513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36514$as_echo_n "checking for $ac_word... " >&6; }
36515if ${ac_cv_path_NM+:} false; then :
36516  $as_echo_n "(cached) " >&6
36517else
36518  case $NM in
36519  [\\/]* | ?:[\\/]*)
36520  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36521  ;;
36522  *)
36523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36524for as_dir in $PATH
36525do
36526  IFS=$as_save_IFS
36527  test -z "$as_dir" && as_dir=.
36528    for ac_exec_ext in '' $ac_executable_extensions; do
36529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36530    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36532    break 2
36533  fi
36534done
36535  done
36536IFS=$as_save_IFS
36537
36538  ;;
36539esac
36540fi
36541NM=$ac_cv_path_NM
36542if test -n "$NM"; then
36543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36544$as_echo "$NM" >&6; }
36545else
36546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36547$as_echo "no" >&6; }
36548fi
36549
36550
36551        if test "x$NM" = x; then
36552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36553        fi
36554      else
36555        # Otherwise we believe it is a complete path. Use it as it is.
36556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36557$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36559$as_echo_n "checking for NM... " >&6; }
36560        if test ! -x "$tool_specified"; then
36561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36562$as_echo "not found" >&6; }
36563          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36564        fi
36565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36566$as_echo "$tool_specified" >&6; }
36567      fi
36568    fi
36569  fi
36570
36571
36572
36573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36574
36575  # First separate the path from the arguments. This will split at the first
36576  # space.
36577  complete="$NM"
36578  path="${complete%% *}"
36579  tmp="$complete EOL"
36580  arguments="${tmp#* }"
36581
36582  # Input might be given as Windows format, start by converting to
36583  # unix format.
36584  new_path=`$CYGPATH -u "$path"`
36585
36586  # Now try to locate executable using which
36587  new_path=`$WHICH "$new_path" 2> /dev/null`
36588  # bat and cmd files are not always considered executable in cygwin causing which
36589  # to not find them
36590  if test "x$new_path" = x \
36591      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36592      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36593    new_path=`$CYGPATH -u "$path"`
36594  fi
36595  if test "x$new_path" = x; then
36596    # Oops. Which didn't find the executable.
36597    # The splitting of arguments from the executable at a space might have been incorrect,
36598    # since paths with space are more likely in Windows. Give it another try with the whole
36599    # argument.
36600    path="$complete"
36601    arguments="EOL"
36602    new_path=`$CYGPATH -u "$path"`
36603    new_path=`$WHICH "$new_path" 2> /dev/null`
36604    # bat and cmd files are not always considered executable in cygwin causing which
36605    # to not find them
36606    if test "x$new_path" = x \
36607        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36608        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36609      new_path=`$CYGPATH -u "$path"`
36610    fi
36611    if test "x$new_path" = x; then
36612      # It's still not found. Now this is an unrecoverable error.
36613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36614$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36615      has_space=`$ECHO "$complete" | $GREP " "`
36616      if test "x$has_space" != x; then
36617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36619      fi
36620      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36621    fi
36622  fi
36623
36624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36627  # "foo.exe" is OK but "foo" is an error.
36628  #
36629  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36630  # It is also a way to make sure we got the proper file name for the real test later on.
36631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36632  if test "x$test_shortpath" = x; then
36633    # Short path failed, file does not exist as specified.
36634    # Try adding .exe or .cmd
36635    if test -f "${new_path}.exe"; then
36636      input_to_shortpath="${new_path}.exe"
36637    elif test -f "${new_path}.cmd"; then
36638      input_to_shortpath="${new_path}.cmd"
36639    else
36640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36641$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36644      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36645    fi
36646  else
36647    input_to_shortpath="$new_path"
36648  fi
36649
36650  # Call helper function which possibly converts this using DOS-style short mode.
36651  # If so, the updated path is stored in $new_path.
36652  new_path="$input_to_shortpath"
36653
36654  input_path="$input_to_shortpath"
36655  # Check if we need to convert this using DOS-style short mode. If the path
36656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36657  # take no chances and rewrite it.
36658  # Note: m4 eats our [], so we need to use [ and ] instead.
36659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36660  if test "x$has_forbidden_chars" != x; then
36661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36665      # Going to short mode and back again did indeed matter. Since short mode is
36666      # case insensitive, let's make it lowercase to improve readability.
36667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36668      # Now convert it back to Unix-stile (cygpath)
36669      input_path=`$CYGPATH -u "$shortmode_path"`
36670      new_path="$input_path"
36671    fi
36672  fi
36673
36674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36675  if test "x$test_cygdrive_prefix" = x; then
36676    # As a simple fix, exclude /usr/bin since it's not a real path.
36677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36679      # a path prefixed by /cygdrive for fixpath to work.
36680      new_path="$CYGWIN_ROOT_PATH$input_path"
36681    fi
36682  fi
36683
36684  # remove trailing .exe if any
36685  new_path="${new_path/%.exe/}"
36686
36687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36688
36689  # First separate the path from the arguments. This will split at the first
36690  # space.
36691  complete="$NM"
36692  path="${complete%% *}"
36693  tmp="$complete EOL"
36694  arguments="${tmp#* }"
36695
36696  # Input might be given as Windows format, start by converting to
36697  # unix format.
36698  new_path="$path"
36699
36700  windows_path="$new_path"
36701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36702    unix_path=`$CYGPATH -u "$windows_path"`
36703    new_path="$unix_path"
36704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36706    new_path="$unix_path"
36707  fi
36708
36709
36710  # Now try to locate executable using which
36711  new_path=`$WHICH "$new_path" 2> /dev/null`
36712
36713  if test "x$new_path" = x; then
36714    # Oops. Which didn't find the executable.
36715    # The splitting of arguments from the executable at a space might have been incorrect,
36716    # since paths with space are more likely in Windows. Give it another try with the whole
36717    # argument.
36718    path="$complete"
36719    arguments="EOL"
36720    new_path="$path"
36721
36722  windows_path="$new_path"
36723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36724    unix_path=`$CYGPATH -u "$windows_path"`
36725    new_path="$unix_path"
36726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36728    new_path="$unix_path"
36729  fi
36730
36731
36732    new_path=`$WHICH "$new_path" 2> /dev/null`
36733
36734    if test "x$new_path" = x; then
36735      # It's still not found. Now this is an unrecoverable error.
36736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36737$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36738      has_space=`$ECHO "$complete" | $GREP " "`
36739      if test "x$has_space" != x; then
36740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36742      fi
36743      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36744    fi
36745  fi
36746
36747  # Now new_path has a complete unix path to the binary
36748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36749    # Keep paths in /bin as-is, but remove trailing .exe if any
36750    new_path="${new_path/%.exe/}"
36751    # Do not save /bin paths to all_fixpath_prefixes!
36752  else
36753    # Not in mixed or Windows style, start by that.
36754    new_path=`cmd //c echo $new_path`
36755
36756  input_path="$new_path"
36757  # Check if we need to convert this using DOS-style short mode. If the path
36758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36759  # take no chances and rewrite it.
36760  # Note: m4 eats our [], so we need to use [ and ] instead.
36761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36762  if test "x$has_forbidden_chars" != x; then
36763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36765  fi
36766
36767    # Output is in $new_path
36768
36769  windows_path="$new_path"
36770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36771    unix_path=`$CYGPATH -u "$windows_path"`
36772    new_path="$unix_path"
36773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36775    new_path="$unix_path"
36776  fi
36777
36778    # remove trailing .exe if any
36779    new_path="${new_path/%.exe/}"
36780
36781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36783  fi
36784
36785  else
36786    # We're on a posix platform. Hooray! :)
36787    # First separate the path from the arguments. This will split at the first
36788    # space.
36789    complete="$NM"
36790    path="${complete%% *}"
36791    tmp="$complete EOL"
36792    arguments="${tmp#* }"
36793
36794    # Cannot rely on the command "which" here since it doesn't always work.
36795    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36796    if test -z "$is_absolute_path"; then
36797      # Path to executable is not absolute. Find it.
36798      IFS_save="$IFS"
36799      IFS=:
36800      for p in $PATH; do
36801        if test -f "$p/$path" && test -x "$p/$path"; then
36802          new_path="$p/$path"
36803          break
36804        fi
36805      done
36806      IFS="$IFS_save"
36807    else
36808      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
36809$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
36810      new_path="$path"
36811    fi
36812
36813    if test "x$new_path" = x; then
36814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36815$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36816      has_space=`$ECHO "$complete" | $GREP " "`
36817      if test "x$has_space" != x; then
36818        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36819$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36820      fi
36821      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36822    fi
36823  fi
36824
36825  # Now join together the path and the arguments once again
36826  if test "x$arguments" != xEOL; then
36827    new_complete="$new_path ${arguments% *}"
36828  else
36829    new_complete="$new_path"
36830  fi
36831
36832  if test "x$complete" != "x$new_complete"; then
36833    NM="$new_complete"
36834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36835$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36836  fi
36837
36838
36839
36840  # Publish this variable in the help.
36841
36842
36843  if test "x$GNM" = x; then
36844    # The variable is not set by user, try to locate tool using the code snippet
36845    for ac_prog in gnm
36846do
36847  # Extract the first word of "$ac_prog", so it can be a program name with args.
36848set dummy $ac_prog; ac_word=$2
36849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36850$as_echo_n "checking for $ac_word... " >&6; }
36851if ${ac_cv_path_GNM+:} false; then :
36852  $as_echo_n "(cached) " >&6
36853else
36854  case $GNM in
36855  [\\/]* | ?:[\\/]*)
36856  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36857  ;;
36858  *)
36859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36860for as_dir in $PATH
36861do
36862  IFS=$as_save_IFS
36863  test -z "$as_dir" && as_dir=.
36864    for ac_exec_ext in '' $ac_executable_extensions; do
36865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36866    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36868    break 2
36869  fi
36870done
36871  done
36872IFS=$as_save_IFS
36873
36874  ;;
36875esac
36876fi
36877GNM=$ac_cv_path_GNM
36878if test -n "$GNM"; then
36879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36880$as_echo "$GNM" >&6; }
36881else
36882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36883$as_echo "no" >&6; }
36884fi
36885
36886
36887  test -n "$GNM" && break
36888done
36889
36890  else
36891    # The variable is set, but is it from the command line or the environment?
36892
36893    # Try to remove the string !GNM! from our list.
36894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36896      # If it failed, the variable was not from the command line. Ignore it,
36897      # but warn the user (except for BASH, which is always set by the calling BASH).
36898      if test "xGNM" != xBASH; then
36899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36900$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36901      fi
36902      # Try to locate tool using the code snippet
36903      for ac_prog in gnm
36904do
36905  # Extract the first word of "$ac_prog", so it can be a program name with args.
36906set dummy $ac_prog; ac_word=$2
36907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36908$as_echo_n "checking for $ac_word... " >&6; }
36909if ${ac_cv_path_GNM+:} false; then :
36910  $as_echo_n "(cached) " >&6
36911else
36912  case $GNM in
36913  [\\/]* | ?:[\\/]*)
36914  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36915  ;;
36916  *)
36917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36918for as_dir in $PATH
36919do
36920  IFS=$as_save_IFS
36921  test -z "$as_dir" && as_dir=.
36922    for ac_exec_ext in '' $ac_executable_extensions; do
36923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36924    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36926    break 2
36927  fi
36928done
36929  done
36930IFS=$as_save_IFS
36931
36932  ;;
36933esac
36934fi
36935GNM=$ac_cv_path_GNM
36936if test -n "$GNM"; then
36937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36938$as_echo "$GNM" >&6; }
36939else
36940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36941$as_echo "no" >&6; }
36942fi
36943
36944
36945  test -n "$GNM" && break
36946done
36947
36948    else
36949      # If it succeeded, then it was overridden by the user. We will use it
36950      # for the tool.
36951
36952      # First remove it from the list of overridden variables, so we can test
36953      # for unknown variables in the end.
36954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36955
36956      # Check if the provided tool contains a complete path.
36957      tool_specified="$GNM"
36958      tool_basename="${tool_specified##*/}"
36959      if test "x$tool_basename" = "x$tool_specified"; then
36960        # A command without a complete path is provided, search $PATH.
36961        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36962$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36963        # Extract the first word of "$tool_basename", so it can be a program name with args.
36964set dummy $tool_basename; ac_word=$2
36965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36966$as_echo_n "checking for $ac_word... " >&6; }
36967if ${ac_cv_path_GNM+:} false; then :
36968  $as_echo_n "(cached) " >&6
36969else
36970  case $GNM in
36971  [\\/]* | ?:[\\/]*)
36972  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36973  ;;
36974  *)
36975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36976for as_dir in $PATH
36977do
36978  IFS=$as_save_IFS
36979  test -z "$as_dir" && as_dir=.
36980    for ac_exec_ext in '' $ac_executable_extensions; do
36981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36982    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36984    break 2
36985  fi
36986done
36987  done
36988IFS=$as_save_IFS
36989
36990  ;;
36991esac
36992fi
36993GNM=$ac_cv_path_GNM
36994if test -n "$GNM"; then
36995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36996$as_echo "$GNM" >&6; }
36997else
36998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36999$as_echo "no" >&6; }
37000fi
37001
37002
37003        if test "x$GNM" = x; then
37004          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37005        fi
37006      else
37007        # Otherwise we believe it is a complete path. Use it as it is.
37008        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37009$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37011$as_echo_n "checking for GNM... " >&6; }
37012        if test ! -x "$tool_specified"; then
37013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37014$as_echo "not found" >&6; }
37015          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37016        fi
37017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37018$as_echo "$tool_specified" >&6; }
37019      fi
37020    fi
37021  fi
37022
37023
37024
37025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37026
37027  # First separate the path from the arguments. This will split at the first
37028  # space.
37029  complete="$GNM"
37030  path="${complete%% *}"
37031  tmp="$complete EOL"
37032  arguments="${tmp#* }"
37033
37034  # Input might be given as Windows format, start by converting to
37035  # unix format.
37036  new_path=`$CYGPATH -u "$path"`
37037
37038  # Now try to locate executable using which
37039  new_path=`$WHICH "$new_path" 2> /dev/null`
37040  # bat and cmd files are not always considered executable in cygwin causing which
37041  # to not find them
37042  if test "x$new_path" = x \
37043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37045    new_path=`$CYGPATH -u "$path"`
37046  fi
37047  if test "x$new_path" = x; then
37048    # Oops. Which didn't find the executable.
37049    # The splitting of arguments from the executable at a space might have been incorrect,
37050    # since paths with space are more likely in Windows. Give it another try with the whole
37051    # argument.
37052    path="$complete"
37053    arguments="EOL"
37054    new_path=`$CYGPATH -u "$path"`
37055    new_path=`$WHICH "$new_path" 2> /dev/null`
37056    # bat and cmd files are not always considered executable in cygwin causing which
37057    # to not find them
37058    if test "x$new_path" = x \
37059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37061      new_path=`$CYGPATH -u "$path"`
37062    fi
37063    if test "x$new_path" = x; then
37064      # It's still not found. Now this is an unrecoverable error.
37065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37066$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37067      has_space=`$ECHO "$complete" | $GREP " "`
37068      if test "x$has_space" != x; then
37069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37071      fi
37072      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37073    fi
37074  fi
37075
37076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37079  # "foo.exe" is OK but "foo" is an error.
37080  #
37081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37082  # It is also a way to make sure we got the proper file name for the real test later on.
37083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37084  if test "x$test_shortpath" = x; then
37085    # Short path failed, file does not exist as specified.
37086    # Try adding .exe or .cmd
37087    if test -f "${new_path}.exe"; then
37088      input_to_shortpath="${new_path}.exe"
37089    elif test -f "${new_path}.cmd"; then
37090      input_to_shortpath="${new_path}.cmd"
37091    else
37092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37093$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37096      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37097    fi
37098  else
37099    input_to_shortpath="$new_path"
37100  fi
37101
37102  # Call helper function which possibly converts this using DOS-style short mode.
37103  # If so, the updated path is stored in $new_path.
37104  new_path="$input_to_shortpath"
37105
37106  input_path="$input_to_shortpath"
37107  # Check if we need to convert this using DOS-style short mode. If the path
37108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37109  # take no chances and rewrite it.
37110  # Note: m4 eats our [], so we need to use [ and ] instead.
37111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37112  if test "x$has_forbidden_chars" != x; then
37113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37117      # Going to short mode and back again did indeed matter. Since short mode is
37118      # case insensitive, let's make it lowercase to improve readability.
37119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37120      # Now convert it back to Unix-stile (cygpath)
37121      input_path=`$CYGPATH -u "$shortmode_path"`
37122      new_path="$input_path"
37123    fi
37124  fi
37125
37126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37127  if test "x$test_cygdrive_prefix" = x; then
37128    # As a simple fix, exclude /usr/bin since it's not a real path.
37129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37131      # a path prefixed by /cygdrive for fixpath to work.
37132      new_path="$CYGWIN_ROOT_PATH$input_path"
37133    fi
37134  fi
37135
37136  # remove trailing .exe if any
37137  new_path="${new_path/%.exe/}"
37138
37139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37140
37141  # First separate the path from the arguments. This will split at the first
37142  # space.
37143  complete="$GNM"
37144  path="${complete%% *}"
37145  tmp="$complete EOL"
37146  arguments="${tmp#* }"
37147
37148  # Input might be given as Windows format, start by converting to
37149  # unix format.
37150  new_path="$path"
37151
37152  windows_path="$new_path"
37153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37154    unix_path=`$CYGPATH -u "$windows_path"`
37155    new_path="$unix_path"
37156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37158    new_path="$unix_path"
37159  fi
37160
37161
37162  # Now try to locate executable using which
37163  new_path=`$WHICH "$new_path" 2> /dev/null`
37164
37165  if test "x$new_path" = x; then
37166    # Oops. Which didn't find the executable.
37167    # The splitting of arguments from the executable at a space might have been incorrect,
37168    # since paths with space are more likely in Windows. Give it another try with the whole
37169    # argument.
37170    path="$complete"
37171    arguments="EOL"
37172    new_path="$path"
37173
37174  windows_path="$new_path"
37175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37176    unix_path=`$CYGPATH -u "$windows_path"`
37177    new_path="$unix_path"
37178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37180    new_path="$unix_path"
37181  fi
37182
37183
37184    new_path=`$WHICH "$new_path" 2> /dev/null`
37185
37186    if test "x$new_path" = x; then
37187      # It's still not found. Now this is an unrecoverable error.
37188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37189$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37190      has_space=`$ECHO "$complete" | $GREP " "`
37191      if test "x$has_space" != x; then
37192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37194      fi
37195      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37196    fi
37197  fi
37198
37199  # Now new_path has a complete unix path to the binary
37200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37201    # Keep paths in /bin as-is, but remove trailing .exe if any
37202    new_path="${new_path/%.exe/}"
37203    # Do not save /bin paths to all_fixpath_prefixes!
37204  else
37205    # Not in mixed or Windows style, start by that.
37206    new_path=`cmd //c echo $new_path`
37207
37208  input_path="$new_path"
37209  # Check if we need to convert this using DOS-style short mode. If the path
37210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37211  # take no chances and rewrite it.
37212  # Note: m4 eats our [], so we need to use [ and ] instead.
37213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37214  if test "x$has_forbidden_chars" != x; then
37215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37217  fi
37218
37219    # Output is in $new_path
37220
37221  windows_path="$new_path"
37222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37223    unix_path=`$CYGPATH -u "$windows_path"`
37224    new_path="$unix_path"
37225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37227    new_path="$unix_path"
37228  fi
37229
37230    # remove trailing .exe if any
37231    new_path="${new_path/%.exe/}"
37232
37233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37235  fi
37236
37237  else
37238    # We're on a posix platform. Hooray! :)
37239    # First separate the path from the arguments. This will split at the first
37240    # space.
37241    complete="$GNM"
37242    path="${complete%% *}"
37243    tmp="$complete EOL"
37244    arguments="${tmp#* }"
37245
37246    # Cannot rely on the command "which" here since it doesn't always work.
37247    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37248    if test -z "$is_absolute_path"; then
37249      # Path to executable is not absolute. Find it.
37250      IFS_save="$IFS"
37251      IFS=:
37252      for p in $PATH; do
37253        if test -f "$p/$path" && test -x "$p/$path"; then
37254          new_path="$p/$path"
37255          break
37256        fi
37257      done
37258      IFS="$IFS_save"
37259    else
37260      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
37261$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
37262      new_path="$path"
37263    fi
37264
37265    if test "x$new_path" = x; then
37266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37267$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37268      has_space=`$ECHO "$complete" | $GREP " "`
37269      if test "x$has_space" != x; then
37270        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37272      fi
37273      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37274    fi
37275  fi
37276
37277  # Now join together the path and the arguments once again
37278  if test "x$arguments" != xEOL; then
37279    new_complete="$new_path ${arguments% *}"
37280  else
37281    new_complete="$new_path"
37282  fi
37283
37284  if test "x$complete" != "x$new_complete"; then
37285    GNM="$new_complete"
37286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37287$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37288  fi
37289
37290
37291
37292  # Publish this variable in the help.
37293
37294
37295  if test "x$STRIP" = x; then
37296    # The variable is not set by user, try to locate tool using the code snippet
37297    for ac_prog in strip
37298do
37299  # Extract the first word of "$ac_prog", so it can be a program name with args.
37300set dummy $ac_prog; ac_word=$2
37301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37302$as_echo_n "checking for $ac_word... " >&6; }
37303if ${ac_cv_path_STRIP+:} false; then :
37304  $as_echo_n "(cached) " >&6
37305else
37306  case $STRIP in
37307  [\\/]* | ?:[\\/]*)
37308  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37309  ;;
37310  *)
37311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37312for as_dir in $PATH
37313do
37314  IFS=$as_save_IFS
37315  test -z "$as_dir" && as_dir=.
37316    for ac_exec_ext in '' $ac_executable_extensions; do
37317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37318    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37320    break 2
37321  fi
37322done
37323  done
37324IFS=$as_save_IFS
37325
37326  ;;
37327esac
37328fi
37329STRIP=$ac_cv_path_STRIP
37330if test -n "$STRIP"; then
37331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37332$as_echo "$STRIP" >&6; }
37333else
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37335$as_echo "no" >&6; }
37336fi
37337
37338
37339  test -n "$STRIP" && break
37340done
37341
37342  else
37343    # The variable is set, but is it from the command line or the environment?
37344
37345    # Try to remove the string !STRIP! from our list.
37346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37348      # If it failed, the variable was not from the command line. Ignore it,
37349      # but warn the user (except for BASH, which is always set by the calling BASH).
37350      if test "xSTRIP" != xBASH; then
37351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37352$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37353      fi
37354      # Try to locate tool using the code snippet
37355      for ac_prog in strip
37356do
37357  # Extract the first word of "$ac_prog", so it can be a program name with args.
37358set dummy $ac_prog; ac_word=$2
37359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37360$as_echo_n "checking for $ac_word... " >&6; }
37361if ${ac_cv_path_STRIP+:} false; then :
37362  $as_echo_n "(cached) " >&6
37363else
37364  case $STRIP in
37365  [\\/]* | ?:[\\/]*)
37366  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37367  ;;
37368  *)
37369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37370for as_dir in $PATH
37371do
37372  IFS=$as_save_IFS
37373  test -z "$as_dir" && as_dir=.
37374    for ac_exec_ext in '' $ac_executable_extensions; do
37375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37376    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37378    break 2
37379  fi
37380done
37381  done
37382IFS=$as_save_IFS
37383
37384  ;;
37385esac
37386fi
37387STRIP=$ac_cv_path_STRIP
37388if test -n "$STRIP"; then
37389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37390$as_echo "$STRIP" >&6; }
37391else
37392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37393$as_echo "no" >&6; }
37394fi
37395
37396
37397  test -n "$STRIP" && break
37398done
37399
37400    else
37401      # If it succeeded, then it was overridden by the user. We will use it
37402      # for the tool.
37403
37404      # First remove it from the list of overridden variables, so we can test
37405      # for unknown variables in the end.
37406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37407
37408      # Check if the provided tool contains a complete path.
37409      tool_specified="$STRIP"
37410      tool_basename="${tool_specified##*/}"
37411      if test "x$tool_basename" = "x$tool_specified"; then
37412        # A command without a complete path is provided, search $PATH.
37413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37414$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37415        # Extract the first word of "$tool_basename", so it can be a program name with args.
37416set dummy $tool_basename; ac_word=$2
37417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37418$as_echo_n "checking for $ac_word... " >&6; }
37419if ${ac_cv_path_STRIP+:} false; then :
37420  $as_echo_n "(cached) " >&6
37421else
37422  case $STRIP in
37423  [\\/]* | ?:[\\/]*)
37424  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37425  ;;
37426  *)
37427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37428for as_dir in $PATH
37429do
37430  IFS=$as_save_IFS
37431  test -z "$as_dir" && as_dir=.
37432    for ac_exec_ext in '' $ac_executable_extensions; do
37433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37434    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37436    break 2
37437  fi
37438done
37439  done
37440IFS=$as_save_IFS
37441
37442  ;;
37443esac
37444fi
37445STRIP=$ac_cv_path_STRIP
37446if test -n "$STRIP"; then
37447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37448$as_echo "$STRIP" >&6; }
37449else
37450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37451$as_echo "no" >&6; }
37452fi
37453
37454
37455        if test "x$STRIP" = x; then
37456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37457        fi
37458      else
37459        # Otherwise we believe it is a complete path. Use it as it is.
37460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37461$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37463$as_echo_n "checking for STRIP... " >&6; }
37464        if test ! -x "$tool_specified"; then
37465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37466$as_echo "not found" >&6; }
37467          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37468        fi
37469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37470$as_echo "$tool_specified" >&6; }
37471      fi
37472    fi
37473  fi
37474
37475
37476
37477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37478
37479  # First separate the path from the arguments. This will split at the first
37480  # space.
37481  complete="$STRIP"
37482  path="${complete%% *}"
37483  tmp="$complete EOL"
37484  arguments="${tmp#* }"
37485
37486  # Input might be given as Windows format, start by converting to
37487  # unix format.
37488  new_path=`$CYGPATH -u "$path"`
37489
37490  # Now try to locate executable using which
37491  new_path=`$WHICH "$new_path" 2> /dev/null`
37492  # bat and cmd files are not always considered executable in cygwin causing which
37493  # to not find them
37494  if test "x$new_path" = x \
37495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37497    new_path=`$CYGPATH -u "$path"`
37498  fi
37499  if test "x$new_path" = x; then
37500    # Oops. Which didn't find the executable.
37501    # The splitting of arguments from the executable at a space might have been incorrect,
37502    # since paths with space are more likely in Windows. Give it another try with the whole
37503    # argument.
37504    path="$complete"
37505    arguments="EOL"
37506    new_path=`$CYGPATH -u "$path"`
37507    new_path=`$WHICH "$new_path" 2> /dev/null`
37508    # bat and cmd files are not always considered executable in cygwin causing which
37509    # to not find them
37510    if test "x$new_path" = x \
37511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37513      new_path=`$CYGPATH -u "$path"`
37514    fi
37515    if test "x$new_path" = x; then
37516      # It's still not found. Now this is an unrecoverable error.
37517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37518$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37519      has_space=`$ECHO "$complete" | $GREP " "`
37520      if test "x$has_space" != x; then
37521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37523      fi
37524      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37525    fi
37526  fi
37527
37528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37531  # "foo.exe" is OK but "foo" is an error.
37532  #
37533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37534  # It is also a way to make sure we got the proper file name for the real test later on.
37535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37536  if test "x$test_shortpath" = x; then
37537    # Short path failed, file does not exist as specified.
37538    # Try adding .exe or .cmd
37539    if test -f "${new_path}.exe"; then
37540      input_to_shortpath="${new_path}.exe"
37541    elif test -f "${new_path}.cmd"; then
37542      input_to_shortpath="${new_path}.cmd"
37543    else
37544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37545$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37548      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37549    fi
37550  else
37551    input_to_shortpath="$new_path"
37552  fi
37553
37554  # Call helper function which possibly converts this using DOS-style short mode.
37555  # If so, the updated path is stored in $new_path.
37556  new_path="$input_to_shortpath"
37557
37558  input_path="$input_to_shortpath"
37559  # Check if we need to convert this using DOS-style short mode. If the path
37560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37561  # take no chances and rewrite it.
37562  # Note: m4 eats our [], so we need to use [ and ] instead.
37563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37564  if test "x$has_forbidden_chars" != x; then
37565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37569      # Going to short mode and back again did indeed matter. Since short mode is
37570      # case insensitive, let's make it lowercase to improve readability.
37571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37572      # Now convert it back to Unix-stile (cygpath)
37573      input_path=`$CYGPATH -u "$shortmode_path"`
37574      new_path="$input_path"
37575    fi
37576  fi
37577
37578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37579  if test "x$test_cygdrive_prefix" = x; then
37580    # As a simple fix, exclude /usr/bin since it's not a real path.
37581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37583      # a path prefixed by /cygdrive for fixpath to work.
37584      new_path="$CYGWIN_ROOT_PATH$input_path"
37585    fi
37586  fi
37587
37588  # remove trailing .exe if any
37589  new_path="${new_path/%.exe/}"
37590
37591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37592
37593  # First separate the path from the arguments. This will split at the first
37594  # space.
37595  complete="$STRIP"
37596  path="${complete%% *}"
37597  tmp="$complete EOL"
37598  arguments="${tmp#* }"
37599
37600  # Input might be given as Windows format, start by converting to
37601  # unix format.
37602  new_path="$path"
37603
37604  windows_path="$new_path"
37605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37606    unix_path=`$CYGPATH -u "$windows_path"`
37607    new_path="$unix_path"
37608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37610    new_path="$unix_path"
37611  fi
37612
37613
37614  # Now try to locate executable using which
37615  new_path=`$WHICH "$new_path" 2> /dev/null`
37616
37617  if test "x$new_path" = x; then
37618    # Oops. Which didn't find the executable.
37619    # The splitting of arguments from the executable at a space might have been incorrect,
37620    # since paths with space are more likely in Windows. Give it another try with the whole
37621    # argument.
37622    path="$complete"
37623    arguments="EOL"
37624    new_path="$path"
37625
37626  windows_path="$new_path"
37627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37628    unix_path=`$CYGPATH -u "$windows_path"`
37629    new_path="$unix_path"
37630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37632    new_path="$unix_path"
37633  fi
37634
37635
37636    new_path=`$WHICH "$new_path" 2> /dev/null`
37637
37638    if test "x$new_path" = x; then
37639      # It's still not found. Now this is an unrecoverable error.
37640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37641$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37642      has_space=`$ECHO "$complete" | $GREP " "`
37643      if test "x$has_space" != x; then
37644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37646      fi
37647      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37648    fi
37649  fi
37650
37651  # Now new_path has a complete unix path to the binary
37652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37653    # Keep paths in /bin as-is, but remove trailing .exe if any
37654    new_path="${new_path/%.exe/}"
37655    # Do not save /bin paths to all_fixpath_prefixes!
37656  else
37657    # Not in mixed or Windows style, start by that.
37658    new_path=`cmd //c echo $new_path`
37659
37660  input_path="$new_path"
37661  # Check if we need to convert this using DOS-style short mode. If the path
37662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37663  # take no chances and rewrite it.
37664  # Note: m4 eats our [], so we need to use [ and ] instead.
37665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37666  if test "x$has_forbidden_chars" != x; then
37667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37669  fi
37670
37671    # Output is in $new_path
37672
37673  windows_path="$new_path"
37674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37675    unix_path=`$CYGPATH -u "$windows_path"`
37676    new_path="$unix_path"
37677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37679    new_path="$unix_path"
37680  fi
37681
37682    # remove trailing .exe if any
37683    new_path="${new_path/%.exe/}"
37684
37685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37687  fi
37688
37689  else
37690    # We're on a posix platform. Hooray! :)
37691    # First separate the path from the arguments. This will split at the first
37692    # space.
37693    complete="$STRIP"
37694    path="${complete%% *}"
37695    tmp="$complete EOL"
37696    arguments="${tmp#* }"
37697
37698    # Cannot rely on the command "which" here since it doesn't always work.
37699    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37700    if test -z "$is_absolute_path"; then
37701      # Path to executable is not absolute. Find it.
37702      IFS_save="$IFS"
37703      IFS=:
37704      for p in $PATH; do
37705        if test -f "$p/$path" && test -x "$p/$path"; then
37706          new_path="$p/$path"
37707          break
37708        fi
37709      done
37710      IFS="$IFS_save"
37711    else
37712      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37713$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37714      new_path="$path"
37715    fi
37716
37717    if test "x$new_path" = x; then
37718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37719$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37720      has_space=`$ECHO "$complete" | $GREP " "`
37721      if test "x$has_space" != x; then
37722        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37724      fi
37725      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37726    fi
37727  fi
37728
37729  # Now join together the path and the arguments once again
37730  if test "x$arguments" != xEOL; then
37731    new_complete="$new_path ${arguments% *}"
37732  else
37733    new_complete="$new_path"
37734  fi
37735
37736  if test "x$complete" != "x$new_complete"; then
37737    STRIP="$new_complete"
37738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37739$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37740  fi
37741
37742
37743
37744  # Publish this variable in the help.
37745
37746
37747  if test "x$MCS" = x; then
37748    # The variable is not set by user, try to locate tool using the code snippet
37749    for ac_prog in mcs
37750do
37751  # Extract the first word of "$ac_prog", so it can be a program name with args.
37752set dummy $ac_prog; ac_word=$2
37753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37754$as_echo_n "checking for $ac_word... " >&6; }
37755if ${ac_cv_path_MCS+:} false; then :
37756  $as_echo_n "(cached) " >&6
37757else
37758  case $MCS in
37759  [\\/]* | ?:[\\/]*)
37760  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37761  ;;
37762  *)
37763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37764for as_dir in $PATH
37765do
37766  IFS=$as_save_IFS
37767  test -z "$as_dir" && as_dir=.
37768    for ac_exec_ext in '' $ac_executable_extensions; do
37769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37770    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37772    break 2
37773  fi
37774done
37775  done
37776IFS=$as_save_IFS
37777
37778  ;;
37779esac
37780fi
37781MCS=$ac_cv_path_MCS
37782if test -n "$MCS"; then
37783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37784$as_echo "$MCS" >&6; }
37785else
37786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37787$as_echo "no" >&6; }
37788fi
37789
37790
37791  test -n "$MCS" && break
37792done
37793
37794  else
37795    # The variable is set, but is it from the command line or the environment?
37796
37797    # Try to remove the string !MCS! from our list.
37798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37800      # If it failed, the variable was not from the command line. Ignore it,
37801      # but warn the user (except for BASH, which is always set by the calling BASH).
37802      if test "xMCS" != xBASH; then
37803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37804$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37805      fi
37806      # Try to locate tool using the code snippet
37807      for ac_prog in mcs
37808do
37809  # Extract the first word of "$ac_prog", so it can be a program name with args.
37810set dummy $ac_prog; ac_word=$2
37811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37812$as_echo_n "checking for $ac_word... " >&6; }
37813if ${ac_cv_path_MCS+:} false; then :
37814  $as_echo_n "(cached) " >&6
37815else
37816  case $MCS in
37817  [\\/]* | ?:[\\/]*)
37818  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37819  ;;
37820  *)
37821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37822for as_dir in $PATH
37823do
37824  IFS=$as_save_IFS
37825  test -z "$as_dir" && as_dir=.
37826    for ac_exec_ext in '' $ac_executable_extensions; do
37827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37828    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836  ;;
37837esac
37838fi
37839MCS=$ac_cv_path_MCS
37840if test -n "$MCS"; then
37841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37842$as_echo "$MCS" >&6; }
37843else
37844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37845$as_echo "no" >&6; }
37846fi
37847
37848
37849  test -n "$MCS" && break
37850done
37851
37852    else
37853      # If it succeeded, then it was overridden by the user. We will use it
37854      # for the tool.
37855
37856      # First remove it from the list of overridden variables, so we can test
37857      # for unknown variables in the end.
37858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37859
37860      # Check if the provided tool contains a complete path.
37861      tool_specified="$MCS"
37862      tool_basename="${tool_specified##*/}"
37863      if test "x$tool_basename" = "x$tool_specified"; then
37864        # A command without a complete path is provided, search $PATH.
37865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37866$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37867        # Extract the first word of "$tool_basename", so it can be a program name with args.
37868set dummy $tool_basename; ac_word=$2
37869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37870$as_echo_n "checking for $ac_word... " >&6; }
37871if ${ac_cv_path_MCS+:} false; then :
37872  $as_echo_n "(cached) " >&6
37873else
37874  case $MCS in
37875  [\\/]* | ?:[\\/]*)
37876  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37877  ;;
37878  *)
37879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37880for as_dir in $PATH
37881do
37882  IFS=$as_save_IFS
37883  test -z "$as_dir" && as_dir=.
37884    for ac_exec_ext in '' $ac_executable_extensions; do
37885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37886    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37888    break 2
37889  fi
37890done
37891  done
37892IFS=$as_save_IFS
37893
37894  ;;
37895esac
37896fi
37897MCS=$ac_cv_path_MCS
37898if test -n "$MCS"; then
37899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37900$as_echo "$MCS" >&6; }
37901else
37902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37903$as_echo "no" >&6; }
37904fi
37905
37906
37907        if test "x$MCS" = x; then
37908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37909        fi
37910      else
37911        # Otherwise we believe it is a complete path. Use it as it is.
37912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37913$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37915$as_echo_n "checking for MCS... " >&6; }
37916        if test ! -x "$tool_specified"; then
37917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37918$as_echo "not found" >&6; }
37919          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37920        fi
37921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37922$as_echo "$tool_specified" >&6; }
37923      fi
37924    fi
37925  fi
37926
37927
37928
37929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37930
37931  # First separate the path from the arguments. This will split at the first
37932  # space.
37933  complete="$MCS"
37934  path="${complete%% *}"
37935  tmp="$complete EOL"
37936  arguments="${tmp#* }"
37937
37938  # Input might be given as Windows format, start by converting to
37939  # unix format.
37940  new_path=`$CYGPATH -u "$path"`
37941
37942  # Now try to locate executable using which
37943  new_path=`$WHICH "$new_path" 2> /dev/null`
37944  # bat and cmd files are not always considered executable in cygwin causing which
37945  # to not find them
37946  if test "x$new_path" = x \
37947      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37948      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37949    new_path=`$CYGPATH -u "$path"`
37950  fi
37951  if test "x$new_path" = x; then
37952    # Oops. Which didn't find the executable.
37953    # The splitting of arguments from the executable at a space might have been incorrect,
37954    # since paths with space are more likely in Windows. Give it another try with the whole
37955    # argument.
37956    path="$complete"
37957    arguments="EOL"
37958    new_path=`$CYGPATH -u "$path"`
37959    new_path=`$WHICH "$new_path" 2> /dev/null`
37960    # bat and cmd files are not always considered executable in cygwin causing which
37961    # to not find them
37962    if test "x$new_path" = x \
37963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37965      new_path=`$CYGPATH -u "$path"`
37966    fi
37967    if test "x$new_path" = x; then
37968      # It's still not found. Now this is an unrecoverable error.
37969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37970$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37971      has_space=`$ECHO "$complete" | $GREP " "`
37972      if test "x$has_space" != x; then
37973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37975      fi
37976      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37977    fi
37978  fi
37979
37980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37983  # "foo.exe" is OK but "foo" is an error.
37984  #
37985  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37986  # It is also a way to make sure we got the proper file name for the real test later on.
37987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37988  if test "x$test_shortpath" = x; then
37989    # Short path failed, file does not exist as specified.
37990    # Try adding .exe or .cmd
37991    if test -f "${new_path}.exe"; then
37992      input_to_shortpath="${new_path}.exe"
37993    elif test -f "${new_path}.cmd"; then
37994      input_to_shortpath="${new_path}.cmd"
37995    else
37996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
37997$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
37998      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37999$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38000      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38001    fi
38002  else
38003    input_to_shortpath="$new_path"
38004  fi
38005
38006  # Call helper function which possibly converts this using DOS-style short mode.
38007  # If so, the updated path is stored in $new_path.
38008  new_path="$input_to_shortpath"
38009
38010  input_path="$input_to_shortpath"
38011  # Check if we need to convert this using DOS-style short mode. If the path
38012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38013  # take no chances and rewrite it.
38014  # Note: m4 eats our [], so we need to use [ and ] instead.
38015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38016  if test "x$has_forbidden_chars" != x; then
38017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38021      # Going to short mode and back again did indeed matter. Since short mode is
38022      # case insensitive, let's make it lowercase to improve readability.
38023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38024      # Now convert it back to Unix-stile (cygpath)
38025      input_path=`$CYGPATH -u "$shortmode_path"`
38026      new_path="$input_path"
38027    fi
38028  fi
38029
38030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38031  if test "x$test_cygdrive_prefix" = x; then
38032    # As a simple fix, exclude /usr/bin since it's not a real path.
38033    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38035      # a path prefixed by /cygdrive for fixpath to work.
38036      new_path="$CYGWIN_ROOT_PATH$input_path"
38037    fi
38038  fi
38039
38040  # remove trailing .exe if any
38041  new_path="${new_path/%.exe/}"
38042
38043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38044
38045  # First separate the path from the arguments. This will split at the first
38046  # space.
38047  complete="$MCS"
38048  path="${complete%% *}"
38049  tmp="$complete EOL"
38050  arguments="${tmp#* }"
38051
38052  # Input might be given as Windows format, start by converting to
38053  # unix format.
38054  new_path="$path"
38055
38056  windows_path="$new_path"
38057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38058    unix_path=`$CYGPATH -u "$windows_path"`
38059    new_path="$unix_path"
38060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38062    new_path="$unix_path"
38063  fi
38064
38065
38066  # Now try to locate executable using which
38067  new_path=`$WHICH "$new_path" 2> /dev/null`
38068
38069  if test "x$new_path" = x; then
38070    # Oops. Which didn't find the executable.
38071    # The splitting of arguments from the executable at a space might have been incorrect,
38072    # since paths with space are more likely in Windows. Give it another try with the whole
38073    # argument.
38074    path="$complete"
38075    arguments="EOL"
38076    new_path="$path"
38077
38078  windows_path="$new_path"
38079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38080    unix_path=`$CYGPATH -u "$windows_path"`
38081    new_path="$unix_path"
38082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38084    new_path="$unix_path"
38085  fi
38086
38087
38088    new_path=`$WHICH "$new_path" 2> /dev/null`
38089
38090    if test "x$new_path" = x; then
38091      # It's still not found. Now this is an unrecoverable error.
38092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38093$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38094      has_space=`$ECHO "$complete" | $GREP " "`
38095      if test "x$has_space" != x; then
38096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38098      fi
38099      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38100    fi
38101  fi
38102
38103  # Now new_path has a complete unix path to the binary
38104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38105    # Keep paths in /bin as-is, but remove trailing .exe if any
38106    new_path="${new_path/%.exe/}"
38107    # Do not save /bin paths to all_fixpath_prefixes!
38108  else
38109    # Not in mixed or Windows style, start by that.
38110    new_path=`cmd //c echo $new_path`
38111
38112  input_path="$new_path"
38113  # Check if we need to convert this using DOS-style short mode. If the path
38114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38115  # take no chances and rewrite it.
38116  # Note: m4 eats our [], so we need to use [ and ] instead.
38117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38118  if test "x$has_forbidden_chars" != x; then
38119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38121  fi
38122
38123    # Output is in $new_path
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134    # remove trailing .exe if any
38135    new_path="${new_path/%.exe/}"
38136
38137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38139  fi
38140
38141  else
38142    # We're on a posix platform. Hooray! :)
38143    # First separate the path from the arguments. This will split at the first
38144    # space.
38145    complete="$MCS"
38146    path="${complete%% *}"
38147    tmp="$complete EOL"
38148    arguments="${tmp#* }"
38149
38150    # Cannot rely on the command "which" here since it doesn't always work.
38151    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38152    if test -z "$is_absolute_path"; then
38153      # Path to executable is not absolute. Find it.
38154      IFS_save="$IFS"
38155      IFS=:
38156      for p in $PATH; do
38157        if test -f "$p/$path" && test -x "$p/$path"; then
38158          new_path="$p/$path"
38159          break
38160        fi
38161      done
38162      IFS="$IFS_save"
38163    else
38164      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
38165$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
38166      new_path="$path"
38167    fi
38168
38169    if test "x$new_path" = x; then
38170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38171$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38172      has_space=`$ECHO "$complete" | $GREP " "`
38173      if test "x$has_space" != x; then
38174        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38176      fi
38177      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38178    fi
38179  fi
38180
38181  # Now join together the path and the arguments once again
38182  if test "x$arguments" != xEOL; then
38183    new_complete="$new_path ${arguments% *}"
38184  else
38185    new_complete="$new_path"
38186  fi
38187
38188  if test "x$complete" != "x$new_complete"; then
38189    MCS="$new_complete"
38190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
38191$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
38192  fi
38193
38194  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
38195
38196
38197  # Publish this variable in the help.
38198
38199
38200  if test "x$NM" = x; then
38201    # The variable is not set by user, try to locate tool using the code snippet
38202    if test -n "$ac_tool_prefix"; then
38203  for ac_prog in nm
38204  do
38205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208$as_echo_n "checking for $ac_word... " >&6; }
38209if ${ac_cv_prog_NM+:} false; then :
38210  $as_echo_n "(cached) " >&6
38211else
38212  if test -n "$NM"; then
38213  ac_cv_prog_NM="$NM" # Let the user override the test.
38214else
38215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38216for as_dir in $PATH
38217do
38218  IFS=$as_save_IFS
38219  test -z "$as_dir" && as_dir=.
38220    for ac_exec_ext in '' $ac_executable_extensions; do
38221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38222    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38224    break 2
38225  fi
38226done
38227  done
38228IFS=$as_save_IFS
38229
38230fi
38231fi
38232NM=$ac_cv_prog_NM
38233if test -n "$NM"; then
38234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38235$as_echo "$NM" >&6; }
38236else
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38238$as_echo "no" >&6; }
38239fi
38240
38241
38242    test -n "$NM" && break
38243  done
38244fi
38245if test -z "$NM"; then
38246  ac_ct_NM=$NM
38247  for ac_prog in nm
38248do
38249  # Extract the first word of "$ac_prog", so it can be a program name with args.
38250set dummy $ac_prog; ac_word=$2
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38252$as_echo_n "checking for $ac_word... " >&6; }
38253if ${ac_cv_prog_ac_ct_NM+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  if test -n "$ac_ct_NM"; then
38257  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38258else
38259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38260for as_dir in $PATH
38261do
38262  IFS=$as_save_IFS
38263  test -z "$as_dir" && as_dir=.
38264    for ac_exec_ext in '' $ac_executable_extensions; do
38265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38266    ac_cv_prog_ac_ct_NM="$ac_prog"
38267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38268    break 2
38269  fi
38270done
38271  done
38272IFS=$as_save_IFS
38273
38274fi
38275fi
38276ac_ct_NM=$ac_cv_prog_ac_ct_NM
38277if test -n "$ac_ct_NM"; then
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38279$as_echo "$ac_ct_NM" >&6; }
38280else
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38282$as_echo "no" >&6; }
38283fi
38284
38285
38286  test -n "$ac_ct_NM" && break
38287done
38288
38289  if test "x$ac_ct_NM" = x; then
38290    NM=""
38291  else
38292    case $cross_compiling:$ac_tool_warned in
38293yes:)
38294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38296ac_tool_warned=yes ;;
38297esac
38298    NM=$ac_ct_NM
38299  fi
38300fi
38301
38302  else
38303    # The variable is set, but is it from the command line or the environment?
38304
38305    # Try to remove the string !NM! from our list.
38306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38308      # If it failed, the variable was not from the command line. Ignore it,
38309      # but warn the user (except for BASH, which is always set by the calling BASH).
38310      if test "xNM" != xBASH; then
38311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38312$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38313      fi
38314      # Try to locate tool using the code snippet
38315      if test -n "$ac_tool_prefix"; then
38316  for ac_prog in nm
38317  do
38318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38321$as_echo_n "checking for $ac_word... " >&6; }
38322if ${ac_cv_prog_NM+:} false; then :
38323  $as_echo_n "(cached) " >&6
38324else
38325  if test -n "$NM"; then
38326  ac_cv_prog_NM="$NM" # Let the user override the test.
38327else
38328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38329for as_dir in $PATH
38330do
38331  IFS=$as_save_IFS
38332  test -z "$as_dir" && as_dir=.
38333    for ac_exec_ext in '' $ac_executable_extensions; do
38334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38335    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38337    break 2
38338  fi
38339done
38340  done
38341IFS=$as_save_IFS
38342
38343fi
38344fi
38345NM=$ac_cv_prog_NM
38346if test -n "$NM"; then
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38348$as_echo "$NM" >&6; }
38349else
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351$as_echo "no" >&6; }
38352fi
38353
38354
38355    test -n "$NM" && break
38356  done
38357fi
38358if test -z "$NM"; then
38359  ac_ct_NM=$NM
38360  for ac_prog in nm
38361do
38362  # Extract the first word of "$ac_prog", so it can be a program name with args.
38363set dummy $ac_prog; ac_word=$2
38364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38365$as_echo_n "checking for $ac_word... " >&6; }
38366if ${ac_cv_prog_ac_ct_NM+:} false; then :
38367  $as_echo_n "(cached) " >&6
38368else
38369  if test -n "$ac_ct_NM"; then
38370  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38371else
38372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38373for as_dir in $PATH
38374do
38375  IFS=$as_save_IFS
38376  test -z "$as_dir" && as_dir=.
38377    for ac_exec_ext in '' $ac_executable_extensions; do
38378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38379    ac_cv_prog_ac_ct_NM="$ac_prog"
38380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38381    break 2
38382  fi
38383done
38384  done
38385IFS=$as_save_IFS
38386
38387fi
38388fi
38389ac_ct_NM=$ac_cv_prog_ac_ct_NM
38390if test -n "$ac_ct_NM"; then
38391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38392$as_echo "$ac_ct_NM" >&6; }
38393else
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38395$as_echo "no" >&6; }
38396fi
38397
38398
38399  test -n "$ac_ct_NM" && break
38400done
38401
38402  if test "x$ac_ct_NM" = x; then
38403    NM=""
38404  else
38405    case $cross_compiling:$ac_tool_warned in
38406yes:)
38407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38409ac_tool_warned=yes ;;
38410esac
38411    NM=$ac_ct_NM
38412  fi
38413fi
38414
38415    else
38416      # If it succeeded, then it was overridden by the user. We will use it
38417      # for the tool.
38418
38419      # First remove it from the list of overridden variables, so we can test
38420      # for unknown variables in the end.
38421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38422
38423      # Check if the provided tool contains a complete path.
38424      tool_specified="$NM"
38425      tool_basename="${tool_specified##*/}"
38426      if test "x$tool_basename" = "x$tool_specified"; then
38427        # A command without a complete path is provided, search $PATH.
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38429$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38430        # Extract the first word of "$tool_basename", so it can be a program name with args.
38431set dummy $tool_basename; ac_word=$2
38432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38433$as_echo_n "checking for $ac_word... " >&6; }
38434if ${ac_cv_path_NM+:} false; then :
38435  $as_echo_n "(cached) " >&6
38436else
38437  case $NM in
38438  [\\/]* | ?:[\\/]*)
38439  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38440  ;;
38441  *)
38442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38443for as_dir in $PATH
38444do
38445  IFS=$as_save_IFS
38446  test -z "$as_dir" && as_dir=.
38447    for ac_exec_ext in '' $ac_executable_extensions; do
38448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38449    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38451    break 2
38452  fi
38453done
38454  done
38455IFS=$as_save_IFS
38456
38457  ;;
38458esac
38459fi
38460NM=$ac_cv_path_NM
38461if test -n "$NM"; then
38462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38463$as_echo "$NM" >&6; }
38464else
38465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38466$as_echo "no" >&6; }
38467fi
38468
38469
38470        if test "x$NM" = x; then
38471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38472        fi
38473      else
38474        # Otherwise we believe it is a complete path. Use it as it is.
38475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38476$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38478$as_echo_n "checking for NM... " >&6; }
38479        if test ! -x "$tool_specified"; then
38480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38481$as_echo "not found" >&6; }
38482          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38483        fi
38484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38485$as_echo "$tool_specified" >&6; }
38486      fi
38487    fi
38488  fi
38489
38490
38491
38492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38493
38494  # First separate the path from the arguments. This will split at the first
38495  # space.
38496  complete="$NM"
38497  path="${complete%% *}"
38498  tmp="$complete EOL"
38499  arguments="${tmp#* }"
38500
38501  # Input might be given as Windows format, start by converting to
38502  # unix format.
38503  new_path=`$CYGPATH -u "$path"`
38504
38505  # Now try to locate executable using which
38506  new_path=`$WHICH "$new_path" 2> /dev/null`
38507  # bat and cmd files are not always considered executable in cygwin causing which
38508  # to not find them
38509  if test "x$new_path" = x \
38510      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38511      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38512    new_path=`$CYGPATH -u "$path"`
38513  fi
38514  if test "x$new_path" = x; then
38515    # Oops. Which didn't find the executable.
38516    # The splitting of arguments from the executable at a space might have been incorrect,
38517    # since paths with space are more likely in Windows. Give it another try with the whole
38518    # argument.
38519    path="$complete"
38520    arguments="EOL"
38521    new_path=`$CYGPATH -u "$path"`
38522    new_path=`$WHICH "$new_path" 2> /dev/null`
38523    # bat and cmd files are not always considered executable in cygwin causing which
38524    # to not find them
38525    if test "x$new_path" = x \
38526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38528      new_path=`$CYGPATH -u "$path"`
38529    fi
38530    if test "x$new_path" = x; then
38531      # It's still not found. Now this is an unrecoverable error.
38532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38533$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38534      has_space=`$ECHO "$complete" | $GREP " "`
38535      if test "x$has_space" != x; then
38536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38538      fi
38539      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38540    fi
38541  fi
38542
38543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38546  # "foo.exe" is OK but "foo" is an error.
38547  #
38548  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38549  # It is also a way to make sure we got the proper file name for the real test later on.
38550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38551  if test "x$test_shortpath" = x; then
38552    # Short path failed, file does not exist as specified.
38553    # Try adding .exe or .cmd
38554    if test -f "${new_path}.exe"; then
38555      input_to_shortpath="${new_path}.exe"
38556    elif test -f "${new_path}.cmd"; then
38557      input_to_shortpath="${new_path}.cmd"
38558    else
38559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38560$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38561      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38562$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38563      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38564    fi
38565  else
38566    input_to_shortpath="$new_path"
38567  fi
38568
38569  # Call helper function which possibly converts this using DOS-style short mode.
38570  # If so, the updated path is stored in $new_path.
38571  new_path="$input_to_shortpath"
38572
38573  input_path="$input_to_shortpath"
38574  # Check if we need to convert this using DOS-style short mode. If the path
38575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38576  # take no chances and rewrite it.
38577  # Note: m4 eats our [], so we need to use [ and ] instead.
38578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38579  if test "x$has_forbidden_chars" != x; then
38580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38584      # Going to short mode and back again did indeed matter. Since short mode is
38585      # case insensitive, let's make it lowercase to improve readability.
38586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38587      # Now convert it back to Unix-stile (cygpath)
38588      input_path=`$CYGPATH -u "$shortmode_path"`
38589      new_path="$input_path"
38590    fi
38591  fi
38592
38593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38594  if test "x$test_cygdrive_prefix" = x; then
38595    # As a simple fix, exclude /usr/bin since it's not a real path.
38596    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38598      # a path prefixed by /cygdrive for fixpath to work.
38599      new_path="$CYGWIN_ROOT_PATH$input_path"
38600    fi
38601  fi
38602
38603  # remove trailing .exe if any
38604  new_path="${new_path/%.exe/}"
38605
38606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607
38608  # First separate the path from the arguments. This will split at the first
38609  # space.
38610  complete="$NM"
38611  path="${complete%% *}"
38612  tmp="$complete EOL"
38613  arguments="${tmp#* }"
38614
38615  # Input might be given as Windows format, start by converting to
38616  # unix format.
38617  new_path="$path"
38618
38619  windows_path="$new_path"
38620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38621    unix_path=`$CYGPATH -u "$windows_path"`
38622    new_path="$unix_path"
38623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38625    new_path="$unix_path"
38626  fi
38627
38628
38629  # Now try to locate executable using which
38630  new_path=`$WHICH "$new_path" 2> /dev/null`
38631
38632  if test "x$new_path" = x; then
38633    # Oops. Which didn't find the executable.
38634    # The splitting of arguments from the executable at a space might have been incorrect,
38635    # since paths with space are more likely in Windows. Give it another try with the whole
38636    # argument.
38637    path="$complete"
38638    arguments="EOL"
38639    new_path="$path"
38640
38641  windows_path="$new_path"
38642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38643    unix_path=`$CYGPATH -u "$windows_path"`
38644    new_path="$unix_path"
38645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38647    new_path="$unix_path"
38648  fi
38649
38650
38651    new_path=`$WHICH "$new_path" 2> /dev/null`
38652
38653    if test "x$new_path" = x; then
38654      # It's still not found. Now this is an unrecoverable error.
38655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38656$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38657      has_space=`$ECHO "$complete" | $GREP " "`
38658      if test "x$has_space" != x; then
38659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38661      fi
38662      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38663    fi
38664  fi
38665
38666  # Now new_path has a complete unix path to the binary
38667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38668    # Keep paths in /bin as-is, but remove trailing .exe if any
38669    new_path="${new_path/%.exe/}"
38670    # Do not save /bin paths to all_fixpath_prefixes!
38671  else
38672    # Not in mixed or Windows style, start by that.
38673    new_path=`cmd //c echo $new_path`
38674
38675  input_path="$new_path"
38676  # Check if we need to convert this using DOS-style short mode. If the path
38677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38678  # take no chances and rewrite it.
38679  # Note: m4 eats our [], so we need to use [ and ] instead.
38680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38681  if test "x$has_forbidden_chars" != x; then
38682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38684  fi
38685
38686    # Output is in $new_path
38687
38688  windows_path="$new_path"
38689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38690    unix_path=`$CYGPATH -u "$windows_path"`
38691    new_path="$unix_path"
38692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38694    new_path="$unix_path"
38695  fi
38696
38697    # remove trailing .exe if any
38698    new_path="${new_path/%.exe/}"
38699
38700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38702  fi
38703
38704  else
38705    # We're on a posix platform. Hooray! :)
38706    # First separate the path from the arguments. This will split at the first
38707    # space.
38708    complete="$NM"
38709    path="${complete%% *}"
38710    tmp="$complete EOL"
38711    arguments="${tmp#* }"
38712
38713    # Cannot rely on the command "which" here since it doesn't always work.
38714    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38715    if test -z "$is_absolute_path"; then
38716      # Path to executable is not absolute. Find it.
38717      IFS_save="$IFS"
38718      IFS=:
38719      for p in $PATH; do
38720        if test -f "$p/$path" && test -x "$p/$path"; then
38721          new_path="$p/$path"
38722          break
38723        fi
38724      done
38725      IFS="$IFS_save"
38726    else
38727      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
38728$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
38729      new_path="$path"
38730    fi
38731
38732    if test "x$new_path" = x; then
38733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38734$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38735      has_space=`$ECHO "$complete" | $GREP " "`
38736      if test "x$has_space" != x; then
38737        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38739      fi
38740      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38741    fi
38742  fi
38743
38744  # Now join together the path and the arguments once again
38745  if test "x$arguments" != xEOL; then
38746    new_complete="$new_path ${arguments% *}"
38747  else
38748    new_complete="$new_path"
38749  fi
38750
38751  if test "x$complete" != "x$new_complete"; then
38752    NM="$new_complete"
38753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38754$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38755  fi
38756
38757    GNM="$NM"
38758
38759
38760
38761  # Publish this variable in the help.
38762
38763
38764  if test "x$STRIP" = x; then
38765    # The variable is not set by user, try to locate tool using the code snippet
38766    if test -n "$ac_tool_prefix"; then
38767  for ac_prog in strip
38768  do
38769    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38772$as_echo_n "checking for $ac_word... " >&6; }
38773if ${ac_cv_prog_STRIP+:} false; then :
38774  $as_echo_n "(cached) " >&6
38775else
38776  if test -n "$STRIP"; then
38777  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38778else
38779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38780for as_dir in $PATH
38781do
38782  IFS=$as_save_IFS
38783  test -z "$as_dir" && as_dir=.
38784    for ac_exec_ext in '' $ac_executable_extensions; do
38785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38786    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38788    break 2
38789  fi
38790done
38791  done
38792IFS=$as_save_IFS
38793
38794fi
38795fi
38796STRIP=$ac_cv_prog_STRIP
38797if test -n "$STRIP"; then
38798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38799$as_echo "$STRIP" >&6; }
38800else
38801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38802$as_echo "no" >&6; }
38803fi
38804
38805
38806    test -n "$STRIP" && break
38807  done
38808fi
38809if test -z "$STRIP"; then
38810  ac_ct_STRIP=$STRIP
38811  for ac_prog in strip
38812do
38813  # Extract the first word of "$ac_prog", so it can be a program name with args.
38814set dummy $ac_prog; ac_word=$2
38815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38816$as_echo_n "checking for $ac_word... " >&6; }
38817if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38818  $as_echo_n "(cached) " >&6
38819else
38820  if test -n "$ac_ct_STRIP"; then
38821  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38822else
38823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38824for as_dir in $PATH
38825do
38826  IFS=$as_save_IFS
38827  test -z "$as_dir" && as_dir=.
38828    for ac_exec_ext in '' $ac_executable_extensions; do
38829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38830    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38832    break 2
38833  fi
38834done
38835  done
38836IFS=$as_save_IFS
38837
38838fi
38839fi
38840ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38841if test -n "$ac_ct_STRIP"; then
38842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38843$as_echo "$ac_ct_STRIP" >&6; }
38844else
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38846$as_echo "no" >&6; }
38847fi
38848
38849
38850  test -n "$ac_ct_STRIP" && break
38851done
38852
38853  if test "x$ac_ct_STRIP" = x; then
38854    STRIP=""
38855  else
38856    case $cross_compiling:$ac_tool_warned in
38857yes:)
38858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38860ac_tool_warned=yes ;;
38861esac
38862    STRIP=$ac_ct_STRIP
38863  fi
38864fi
38865
38866  else
38867    # The variable is set, but is it from the command line or the environment?
38868
38869    # Try to remove the string !STRIP! from our list.
38870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38872      # If it failed, the variable was not from the command line. Ignore it,
38873      # but warn the user (except for BASH, which is always set by the calling BASH).
38874      if test "xSTRIP" != xBASH; then
38875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38876$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38877      fi
38878      # Try to locate tool using the code snippet
38879      if test -n "$ac_tool_prefix"; then
38880  for ac_prog in strip
38881  do
38882    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38883set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38885$as_echo_n "checking for $ac_word... " >&6; }
38886if ${ac_cv_prog_STRIP+:} false; then :
38887  $as_echo_n "(cached) " >&6
38888else
38889  if test -n "$STRIP"; then
38890  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38891else
38892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38893for as_dir in $PATH
38894do
38895  IFS=$as_save_IFS
38896  test -z "$as_dir" && as_dir=.
38897    for ac_exec_ext in '' $ac_executable_extensions; do
38898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38899    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38901    break 2
38902  fi
38903done
38904  done
38905IFS=$as_save_IFS
38906
38907fi
38908fi
38909STRIP=$ac_cv_prog_STRIP
38910if test -n "$STRIP"; then
38911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38912$as_echo "$STRIP" >&6; }
38913else
38914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38915$as_echo "no" >&6; }
38916fi
38917
38918
38919    test -n "$STRIP" && break
38920  done
38921fi
38922if test -z "$STRIP"; then
38923  ac_ct_STRIP=$STRIP
38924  for ac_prog in strip
38925do
38926  # Extract the first word of "$ac_prog", so it can be a program name with args.
38927set dummy $ac_prog; ac_word=$2
38928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38929$as_echo_n "checking for $ac_word... " >&6; }
38930if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38931  $as_echo_n "(cached) " >&6
38932else
38933  if test -n "$ac_ct_STRIP"; then
38934  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38935else
38936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38937for as_dir in $PATH
38938do
38939  IFS=$as_save_IFS
38940  test -z "$as_dir" && as_dir=.
38941    for ac_exec_ext in '' $ac_executable_extensions; do
38942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38943    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38945    break 2
38946  fi
38947done
38948  done
38949IFS=$as_save_IFS
38950
38951fi
38952fi
38953ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38954if test -n "$ac_ct_STRIP"; then
38955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38956$as_echo "$ac_ct_STRIP" >&6; }
38957else
38958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38959$as_echo "no" >&6; }
38960fi
38961
38962
38963  test -n "$ac_ct_STRIP" && break
38964done
38965
38966  if test "x$ac_ct_STRIP" = x; then
38967    STRIP=""
38968  else
38969    case $cross_compiling:$ac_tool_warned in
38970yes:)
38971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38973ac_tool_warned=yes ;;
38974esac
38975    STRIP=$ac_ct_STRIP
38976  fi
38977fi
38978
38979    else
38980      # If it succeeded, then it was overridden by the user. We will use it
38981      # for the tool.
38982
38983      # First remove it from the list of overridden variables, so we can test
38984      # for unknown variables in the end.
38985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38986
38987      # Check if the provided tool contains a complete path.
38988      tool_specified="$STRIP"
38989      tool_basename="${tool_specified##*/}"
38990      if test "x$tool_basename" = "x$tool_specified"; then
38991        # A command without a complete path is provided, search $PATH.
38992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38993$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38994        # Extract the first word of "$tool_basename", so it can be a program name with args.
38995set dummy $tool_basename; ac_word=$2
38996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38997$as_echo_n "checking for $ac_word... " >&6; }
38998if ${ac_cv_path_STRIP+:} false; then :
38999  $as_echo_n "(cached) " >&6
39000else
39001  case $STRIP in
39002  [\\/]* | ?:[\\/]*)
39003  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39004  ;;
39005  *)
39006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39007for as_dir in $PATH
39008do
39009  IFS=$as_save_IFS
39010  test -z "$as_dir" && as_dir=.
39011    for ac_exec_ext in '' $ac_executable_extensions; do
39012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39013    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39015    break 2
39016  fi
39017done
39018  done
39019IFS=$as_save_IFS
39020
39021  ;;
39022esac
39023fi
39024STRIP=$ac_cv_path_STRIP
39025if test -n "$STRIP"; then
39026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39027$as_echo "$STRIP" >&6; }
39028else
39029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39030$as_echo "no" >&6; }
39031fi
39032
39033
39034        if test "x$STRIP" = x; then
39035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39036        fi
39037      else
39038        # Otherwise we believe it is a complete path. Use it as it is.
39039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39040$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39042$as_echo_n "checking for STRIP... " >&6; }
39043        if test ! -x "$tool_specified"; then
39044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39045$as_echo "not found" >&6; }
39046          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39047        fi
39048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39049$as_echo "$tool_specified" >&6; }
39050      fi
39051    fi
39052  fi
39053
39054
39055
39056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39057
39058  # First separate the path from the arguments. This will split at the first
39059  # space.
39060  complete="$STRIP"
39061  path="${complete%% *}"
39062  tmp="$complete EOL"
39063  arguments="${tmp#* }"
39064
39065  # Input might be given as Windows format, start by converting to
39066  # unix format.
39067  new_path=`$CYGPATH -u "$path"`
39068
39069  # Now try to locate executable using which
39070  new_path=`$WHICH "$new_path" 2> /dev/null`
39071  # bat and cmd files are not always considered executable in cygwin causing which
39072  # to not find them
39073  if test "x$new_path" = x \
39074      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39075      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39076    new_path=`$CYGPATH -u "$path"`
39077  fi
39078  if test "x$new_path" = x; then
39079    # Oops. Which didn't find the executable.
39080    # The splitting of arguments from the executable at a space might have been incorrect,
39081    # since paths with space are more likely in Windows. Give it another try with the whole
39082    # argument.
39083    path="$complete"
39084    arguments="EOL"
39085    new_path=`$CYGPATH -u "$path"`
39086    new_path=`$WHICH "$new_path" 2> /dev/null`
39087    # bat and cmd files are not always considered executable in cygwin causing which
39088    # to not find them
39089    if test "x$new_path" = x \
39090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39092      new_path=`$CYGPATH -u "$path"`
39093    fi
39094    if test "x$new_path" = x; then
39095      # It's still not found. Now this is an unrecoverable error.
39096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39097$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39098      has_space=`$ECHO "$complete" | $GREP " "`
39099      if test "x$has_space" != x; then
39100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39102      fi
39103      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39104    fi
39105  fi
39106
39107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39110  # "foo.exe" is OK but "foo" is an error.
39111  #
39112  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39113  # It is also a way to make sure we got the proper file name for the real test later on.
39114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39115  if test "x$test_shortpath" = x; then
39116    # Short path failed, file does not exist as specified.
39117    # Try adding .exe or .cmd
39118    if test -f "${new_path}.exe"; then
39119      input_to_shortpath="${new_path}.exe"
39120    elif test -f "${new_path}.cmd"; then
39121      input_to_shortpath="${new_path}.cmd"
39122    else
39123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39124$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39127      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39128    fi
39129  else
39130    input_to_shortpath="$new_path"
39131  fi
39132
39133  # Call helper function which possibly converts this using DOS-style short mode.
39134  # If so, the updated path is stored in $new_path.
39135  new_path="$input_to_shortpath"
39136
39137  input_path="$input_to_shortpath"
39138  # Check if we need to convert this using DOS-style short mode. If the path
39139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39140  # take no chances and rewrite it.
39141  # Note: m4 eats our [], so we need to use [ and ] instead.
39142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39143  if test "x$has_forbidden_chars" != x; then
39144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39148      # Going to short mode and back again did indeed matter. Since short mode is
39149      # case insensitive, let's make it lowercase to improve readability.
39150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39151      # Now convert it back to Unix-stile (cygpath)
39152      input_path=`$CYGPATH -u "$shortmode_path"`
39153      new_path="$input_path"
39154    fi
39155  fi
39156
39157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39158  if test "x$test_cygdrive_prefix" = x; then
39159    # As a simple fix, exclude /usr/bin since it's not a real path.
39160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39162      # a path prefixed by /cygdrive for fixpath to work.
39163      new_path="$CYGWIN_ROOT_PATH$input_path"
39164    fi
39165  fi
39166
39167  # remove trailing .exe if any
39168  new_path="${new_path/%.exe/}"
39169
39170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39171
39172  # First separate the path from the arguments. This will split at the first
39173  # space.
39174  complete="$STRIP"
39175  path="${complete%% *}"
39176  tmp="$complete EOL"
39177  arguments="${tmp#* }"
39178
39179  # Input might be given as Windows format, start by converting to
39180  # unix format.
39181  new_path="$path"
39182
39183  windows_path="$new_path"
39184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39185    unix_path=`$CYGPATH -u "$windows_path"`
39186    new_path="$unix_path"
39187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39189    new_path="$unix_path"
39190  fi
39191
39192
39193  # Now try to locate executable using which
39194  new_path=`$WHICH "$new_path" 2> /dev/null`
39195
39196  if test "x$new_path" = x; then
39197    # Oops. Which didn't find the executable.
39198    # The splitting of arguments from the executable at a space might have been incorrect,
39199    # since paths with space are more likely in Windows. Give it another try with the whole
39200    # argument.
39201    path="$complete"
39202    arguments="EOL"
39203    new_path="$path"
39204
39205  windows_path="$new_path"
39206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39207    unix_path=`$CYGPATH -u "$windows_path"`
39208    new_path="$unix_path"
39209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39211    new_path="$unix_path"
39212  fi
39213
39214
39215    new_path=`$WHICH "$new_path" 2> /dev/null`
39216
39217    if test "x$new_path" = x; then
39218      # It's still not found. Now this is an unrecoverable error.
39219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39220$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39221      has_space=`$ECHO "$complete" | $GREP " "`
39222      if test "x$has_space" != x; then
39223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39225      fi
39226      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39227    fi
39228  fi
39229
39230  # Now new_path has a complete unix path to the binary
39231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39232    # Keep paths in /bin as-is, but remove trailing .exe if any
39233    new_path="${new_path/%.exe/}"
39234    # Do not save /bin paths to all_fixpath_prefixes!
39235  else
39236    # Not in mixed or Windows style, start by that.
39237    new_path=`cmd //c echo $new_path`
39238
39239  input_path="$new_path"
39240  # Check if we need to convert this using DOS-style short mode. If the path
39241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39242  # take no chances and rewrite it.
39243  # Note: m4 eats our [], so we need to use [ and ] instead.
39244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39245  if test "x$has_forbidden_chars" != x; then
39246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39248  fi
39249
39250    # Output is in $new_path
39251
39252  windows_path="$new_path"
39253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39254    unix_path=`$CYGPATH -u "$windows_path"`
39255    new_path="$unix_path"
39256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39258    new_path="$unix_path"
39259  fi
39260
39261    # remove trailing .exe if any
39262    new_path="${new_path/%.exe/}"
39263
39264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39266  fi
39267
39268  else
39269    # We're on a posix platform. Hooray! :)
39270    # First separate the path from the arguments. This will split at the first
39271    # space.
39272    complete="$STRIP"
39273    path="${complete%% *}"
39274    tmp="$complete EOL"
39275    arguments="${tmp#* }"
39276
39277    # Cannot rely on the command "which" here since it doesn't always work.
39278    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39279    if test -z "$is_absolute_path"; then
39280      # Path to executable is not absolute. Find it.
39281      IFS_save="$IFS"
39282      IFS=:
39283      for p in $PATH; do
39284        if test -f "$p/$path" && test -x "$p/$path"; then
39285          new_path="$p/$path"
39286          break
39287        fi
39288      done
39289      IFS="$IFS_save"
39290    else
39291      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
39292$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
39293      new_path="$path"
39294    fi
39295
39296    if test "x$new_path" = x; then
39297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39298$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39299      has_space=`$ECHO "$complete" | $GREP " "`
39300      if test "x$has_space" != x; then
39301        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39302$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39303      fi
39304      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39305    fi
39306  fi
39307
39308  # Now join together the path and the arguments once again
39309  if test "x$arguments" != xEOL; then
39310    new_complete="$new_path ${arguments% *}"
39311  else
39312    new_complete="$new_path"
39313  fi
39314
39315  if test "x$complete" != "x$new_complete"; then
39316    STRIP="$new_complete"
39317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39318$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39319  fi
39320
39321  fi
39322
39323  # objcopy is used for moving debug symbols to separate files when
39324  # full debug symbols are enabled.
39325  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
39326
39327
39328  # Publish this variable in the help.
39329
39330
39331  if test "x$OBJCOPY" = x; then
39332    # The variable is not set by user, try to locate tool using the code snippet
39333    if test -n "$ac_tool_prefix"; then
39334  for ac_prog in gobjcopy objcopy
39335  do
39336    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39337set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39339$as_echo_n "checking for $ac_word... " >&6; }
39340if ${ac_cv_prog_OBJCOPY+:} false; then :
39341  $as_echo_n "(cached) " >&6
39342else
39343  if test -n "$OBJCOPY"; then
39344  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39345else
39346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39347for as_dir in $PATH
39348do
39349  IFS=$as_save_IFS
39350  test -z "$as_dir" && as_dir=.
39351    for ac_exec_ext in '' $ac_executable_extensions; do
39352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39353    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39355    break 2
39356  fi
39357done
39358  done
39359IFS=$as_save_IFS
39360
39361fi
39362fi
39363OBJCOPY=$ac_cv_prog_OBJCOPY
39364if test -n "$OBJCOPY"; then
39365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39366$as_echo "$OBJCOPY" >&6; }
39367else
39368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39369$as_echo "no" >&6; }
39370fi
39371
39372
39373    test -n "$OBJCOPY" && break
39374  done
39375fi
39376if test -z "$OBJCOPY"; then
39377  ac_ct_OBJCOPY=$OBJCOPY
39378  for ac_prog in gobjcopy objcopy
39379do
39380  # Extract the first word of "$ac_prog", so it can be a program name with args.
39381set dummy $ac_prog; ac_word=$2
39382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39383$as_echo_n "checking for $ac_word... " >&6; }
39384if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39385  $as_echo_n "(cached) " >&6
39386else
39387  if test -n "$ac_ct_OBJCOPY"; then
39388  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39389else
39390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39391for as_dir in $PATH
39392do
39393  IFS=$as_save_IFS
39394  test -z "$as_dir" && as_dir=.
39395    for ac_exec_ext in '' $ac_executable_extensions; do
39396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39397    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39399    break 2
39400  fi
39401done
39402  done
39403IFS=$as_save_IFS
39404
39405fi
39406fi
39407ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39408if test -n "$ac_ct_OBJCOPY"; then
39409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39410$as_echo "$ac_ct_OBJCOPY" >&6; }
39411else
39412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39413$as_echo "no" >&6; }
39414fi
39415
39416
39417  test -n "$ac_ct_OBJCOPY" && break
39418done
39419
39420  if test "x$ac_ct_OBJCOPY" = x; then
39421    OBJCOPY=""
39422  else
39423    case $cross_compiling:$ac_tool_warned in
39424yes:)
39425{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39426$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39427ac_tool_warned=yes ;;
39428esac
39429    OBJCOPY=$ac_ct_OBJCOPY
39430  fi
39431fi
39432
39433  else
39434    # The variable is set, but is it from the command line or the environment?
39435
39436    # Try to remove the string !OBJCOPY! from our list.
39437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
39438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39439      # If it failed, the variable was not from the command line. Ignore it,
39440      # but warn the user (except for BASH, which is always set by the calling BASH).
39441      if test "xOBJCOPY" != xBASH; then
39442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
39443$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
39444      fi
39445      # Try to locate tool using the code snippet
39446      if test -n "$ac_tool_prefix"; then
39447  for ac_prog in gobjcopy objcopy
39448  do
39449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39452$as_echo_n "checking for $ac_word... " >&6; }
39453if ${ac_cv_prog_OBJCOPY+:} false; then :
39454  $as_echo_n "(cached) " >&6
39455else
39456  if test -n "$OBJCOPY"; then
39457  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39458else
39459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39460for as_dir in $PATH
39461do
39462  IFS=$as_save_IFS
39463  test -z "$as_dir" && as_dir=.
39464    for ac_exec_ext in '' $ac_executable_extensions; do
39465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39466    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39468    break 2
39469  fi
39470done
39471  done
39472IFS=$as_save_IFS
39473
39474fi
39475fi
39476OBJCOPY=$ac_cv_prog_OBJCOPY
39477if test -n "$OBJCOPY"; then
39478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39479$as_echo "$OBJCOPY" >&6; }
39480else
39481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39482$as_echo "no" >&6; }
39483fi
39484
39485
39486    test -n "$OBJCOPY" && break
39487  done
39488fi
39489if test -z "$OBJCOPY"; then
39490  ac_ct_OBJCOPY=$OBJCOPY
39491  for ac_prog in gobjcopy objcopy
39492do
39493  # Extract the first word of "$ac_prog", so it can be a program name with args.
39494set dummy $ac_prog; ac_word=$2
39495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39496$as_echo_n "checking for $ac_word... " >&6; }
39497if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39498  $as_echo_n "(cached) " >&6
39499else
39500  if test -n "$ac_ct_OBJCOPY"; then
39501  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39502else
39503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39504for as_dir in $PATH
39505do
39506  IFS=$as_save_IFS
39507  test -z "$as_dir" && as_dir=.
39508    for ac_exec_ext in '' $ac_executable_extensions; do
39509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39510    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39512    break 2
39513  fi
39514done
39515  done
39516IFS=$as_save_IFS
39517
39518fi
39519fi
39520ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39521if test -n "$ac_ct_OBJCOPY"; then
39522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39523$as_echo "$ac_ct_OBJCOPY" >&6; }
39524else
39525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39526$as_echo "no" >&6; }
39527fi
39528
39529
39530  test -n "$ac_ct_OBJCOPY" && break
39531done
39532
39533  if test "x$ac_ct_OBJCOPY" = x; then
39534    OBJCOPY=""
39535  else
39536    case $cross_compiling:$ac_tool_warned in
39537yes:)
39538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39540ac_tool_warned=yes ;;
39541esac
39542    OBJCOPY=$ac_ct_OBJCOPY
39543  fi
39544fi
39545
39546    else
39547      # If it succeeded, then it was overridden by the user. We will use it
39548      # for the tool.
39549
39550      # First remove it from the list of overridden variables, so we can test
39551      # for unknown variables in the end.
39552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39553
39554      # Check if the provided tool contains a complete path.
39555      tool_specified="$OBJCOPY"
39556      tool_basename="${tool_specified##*/}"
39557      if test "x$tool_basename" = "x$tool_specified"; then
39558        # A command without a complete path is provided, search $PATH.
39559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39560$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39561        # Extract the first word of "$tool_basename", so it can be a program name with args.
39562set dummy $tool_basename; ac_word=$2
39563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39564$as_echo_n "checking for $ac_word... " >&6; }
39565if ${ac_cv_path_OBJCOPY+:} false; then :
39566  $as_echo_n "(cached) " >&6
39567else
39568  case $OBJCOPY in
39569  [\\/]* | ?:[\\/]*)
39570  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39571  ;;
39572  *)
39573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39574for as_dir in $PATH
39575do
39576  IFS=$as_save_IFS
39577  test -z "$as_dir" && as_dir=.
39578    for ac_exec_ext in '' $ac_executable_extensions; do
39579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39580    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39582    break 2
39583  fi
39584done
39585  done
39586IFS=$as_save_IFS
39587
39588  ;;
39589esac
39590fi
39591OBJCOPY=$ac_cv_path_OBJCOPY
39592if test -n "$OBJCOPY"; then
39593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39594$as_echo "$OBJCOPY" >&6; }
39595else
39596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39597$as_echo "no" >&6; }
39598fi
39599
39600
39601        if test "x$OBJCOPY" = x; then
39602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39603        fi
39604      else
39605        # Otherwise we believe it is a complete path. Use it as it is.
39606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39607$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39609$as_echo_n "checking for OBJCOPY... " >&6; }
39610        if test ! -x "$tool_specified"; then
39611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39612$as_echo "not found" >&6; }
39613          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39614        fi
39615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39616$as_echo "$tool_specified" >&6; }
39617      fi
39618    fi
39619  fi
39620
39621
39622    # Only call fixup if objcopy was found.
39623    if test -n "$OBJCOPY"; then
39624
39625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39626
39627  # First separate the path from the arguments. This will split at the first
39628  # space.
39629  complete="$OBJCOPY"
39630  path="${complete%% *}"
39631  tmp="$complete EOL"
39632  arguments="${tmp#* }"
39633
39634  # Input might be given as Windows format, start by converting to
39635  # unix format.
39636  new_path=`$CYGPATH -u "$path"`
39637
39638  # Now try to locate executable using which
39639  new_path=`$WHICH "$new_path" 2> /dev/null`
39640  # bat and cmd files are not always considered executable in cygwin causing which
39641  # to not find them
39642  if test "x$new_path" = x \
39643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39645    new_path=`$CYGPATH -u "$path"`
39646  fi
39647  if test "x$new_path" = x; then
39648    # Oops. Which didn't find the executable.
39649    # The splitting of arguments from the executable at a space might have been incorrect,
39650    # since paths with space are more likely in Windows. Give it another try with the whole
39651    # argument.
39652    path="$complete"
39653    arguments="EOL"
39654    new_path=`$CYGPATH -u "$path"`
39655    new_path=`$WHICH "$new_path" 2> /dev/null`
39656    # bat and cmd files are not always considered executable in cygwin causing which
39657    # to not find them
39658    if test "x$new_path" = x \
39659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39661      new_path=`$CYGPATH -u "$path"`
39662    fi
39663    if test "x$new_path" = x; then
39664      # It's still not found. Now this is an unrecoverable error.
39665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39666$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39667      has_space=`$ECHO "$complete" | $GREP " "`
39668      if test "x$has_space" != x; then
39669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39671      fi
39672      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39673    fi
39674  fi
39675
39676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39679  # "foo.exe" is OK but "foo" is an error.
39680  #
39681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39682  # It is also a way to make sure we got the proper file name for the real test later on.
39683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39684  if test "x$test_shortpath" = x; then
39685    # Short path failed, file does not exist as specified.
39686    # Try adding .exe or .cmd
39687    if test -f "${new_path}.exe"; then
39688      input_to_shortpath="${new_path}.exe"
39689    elif test -f "${new_path}.cmd"; then
39690      input_to_shortpath="${new_path}.cmd"
39691    else
39692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39693$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39696      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39697    fi
39698  else
39699    input_to_shortpath="$new_path"
39700  fi
39701
39702  # Call helper function which possibly converts this using DOS-style short mode.
39703  # If so, the updated path is stored in $new_path.
39704  new_path="$input_to_shortpath"
39705
39706  input_path="$input_to_shortpath"
39707  # Check if we need to convert this using DOS-style short mode. If the path
39708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39709  # take no chances and rewrite it.
39710  # Note: m4 eats our [], so we need to use [ and ] instead.
39711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39712  if test "x$has_forbidden_chars" != x; then
39713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39717      # Going to short mode and back again did indeed matter. Since short mode is
39718      # case insensitive, let's make it lowercase to improve readability.
39719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39720      # Now convert it back to Unix-stile (cygpath)
39721      input_path=`$CYGPATH -u "$shortmode_path"`
39722      new_path="$input_path"
39723    fi
39724  fi
39725
39726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39727  if test "x$test_cygdrive_prefix" = x; then
39728    # As a simple fix, exclude /usr/bin since it's not a real path.
39729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39731      # a path prefixed by /cygdrive for fixpath to work.
39732      new_path="$CYGWIN_ROOT_PATH$input_path"
39733    fi
39734  fi
39735
39736  # remove trailing .exe if any
39737  new_path="${new_path/%.exe/}"
39738
39739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39740
39741  # First separate the path from the arguments. This will split at the first
39742  # space.
39743  complete="$OBJCOPY"
39744  path="${complete%% *}"
39745  tmp="$complete EOL"
39746  arguments="${tmp#* }"
39747
39748  # Input might be given as Windows format, start by converting to
39749  # unix format.
39750  new_path="$path"
39751
39752  windows_path="$new_path"
39753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39754    unix_path=`$CYGPATH -u "$windows_path"`
39755    new_path="$unix_path"
39756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39758    new_path="$unix_path"
39759  fi
39760
39761
39762  # Now try to locate executable using which
39763  new_path=`$WHICH "$new_path" 2> /dev/null`
39764
39765  if test "x$new_path" = x; then
39766    # Oops. Which didn't find the executable.
39767    # The splitting of arguments from the executable at a space might have been incorrect,
39768    # since paths with space are more likely in Windows. Give it another try with the whole
39769    # argument.
39770    path="$complete"
39771    arguments="EOL"
39772    new_path="$path"
39773
39774  windows_path="$new_path"
39775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39776    unix_path=`$CYGPATH -u "$windows_path"`
39777    new_path="$unix_path"
39778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39780    new_path="$unix_path"
39781  fi
39782
39783
39784    new_path=`$WHICH "$new_path" 2> /dev/null`
39785
39786    if test "x$new_path" = x; then
39787      # It's still not found. Now this is an unrecoverable error.
39788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39789$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39790      has_space=`$ECHO "$complete" | $GREP " "`
39791      if test "x$has_space" != x; then
39792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39794      fi
39795      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39796    fi
39797  fi
39798
39799  # Now new_path has a complete unix path to the binary
39800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39801    # Keep paths in /bin as-is, but remove trailing .exe if any
39802    new_path="${new_path/%.exe/}"
39803    # Do not save /bin paths to all_fixpath_prefixes!
39804  else
39805    # Not in mixed or Windows style, start by that.
39806    new_path=`cmd //c echo $new_path`
39807
39808  input_path="$new_path"
39809  # Check if we need to convert this using DOS-style short mode. If the path
39810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39811  # take no chances and rewrite it.
39812  # Note: m4 eats our [], so we need to use [ and ] instead.
39813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39814  if test "x$has_forbidden_chars" != x; then
39815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39817  fi
39818
39819    # Output is in $new_path
39820
39821  windows_path="$new_path"
39822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39823    unix_path=`$CYGPATH -u "$windows_path"`
39824    new_path="$unix_path"
39825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39827    new_path="$unix_path"
39828  fi
39829
39830    # remove trailing .exe if any
39831    new_path="${new_path/%.exe/}"
39832
39833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39835  fi
39836
39837  else
39838    # We're on a posix platform. Hooray! :)
39839    # First separate the path from the arguments. This will split at the first
39840    # space.
39841    complete="$OBJCOPY"
39842    path="${complete%% *}"
39843    tmp="$complete EOL"
39844    arguments="${tmp#* }"
39845
39846    # Cannot rely on the command "which" here since it doesn't always work.
39847    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39848    if test -z "$is_absolute_path"; then
39849      # Path to executable is not absolute. Find it.
39850      IFS_save="$IFS"
39851      IFS=:
39852      for p in $PATH; do
39853        if test -f "$p/$path" && test -x "$p/$path"; then
39854          new_path="$p/$path"
39855          break
39856        fi
39857      done
39858      IFS="$IFS_save"
39859    else
39860      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
39861$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
39862      new_path="$path"
39863    fi
39864
39865    if test "x$new_path" = x; then
39866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39867$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39868      has_space=`$ECHO "$complete" | $GREP " "`
39869      if test "x$has_space" != x; then
39870        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39872      fi
39873      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39874    fi
39875  fi
39876
39877  # Now join together the path and the arguments once again
39878  if test "x$arguments" != xEOL; then
39879    new_complete="$new_path ${arguments% *}"
39880  else
39881    new_complete="$new_path"
39882  fi
39883
39884  if test "x$complete" != "x$new_complete"; then
39885    OBJCOPY="$new_complete"
39886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39887$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39888  fi
39889
39890    fi
39891  fi
39892
39893
39894
39895  # Publish this variable in the help.
39896
39897
39898  if test "x$OBJDUMP" = x; then
39899    # The variable is not set by user, try to locate tool using the code snippet
39900    if test -n "$ac_tool_prefix"; then
39901  for ac_prog in gobjdump objdump
39902  do
39903    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39904set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39906$as_echo_n "checking for $ac_word... " >&6; }
39907if ${ac_cv_prog_OBJDUMP+:} false; then :
39908  $as_echo_n "(cached) " >&6
39909else
39910  if test -n "$OBJDUMP"; then
39911  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39912else
39913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39914for as_dir in $PATH
39915do
39916  IFS=$as_save_IFS
39917  test -z "$as_dir" && as_dir=.
39918    for ac_exec_ext in '' $ac_executable_extensions; do
39919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39920    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39922    break 2
39923  fi
39924done
39925  done
39926IFS=$as_save_IFS
39927
39928fi
39929fi
39930OBJDUMP=$ac_cv_prog_OBJDUMP
39931if test -n "$OBJDUMP"; then
39932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39933$as_echo "$OBJDUMP" >&6; }
39934else
39935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39936$as_echo "no" >&6; }
39937fi
39938
39939
39940    test -n "$OBJDUMP" && break
39941  done
39942fi
39943if test -z "$OBJDUMP"; then
39944  ac_ct_OBJDUMP=$OBJDUMP
39945  for ac_prog in gobjdump objdump
39946do
39947  # Extract the first word of "$ac_prog", so it can be a program name with args.
39948set dummy $ac_prog; ac_word=$2
39949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39950$as_echo_n "checking for $ac_word... " >&6; }
39951if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39952  $as_echo_n "(cached) " >&6
39953else
39954  if test -n "$ac_ct_OBJDUMP"; then
39955  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39956else
39957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39958for as_dir in $PATH
39959do
39960  IFS=$as_save_IFS
39961  test -z "$as_dir" && as_dir=.
39962    for ac_exec_ext in '' $ac_executable_extensions; do
39963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39964    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39966    break 2
39967  fi
39968done
39969  done
39970IFS=$as_save_IFS
39971
39972fi
39973fi
39974ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39975if test -n "$ac_ct_OBJDUMP"; then
39976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39977$as_echo "$ac_ct_OBJDUMP" >&6; }
39978else
39979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39980$as_echo "no" >&6; }
39981fi
39982
39983
39984  test -n "$ac_ct_OBJDUMP" && break
39985done
39986
39987  if test "x$ac_ct_OBJDUMP" = x; then
39988    OBJDUMP=""
39989  else
39990    case $cross_compiling:$ac_tool_warned in
39991yes:)
39992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39994ac_tool_warned=yes ;;
39995esac
39996    OBJDUMP=$ac_ct_OBJDUMP
39997  fi
39998fi
39999
40000  else
40001    # The variable is set, but is it from the command line or the environment?
40002
40003    # Try to remove the string !OBJDUMP! from our list.
40004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
40005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40006      # If it failed, the variable was not from the command line. Ignore it,
40007      # but warn the user (except for BASH, which is always set by the calling BASH).
40008      if test "xOBJDUMP" != xBASH; then
40009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
40010$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
40011      fi
40012      # Try to locate tool using the code snippet
40013      if test -n "$ac_tool_prefix"; then
40014  for ac_prog in gobjdump objdump
40015  do
40016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40019$as_echo_n "checking for $ac_word... " >&6; }
40020if ${ac_cv_prog_OBJDUMP+:} false; then :
40021  $as_echo_n "(cached) " >&6
40022else
40023  if test -n "$OBJDUMP"; then
40024  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
40025else
40026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40027for as_dir in $PATH
40028do
40029  IFS=$as_save_IFS
40030  test -z "$as_dir" && as_dir=.
40031    for ac_exec_ext in '' $ac_executable_extensions; do
40032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40033    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
40034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40035    break 2
40036  fi
40037done
40038  done
40039IFS=$as_save_IFS
40040
40041fi
40042fi
40043OBJDUMP=$ac_cv_prog_OBJDUMP
40044if test -n "$OBJDUMP"; then
40045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40046$as_echo "$OBJDUMP" >&6; }
40047else
40048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40049$as_echo "no" >&6; }
40050fi
40051
40052
40053    test -n "$OBJDUMP" && break
40054  done
40055fi
40056if test -z "$OBJDUMP"; then
40057  ac_ct_OBJDUMP=$OBJDUMP
40058  for ac_prog in gobjdump objdump
40059do
40060  # Extract the first word of "$ac_prog", so it can be a program name with args.
40061set dummy $ac_prog; ac_word=$2
40062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40063$as_echo_n "checking for $ac_word... " >&6; }
40064if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
40065  $as_echo_n "(cached) " >&6
40066else
40067  if test -n "$ac_ct_OBJDUMP"; then
40068  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
40069else
40070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40071for as_dir in $PATH
40072do
40073  IFS=$as_save_IFS
40074  test -z "$as_dir" && as_dir=.
40075    for ac_exec_ext in '' $ac_executable_extensions; do
40076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40077    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
40078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40079    break 2
40080  fi
40081done
40082  done
40083IFS=$as_save_IFS
40084
40085fi
40086fi
40087ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
40088if test -n "$ac_ct_OBJDUMP"; then
40089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
40090$as_echo "$ac_ct_OBJDUMP" >&6; }
40091else
40092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40093$as_echo "no" >&6; }
40094fi
40095
40096
40097  test -n "$ac_ct_OBJDUMP" && break
40098done
40099
40100  if test "x$ac_ct_OBJDUMP" = x; then
40101    OBJDUMP=""
40102  else
40103    case $cross_compiling:$ac_tool_warned in
40104yes:)
40105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40107ac_tool_warned=yes ;;
40108esac
40109    OBJDUMP=$ac_ct_OBJDUMP
40110  fi
40111fi
40112
40113    else
40114      # If it succeeded, then it was overridden by the user. We will use it
40115      # for the tool.
40116
40117      # First remove it from the list of overridden variables, so we can test
40118      # for unknown variables in the end.
40119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40120
40121      # Check if the provided tool contains a complete path.
40122      tool_specified="$OBJDUMP"
40123      tool_basename="${tool_specified##*/}"
40124      if test "x$tool_basename" = "x$tool_specified"; then
40125        # A command without a complete path is provided, search $PATH.
40126        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
40127$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
40128        # Extract the first word of "$tool_basename", so it can be a program name with args.
40129set dummy $tool_basename; ac_word=$2
40130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40131$as_echo_n "checking for $ac_word... " >&6; }
40132if ${ac_cv_path_OBJDUMP+:} false; then :
40133  $as_echo_n "(cached) " >&6
40134else
40135  case $OBJDUMP in
40136  [\\/]* | ?:[\\/]*)
40137  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
40138  ;;
40139  *)
40140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40141for as_dir in $PATH
40142do
40143  IFS=$as_save_IFS
40144  test -z "$as_dir" && as_dir=.
40145    for ac_exec_ext in '' $ac_executable_extensions; do
40146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40147    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
40148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40149    break 2
40150  fi
40151done
40152  done
40153IFS=$as_save_IFS
40154
40155  ;;
40156esac
40157fi
40158OBJDUMP=$ac_cv_path_OBJDUMP
40159if test -n "$OBJDUMP"; then
40160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40161$as_echo "$OBJDUMP" >&6; }
40162else
40163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40164$as_echo "no" >&6; }
40165fi
40166
40167
40168        if test "x$OBJDUMP" = x; then
40169          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40170        fi
40171      else
40172        # Otherwise we believe it is a complete path. Use it as it is.
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
40174$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
40176$as_echo_n "checking for OBJDUMP... " >&6; }
40177        if test ! -x "$tool_specified"; then
40178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40179$as_echo "not found" >&6; }
40180          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
40181        fi
40182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40183$as_echo "$tool_specified" >&6; }
40184      fi
40185    fi
40186  fi
40187
40188
40189  if test "x$OBJDUMP" != x; then
40190    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
40191
40192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40193
40194  # First separate the path from the arguments. This will split at the first
40195  # space.
40196  complete="$OBJDUMP"
40197  path="${complete%% *}"
40198  tmp="$complete EOL"
40199  arguments="${tmp#* }"
40200
40201  # Input might be given as Windows format, start by converting to
40202  # unix format.
40203  new_path=`$CYGPATH -u "$path"`
40204
40205  # Now try to locate executable using which
40206  new_path=`$WHICH "$new_path" 2> /dev/null`
40207  # bat and cmd files are not always considered executable in cygwin causing which
40208  # to not find them
40209  if test "x$new_path" = x \
40210      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40211      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40212    new_path=`$CYGPATH -u "$path"`
40213  fi
40214  if test "x$new_path" = x; then
40215    # Oops. Which didn't find the executable.
40216    # The splitting of arguments from the executable at a space might have been incorrect,
40217    # since paths with space are more likely in Windows. Give it another try with the whole
40218    # argument.
40219    path="$complete"
40220    arguments="EOL"
40221    new_path=`$CYGPATH -u "$path"`
40222    new_path=`$WHICH "$new_path" 2> /dev/null`
40223    # bat and cmd files are not always considered executable in cygwin causing which
40224    # to not find them
40225    if test "x$new_path" = x \
40226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40228      new_path=`$CYGPATH -u "$path"`
40229    fi
40230    if test "x$new_path" = x; then
40231      # It's still not found. Now this is an unrecoverable error.
40232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40233$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40234      has_space=`$ECHO "$complete" | $GREP " "`
40235      if test "x$has_space" != x; then
40236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40238      fi
40239      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40240    fi
40241  fi
40242
40243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40246  # "foo.exe" is OK but "foo" is an error.
40247  #
40248  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40249  # It is also a way to make sure we got the proper file name for the real test later on.
40250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40251  if test "x$test_shortpath" = x; then
40252    # Short path failed, file does not exist as specified.
40253    # Try adding .exe or .cmd
40254    if test -f "${new_path}.exe"; then
40255      input_to_shortpath="${new_path}.exe"
40256    elif test -f "${new_path}.cmd"; then
40257      input_to_shortpath="${new_path}.cmd"
40258    else
40259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
40260$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
40261      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40262$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40263      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40264    fi
40265  else
40266    input_to_shortpath="$new_path"
40267  fi
40268
40269  # Call helper function which possibly converts this using DOS-style short mode.
40270  # If so, the updated path is stored in $new_path.
40271  new_path="$input_to_shortpath"
40272
40273  input_path="$input_to_shortpath"
40274  # Check if we need to convert this using DOS-style short mode. If the path
40275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40276  # take no chances and rewrite it.
40277  # Note: m4 eats our [], so we need to use [ and ] instead.
40278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40279  if test "x$has_forbidden_chars" != x; then
40280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40284      # Going to short mode and back again did indeed matter. Since short mode is
40285      # case insensitive, let's make it lowercase to improve readability.
40286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40287      # Now convert it back to Unix-stile (cygpath)
40288      input_path=`$CYGPATH -u "$shortmode_path"`
40289      new_path="$input_path"
40290    fi
40291  fi
40292
40293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40294  if test "x$test_cygdrive_prefix" = x; then
40295    # As a simple fix, exclude /usr/bin since it's not a real path.
40296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40298      # a path prefixed by /cygdrive for fixpath to work.
40299      new_path="$CYGWIN_ROOT_PATH$input_path"
40300    fi
40301  fi
40302
40303  # remove trailing .exe if any
40304  new_path="${new_path/%.exe/}"
40305
40306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40307
40308  # First separate the path from the arguments. This will split at the first
40309  # space.
40310  complete="$OBJDUMP"
40311  path="${complete%% *}"
40312  tmp="$complete EOL"
40313  arguments="${tmp#* }"
40314
40315  # Input might be given as Windows format, start by converting to
40316  # unix format.
40317  new_path="$path"
40318
40319  windows_path="$new_path"
40320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40321    unix_path=`$CYGPATH -u "$windows_path"`
40322    new_path="$unix_path"
40323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40325    new_path="$unix_path"
40326  fi
40327
40328
40329  # Now try to locate executable using which
40330  new_path=`$WHICH "$new_path" 2> /dev/null`
40331
40332  if test "x$new_path" = x; then
40333    # Oops. Which didn't find the executable.
40334    # The splitting of arguments from the executable at a space might have been incorrect,
40335    # since paths with space are more likely in Windows. Give it another try with the whole
40336    # argument.
40337    path="$complete"
40338    arguments="EOL"
40339    new_path="$path"
40340
40341  windows_path="$new_path"
40342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40343    unix_path=`$CYGPATH -u "$windows_path"`
40344    new_path="$unix_path"
40345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40347    new_path="$unix_path"
40348  fi
40349
40350
40351    new_path=`$WHICH "$new_path" 2> /dev/null`
40352
40353    if test "x$new_path" = x; then
40354      # It's still not found. Now this is an unrecoverable error.
40355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40356$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40357      has_space=`$ECHO "$complete" | $GREP " "`
40358      if test "x$has_space" != x; then
40359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40361      fi
40362      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40363    fi
40364  fi
40365
40366  # Now new_path has a complete unix path to the binary
40367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40368    # Keep paths in /bin as-is, but remove trailing .exe if any
40369    new_path="${new_path/%.exe/}"
40370    # Do not save /bin paths to all_fixpath_prefixes!
40371  else
40372    # Not in mixed or Windows style, start by that.
40373    new_path=`cmd //c echo $new_path`
40374
40375  input_path="$new_path"
40376  # Check if we need to convert this using DOS-style short mode. If the path
40377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40378  # take no chances and rewrite it.
40379  # Note: m4 eats our [], so we need to use [ and ] instead.
40380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40381  if test "x$has_forbidden_chars" != x; then
40382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40384  fi
40385
40386    # Output is in $new_path
40387
40388  windows_path="$new_path"
40389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40390    unix_path=`$CYGPATH -u "$windows_path"`
40391    new_path="$unix_path"
40392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40394    new_path="$unix_path"
40395  fi
40396
40397    # remove trailing .exe if any
40398    new_path="${new_path/%.exe/}"
40399
40400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40402  fi
40403
40404  else
40405    # We're on a posix platform. Hooray! :)
40406    # First separate the path from the arguments. This will split at the first
40407    # space.
40408    complete="$OBJDUMP"
40409    path="${complete%% *}"
40410    tmp="$complete EOL"
40411    arguments="${tmp#* }"
40412
40413    # Cannot rely on the command "which" here since it doesn't always work.
40414    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40415    if test -z "$is_absolute_path"; then
40416      # Path to executable is not absolute. Find it.
40417      IFS_save="$IFS"
40418      IFS=:
40419      for p in $PATH; do
40420        if test -f "$p/$path" && test -x "$p/$path"; then
40421          new_path="$p/$path"
40422          break
40423        fi
40424      done
40425      IFS="$IFS_save"
40426    else
40427      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
40428$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
40429      new_path="$path"
40430    fi
40431
40432    if test "x$new_path" = x; then
40433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40434$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40435      has_space=`$ECHO "$complete" | $GREP " "`
40436      if test "x$has_space" != x; then
40437        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40439      fi
40440      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40441    fi
40442  fi
40443
40444  # Now join together the path and the arguments once again
40445  if test "x$arguments" != xEOL; then
40446    new_complete="$new_path ${arguments% *}"
40447  else
40448    new_complete="$new_path"
40449  fi
40450
40451  if test "x$complete" != "x$new_complete"; then
40452    OBJDUMP="$new_complete"
40453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40454$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40455  fi
40456
40457  fi
40458
40459  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
40460
40461
40462  # Publish this variable in the help.
40463
40464
40465  if test "x$LIPO" = x; then
40466    # The variable is not set by user, try to locate tool using the code snippet
40467    for ac_prog in lipo
40468do
40469  # Extract the first word of "$ac_prog", so it can be a program name with args.
40470set dummy $ac_prog; ac_word=$2
40471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40472$as_echo_n "checking for $ac_word... " >&6; }
40473if ${ac_cv_path_LIPO+:} false; then :
40474  $as_echo_n "(cached) " >&6
40475else
40476  case $LIPO in
40477  [\\/]* | ?:[\\/]*)
40478  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40479  ;;
40480  *)
40481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40482for as_dir in $PATH
40483do
40484  IFS=$as_save_IFS
40485  test -z "$as_dir" && as_dir=.
40486    for ac_exec_ext in '' $ac_executable_extensions; do
40487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40488    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40490    break 2
40491  fi
40492done
40493  done
40494IFS=$as_save_IFS
40495
40496  ;;
40497esac
40498fi
40499LIPO=$ac_cv_path_LIPO
40500if test -n "$LIPO"; then
40501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40502$as_echo "$LIPO" >&6; }
40503else
40504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40505$as_echo "no" >&6; }
40506fi
40507
40508
40509  test -n "$LIPO" && break
40510done
40511
40512  else
40513    # The variable is set, but is it from the command line or the environment?
40514
40515    # Try to remove the string !LIPO! from our list.
40516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
40517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40518      # If it failed, the variable was not from the command line. Ignore it,
40519      # but warn the user (except for BASH, which is always set by the calling BASH).
40520      if test "xLIPO" != xBASH; then
40521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
40522$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
40523      fi
40524      # Try to locate tool using the code snippet
40525      for ac_prog in lipo
40526do
40527  # Extract the first word of "$ac_prog", so it can be a program name with args.
40528set dummy $ac_prog; ac_word=$2
40529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40530$as_echo_n "checking for $ac_word... " >&6; }
40531if ${ac_cv_path_LIPO+:} false; then :
40532  $as_echo_n "(cached) " >&6
40533else
40534  case $LIPO in
40535  [\\/]* | ?:[\\/]*)
40536  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40537  ;;
40538  *)
40539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40540for as_dir in $PATH
40541do
40542  IFS=$as_save_IFS
40543  test -z "$as_dir" && as_dir=.
40544    for ac_exec_ext in '' $ac_executable_extensions; do
40545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40546    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40548    break 2
40549  fi
40550done
40551  done
40552IFS=$as_save_IFS
40553
40554  ;;
40555esac
40556fi
40557LIPO=$ac_cv_path_LIPO
40558if test -n "$LIPO"; then
40559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40560$as_echo "$LIPO" >&6; }
40561else
40562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40563$as_echo "no" >&6; }
40564fi
40565
40566
40567  test -n "$LIPO" && break
40568done
40569
40570    else
40571      # If it succeeded, then it was overridden by the user. We will use it
40572      # for the tool.
40573
40574      # First remove it from the list of overridden variables, so we can test
40575      # for unknown variables in the end.
40576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40577
40578      # Check if the provided tool contains a complete path.
40579      tool_specified="$LIPO"
40580      tool_basename="${tool_specified##*/}"
40581      if test "x$tool_basename" = "x$tool_specified"; then
40582        # A command without a complete path is provided, search $PATH.
40583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
40584$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
40585        # Extract the first word of "$tool_basename", so it can be a program name with args.
40586set dummy $tool_basename; ac_word=$2
40587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40588$as_echo_n "checking for $ac_word... " >&6; }
40589if ${ac_cv_path_LIPO+:} false; then :
40590  $as_echo_n "(cached) " >&6
40591else
40592  case $LIPO in
40593  [\\/]* | ?:[\\/]*)
40594  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40595  ;;
40596  *)
40597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40598for as_dir in $PATH
40599do
40600  IFS=$as_save_IFS
40601  test -z "$as_dir" && as_dir=.
40602    for ac_exec_ext in '' $ac_executable_extensions; do
40603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40604    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40606    break 2
40607  fi
40608done
40609  done
40610IFS=$as_save_IFS
40611
40612  ;;
40613esac
40614fi
40615LIPO=$ac_cv_path_LIPO
40616if test -n "$LIPO"; then
40617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40618$as_echo "$LIPO" >&6; }
40619else
40620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40621$as_echo "no" >&6; }
40622fi
40623
40624
40625        if test "x$LIPO" = x; then
40626          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40627        fi
40628      else
40629        # Otherwise we believe it is a complete path. Use it as it is.
40630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
40631$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
40632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
40633$as_echo_n "checking for LIPO... " >&6; }
40634        if test ! -x "$tool_specified"; then
40635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40636$as_echo "not found" >&6; }
40637          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
40638        fi
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40640$as_echo "$tool_specified" >&6; }
40641      fi
40642    fi
40643  fi
40644
40645
40646
40647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40648
40649  # First separate the path from the arguments. This will split at the first
40650  # space.
40651  complete="$LIPO"
40652  path="${complete%% *}"
40653  tmp="$complete EOL"
40654  arguments="${tmp#* }"
40655
40656  # Input might be given as Windows format, start by converting to
40657  # unix format.
40658  new_path=`$CYGPATH -u "$path"`
40659
40660  # Now try to locate executable using which
40661  new_path=`$WHICH "$new_path" 2> /dev/null`
40662  # bat and cmd files are not always considered executable in cygwin causing which
40663  # to not find them
40664  if test "x$new_path" = x \
40665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40667    new_path=`$CYGPATH -u "$path"`
40668  fi
40669  if test "x$new_path" = x; then
40670    # Oops. Which didn't find the executable.
40671    # The splitting of arguments from the executable at a space might have been incorrect,
40672    # since paths with space are more likely in Windows. Give it another try with the whole
40673    # argument.
40674    path="$complete"
40675    arguments="EOL"
40676    new_path=`$CYGPATH -u "$path"`
40677    new_path=`$WHICH "$new_path" 2> /dev/null`
40678    # bat and cmd files are not always considered executable in cygwin causing which
40679    # to not find them
40680    if test "x$new_path" = x \
40681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40683      new_path=`$CYGPATH -u "$path"`
40684    fi
40685    if test "x$new_path" = x; then
40686      # It's still not found. Now this is an unrecoverable error.
40687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40688$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40689      has_space=`$ECHO "$complete" | $GREP " "`
40690      if test "x$has_space" != x; then
40691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40693      fi
40694      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40695    fi
40696  fi
40697
40698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40701  # "foo.exe" is OK but "foo" is an error.
40702  #
40703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40704  # It is also a way to make sure we got the proper file name for the real test later on.
40705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40706  if test "x$test_shortpath" = x; then
40707    # Short path failed, file does not exist as specified.
40708    # Try adding .exe or .cmd
40709    if test -f "${new_path}.exe"; then
40710      input_to_shortpath="${new_path}.exe"
40711    elif test -f "${new_path}.cmd"; then
40712      input_to_shortpath="${new_path}.cmd"
40713    else
40714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
40715$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
40716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40718      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40719    fi
40720  else
40721    input_to_shortpath="$new_path"
40722  fi
40723
40724  # Call helper function which possibly converts this using DOS-style short mode.
40725  # If so, the updated path is stored in $new_path.
40726  new_path="$input_to_shortpath"
40727
40728  input_path="$input_to_shortpath"
40729  # Check if we need to convert this using DOS-style short mode. If the path
40730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40731  # take no chances and rewrite it.
40732  # Note: m4 eats our [], so we need to use [ and ] instead.
40733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40734  if test "x$has_forbidden_chars" != x; then
40735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40739      # Going to short mode and back again did indeed matter. Since short mode is
40740      # case insensitive, let's make it lowercase to improve readability.
40741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40742      # Now convert it back to Unix-stile (cygpath)
40743      input_path=`$CYGPATH -u "$shortmode_path"`
40744      new_path="$input_path"
40745    fi
40746  fi
40747
40748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40749  if test "x$test_cygdrive_prefix" = x; then
40750    # As a simple fix, exclude /usr/bin since it's not a real path.
40751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40753      # a path prefixed by /cygdrive for fixpath to work.
40754      new_path="$CYGWIN_ROOT_PATH$input_path"
40755    fi
40756  fi
40757
40758  # remove trailing .exe if any
40759  new_path="${new_path/%.exe/}"
40760
40761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40762
40763  # First separate the path from the arguments. This will split at the first
40764  # space.
40765  complete="$LIPO"
40766  path="${complete%% *}"
40767  tmp="$complete EOL"
40768  arguments="${tmp#* }"
40769
40770  # Input might be given as Windows format, start by converting to
40771  # unix format.
40772  new_path="$path"
40773
40774  windows_path="$new_path"
40775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40776    unix_path=`$CYGPATH -u "$windows_path"`
40777    new_path="$unix_path"
40778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40780    new_path="$unix_path"
40781  fi
40782
40783
40784  # Now try to locate executable using which
40785  new_path=`$WHICH "$new_path" 2> /dev/null`
40786
40787  if test "x$new_path" = x; then
40788    # Oops. Which didn't find the executable.
40789    # The splitting of arguments from the executable at a space might have been incorrect,
40790    # since paths with space are more likely in Windows. Give it another try with the whole
40791    # argument.
40792    path="$complete"
40793    arguments="EOL"
40794    new_path="$path"
40795
40796  windows_path="$new_path"
40797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40798    unix_path=`$CYGPATH -u "$windows_path"`
40799    new_path="$unix_path"
40800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40802    new_path="$unix_path"
40803  fi
40804
40805
40806    new_path=`$WHICH "$new_path" 2> /dev/null`
40807
40808    if test "x$new_path" = x; then
40809      # It's still not found. Now this is an unrecoverable error.
40810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40811$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40812      has_space=`$ECHO "$complete" | $GREP " "`
40813      if test "x$has_space" != x; then
40814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40816      fi
40817      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40818    fi
40819  fi
40820
40821  # Now new_path has a complete unix path to the binary
40822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40823    # Keep paths in /bin as-is, but remove trailing .exe if any
40824    new_path="${new_path/%.exe/}"
40825    # Do not save /bin paths to all_fixpath_prefixes!
40826  else
40827    # Not in mixed or Windows style, start by that.
40828    new_path=`cmd //c echo $new_path`
40829
40830  input_path="$new_path"
40831  # Check if we need to convert this using DOS-style short mode. If the path
40832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40833  # take no chances and rewrite it.
40834  # Note: m4 eats our [], so we need to use [ and ] instead.
40835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40836  if test "x$has_forbidden_chars" != x; then
40837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40839  fi
40840
40841    # Output is in $new_path
40842
40843  windows_path="$new_path"
40844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40845    unix_path=`$CYGPATH -u "$windows_path"`
40846    new_path="$unix_path"
40847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40849    new_path="$unix_path"
40850  fi
40851
40852    # remove trailing .exe if any
40853    new_path="${new_path/%.exe/}"
40854
40855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40857  fi
40858
40859  else
40860    # We're on a posix platform. Hooray! :)
40861    # First separate the path from the arguments. This will split at the first
40862    # space.
40863    complete="$LIPO"
40864    path="${complete%% *}"
40865    tmp="$complete EOL"
40866    arguments="${tmp#* }"
40867
40868    # Cannot rely on the command "which" here since it doesn't always work.
40869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40870    if test -z "$is_absolute_path"; then
40871      # Path to executable is not absolute. Find it.
40872      IFS_save="$IFS"
40873      IFS=:
40874      for p in $PATH; do
40875        if test -f "$p/$path" && test -x "$p/$path"; then
40876          new_path="$p/$path"
40877          break
40878        fi
40879      done
40880      IFS="$IFS_save"
40881    else
40882      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
40883$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
40884      new_path="$path"
40885    fi
40886
40887    if test "x$new_path" = x; then
40888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40889$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40890      has_space=`$ECHO "$complete" | $GREP " "`
40891      if test "x$has_space" != x; then
40892        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40894      fi
40895      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40896    fi
40897  fi
40898
40899  # Now join together the path and the arguments once again
40900  if test "x$arguments" != xEOL; then
40901    new_complete="$new_path ${arguments% *}"
40902  else
40903    new_complete="$new_path"
40904  fi
40905
40906  if test "x$complete" != "x$new_complete"; then
40907    LIPO="$new_complete"
40908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
40909$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
40910  fi
40911
40912  fi
40913
40914
40915
40916  # Restore old path without tools dir
40917  PATH="$OLD_PATH"
40918
40919
40920# FIXME: Currently we must test this after paths but before flags. Fix!
40921
40922# And we can test some aspects on the target using configure macros.
40923
40924
40925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40926$as_echo_n "checking for ANSI C header files... " >&6; }
40927if ${ac_cv_header_stdc+:} false; then :
40928  $as_echo_n "(cached) " >&6
40929else
40930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40931/* end confdefs.h.  */
40932#include <stdlib.h>
40933#include <stdarg.h>
40934#include <string.h>
40935#include <float.h>
40936
40937int
40938main ()
40939{
40940
40941  ;
40942  return 0;
40943}
40944_ACEOF
40945if ac_fn_cxx_try_compile "$LINENO"; then :
40946  ac_cv_header_stdc=yes
40947else
40948  ac_cv_header_stdc=no
40949fi
40950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40951
40952if test $ac_cv_header_stdc = yes; then
40953  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40955/* end confdefs.h.  */
40956#include <string.h>
40957
40958_ACEOF
40959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40960  $EGREP "memchr" >/dev/null 2>&1; then :
40961
40962else
40963  ac_cv_header_stdc=no
40964fi
40965rm -f conftest*
40966
40967fi
40968
40969if test $ac_cv_header_stdc = yes; then
40970  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40972/* end confdefs.h.  */
40973#include <stdlib.h>
40974
40975_ACEOF
40976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40977  $EGREP "free" >/dev/null 2>&1; then :
40978
40979else
40980  ac_cv_header_stdc=no
40981fi
40982rm -f conftest*
40983
40984fi
40985
40986if test $ac_cv_header_stdc = yes; then
40987  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40988  if test "$cross_compiling" = yes; then :
40989  :
40990else
40991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40992/* end confdefs.h.  */
40993#include <ctype.h>
40994#include <stdlib.h>
40995#if ((' ' & 0x0FF) == 0x020)
40996# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40997# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40998#else
40999# define ISLOWER(c) \
41000		   (('a' <= (c) && (c) <= 'i') \
41001		     || ('j' <= (c) && (c) <= 'r') \
41002		     || ('s' <= (c) && (c) <= 'z'))
41003# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41004#endif
41005
41006#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41007int
41008main ()
41009{
41010  int i;
41011  for (i = 0; i < 256; i++)
41012    if (XOR (islower (i), ISLOWER (i))
41013	|| toupper (i) != TOUPPER (i))
41014      return 2;
41015  return 0;
41016}
41017_ACEOF
41018if ac_fn_cxx_try_run "$LINENO"; then :
41019
41020else
41021  ac_cv_header_stdc=no
41022fi
41023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41024  conftest.$ac_objext conftest.beam conftest.$ac_ext
41025fi
41026
41027fi
41028fi
41029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41030$as_echo "$ac_cv_header_stdc" >&6; }
41031if test $ac_cv_header_stdc = yes; then
41032
41033$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41034
41035fi
41036
41037# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41038for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41039		  inttypes.h stdint.h unistd.h
41040do :
41041  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41042ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41043"
41044if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41045  cat >>confdefs.h <<_ACEOF
41046#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41047_ACEOF
41048
41049fi
41050
41051done
41052
41053
41054
41055  ###############################################################################
41056  #
41057  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41058  # (The JVM can use 32 or 64 bit Java pointers but that decision
41059  # is made at runtime.)
41060  #
41061
41062  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41063    # Always specify -m flag on Solaris
41064    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41065
41066  # When we add flags to the "official" CFLAGS etc, we need to
41067  # keep track of these additions in ADDED_CFLAGS etc. These
41068  # will later be checked to make sure only controlled additions
41069  # have been made to CFLAGS etc.
41070  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41071  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41072  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41073
41074  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41075  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41076  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41077
41078  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41079  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41080  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41081
41082  elif test "x$COMPILE_TYPE" = xreduced; then
41083    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41084      # Specify -m if running reduced on other Posix platforms
41085
41086  # When we add flags to the "official" CFLAGS etc, we need to
41087  # keep track of these additions in ADDED_CFLAGS etc. These
41088  # will later be checked to make sure only controlled additions
41089  # have been made to CFLAGS etc.
41090  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41091  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41092  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41093
41094  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41095  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41096  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41097
41098  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41099  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41100  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41101
41102    fi
41103  fi
41104
41105  # Make compilation sanity check
41106  for ac_header in stdio.h
41107do :
41108  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41109if test "x$ac_cv_header_stdio_h" = xyes; then :
41110  cat >>confdefs.h <<_ACEOF
41111#define HAVE_STDIO_H 1
41112_ACEOF
41113
41114else
41115
41116    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41117$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41118    if test "x$COMPILE_TYPE" = xreduced; then
41119      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41120$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41121    elif test "x$COMPILE_TYPE" = xcross; then
41122      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41123$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41124    fi
41125    as_fn_error $? "Cannot continue." "$LINENO" 5
41126
41127fi
41128
41129done
41130
41131
41132  # The cast to long int works around a bug in the HP C Compiler
41133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41135# This bug is HP SR number 8606223364.
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41137$as_echo_n "checking size of int *... " >&6; }
41138if ${ac_cv_sizeof_int_p+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41142
41143else
41144  if test "$ac_cv_type_int_p" = yes; then
41145     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41147as_fn_error 77 "cannot compute sizeof (int *)
41148See \`config.log' for more details" "$LINENO" 5; }
41149   else
41150     ac_cv_sizeof_int_p=0
41151   fi
41152fi
41153
41154fi
41155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41156$as_echo "$ac_cv_sizeof_int_p" >&6; }
41157
41158
41159
41160cat >>confdefs.h <<_ACEOF
41161#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41162_ACEOF
41163
41164
41165
41166  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41167  if test "x$ac_cv_sizeof_int_p" = x; then
41168    # The test failed, lets stick to the assumed value.
41169    { $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
41170$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41171  else
41172    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41173
41174    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41175      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41176      # Let's try to implicitely set the compilers target architecture and retry the test
41177      { $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
41178$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;}
41179      { $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
41180$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;}
41181
41182  # When we add flags to the "official" CFLAGS etc, we need to
41183  # keep track of these additions in ADDED_CFLAGS etc. These
41184  # will later be checked to make sure only controlled additions
41185  # have been made to CFLAGS etc.
41186  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41187  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41188  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41189
41190  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41191  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41192  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41193
41194  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41195  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41196  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41197
41198
41199      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41200      unset ac_cv_sizeof_int_p
41201      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41202      cat >>confdefs.h <<_ACEOF
41203#undef SIZEOF_INT_P
41204_ACEOF
41205
41206      # The cast to long int works around a bug in the HP C Compiler
41207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41209# This bug is HP SR number 8606223364.
41210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41211$as_echo_n "checking size of int *... " >&6; }
41212if ${ac_cv_sizeof_int_p+:} false; then :
41213  $as_echo_n "(cached) " >&6
41214else
41215  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41216
41217else
41218  if test "$ac_cv_type_int_p" = yes; then
41219     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41221as_fn_error 77 "cannot compute sizeof (int *)
41222See \`config.log' for more details" "$LINENO" 5; }
41223   else
41224     ac_cv_sizeof_int_p=0
41225   fi
41226fi
41227
41228fi
41229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41230$as_echo "$ac_cv_sizeof_int_p" >&6; }
41231
41232
41233
41234cat >>confdefs.h <<_ACEOF
41235#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41236_ACEOF
41237
41238
41239
41240      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41241
41242      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41243        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
41244      fi
41245    fi
41246  fi
41247
41248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41249$as_echo_n "checking for target address size... " >&6; }
41250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41251$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41252
41253
41254  ###############################################################################
41255  #
41256  # Is the target little of big endian?
41257  #
41258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41259$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41260if ${ac_cv_c_bigendian+:} false; then :
41261  $as_echo_n "(cached) " >&6
41262else
41263  ac_cv_c_bigendian=unknown
41264    # See if we're dealing with a universal compiler.
41265    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41266/* end confdefs.h.  */
41267#ifndef __APPLE_CC__
41268	       not a universal capable compiler
41269	     #endif
41270	     typedef int dummy;
41271
41272_ACEOF
41273if ac_fn_cxx_try_compile "$LINENO"; then :
41274
41275	# Check for potential -arch flags.  It is not universal unless
41276	# there are at least two -arch flags with different values.
41277	ac_arch=
41278	ac_prev=
41279	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41280	 if test -n "$ac_prev"; then
41281	   case $ac_word in
41282	     i?86 | x86_64 | ppc | ppc64)
41283	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41284		 ac_arch=$ac_word
41285	       else
41286		 ac_cv_c_bigendian=universal
41287		 break
41288	       fi
41289	       ;;
41290	   esac
41291	   ac_prev=
41292	 elif test "x$ac_word" = "x-arch"; then
41293	   ac_prev=arch
41294	 fi
41295       done
41296fi
41297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41298    if test $ac_cv_c_bigendian = unknown; then
41299      # See if sys/param.h defines the BYTE_ORDER macro.
41300      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41301/* end confdefs.h.  */
41302#include <sys/types.h>
41303	     #include <sys/param.h>
41304
41305int
41306main ()
41307{
41308#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41309		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41310		     && LITTLE_ENDIAN)
41311	      bogus endian macros
41312	     #endif
41313
41314  ;
41315  return 0;
41316}
41317_ACEOF
41318if ac_fn_cxx_try_compile "$LINENO"; then :
41319  # It does; now see whether it defined to BIG_ENDIAN or not.
41320	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41321/* end confdefs.h.  */
41322#include <sys/types.h>
41323		#include <sys/param.h>
41324
41325int
41326main ()
41327{
41328#if BYTE_ORDER != BIG_ENDIAN
41329		 not big endian
41330		#endif
41331
41332  ;
41333  return 0;
41334}
41335_ACEOF
41336if ac_fn_cxx_try_compile "$LINENO"; then :
41337  ac_cv_c_bigendian=yes
41338else
41339  ac_cv_c_bigendian=no
41340fi
41341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41342fi
41343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41344    fi
41345    if test $ac_cv_c_bigendian = unknown; then
41346      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41347      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41348/* end confdefs.h.  */
41349#include <limits.h>
41350
41351int
41352main ()
41353{
41354#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41355	      bogus endian macros
41356	     #endif
41357
41358  ;
41359  return 0;
41360}
41361_ACEOF
41362if ac_fn_cxx_try_compile "$LINENO"; then :
41363  # It does; now see whether it defined to _BIG_ENDIAN or not.
41364	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41365/* end confdefs.h.  */
41366#include <limits.h>
41367
41368int
41369main ()
41370{
41371#ifndef _BIG_ENDIAN
41372		 not big endian
41373		#endif
41374
41375  ;
41376  return 0;
41377}
41378_ACEOF
41379if ac_fn_cxx_try_compile "$LINENO"; then :
41380  ac_cv_c_bigendian=yes
41381else
41382  ac_cv_c_bigendian=no
41383fi
41384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41385fi
41386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41387    fi
41388    if test $ac_cv_c_bigendian = unknown; then
41389      # Compile a test program.
41390      if test "$cross_compiling" = yes; then :
41391  # Try to guess by grepping values from an object file.
41392	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41393/* end confdefs.h.  */
41394short int ascii_mm[] =
41395		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41396		short int ascii_ii[] =
41397		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41398		int use_ascii (int i) {
41399		  return ascii_mm[i] + ascii_ii[i];
41400		}
41401		short int ebcdic_ii[] =
41402		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41403		short int ebcdic_mm[] =
41404		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41405		int use_ebcdic (int i) {
41406		  return ebcdic_mm[i] + ebcdic_ii[i];
41407		}
41408		extern int foo;
41409
41410int
41411main ()
41412{
41413return use_ascii (foo) == use_ebcdic (foo);
41414  ;
41415  return 0;
41416}
41417_ACEOF
41418if ac_fn_cxx_try_compile "$LINENO"; then :
41419  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41420	      ac_cv_c_bigendian=yes
41421	    fi
41422	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41423	      if test "$ac_cv_c_bigendian" = unknown; then
41424		ac_cv_c_bigendian=no
41425	      else
41426		# finding both strings is unlikely to happen, but who knows?
41427		ac_cv_c_bigendian=unknown
41428	      fi
41429	    fi
41430fi
41431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41432else
41433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41434/* end confdefs.h.  */
41435$ac_includes_default
41436int
41437main ()
41438{
41439
41440	     /* Are we little or big endian?  From Harbison&Steele.  */
41441	     union
41442	     {
41443	       long int l;
41444	       char c[sizeof (long int)];
41445	     } u;
41446	     u.l = 1;
41447	     return u.c[sizeof (long int) - 1] == 1;
41448
41449  ;
41450  return 0;
41451}
41452_ACEOF
41453if ac_fn_cxx_try_run "$LINENO"; then :
41454  ac_cv_c_bigendian=no
41455else
41456  ac_cv_c_bigendian=yes
41457fi
41458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41459  conftest.$ac_objext conftest.beam conftest.$ac_ext
41460fi
41461
41462    fi
41463fi
41464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41465$as_echo "$ac_cv_c_bigendian" >&6; }
41466 case $ac_cv_c_bigendian in #(
41467   yes)
41468     ENDIAN="big";; #(
41469   no)
41470     ENDIAN="little" ;; #(
41471   universal)
41472     ENDIAN="universal_endianness"
41473     ;; #(
41474   *)
41475     ENDIAN="unknown" ;;
41476 esac
41477
41478
41479  if test "x$ENDIAN" = xuniversal_endianness; then
41480    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41481  fi
41482  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41483    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
41484  fi
41485
41486
41487# Configure flags for the tools
41488
41489
41490  ###############################################################################
41491  #
41492  # How to compile shared libraries.
41493  #
41494
41495  if test "x$GCC" = xyes; then
41496    COMPILER_NAME=gcc
41497    PICFLAG="-fPIC"
41498    LIBRARY_PREFIX=lib
41499    SHARED_LIBRARY='lib$1.so'
41500    STATIC_LIBRARY='lib$1.a'
41501    SHARED_LIBRARY_FLAGS="-shared"
41502    SHARED_LIBRARY_SUFFIX='.so'
41503    STATIC_LIBRARY_SUFFIX='.a'
41504    OBJ_SUFFIX='.o'
41505    EXE_SUFFIX=''
41506    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41507    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41508    C_FLAG_REORDER=''
41509    CXX_FLAG_REORDER=''
41510    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41511    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41512    LD="$CC"
41513    LDEXE="$CC"
41514    LDCXX="$CXX"
41515    LDEXECXX="$CXX"
41516    POST_STRIP_CMD="$STRIP -g"
41517
41518    # Linking is different on MacOSX
41519    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41520      # Might change in the future to clang.
41521      COMPILER_NAME=gcc
41522      SHARED_LIBRARY='lib$1.dylib'
41523      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41524      SHARED_LIBRARY_SUFFIX='.dylib'
41525      EXE_SUFFIX=''
41526      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41527      SET_SHARED_LIBRARY_MAPFILE=''
41528      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41529      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41530      POST_STRIP_CMD="$STRIP -S"
41531    fi
41532  else
41533    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41534      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
41535      COMPILER_NAME=ossc
41536      PICFLAG="-KPIC"
41537      LIBRARY_PREFIX=lib
41538      SHARED_LIBRARY='lib$1.so'
41539      STATIC_LIBRARY='lib$1.a'
41540      SHARED_LIBRARY_FLAGS="-G"
41541      SHARED_LIBRARY_SUFFIX='.so'
41542      STATIC_LIBRARY_SUFFIX='.a'
41543      OBJ_SUFFIX='.o'
41544      EXE_SUFFIX=''
41545      SET_SHARED_LIBRARY_NAME=''
41546      SET_SHARED_LIBRARY_MAPFILE='-M$1'
41547      C_FLAG_REORDER='-xF'
41548      CXX_FLAG_REORDER='-xF'
41549      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
41550      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41551      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41552      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41553      CFLAGS_JDKLIB_EXTRA='-xstrconst'
41554      POST_STRIP_CMD="$STRIP -x"
41555      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41556    fi
41557    if test "x$OPENJDK_TARGET_OS" = xaix; then
41558        COMPILER_NAME=xlc
41559        PICFLAG="-qpic=large"
41560        LIBRARY_PREFIX=lib
41561        SHARED_LIBRARY='lib$1.so'
41562        STATIC_LIBRARY='lib$1.a'
41563        SHARED_LIBRARY_FLAGS="-qmkshrobj"
41564        SHARED_LIBRARY_SUFFIX='.so'
41565        STATIC_LIBRARY_SUFFIX='.a'
41566        OBJ_SUFFIX='.o'
41567        EXE_SUFFIX=''
41568        SET_SHARED_LIBRARY_NAME=''
41569        SET_SHARED_LIBRARY_MAPFILE=''
41570        C_FLAG_REORDER=''
41571        CXX_FLAG_REORDER=''
41572        SET_SHARED_LIBRARY_ORIGIN=''
41573        SET_EXECUTABLE_ORIGIN=""
41574        CFLAGS_JDK=""
41575        CXXFLAGS_JDK=""
41576        CFLAGS_JDKLIB_EXTRA=''
41577        POST_STRIP_CMD="$STRIP -X32_64"
41578        POST_MCS_CMD=""
41579    fi
41580    if test "x$OPENJDK_TARGET_OS" = xwindows; then
41581      # If it is not gcc, then assume it is the MS Visual Studio compiler
41582      COMPILER_NAME=cl
41583      PICFLAG=""
41584      LIBRARY_PREFIX=
41585      SHARED_LIBRARY='$1.dll'
41586      STATIC_LIBRARY='$1.lib'
41587      SHARED_LIBRARY_FLAGS="-LD"
41588      SHARED_LIBRARY_SUFFIX='.dll'
41589      STATIC_LIBRARY_SUFFIX='.lib'
41590      OBJ_SUFFIX='.obj'
41591      EXE_SUFFIX='.exe'
41592      SET_SHARED_LIBRARY_NAME=''
41593      SET_SHARED_LIBRARY_MAPFILE=''
41594      SET_SHARED_LIBRARY_ORIGIN=''
41595      SET_EXECUTABLE_ORIGIN=''
41596    fi
41597  fi
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617  # The (cross) compiler is now configured, we can now test capabilities
41618  # of the target platform.
41619
41620
41621
41622  ###############################################################################
41623  #
41624  # Setup the opt flags for different compilers
41625  # and different operating systems.
41626  #
41627
41628  #
41629  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
41630  #
41631  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
41632    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
41633    # While waiting for a better solution, the current workaround is to use -mstackrealign.
41634    CFLAGS="$CFLAGS -mstackrealign"
41635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
41636$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
41637    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41638/* end confdefs.h.  */
41639int main() { return 0; }
41640_ACEOF
41641if ac_fn_cxx_try_link "$LINENO"; then :
41642
41643          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41644$as_echo "yes" >&6; }
41645
41646else
41647
41648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41649$as_echo "no" >&6; }
41650          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
41651
41652
41653fi
41654rm -f core conftest.err conftest.$ac_objext \
41655    conftest$ac_exeext conftest.$ac_ext
41656  fi
41657
41658  C_FLAG_DEPS="-MMD -MF"
41659  CXX_FLAG_DEPS="-MMD -MF"
41660
41661  case $COMPILER_TYPE in
41662    CC )
41663      case $COMPILER_NAME in
41664        gcc )
41665          case $OPENJDK_TARGET_OS in
41666            macosx )
41667              # On MacOSX we optimize for size, something
41668              # we should do for all platforms?
41669              C_O_FLAG_HI="-Os"
41670              C_O_FLAG_NORM="-Os"
41671              C_O_FLAG_NONE=""
41672              ;;
41673            *)
41674              C_O_FLAG_HI="-O3"
41675              C_O_FLAG_NORM="-O2"
41676              C_O_FLAG_NONE="-O0"
41677              ;;
41678          esac
41679          CXX_O_FLAG_HI="$C_O_FLAG_HI"
41680          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41681          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41682          CFLAGS_DEBUG_SYMBOLS="-g"
41683          CXXFLAGS_DEBUG_SYMBOLS="-g"
41684          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41685            CFLAGS_DEBUG_SYMBOLS="-g1"
41686            CXXFLAGS_DEBUG_SYMBOLS="-g1"
41687          fi
41688          ;;
41689        ossc )
41690          #
41691          # Forte has different names for this with their C++ compiler...
41692          #
41693          C_FLAG_DEPS="-xMMD -xMF"
41694          CXX_FLAG_DEPS="-xMMD -xMF"
41695
41696          # Extra options used with HIGHEST
41697          #
41698          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
41699          #          done with care, there are some assumptions below that need to
41700          #          be understood about the use of pointers, and IEEE behavior.
41701          #
41702          # Use non-standard floating point mode (not IEEE 754)
41703          CC_HIGHEST="$CC_HIGHEST -fns"
41704          # Do some simplification of floating point arithmetic (not IEEE 754)
41705          CC_HIGHEST="$CC_HIGHEST -fsimple"
41706          # Use single precision floating point with 'float'
41707          CC_HIGHEST="$CC_HIGHEST -fsingle"
41708          # Assume memory references via basic pointer types do not alias
41709          #   (Source with excessing pointer casting and data access with mixed
41710          #    pointer types are not recommended)
41711          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
41712          # Use intrinsic or inline versions for math/std functions
41713          #   (If you expect perfect errno behavior, do not use this)
41714          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
41715          # Loop data dependency optimizations (need -xO3 or higher)
41716          CC_HIGHEST="$CC_HIGHEST -xdepend"
41717          # Pointer parameters to functions do not overlap
41718          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
41719          #    If you pass in multiple pointers to the same data, do not use this)
41720          CC_HIGHEST="$CC_HIGHEST -xrestrict"
41721          # Inline some library routines
41722          #   (If you expect perfect errno behavior, do not use this)
41723          CC_HIGHEST="$CC_HIGHEST -xlibmil"
41724          # Use optimized math routines
41725          #   (If you expect perfect errno behavior, do not use this)
41726          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
41727          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
41728
41729          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
41730            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
41731            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
41732          fi
41733
41734          case $OPENJDK_TARGET_CPU_ARCH in
41735            x86)
41736              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41737              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41738              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41739              C_O_FLAG_NONE="-xregs=no%frameptr"
41740              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41741              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41742              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41743              CXX_O_FLAG_NONE="-xregs=no%frameptr"
41744              if test "x$OPENJDK_TARGET_CPU" = xx86; then
41745                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41746                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41747              fi
41748              ;;
41749            sparc)
41750              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41751              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41752              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41753              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41754              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41755              C_O_FLAG_NONE=""
41756              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41757              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41758              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41759              CXX_O_FLAG_NONE=""
41760              ;;
41761          esac
41762
41763          CFLAGS_DEBUG_SYMBOLS="-g -xs"
41764          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41765          ;;
41766        xlc )
41767          C_FLAG_DEPS="-qmakedep=gcc -MF"
41768          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
41769          C_O_FLAG_HIGHEST="-O3"
41770          C_O_FLAG_HI="-O3 -qstrict"
41771          C_O_FLAG_NORM="-O2"
41772          C_O_FLAG_NONE=""
41773          CXX_O_FLAG_HIGHEST="-O3"
41774          CXX_O_FLAG_HI="-O3 -qstrict"
41775          CXX_O_FLAG_NORM="-O2"
41776          CXX_O_FLAG_NONE=""
41777          CFLAGS_DEBUG_SYMBOLS="-g"
41778          CXXFLAGS_DEBUG_SYMBOLS="-g"
41779          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41780          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41781          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41782          ;;
41783      esac
41784      ;;
41785    CL )
41786      C_O_FLAG_HIGHEST="-O2"
41787      C_O_FLAG_HI="-O1"
41788      C_O_FLAG_NORM="-O1"
41789      C_O_FLAG_NONE="-Od"
41790      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41791      CXX_O_FLAG_HI="$C_O_FLAG_HI"
41792      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41793      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41794      ;;
41795  esac
41796
41797  if test -z "$C_O_FLAG_HIGHEST"; then
41798    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
41799  fi
41800
41801  if test -z "$CXX_O_FLAG_HIGHEST"; then
41802    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
41803  fi
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41819    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41820$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41821  fi
41822
41823  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41824    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41825$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41826  fi
41827
41828  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41829    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41830$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41831  fi
41832
41833
41834# Check whether --with-extra-cflags was given.
41835if test "${with_extra_cflags+set}" = set; then :
41836  withval=$with_extra_cflags;
41837fi
41838
41839
41840
41841# Check whether --with-extra-cxxflags was given.
41842if test "${with_extra_cxxflags+set}" = set; then :
41843  withval=$with_extra_cxxflags;
41844fi
41845
41846
41847
41848# Check whether --with-extra-ldflags was given.
41849if test "${with_extra_ldflags+set}" = set; then :
41850  withval=$with_extra_ldflags;
41851fi
41852
41853
41854  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41855  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41856  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41857
41858  # Hotspot needs these set in their legacy form
41859  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41860  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41861  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41862
41863
41864
41865
41866
41867  ###############################################################################
41868  #
41869  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41870  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41871  #
41872  case $COMPILER_NAME in
41873    gcc )
41874      # these options are used for both C and C++ compiles
41875      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41876      -pipe \
41877      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41878      case $OPENJDK_TARGET_CPU_ARCH in
41879        arm )
41880          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41881          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41882          ;;
41883        ppc )
41884          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41885          ;;
41886        * )
41887          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41888          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41889          ;;
41890      esac
41891      ;;
41892    ossc )
41893      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41894      case $OPENJDK_TARGET_CPU_ARCH in
41895        x86 )
41896          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41897          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41898          ;;
41899      esac
41900
41901      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41902      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41903
41904      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41905      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41906      ;;
41907    xlc )
41908      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41909      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41910
41911      LDFLAGS_JDK="$LDFLAGS_JDK"
41912      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
41913      ;;
41914    cl )
41915      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41916      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41917      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41918      -DWIN32 -DIAL"
41919      case $OPENJDK_TARGET_CPU in
41920        x86 )
41921          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41922          ;;
41923        x86_64 )
41924          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41925          ;;
41926      esac
41927      ;;
41928  esac
41929
41930  ###############################################################################
41931
41932  # Adjust flags according to debug level.
41933  case $DEBUG_LEVEL in
41934    fastdebug )
41935      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41936      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41937      C_O_FLAG_HI="$C_O_FLAG_NORM"
41938      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41939      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41940      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41941      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41942      ;;
41943    slowdebug )
41944      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41945      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41946      C_O_FLAG_HI="$C_O_FLAG_NONE"
41947      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41948      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41949      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41950      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41951      ;;
41952  esac
41953
41954  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41955
41956  # The package path is used only on macosx?
41957  PACKAGE_PATH=/opt/local
41958
41959
41960  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41961    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41962    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41963    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41964    #   Note: -Dmacro         is the same as    #define macro 1
41965    #         -Dmacro=        is the same as    #define macro
41966    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41967      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41968    else
41969      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41970    fi
41971  else
41972    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41973  fi
41974  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41975    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
41976  fi
41977  if test "x$OPENJDK_TARGET_OS" = xwindows; then
41978    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
41979  fi
41980  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41981    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
41982  fi
41983  if test "x$OPENJDK_TARGET_OS" = xaix; then
41984    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
41985  fi
41986  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41987    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41988    # Setting these parameters makes it an error to link to macosx APIs that are
41989    # newer than the given OS version and makes the linked binaries compatible even
41990    # if built on a newer version of the OS.
41991    # The expected format is X.Y.Z
41992    MACOSX_VERSION_MIN=10.7.0
41993
41994    # The macro takes the version with no dots, ex: 1070
41995    # Let the flags variables get resolved in make for easier override on make
41996    # command line.
41997    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41998    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41999  fi
42000  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42001    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
42002  fi
42003  if test "x$DEBUG_LEVEL" = xrelease; then
42004    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42005  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42006    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42007  fi
42008  else
42009    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42010  fi
42011
42012  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42013  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42014
42015  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42016      -I${JDK_OUTPUTDIR}/include \
42017      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42018      -I${JDK_TOPDIR}/src/share/javavm/export \
42019      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42020      -I${JDK_TOPDIR}/src/share/native/common \
42021      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42022
42023  # The shared libraries are compiled using the picflag.
42024  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42025  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42026
42027  # Executable flags
42028  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
42029  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
42030
42031  # Now this is odd. The JDK native libraries have to link against libjvm.so
42032  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42033  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42034  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42035  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42036  # libraries will link to whatever is in memory. Yuck.
42037  #
42038  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42039  if test "x$COMPILER_NAME" = xcl; then
42040    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42041    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42042      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42043    fi
42044    # TODO: make -debug optional "--disable-full-debug-symbols"
42045    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42046    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42047    LDFLAGS_JDKLIB_SUFFIX=""
42048    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42049      LDFLAGS_STACK_SIZE=1048576
42050    else
42051      LDFLAGS_STACK_SIZE=327680
42052    fi
42053    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42054  else
42055    if test "x$COMPILER_NAME" = xgcc; then
42056      # If this is a --hash-style=gnu system, use --hash-style=both, why?
42057      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
42058      if test -n "$HAS_GNU_HASH"; then
42059        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42060      fi
42061      if test "x$OPENJDK_TARGET_OS" = xlinux; then
42062        # And since we now know that the linker is gnu, then add -z defs, to forbid
42063        # undefined symbols in object files.
42064        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42065        if test "x$DEBUG_LEVEL" = "xrelease"; then
42066          # When building release libraries, tell the linker optimize them.
42067          # Should this be supplied to the OSS linker as well?
42068          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42069        fi
42070      fi
42071    fi
42072    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42073        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42074
42075    # On some platforms (mac) the linker warns about non existing -L dirs.
42076    # Add server first if available. Linking aginst client does not always produce the same results.
42077    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42078    # Default to server for other variants.
42079    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42080      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42081    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42082      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42083    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42084      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42085    else
42086      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42087    fi
42088
42089    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42090    if test "x$COMPILER_NAME" = xossc; then
42091      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42092    fi
42093
42094    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42095    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42096      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42097    fi
42098  fi
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114  # Some Zero and Shark settings.
42115  # ZERO_ARCHFLAG tells the compiler which mode to build for
42116  case "${OPENJDK_TARGET_CPU}" in
42117    s390)
42118      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42119      ;;
42120    *)
42121      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42122  esac
42123
42124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42125$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42126  supports=yes
42127
42128  saved_cflags="$CFLAGS"
42129  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42130  ac_ext=c
42131ac_cpp='$CPP $CPPFLAGS'
42132ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42133ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42134ac_compiler_gnu=$ac_cv_c_compiler_gnu
42135
42136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42137/* end confdefs.h.  */
42138int i;
42139_ACEOF
42140if ac_fn_c_try_compile "$LINENO"; then :
42141
42142else
42143  supports=no
42144fi
42145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42146  ac_ext=cpp
42147ac_cpp='$CXXCPP $CPPFLAGS'
42148ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42149ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42150ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42151
42152  CFLAGS="$saved_cflags"
42153
42154  saved_cxxflags="$CXXFLAGS"
42155  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42156  ac_ext=cpp
42157ac_cpp='$CXXCPP $CPPFLAGS'
42158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42161
42162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42163/* end confdefs.h.  */
42164int i;
42165_ACEOF
42166if ac_fn_cxx_try_compile "$LINENO"; then :
42167
42168else
42169  supports=no
42170fi
42171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42172  ac_ext=cpp
42173ac_cpp='$CXXCPP $CPPFLAGS'
42174ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42175ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42176ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42177
42178  CXXFLAGS="$saved_cxxflags"
42179
42180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42181$as_echo "$supports" >&6; }
42182  if test "x$supports" = "xyes" ; then
42183    :
42184  else
42185    ZERO_ARCHFLAG=""
42186  fi
42187
42188
42189
42190  # Check that the compiler supports -mX (or -qX on AIX) flags
42191  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42192
42193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42194$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42195  supports=yes
42196
42197  saved_cflags="$CFLAGS"
42198  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42199  ac_ext=c
42200ac_cpp='$CPP $CPPFLAGS'
42201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42203ac_compiler_gnu=$ac_cv_c_compiler_gnu
42204
42205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42206/* end confdefs.h.  */
42207int i;
42208_ACEOF
42209if ac_fn_c_try_compile "$LINENO"; then :
42210
42211else
42212  supports=no
42213fi
42214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42215  ac_ext=cpp
42216ac_cpp='$CXXCPP $CPPFLAGS'
42217ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42218ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42219ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42220
42221  CFLAGS="$saved_cflags"
42222
42223  saved_cxxflags="$CXXFLAGS"
42224  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42225  ac_ext=cpp
42226ac_cpp='$CXXCPP $CPPFLAGS'
42227ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42228ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42229ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42230
42231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42232/* end confdefs.h.  */
42233int i;
42234_ACEOF
42235if ac_fn_cxx_try_compile "$LINENO"; then :
42236
42237else
42238  supports=no
42239fi
42240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42241  ac_ext=cpp
42242ac_cpp='$CXXCPP $CPPFLAGS'
42243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42246
42247  CXXFLAGS="$saved_cxxflags"
42248
42249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42250$as_echo "$supports" >&6; }
42251  if test "x$supports" = "xyes" ; then
42252    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42253  else
42254    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42255  fi
42256
42257
42258
42259
42260  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
42261  USING_BROKEN_SUSE_LD=no
42262  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
42263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
42264$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
42265    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
42266    echo "int main() { }" > main.c
42267    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
42268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42269$as_echo "no" >&6; }
42270      USING_BROKEN_SUSE_LD=no
42271    else
42272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42273$as_echo "yes" >&6; }
42274      USING_BROKEN_SUSE_LD=yes
42275    fi
42276    rm -rf version-script.map main.c a.out
42277  fi
42278
42279
42280
42281# Setup debug symbols (need objcopy from the toolchain for that)
42282
42283  #
42284  # ENABLE_DEBUG_SYMBOLS
42285  # This must be done after the toolchain is setup, since we're looking at objcopy.
42286  #
42287  # Check whether --enable-debug-symbols was given.
42288if test "${enable_debug_symbols+set}" = set; then :
42289  enableval=$enable_debug_symbols;
42290fi
42291
42292
42293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42294$as_echo_n "checking if we should generate debug symbols... " >&6; }
42295
42296  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42297    # explicit enabling of enable-debug-symbols and can't find objcopy
42298    #   this is an error
42299    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42300  fi
42301
42302  if test "x$enable_debug_symbols" = "xyes"; then
42303    ENABLE_DEBUG_SYMBOLS=true
42304  elif test "x$enable_debug_symbols" = "xno"; then
42305    ENABLE_DEBUG_SYMBOLS=false
42306  else
42307    # Default is on if objcopy is found
42308    if test "x$OBJCOPY" != x; then
42309      ENABLE_DEBUG_SYMBOLS=true
42310    # MacOS X and Windows don't use objcopy but default is on for those OSes
42311    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42312      ENABLE_DEBUG_SYMBOLS=true
42313    else
42314      ENABLE_DEBUG_SYMBOLS=false
42315    fi
42316  fi
42317
42318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42319$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42320
42321  #
42322  # ZIP_DEBUGINFO_FILES
42323  #
42324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42325$as_echo_n "checking if we should zip debug-info files... " >&6; }
42326  # Check whether --enable-zip-debug-info was given.
42327if test "${enable_zip_debug_info+set}" = set; then :
42328  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42329else
42330  enable_zip_debug_info="yes"
42331fi
42332
42333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42334$as_echo "${enable_zip_debug_info}" >&6; }
42335
42336  if test "x${enable_zip_debug_info}" = "xno"; then
42337    ZIP_DEBUGINFO_FILES=false
42338  else
42339    ZIP_DEBUGINFO_FILES=true
42340  fi
42341
42342
42343
42344
42345
42346
42347
42348###############################################################################
42349#
42350# Check dependencies for external and internal libraries.
42351#
42352###############################################################################
42353
42354# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42355
42356  # When using cygwin or msys, we need a wrapper binary that renames
42357  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42358  # @files and rewrites these too! This wrapper binary is
42359  # called fixpath.
42360  FIXPATH=
42361  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42363$as_echo_n "checking if fixpath can be created... " >&6; }
42364    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42365    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42366    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42367      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42368      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42369      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42370      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42371    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42372      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42373      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42374
42375      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42376      # @ was chosen as separator to minimize risk of other tools messing around with it
42377      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42378      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42379
42380      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42381    fi
42382    rm -f $OUTPUT_ROOT/fixpath*
42383    cd $OUTPUT_ROOT
42384    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42385    cd $CURDIR
42386
42387    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42389$as_echo "no" >&6; }
42390      cat $OUTPUT_ROOT/fixpath1.log
42391      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42392    fi
42393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42394$as_echo "yes" >&6; }
42395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42396$as_echo_n "checking if fixpath.exe works... " >&6; }
42397    cd $OUTPUT_ROOT
42398    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42399    cd $CURDIR
42400    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42402$as_echo "no" >&6; }
42403      cat $OUTPUT_ROOT/fixpath2.log
42404      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42405    fi
42406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42407$as_echo "yes" >&6; }
42408    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42409  fi
42410
42411
42412
42413
42414
42415
42416  ###############################################################################
42417  #
42418  # OS specific settings that we never will need to probe.
42419  #
42420  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42422$as_echo_n "checking what is not needed on Linux?... " >&6; }
42423    PULSE_NOT_NEEDED=yes
42424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42425$as_echo "pulse" >&6; }
42426  fi
42427
42428  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42430$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42431    ALSA_NOT_NEEDED=yes
42432    PULSE_NOT_NEEDED=yes
42433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42434$as_echo "alsa pulse" >&6; }
42435  fi
42436
42437  if test "x$OPENJDK_TARGET_OS" = xaix; then
42438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42439$as_echo_n "checking what is not needed on AIX?... " >&6; }
42440    ALSA_NOT_NEEDED=yes
42441    PULSE_NOT_NEEDED=yes
42442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42443$as_echo "alsa pulse" >&6; }
42444  fi
42445
42446
42447  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42449$as_echo_n "checking what is not needed on Windows?... " >&6; }
42450    CUPS_NOT_NEEDED=yes
42451    ALSA_NOT_NEEDED=yes
42452    PULSE_NOT_NEEDED=yes
42453    X11_NOT_NEEDED=yes
42454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42455$as_echo "alsa cups pulse x11" >&6; }
42456  fi
42457
42458  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42460$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42461    ALSA_NOT_NEEDED=yes
42462    PULSE_NOT_NEEDED=yes
42463    X11_NOT_NEEDED=yes
42464    # If the java runtime framework is disabled, then we need X11.
42465    # This will be adjusted below.
42466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42467$as_echo "alsa pulse x11" >&6; }
42468  fi
42469
42470  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42472$as_echo_n "checking what is not needed on bsd?... " >&6; }
42473    ALSA_NOT_NEEDED=yes
42474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42475$as_echo "alsa" >&6; }
42476  fi
42477
42478  if test "x$OPENJDK" = "xfalse"; then
42479    FREETYPE_NOT_NEEDED=yes
42480  fi
42481
42482  if test "x$SUPPORT_HEADFUL" = xno; then
42483    X11_NOT_NEEDED=yes
42484  fi
42485
42486  ###############################################################################
42487  #
42488  # Check for MacOSX support for OpenJDK.
42489  #
42490
42491
42492  # Check whether --enable-macosx-runtime-support was given.
42493if test "${enable_macosx_runtime_support+set}" = set; then :
42494  enableval=$enable_macosx_runtime_support;
42495fi
42496
42497  if test "x$enable_macosx_runtime_support" != x; then
42498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42499$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42500  fi
42501
42502
42503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42504$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42505  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42507$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42508  else
42509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42510$as_echo "no" >&6; }
42511  fi
42512
42513
42514
42515  ###############################################################################
42516  #
42517  # Check for X Windows
42518  #
42519
42520  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42521  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42522  # --x-libraries for the sysroot, if that seems to be correct.
42523  if test "x$SYS_ROOT" != "x/"; then
42524    if test "x$x_includes" = xNONE; then
42525      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42526        x_includes="$SYS_ROOT/usr/X11R6/include"
42527      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42528        x_includes="$SYS_ROOT/usr/include"
42529      fi
42530    fi
42531    if test "x$x_libraries" = xNONE; then
42532      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42533        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42534      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42535        x_libraries="$SYS_ROOT/usr/lib64"
42536      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42537        x_libraries="$SYS_ROOT/usr/lib"
42538      fi
42539    fi
42540  fi
42541
42542  # Now let autoconf do it's magic
42543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42544$as_echo_n "checking for X... " >&6; }
42545
42546
42547# Check whether --with-x was given.
42548if test "${with_x+set}" = set; then :
42549  withval=$with_x;
42550fi
42551
42552# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42553if test "x$with_x" = xno; then
42554  # The user explicitly disabled X.
42555  have_x=disabled
42556else
42557  case $x_includes,$x_libraries in #(
42558    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42559    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42560  $as_echo_n "(cached) " >&6
42561else
42562  # One or both of the vars are not set, and there is no cached value.
42563ac_x_includes=no ac_x_libraries=no
42564rm -f -r conftest.dir
42565if mkdir conftest.dir; then
42566  cd conftest.dir
42567  cat >Imakefile <<'_ACEOF'
42568incroot:
42569	@echo incroot='${INCROOT}'
42570usrlibdir:
42571	@echo usrlibdir='${USRLIBDIR}'
42572libdir:
42573	@echo libdir='${LIBDIR}'
42574_ACEOF
42575  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42576    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42577    for ac_var in incroot usrlibdir libdir; do
42578      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42579    done
42580    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42581    for ac_extension in a so sl dylib la dll; do
42582      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42583	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42584	ac_im_usrlibdir=$ac_im_libdir; break
42585      fi
42586    done
42587    # Screen out bogus values from the imake configuration.  They are
42588    # bogus both because they are the default anyway, and because
42589    # using them would break gcc on systems where it needs fixed includes.
42590    case $ac_im_incroot in
42591	/usr/include) ac_x_includes= ;;
42592	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42593    esac
42594    case $ac_im_usrlibdir in
42595	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42596	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42597    esac
42598  fi
42599  cd ..
42600  rm -f -r conftest.dir
42601fi
42602
42603# Standard set of common directories for X headers.
42604# Check X11 before X11Rn because it is often a symlink to the current release.
42605ac_x_header_dirs='
42606/usr/X11/include
42607/usr/X11R7/include
42608/usr/X11R6/include
42609/usr/X11R5/include
42610/usr/X11R4/include
42611
42612/usr/include/X11
42613/usr/include/X11R7
42614/usr/include/X11R6
42615/usr/include/X11R5
42616/usr/include/X11R4
42617
42618/usr/local/X11/include
42619/usr/local/X11R7/include
42620/usr/local/X11R6/include
42621/usr/local/X11R5/include
42622/usr/local/X11R4/include
42623
42624/usr/local/include/X11
42625/usr/local/include/X11R7
42626/usr/local/include/X11R6
42627/usr/local/include/X11R5
42628/usr/local/include/X11R4
42629
42630/usr/X386/include
42631/usr/x386/include
42632/usr/XFree86/include/X11
42633
42634/usr/include
42635/usr/local/include
42636/usr/unsupported/include
42637/usr/athena/include
42638/usr/local/x11r5/include
42639/usr/lpp/Xamples/include
42640
42641/usr/openwin/include
42642/usr/openwin/share/include'
42643
42644if test "$ac_x_includes" = no; then
42645  # Guess where to find include files, by looking for Xlib.h.
42646  # First, try using that file with no special directory specified.
42647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42648/* end confdefs.h.  */
42649#include <X11/Xlib.h>
42650_ACEOF
42651if ac_fn_cxx_try_cpp "$LINENO"; then :
42652  # We can compile using X headers with no special include directory.
42653ac_x_includes=
42654else
42655  for ac_dir in $ac_x_header_dirs; do
42656  if test -r "$ac_dir/X11/Xlib.h"; then
42657    ac_x_includes=$ac_dir
42658    break
42659  fi
42660done
42661fi
42662rm -f conftest.err conftest.i conftest.$ac_ext
42663fi # $ac_x_includes = no
42664
42665if test "$ac_x_libraries" = no; then
42666  # Check for the libraries.
42667  # See if we find them without any special options.
42668  # Don't add to $LIBS permanently.
42669  ac_save_LIBS=$LIBS
42670  LIBS="-lX11 $LIBS"
42671  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42672/* end confdefs.h.  */
42673#include <X11/Xlib.h>
42674int
42675main ()
42676{
42677XrmInitialize ()
42678  ;
42679  return 0;
42680}
42681_ACEOF
42682if ac_fn_cxx_try_link "$LINENO"; then :
42683  LIBS=$ac_save_LIBS
42684# We can link X programs with no special library path.
42685ac_x_libraries=
42686else
42687  LIBS=$ac_save_LIBS
42688for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42689do
42690  # Don't even attempt the hair of trying to link an X program!
42691  for ac_extension in a so sl dylib la dll; do
42692    if test -r "$ac_dir/libX11.$ac_extension"; then
42693      ac_x_libraries=$ac_dir
42694      break 2
42695    fi
42696  done
42697done
42698fi
42699rm -f core conftest.err conftest.$ac_objext \
42700    conftest$ac_exeext conftest.$ac_ext
42701fi # $ac_x_libraries = no
42702
42703case $ac_x_includes,$ac_x_libraries in #(
42704  no,* | *,no | *\'*)
42705    # Didn't find X, or a directory has "'" in its name.
42706    ac_cv_have_x="have_x=no";; #(
42707  *)
42708    # Record where we found X for the cache.
42709    ac_cv_have_x="have_x=yes\
42710	ac_x_includes='$ac_x_includes'\
42711	ac_x_libraries='$ac_x_libraries'"
42712esac
42713fi
42714;; #(
42715    *) have_x=yes;;
42716  esac
42717  eval "$ac_cv_have_x"
42718fi # $with_x != no
42719
42720if test "$have_x" != yes; then
42721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42722$as_echo "$have_x" >&6; }
42723  no_x=yes
42724else
42725  # If each of the values was on the command line, it overrides each guess.
42726  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42727  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42728  # Update the cache value to reflect the command line values.
42729  ac_cv_have_x="have_x=yes\
42730	ac_x_includes='$x_includes'\
42731	ac_x_libraries='$x_libraries'"
42732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42733$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42734fi
42735
42736  if test "$no_x" = yes; then
42737  # Not all programs may use this symbol, but it does not hurt to define it.
42738
42739$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42740
42741  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42742else
42743  if test -n "$x_includes"; then
42744    X_CFLAGS="$X_CFLAGS -I$x_includes"
42745  fi
42746
42747  # It would also be nice to do this for all -L options, not just this one.
42748  if test -n "$x_libraries"; then
42749    X_LIBS="$X_LIBS -L$x_libraries"
42750    # For Solaris; some versions of Sun CC require a space after -R and
42751    # others require no space.  Words are not sufficient . . . .
42752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42753$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42754    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42755    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42756    ac_cxx_werror_flag=yes
42757    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42758/* end confdefs.h.  */
42759
42760int
42761main ()
42762{
42763
42764  ;
42765  return 0;
42766}
42767_ACEOF
42768if ac_fn_cxx_try_link "$LINENO"; then :
42769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42770$as_echo "no" >&6; }
42771       X_LIBS="$X_LIBS -R$x_libraries"
42772else
42773  LIBS="$ac_xsave_LIBS -R $x_libraries"
42774       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42775/* end confdefs.h.  */
42776
42777int
42778main ()
42779{
42780
42781  ;
42782  return 0;
42783}
42784_ACEOF
42785if ac_fn_cxx_try_link "$LINENO"; then :
42786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42787$as_echo "yes" >&6; }
42788	  X_LIBS="$X_LIBS -R $x_libraries"
42789else
42790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42791$as_echo "neither works" >&6; }
42792fi
42793rm -f core conftest.err conftest.$ac_objext \
42794    conftest$ac_exeext conftest.$ac_ext
42795fi
42796rm -f core conftest.err conftest.$ac_objext \
42797    conftest$ac_exeext conftest.$ac_ext
42798    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42799    LIBS=$ac_xsave_LIBS
42800  fi
42801
42802  # Check for system-dependent libraries X programs must link with.
42803  # Do this before checking for the system-independent R6 libraries
42804  # (-lICE), since we may need -lsocket or whatever for X linking.
42805
42806  if test "$ISC" = yes; then
42807    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42808  else
42809    # Martyn Johnson says this is needed for Ultrix, if the X
42810    # libraries were built with DECnet support.  And Karl Berry says
42811    # the Alpha needs dnet_stub (dnet does not exist).
42812    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42814/* end confdefs.h.  */
42815
42816/* Override any GCC internal prototype to avoid an error.
42817   Use char because int might match the return type of a GCC
42818   builtin and then its argument prototype would still apply.  */
42819#ifdef __cplusplus
42820extern "C"
42821#endif
42822char XOpenDisplay ();
42823int
42824main ()
42825{
42826return XOpenDisplay ();
42827  ;
42828  return 0;
42829}
42830_ACEOF
42831if ac_fn_cxx_try_link "$LINENO"; then :
42832
42833else
42834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42835$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42836if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42837  $as_echo_n "(cached) " >&6
42838else
42839  ac_check_lib_save_LIBS=$LIBS
42840LIBS="-ldnet  $LIBS"
42841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42842/* end confdefs.h.  */
42843
42844/* Override any GCC internal prototype to avoid an error.
42845   Use char because int might match the return type of a GCC
42846   builtin and then its argument prototype would still apply.  */
42847#ifdef __cplusplus
42848extern "C"
42849#endif
42850char dnet_ntoa ();
42851int
42852main ()
42853{
42854return dnet_ntoa ();
42855  ;
42856  return 0;
42857}
42858_ACEOF
42859if ac_fn_cxx_try_link "$LINENO"; then :
42860  ac_cv_lib_dnet_dnet_ntoa=yes
42861else
42862  ac_cv_lib_dnet_dnet_ntoa=no
42863fi
42864rm -f core conftest.err conftest.$ac_objext \
42865    conftest$ac_exeext conftest.$ac_ext
42866LIBS=$ac_check_lib_save_LIBS
42867fi
42868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42869$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42870if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42871  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42872fi
42873
42874    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42876$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42877if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42878  $as_echo_n "(cached) " >&6
42879else
42880  ac_check_lib_save_LIBS=$LIBS
42881LIBS="-ldnet_stub  $LIBS"
42882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42883/* end confdefs.h.  */
42884
42885/* Override any GCC internal prototype to avoid an error.
42886   Use char because int might match the return type of a GCC
42887   builtin and then its argument prototype would still apply.  */
42888#ifdef __cplusplus
42889extern "C"
42890#endif
42891char dnet_ntoa ();
42892int
42893main ()
42894{
42895return dnet_ntoa ();
42896  ;
42897  return 0;
42898}
42899_ACEOF
42900if ac_fn_cxx_try_link "$LINENO"; then :
42901  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42902else
42903  ac_cv_lib_dnet_stub_dnet_ntoa=no
42904fi
42905rm -f core conftest.err conftest.$ac_objext \
42906    conftest$ac_exeext conftest.$ac_ext
42907LIBS=$ac_check_lib_save_LIBS
42908fi
42909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42910$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42911if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42912  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42913fi
42914
42915    fi
42916fi
42917rm -f core conftest.err conftest.$ac_objext \
42918    conftest$ac_exeext conftest.$ac_ext
42919    LIBS="$ac_xsave_LIBS"
42920
42921    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42922    # to get the SysV transport functions.
42923    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42924    # needs -lnsl.
42925    # The nsl library prevents programs from opening the X display
42926    # on Irix 5.2, according to T.E. Dickey.
42927    # The functions gethostbyname, getservbyname, and inet_addr are
42928    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42929    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42930if test "x$ac_cv_func_gethostbyname" = xyes; then :
42931
42932fi
42933
42934    if test $ac_cv_func_gethostbyname = no; then
42935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42936$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42937if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42938  $as_echo_n "(cached) " >&6
42939else
42940  ac_check_lib_save_LIBS=$LIBS
42941LIBS="-lnsl  $LIBS"
42942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42943/* end confdefs.h.  */
42944
42945/* Override any GCC internal prototype to avoid an error.
42946   Use char because int might match the return type of a GCC
42947   builtin and then its argument prototype would still apply.  */
42948#ifdef __cplusplus
42949extern "C"
42950#endif
42951char gethostbyname ();
42952int
42953main ()
42954{
42955return gethostbyname ();
42956  ;
42957  return 0;
42958}
42959_ACEOF
42960if ac_fn_cxx_try_link "$LINENO"; then :
42961  ac_cv_lib_nsl_gethostbyname=yes
42962else
42963  ac_cv_lib_nsl_gethostbyname=no
42964fi
42965rm -f core conftest.err conftest.$ac_objext \
42966    conftest$ac_exeext conftest.$ac_ext
42967LIBS=$ac_check_lib_save_LIBS
42968fi
42969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42970$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42971if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42972  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42973fi
42974
42975      if test $ac_cv_lib_nsl_gethostbyname = no; then
42976	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42977$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42978if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42979  $as_echo_n "(cached) " >&6
42980else
42981  ac_check_lib_save_LIBS=$LIBS
42982LIBS="-lbsd  $LIBS"
42983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42984/* end confdefs.h.  */
42985
42986/* Override any GCC internal prototype to avoid an error.
42987   Use char because int might match the return type of a GCC
42988   builtin and then its argument prototype would still apply.  */
42989#ifdef __cplusplus
42990extern "C"
42991#endif
42992char gethostbyname ();
42993int
42994main ()
42995{
42996return gethostbyname ();
42997  ;
42998  return 0;
42999}
43000_ACEOF
43001if ac_fn_cxx_try_link "$LINENO"; then :
43002  ac_cv_lib_bsd_gethostbyname=yes
43003else
43004  ac_cv_lib_bsd_gethostbyname=no
43005fi
43006rm -f core conftest.err conftest.$ac_objext \
43007    conftest$ac_exeext conftest.$ac_ext
43008LIBS=$ac_check_lib_save_LIBS
43009fi
43010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43011$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43012if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43013  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43014fi
43015
43016      fi
43017    fi
43018
43019    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43020    # socket/setsockopt and other routines are undefined under SCO ODT
43021    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43022    # on later versions), says Simon Leinen: it contains gethostby*
43023    # variants that don't use the name server (or something).  -lsocket
43024    # must be given before -lnsl if both are needed.  We assume that
43025    # if connect needs -lnsl, so does gethostbyname.
43026    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43027if test "x$ac_cv_func_connect" = xyes; then :
43028
43029fi
43030
43031    if test $ac_cv_func_connect = no; then
43032      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43033$as_echo_n "checking for connect in -lsocket... " >&6; }
43034if ${ac_cv_lib_socket_connect+:} false; then :
43035  $as_echo_n "(cached) " >&6
43036else
43037  ac_check_lib_save_LIBS=$LIBS
43038LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43040/* end confdefs.h.  */
43041
43042/* Override any GCC internal prototype to avoid an error.
43043   Use char because int might match the return type of a GCC
43044   builtin and then its argument prototype would still apply.  */
43045#ifdef __cplusplus
43046extern "C"
43047#endif
43048char connect ();
43049int
43050main ()
43051{
43052return connect ();
43053  ;
43054  return 0;
43055}
43056_ACEOF
43057if ac_fn_cxx_try_link "$LINENO"; then :
43058  ac_cv_lib_socket_connect=yes
43059else
43060  ac_cv_lib_socket_connect=no
43061fi
43062rm -f core conftest.err conftest.$ac_objext \
43063    conftest$ac_exeext conftest.$ac_ext
43064LIBS=$ac_check_lib_save_LIBS
43065fi
43066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43067$as_echo "$ac_cv_lib_socket_connect" >&6; }
43068if test "x$ac_cv_lib_socket_connect" = xyes; then :
43069  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43070fi
43071
43072    fi
43073
43074    # Guillermo Gomez says -lposix is necessary on A/UX.
43075    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43076if test "x$ac_cv_func_remove" = xyes; then :
43077
43078fi
43079
43080    if test $ac_cv_func_remove = no; then
43081      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43082$as_echo_n "checking for remove in -lposix... " >&6; }
43083if ${ac_cv_lib_posix_remove+:} false; then :
43084  $as_echo_n "(cached) " >&6
43085else
43086  ac_check_lib_save_LIBS=$LIBS
43087LIBS="-lposix  $LIBS"
43088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43089/* end confdefs.h.  */
43090
43091/* Override any GCC internal prototype to avoid an error.
43092   Use char because int might match the return type of a GCC
43093   builtin and then its argument prototype would still apply.  */
43094#ifdef __cplusplus
43095extern "C"
43096#endif
43097char remove ();
43098int
43099main ()
43100{
43101return remove ();
43102  ;
43103  return 0;
43104}
43105_ACEOF
43106if ac_fn_cxx_try_link "$LINENO"; then :
43107  ac_cv_lib_posix_remove=yes
43108else
43109  ac_cv_lib_posix_remove=no
43110fi
43111rm -f core conftest.err conftest.$ac_objext \
43112    conftest$ac_exeext conftest.$ac_ext
43113LIBS=$ac_check_lib_save_LIBS
43114fi
43115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43116$as_echo "$ac_cv_lib_posix_remove" >&6; }
43117if test "x$ac_cv_lib_posix_remove" = xyes; then :
43118  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43119fi
43120
43121    fi
43122
43123    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43124    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43125if test "x$ac_cv_func_shmat" = xyes; then :
43126
43127fi
43128
43129    if test $ac_cv_func_shmat = no; then
43130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43131$as_echo_n "checking for shmat in -lipc... " >&6; }
43132if ${ac_cv_lib_ipc_shmat+:} false; then :
43133  $as_echo_n "(cached) " >&6
43134else
43135  ac_check_lib_save_LIBS=$LIBS
43136LIBS="-lipc  $LIBS"
43137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43138/* end confdefs.h.  */
43139
43140/* Override any GCC internal prototype to avoid an error.
43141   Use char because int might match the return type of a GCC
43142   builtin and then its argument prototype would still apply.  */
43143#ifdef __cplusplus
43144extern "C"
43145#endif
43146char shmat ();
43147int
43148main ()
43149{
43150return shmat ();
43151  ;
43152  return 0;
43153}
43154_ACEOF
43155if ac_fn_cxx_try_link "$LINENO"; then :
43156  ac_cv_lib_ipc_shmat=yes
43157else
43158  ac_cv_lib_ipc_shmat=no
43159fi
43160rm -f core conftest.err conftest.$ac_objext \
43161    conftest$ac_exeext conftest.$ac_ext
43162LIBS=$ac_check_lib_save_LIBS
43163fi
43164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43165$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43166if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43167  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43168fi
43169
43170    fi
43171  fi
43172
43173  # Check for libraries that X11R6 Xt/Xaw programs need.
43174  ac_save_LDFLAGS=$LDFLAGS
43175  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43176  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43177  # check for ICE first), but we must link in the order -lSM -lICE or
43178  # we get undefined symbols.  So assume we have SM if we have ICE.
43179  # These have to be linked with before -lX11, unlike the other
43180  # libraries we check for below, so use a different variable.
43181  # John Interrante, Karl Berry
43182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43183$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43184if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43185  $as_echo_n "(cached) " >&6
43186else
43187  ac_check_lib_save_LIBS=$LIBS
43188LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43190/* end confdefs.h.  */
43191
43192/* Override any GCC internal prototype to avoid an error.
43193   Use char because int might match the return type of a GCC
43194   builtin and then its argument prototype would still apply.  */
43195#ifdef __cplusplus
43196extern "C"
43197#endif
43198char IceConnectionNumber ();
43199int
43200main ()
43201{
43202return IceConnectionNumber ();
43203  ;
43204  return 0;
43205}
43206_ACEOF
43207if ac_fn_cxx_try_link "$LINENO"; then :
43208  ac_cv_lib_ICE_IceConnectionNumber=yes
43209else
43210  ac_cv_lib_ICE_IceConnectionNumber=no
43211fi
43212rm -f core conftest.err conftest.$ac_objext \
43213    conftest$ac_exeext conftest.$ac_ext
43214LIBS=$ac_check_lib_save_LIBS
43215fi
43216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43217$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43218if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43219  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43220fi
43221
43222  LDFLAGS=$ac_save_LDFLAGS
43223
43224fi
43225
43226
43227  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43228  # this doesn't make sense so we remove it.
43229  if test "x$COMPILE_TYPE" = xcross; then
43230    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43231  fi
43232
43233  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43234
43235  # Print a helpful message on how to acquire the necessary build dependency.
43236  # x11 is the help tag: freetype, cups, pulse, alsa etc
43237  MISSING_DEPENDENCY=x11
43238
43239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43240    cygwin_help $MISSING_DEPENDENCY
43241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43242    msys_help $MISSING_DEPENDENCY
43243  else
43244    PKGHANDLER_COMMAND=
43245
43246    case $PKGHANDLER in
43247      apt-get)
43248        apt_help     $MISSING_DEPENDENCY ;;
43249      yum)
43250        yum_help     $MISSING_DEPENDENCY ;;
43251      port)
43252        port_help    $MISSING_DEPENDENCY ;;
43253      pkgutil)
43254        pkgutil_help $MISSING_DEPENDENCY ;;
43255      pkgadd)
43256        pkgadd_help  $MISSING_DEPENDENCY ;;
43257    esac
43258
43259    if test "x$PKGHANDLER_COMMAND" != x; then
43260      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43261    fi
43262  fi
43263
43264    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43265  fi
43266
43267  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43268    OPENWIN_HOME="/usr/openwin"
43269  fi
43270
43271
43272
43273  #
43274  # Weird Sol10 something check...TODO change to try compile
43275  #
43276  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43277    if test "`uname -r`" = "5.10"; then
43278      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43279        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43280      fi
43281    fi
43282  fi
43283
43284  ac_ext=c
43285ac_cpp='$CPP $CPPFLAGS'
43286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43288ac_compiler_gnu=$ac_cv_c_compiler_gnu
43289
43290  OLD_CFLAGS="$CFLAGS"
43291  CFLAGS="$CFLAGS $X_CFLAGS"
43292
43293  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43294  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43295do :
43296  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43297ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43298        # include <X11/Xlib.h>
43299        # include <X11/Xutil.h>
43300
43301
43302"
43303if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43304  cat >>confdefs.h <<_ACEOF
43305#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43306_ACEOF
43307 X11_A_OK=yes
43308else
43309  X11_A_OK=no; break
43310fi
43311
43312done
43313
43314
43315  CFLAGS="$OLD_CFLAGS"
43316  ac_ext=cpp
43317ac_cpp='$CXXCPP $CPPFLAGS'
43318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43321
43322
43323  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43324
43325  # Print a helpful message on how to acquire the necessary build dependency.
43326  # x11 is the help tag: freetype, cups, pulse, alsa etc
43327  MISSING_DEPENDENCY=x11
43328
43329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43330    cygwin_help $MISSING_DEPENDENCY
43331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43332    msys_help $MISSING_DEPENDENCY
43333  else
43334    PKGHANDLER_COMMAND=
43335
43336    case $PKGHANDLER in
43337      apt-get)
43338        apt_help     $MISSING_DEPENDENCY ;;
43339      yum)
43340        yum_help     $MISSING_DEPENDENCY ;;
43341      port)
43342        port_help    $MISSING_DEPENDENCY ;;
43343      pkgutil)
43344        pkgutil_help $MISSING_DEPENDENCY ;;
43345      pkgadd)
43346        pkgadd_help  $MISSING_DEPENDENCY ;;
43347    esac
43348
43349    if test "x$PKGHANDLER_COMMAND" != x; then
43350      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43351    fi
43352  fi
43353
43354    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43355  fi
43356
43357
43358
43359
43360
43361
43362  ###############################################################################
43363  #
43364  # The common unix printing system cups is used to print from java.
43365  #
43366
43367# Check whether --with-cups was given.
43368if test "${with_cups+set}" = set; then :
43369  withval=$with_cups;
43370fi
43371
43372
43373# Check whether --with-cups-include was given.
43374if test "${with_cups_include+set}" = set; then :
43375  withval=$with_cups_include;
43376fi
43377
43378
43379  if test "x$CUPS_NOT_NEEDED" = xyes; then
43380    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43381      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43382$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43383    fi
43384    CUPS_CFLAGS=
43385  else
43386    CUPS_FOUND=no
43387
43388    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43389      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43390    fi
43391
43392    if test "x${with_cups}" != x; then
43393      CUPS_CFLAGS="-I${with_cups}/include"
43394      CUPS_FOUND=yes
43395    fi
43396    if test "x${with_cups_include}" != x; then
43397      CUPS_CFLAGS="-I${with_cups_include}"
43398      CUPS_FOUND=yes
43399    fi
43400    if test "x$CUPS_FOUND" = xno; then
43401
43402
43403  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43404    # Source the builddeps file again, to make sure it uses the latest variables!
43405    . $builddepsfile
43406    # Look for a target and build machine specific resource!
43407    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43408    if test "x$resource" = x; then
43409      # Ok, lets instead look for a target specific resource
43410      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43411    fi
43412    if test "x$resource" = x; then
43413      # Ok, lets instead look for a build specific resource
43414      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43415    fi
43416    if test "x$resource" = x; then
43417      # Ok, lets instead look for a generic resource
43418      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43419      resource=${builddep_cups}
43420    fi
43421    if test "x$resource" != x; then
43422      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43423$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43424      # If the resource in the builddeps.conf file is an existing directory,
43425      # for example /java/linux/cups
43426      if test -d ${resource}; then
43427        depdir=${resource}
43428      else
43429
43430  # cups is for example mymodule
43431  # $resource is for example libs/general/libmymod_1_2_3.zip
43432  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43433  # $with_builddeps_dir is for example /localhome/builddeps
43434  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43435  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43436  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43437  filename=`basename $resource`
43438  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43439  filebase=${filename%%.*}
43440  extension=${filename#*.}
43441  installdir=$with_builddeps_dir/$filebase
43442  if test ! -f $installdir/$filename.unpacked; then
43443    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43444$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43445    if test ! -d $installdir; then
43446      mkdir -p $installdir
43447    fi
43448    if test ! -d $installdir; then
43449      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43450    fi
43451    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43452    touch $tmpfile
43453    if test ! -f $tmpfile; then
43454      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43455    fi
43456
43457  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43458  # $tmpfile is the local file name for the downloaded file.
43459  VALID_TOOL=no
43460  if test "x$BDEPS_FTP" = xwget; then
43461    VALID_TOOL=yes
43462    wget -O $tmpfile $with_builddeps_server/$resource
43463  fi
43464  if test "x$BDEPS_FTP" = xlftp; then
43465    VALID_TOOL=yes
43466    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43467  fi
43468  if test "x$BDEPS_FTP" = xftp; then
43469    VALID_TOOL=yes
43470    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43471    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43472    FTPUSERPWD=${FTPSERVER%%@*}
43473    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43474      FTPUSER=${userpwd%%:*}
43475      FTPPWD=${userpwd#*@}
43476      FTPSERVER=${FTPSERVER#*@}
43477    else
43478      FTPUSER=ftp
43479      FTPPWD=ftp
43480    fi
43481    # the "pass" command does not work on some
43482    # ftp clients (read ftp.exe) but if it works,
43483    # passive mode is better!
43484    ( \
43485        echo "user $FTPUSER $FTPPWD"        ; \
43486        echo "pass"                         ; \
43487        echo "bin"                          ; \
43488        echo "get $FTPPATH $tmpfile"              ; \
43489    ) | ftp -in $FTPSERVER
43490  fi
43491  if test "x$VALID_TOOL" != xyes; then
43492    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43493  fi
43494
43495    mv $tmpfile $installdir/$filename
43496    if test ! -s $installdir/$filename; then
43497      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43498    fi
43499    case "$extension" in
43500      zip)  echo "Unzipping $installdir/$filename..."
43501        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43502        ;;
43503      tar.gz) echo "Untaring $installdir/$filename..."
43504        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43505        ;;
43506      tgz) echo "Untaring $installdir/$filename..."
43507        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43508        ;;
43509      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43510        ;;
43511    esac
43512  fi
43513  if test -f $installdir/$filename.unpacked; then
43514    depdir=$installdir
43515  fi
43516
43517      fi
43518      # Source the builddeps file again, because in the previous command, the depdir
43519      # was updated to point at the current build dependency install directory.
43520      . $builddepsfile
43521      # Now extract variables from the builddeps.conf files.
43522      theroot=${builddep_cups_ROOT}
43523      thecflags=${builddep_cups_CFLAGS}
43524      thelibs=${builddep_cups_LIBS}
43525      if test "x$depdir" = x; then
43526        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43527      fi
43528      CUPS=$depdir
43529      if test "x$theroot" != x; then
43530        CUPS="$theroot"
43531      fi
43532      if test "x$thecflags" != x; then
43533        CUPS_CFLAGS="$thecflags"
43534      fi
43535      if test "x$thelibs" != x; then
43536        CUPS_LIBS="$thelibs"
43537      fi
43538      CUPS_FOUND=yes
43539
43540    fi
43541
43542  fi
43543
43544    fi
43545    if test "x$CUPS_FOUND" = xno; then
43546      # Are the cups headers installed in the default /usr/include location?
43547      for ac_header in cups/cups.h cups/ppd.h
43548do :
43549  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43550ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43551if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43552  cat >>confdefs.h <<_ACEOF
43553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43554_ACEOF
43555
43556            CUPS_FOUND=yes
43557            CUPS_CFLAGS=
43558            DEFAULT_CUPS=yes
43559
43560
43561fi
43562
43563done
43564
43565    fi
43566    if test "x$CUPS_FOUND" = xno; then
43567      # Getting nervous now? Lets poke around for standard Solaris third-party
43568      # package installation locations.
43569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43570$as_echo_n "checking for cups headers... " >&6; }
43571      if test -s /opt/sfw/cups/include/cups/cups.h; then
43572        # An SFW package seems to be installed!
43573        CUPS_FOUND=yes
43574        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43575      elif test -s /opt/csw/include/cups/cups.h; then
43576        # A CSW package seems to be installed!
43577        CUPS_FOUND=yes
43578        CUPS_CFLAGS="-I/opt/csw/include"
43579      fi
43580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43581$as_echo "$CUPS_FOUND" >&6; }
43582    fi
43583    if test "x$CUPS_FOUND" = xno; then
43584
43585  # Print a helpful message on how to acquire the necessary build dependency.
43586  # cups is the help tag: freetype, cups, pulse, alsa etc
43587  MISSING_DEPENDENCY=cups
43588
43589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43590    cygwin_help $MISSING_DEPENDENCY
43591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43592    msys_help $MISSING_DEPENDENCY
43593  else
43594    PKGHANDLER_COMMAND=
43595
43596    case $PKGHANDLER in
43597      apt-get)
43598        apt_help     $MISSING_DEPENDENCY ;;
43599      yum)
43600        yum_help     $MISSING_DEPENDENCY ;;
43601      port)
43602        port_help    $MISSING_DEPENDENCY ;;
43603      pkgutil)
43604        pkgutil_help $MISSING_DEPENDENCY ;;
43605      pkgadd)
43606        pkgadd_help  $MISSING_DEPENDENCY ;;
43607    esac
43608
43609    if test "x$PKGHANDLER_COMMAND" != x; then
43610      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43611    fi
43612  fi
43613
43614      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43615    fi
43616  fi
43617
43618
43619
43620
43621
43622
43623  ###############################################################################
43624  #
43625  # The ubiquitous freetype library is used to render fonts.
43626  #
43627
43628# Check whether --with-freetype was given.
43629if test "${with_freetype+set}" = set; then :
43630  withval=$with_freetype;
43631fi
43632
43633
43634# Check whether --with-freetype-include was given.
43635if test "${with_freetype_include+set}" = set; then :
43636  withval=$with_freetype_include;
43637fi
43638
43639
43640# Check whether --with-freetype-lib was given.
43641if test "${with_freetype_lib+set}" = set; then :
43642  withval=$with_freetype_lib;
43643fi
43644
43645  # Check whether --enable-freetype-bundling was given.
43646if test "${enable_freetype_bundling+set}" = set; then :
43647  enableval=$enable_freetype_bundling;
43648fi
43649
43650
43651  FREETYPE_CFLAGS=
43652  FREETYPE_LIBS=
43653  FREETYPE_BUNDLE_LIB_PATH=
43654
43655  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43656    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43657      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43658$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43659    fi
43660    if test "x$enable_freetype_bundling" != x; then
43661      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43662$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43663    fi
43664  else
43665    # freetype is needed to build; go get it!
43666
43667    BUNDLE_FREETYPE="$enable_freetype_bundling"
43668
43669    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43670      # User has specified settings
43671
43672      if test "x$BUNDLE_FREETYPE" = x; then
43673        # If not specified, default is to bundle freetype
43674        BUNDLE_FREETYPE=yes
43675      fi
43676
43677      if test "x$with_freetype" != x; then
43678        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43679        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43680      fi
43681
43682      # Allow --with-freetype-lib and --with-freetype-include to override
43683      if test "x$with_freetype_include" != x; then
43684        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43685      fi
43686      if test "x$with_freetype_lib" != x; then
43687        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43688      fi
43689
43690      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43691        # Okay, we got it. Check that it works.
43692
43693  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43694  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43695  METHOD="--with-freetype"
43696
43697  # First check if the files exists.
43698  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43699    # We found an arbitrary include file. That's a good sign.
43700    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43701$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43702    FOUND_FREETYPE=yes
43703
43704    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43705    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43706      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43708      FOUND_FREETYPE=no
43709    else
43710      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43711        # On Windows, we will need both .lib and .dll file.
43712        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43715          FOUND_FREETYPE=no
43716        fi
43717      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
43718        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43719        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43720      fi
43721    fi
43722  fi
43723
43724  if test "x$FOUND_FREETYPE" = xyes; then
43725
43726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43727
43728  # Input might be given as Windows format, start by converting to
43729  # unix format.
43730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43731  new_path=`$CYGPATH -u "$path"`
43732
43733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43736  # "foo.exe" is OK but "foo" is an error.
43737  #
43738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43739  # It is also a way to make sure we got the proper file name for the real test later on.
43740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43741  if test "x$test_shortpath" = x; then
43742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43745  fi
43746
43747  # Call helper function which possibly converts this using DOS-style short mode.
43748  # If so, the updated path is stored in $new_path.
43749
43750  input_path="$new_path"
43751  # Check if we need to convert this using DOS-style short mode. If the path
43752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43753  # take no chances and rewrite it.
43754  # Note: m4 eats our [], so we need to use [ and ] instead.
43755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43756  if test "x$has_forbidden_chars" != x; then
43757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43761      # Going to short mode and back again did indeed matter. Since short mode is
43762      # case insensitive, let's make it lowercase to improve readability.
43763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43764      # Now convert it back to Unix-stile (cygpath)
43765      input_path=`$CYGPATH -u "$shortmode_path"`
43766      new_path="$input_path"
43767    fi
43768  fi
43769
43770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43771  if test "x$test_cygdrive_prefix" = x; then
43772    # As a simple fix, exclude /usr/bin since it's not a real path.
43773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43775      # a path prefixed by /cygdrive for fixpath to work.
43776      new_path="$CYGWIN_ROOT_PATH$input_path"
43777    fi
43778  fi
43779
43780
43781  if test "x$path" != "x$new_path"; then
43782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43785  fi
43786
43787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43788
43789  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43790  has_colon=`$ECHO $path | $GREP ^.:`
43791  new_path="$path"
43792  if test "x$has_colon" = x; then
43793    # Not in mixed or Windows style, start by that.
43794    new_path=`cmd //c echo $path`
43795  fi
43796
43797
43798  input_path="$new_path"
43799  # Check if we need to convert this using DOS-style short mode. If the path
43800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43801  # take no chances and rewrite it.
43802  # Note: m4 eats our [], so we need to use [ and ] instead.
43803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43804  if test "x$has_forbidden_chars" != x; then
43805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43807  fi
43808
43809
43810  windows_path="$new_path"
43811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43812    unix_path=`$CYGPATH -u "$windows_path"`
43813    new_path="$unix_path"
43814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43816    new_path="$unix_path"
43817  fi
43818
43819  if test "x$path" != "x$new_path"; then
43820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43823  fi
43824
43825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43827
43828  else
43829    # We're on a posix platform. Hooray! :)
43830    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43831    has_space=`$ECHO "$path" | $GREP " "`
43832    if test "x$has_space" != x; then
43833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43836    fi
43837
43838    # Use eval to expand a potential ~
43839    eval path="$path"
43840    if test ! -f "$path" && test ! -d "$path"; then
43841      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43842    fi
43843
43844    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43845  fi
43846
43847
43848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43849
43850  # Input might be given as Windows format, start by converting to
43851  # unix format.
43852  path="$POTENTIAL_FREETYPE_LIB_PATH"
43853  new_path=`$CYGPATH -u "$path"`
43854
43855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43858  # "foo.exe" is OK but "foo" is an error.
43859  #
43860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43861  # It is also a way to make sure we got the proper file name for the real test later on.
43862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43863  if test "x$test_shortpath" = x; then
43864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43867  fi
43868
43869  # Call helper function which possibly converts this using DOS-style short mode.
43870  # If so, the updated path is stored in $new_path.
43871
43872  input_path="$new_path"
43873  # Check if we need to convert this using DOS-style short mode. If the path
43874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43875  # take no chances and rewrite it.
43876  # Note: m4 eats our [], so we need to use [ and ] instead.
43877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43878  if test "x$has_forbidden_chars" != x; then
43879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43883      # Going to short mode and back again did indeed matter. Since short mode is
43884      # case insensitive, let's make it lowercase to improve readability.
43885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43886      # Now convert it back to Unix-stile (cygpath)
43887      input_path=`$CYGPATH -u "$shortmode_path"`
43888      new_path="$input_path"
43889    fi
43890  fi
43891
43892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43893  if test "x$test_cygdrive_prefix" = x; then
43894    # As a simple fix, exclude /usr/bin since it's not a real path.
43895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43897      # a path prefixed by /cygdrive for fixpath to work.
43898      new_path="$CYGWIN_ROOT_PATH$input_path"
43899    fi
43900  fi
43901
43902
43903  if test "x$path" != "x$new_path"; then
43904    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43907  fi
43908
43909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43910
43911  path="$POTENTIAL_FREETYPE_LIB_PATH"
43912  has_colon=`$ECHO $path | $GREP ^.:`
43913  new_path="$path"
43914  if test "x$has_colon" = x; then
43915    # Not in mixed or Windows style, start by that.
43916    new_path=`cmd //c echo $path`
43917  fi
43918
43919
43920  input_path="$new_path"
43921  # Check if we need to convert this using DOS-style short mode. If the path
43922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43923  # take no chances and rewrite it.
43924  # Note: m4 eats our [], so we need to use [ and ] instead.
43925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43926  if test "x$has_forbidden_chars" != x; then
43927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43929  fi
43930
43931
43932  windows_path="$new_path"
43933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43934    unix_path=`$CYGPATH -u "$windows_path"`
43935    new_path="$unix_path"
43936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43938    new_path="$unix_path"
43939  fi
43940
43941  if test "x$path" != "x$new_path"; then
43942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43945  fi
43946
43947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43949
43950  else
43951    # We're on a posix platform. Hooray! :)
43952    path="$POTENTIAL_FREETYPE_LIB_PATH"
43953    has_space=`$ECHO "$path" | $GREP " "`
43954    if test "x$has_space" != x; then
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43958    fi
43959
43960    # Use eval to expand a potential ~
43961    eval path="$path"
43962    if test ! -f "$path" && test ! -d "$path"; then
43963      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43964    fi
43965
43966    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43967  fi
43968
43969
43970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43972$as_echo_n "checking for freetype includes... " >&6; }
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43977$as_echo_n "checking for freetype libraries... " >&6; }
43978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43979$as_echo "$FREETYPE_LIB_PATH" >&6; }
43980  fi
43981
43982        if test "x$FOUND_FREETYPE" != xyes; then
43983          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43984        fi
43985      else
43986        # User specified only one of lib or include. This is an error.
43987        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43988          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43989$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43990          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43991        else
43992          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43993$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43994          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43995        fi
43996      fi
43997    else
43998      # User did not specify settings, but we need freetype. Try to locate it.
43999
44000      if test "x$BUNDLE_FREETYPE" = x; then
44001        # If not specified, default is to bundle freetype only on windows
44002        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44003          BUNDLE_FREETYPE=yes
44004        else
44005          BUNDLE_FREETYPE=no
44006        fi
44007      fi
44008
44009      if test "x$FOUND_FREETYPE" != xyes; then
44010        # Check builddeps
44011
44012
44013  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44014    # Source the builddeps file again, to make sure it uses the latest variables!
44015    . $builddepsfile
44016    # Look for a target and build machine specific resource!
44017    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44018    if test "x$resource" = x; then
44019      # Ok, lets instead look for a target specific resource
44020      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44021    fi
44022    if test "x$resource" = x; then
44023      # Ok, lets instead look for a build specific resource
44024      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44025    fi
44026    if test "x$resource" = x; then
44027      # Ok, lets instead look for a generic resource
44028      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44029      resource=${builddep_freetype2}
44030    fi
44031    if test "x$resource" != x; then
44032      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44033$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44034      # If the resource in the builddeps.conf file is an existing directory,
44035      # for example /java/linux/cups
44036      if test -d ${resource}; then
44037        depdir=${resource}
44038      else
44039
44040  # freetype2 is for example mymodule
44041  # $resource is for example libs/general/libmymod_1_2_3.zip
44042  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44043  # $with_builddeps_dir is for example /localhome/builddeps
44044  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44045  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44046  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44047  filename=`basename $resource`
44048  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44049  filebase=${filename%%.*}
44050  extension=${filename#*.}
44051  installdir=$with_builddeps_dir/$filebase
44052  if test ! -f $installdir/$filename.unpacked; then
44053    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44054$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44055    if test ! -d $installdir; then
44056      mkdir -p $installdir
44057    fi
44058    if test ! -d $installdir; then
44059      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44060    fi
44061    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44062    touch $tmpfile
44063    if test ! -f $tmpfile; then
44064      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44065    fi
44066
44067  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44068  # $tmpfile is the local file name for the downloaded file.
44069  VALID_TOOL=no
44070  if test "x$BDEPS_FTP" = xwget; then
44071    VALID_TOOL=yes
44072    wget -O $tmpfile $with_builddeps_server/$resource
44073  fi
44074  if test "x$BDEPS_FTP" = xlftp; then
44075    VALID_TOOL=yes
44076    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44077  fi
44078  if test "x$BDEPS_FTP" = xftp; then
44079    VALID_TOOL=yes
44080    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44081    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44082    FTPUSERPWD=${FTPSERVER%%@*}
44083    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44084      FTPUSER=${userpwd%%:*}
44085      FTPPWD=${userpwd#*@}
44086      FTPSERVER=${FTPSERVER#*@}
44087    else
44088      FTPUSER=ftp
44089      FTPPWD=ftp
44090    fi
44091    # the "pass" command does not work on some
44092    # ftp clients (read ftp.exe) but if it works,
44093    # passive mode is better!
44094    ( \
44095        echo "user $FTPUSER $FTPPWD"        ; \
44096        echo "pass"                         ; \
44097        echo "bin"                          ; \
44098        echo "get $FTPPATH $tmpfile"              ; \
44099    ) | ftp -in $FTPSERVER
44100  fi
44101  if test "x$VALID_TOOL" != xyes; then
44102    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44103  fi
44104
44105    mv $tmpfile $installdir/$filename
44106    if test ! -s $installdir/$filename; then
44107      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44108    fi
44109    case "$extension" in
44110      zip)  echo "Unzipping $installdir/$filename..."
44111        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44112        ;;
44113      tar.gz) echo "Untaring $installdir/$filename..."
44114        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44115        ;;
44116      tgz) echo "Untaring $installdir/$filename..."
44117        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44118        ;;
44119      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44120        ;;
44121    esac
44122  fi
44123  if test -f $installdir/$filename.unpacked; then
44124    depdir=$installdir
44125  fi
44126
44127      fi
44128      # Source the builddeps file again, because in the previous command, the depdir
44129      # was updated to point at the current build dependency install directory.
44130      . $builddepsfile
44131      # Now extract variables from the builddeps.conf files.
44132      theroot=${builddep_freetype2_ROOT}
44133      thecflags=${builddep_freetype2_CFLAGS}
44134      thelibs=${builddep_freetype2_LIBS}
44135      if test "x$depdir" = x; then
44136        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44137      fi
44138      FREETYPE=$depdir
44139      if test "x$theroot" != x; then
44140        FREETYPE="$theroot"
44141      fi
44142      if test "x$thecflags" != x; then
44143        FREETYPE_CFLAGS="$thecflags"
44144      fi
44145      if test "x$thelibs" != x; then
44146        FREETYPE_LIBS="$thelibs"
44147      fi
44148      FOUND_FREETYPE=yes
44149      else FOUND_FREETYPE=no
44150
44151    fi
44152    else FOUND_FREETYPE=no
44153
44154  fi
44155
44156        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44157        if test "x$FOUND_FREETYPE" = xyes; then
44158          if test "x$BUNDLE_FREETYPE" = xyes; then
44159            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44160$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44161            FOUND_FREETYPE=no
44162          else
44163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44164$as_echo_n "checking for freetype... " >&6; }
44165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44166$as_echo "yes (using builddeps)" >&6; }
44167          fi
44168        fi
44169      fi
44170
44171      if test "x$FOUND_FREETYPE" != xyes; then
44172        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44173        if test "x$PKG_CONFIG" != x; then
44174
44175pkg_failed=no
44176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44177$as_echo_n "checking for FREETYPE... " >&6; }
44178
44179if test -n "$FREETYPE_CFLAGS"; then
44180    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44181 elif test -n "$PKG_CONFIG"; then
44182    if test -n "$PKG_CONFIG" && \
44183    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44184  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44185  ac_status=$?
44186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44187  test $ac_status = 0; }; then
44188  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44189else
44190  pkg_failed=yes
44191fi
44192 else
44193    pkg_failed=untried
44194fi
44195if test -n "$FREETYPE_LIBS"; then
44196    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44197 elif test -n "$PKG_CONFIG"; then
44198    if test -n "$PKG_CONFIG" && \
44199    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44200  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44201  ac_status=$?
44202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44203  test $ac_status = 0; }; then
44204  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44205else
44206  pkg_failed=yes
44207fi
44208 else
44209    pkg_failed=untried
44210fi
44211
44212
44213
44214if test $pkg_failed = yes; then
44215
44216if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44217        _pkg_short_errors_supported=yes
44218else
44219        _pkg_short_errors_supported=no
44220fi
44221        if test $_pkg_short_errors_supported = yes; then
44222	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44223        else
44224	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44225        fi
44226	# Put the nasty error message in config.log where it belongs
44227	echo "$FREETYPE_PKG_ERRORS" >&5
44228
44229	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44230$as_echo "no" >&6; }
44231                FOUND_FREETYPE=no
44232elif test $pkg_failed = untried; then
44233	FOUND_FREETYPE=no
44234else
44235	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44236	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44238$as_echo "yes" >&6; }
44239	FOUND_FREETYPE=yes
44240fi
44241          if test "x$FOUND_FREETYPE" = xyes; then
44242            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44243            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44244            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44245            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44246              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44247            fi
44248            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44249            if test "x$BUNDLE_FREETYPE" = xyes; then
44250              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44251$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44252              FOUND_FREETYPE=no
44253            else
44254              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44255$as_echo_n "checking for freetype... " >&6; }
44256              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44257$as_echo "yes (using pkg-config)" >&6; }
44258            fi
44259          fi
44260        fi
44261      fi
44262
44263      if test "x$FOUND_FREETYPE" != xyes; then
44264        # Check in well-known locations
44265        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44266          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44267
44268  windows_path="$FREETYPE_BASE_DIR"
44269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44270    unix_path=`$CYGPATH -u "$windows_path"`
44271    FREETYPE_BASE_DIR="$unix_path"
44272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44274    FREETYPE_BASE_DIR="$unix_path"
44275  fi
44276
44277
44278  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44279  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44280  METHOD="well-known location"
44281
44282  # First check if the files exists.
44283  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44284    # We found an arbitrary include file. That's a good sign.
44285    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44286$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44287    FOUND_FREETYPE=yes
44288
44289    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44290    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44291      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44292$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44293      FOUND_FREETYPE=no
44294    else
44295      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44296        # On Windows, we will need both .lib and .dll file.
44297        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44298          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44299$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44300          FOUND_FREETYPE=no
44301        fi
44302      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
44303        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44304        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44305      fi
44306    fi
44307  fi
44308
44309  if test "x$FOUND_FREETYPE" = xyes; then
44310
44311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44312
44313  # Input might be given as Windows format, start by converting to
44314  # unix format.
44315  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44316  new_path=`$CYGPATH -u "$path"`
44317
44318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44321  # "foo.exe" is OK but "foo" is an error.
44322  #
44323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44324  # It is also a way to make sure we got the proper file name for the real test later on.
44325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44326  if test "x$test_shortpath" = x; then
44327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44328$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44329    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44330  fi
44331
44332  # Call helper function which possibly converts this using DOS-style short mode.
44333  # If so, the updated path is stored in $new_path.
44334
44335  input_path="$new_path"
44336  # Check if we need to convert this using DOS-style short mode. If the path
44337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44338  # take no chances and rewrite it.
44339  # Note: m4 eats our [], so we need to use [ and ] instead.
44340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44341  if test "x$has_forbidden_chars" != x; then
44342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44346      # Going to short mode and back again did indeed matter. Since short mode is
44347      # case insensitive, let's make it lowercase to improve readability.
44348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44349      # Now convert it back to Unix-stile (cygpath)
44350      input_path=`$CYGPATH -u "$shortmode_path"`
44351      new_path="$input_path"
44352    fi
44353  fi
44354
44355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44356  if test "x$test_cygdrive_prefix" = x; then
44357    # As a simple fix, exclude /usr/bin since it's not a real path.
44358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44360      # a path prefixed by /cygdrive for fixpath to work.
44361      new_path="$CYGWIN_ROOT_PATH$input_path"
44362    fi
44363  fi
44364
44365
44366  if test "x$path" != "x$new_path"; then
44367    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44370  fi
44371
44372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44373
44374  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44375  has_colon=`$ECHO $path | $GREP ^.:`
44376  new_path="$path"
44377  if test "x$has_colon" = x; then
44378    # Not in mixed or Windows style, start by that.
44379    new_path=`cmd //c echo $path`
44380  fi
44381
44382
44383  input_path="$new_path"
44384  # Check if we need to convert this using DOS-style short mode. If the path
44385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44386  # take no chances and rewrite it.
44387  # Note: m4 eats our [], so we need to use [ and ] instead.
44388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44389  if test "x$has_forbidden_chars" != x; then
44390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44392  fi
44393
44394
44395  windows_path="$new_path"
44396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44397    unix_path=`$CYGPATH -u "$windows_path"`
44398    new_path="$unix_path"
44399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44401    new_path="$unix_path"
44402  fi
44403
44404  if test "x$path" != "x$new_path"; then
44405    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44408  fi
44409
44410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44412
44413  else
44414    # We're on a posix platform. Hooray! :)
44415    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44416    has_space=`$ECHO "$path" | $GREP " "`
44417    if test "x$has_space" != x; then
44418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44420      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44421    fi
44422
44423    # Use eval to expand a potential ~
44424    eval path="$path"
44425    if test ! -f "$path" && test ! -d "$path"; then
44426      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44427    fi
44428
44429    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44430  fi
44431
44432
44433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44434
44435  # Input might be given as Windows format, start by converting to
44436  # unix format.
44437  path="$POTENTIAL_FREETYPE_LIB_PATH"
44438  new_path=`$CYGPATH -u "$path"`
44439
44440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44443  # "foo.exe" is OK but "foo" is an error.
44444  #
44445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44446  # It is also a way to make sure we got the proper file name for the real test later on.
44447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44448  if test "x$test_shortpath" = x; then
44449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44451    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44452  fi
44453
44454  # Call helper function which possibly converts this using DOS-style short mode.
44455  # If so, the updated path is stored in $new_path.
44456
44457  input_path="$new_path"
44458  # Check if we need to convert this using DOS-style short mode. If the path
44459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44460  # take no chances and rewrite it.
44461  # Note: m4 eats our [], so we need to use [ and ] instead.
44462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44463  if test "x$has_forbidden_chars" != x; then
44464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44468      # Going to short mode and back again did indeed matter. Since short mode is
44469      # case insensitive, let's make it lowercase to improve readability.
44470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44471      # Now convert it back to Unix-stile (cygpath)
44472      input_path=`$CYGPATH -u "$shortmode_path"`
44473      new_path="$input_path"
44474    fi
44475  fi
44476
44477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44478  if test "x$test_cygdrive_prefix" = x; then
44479    # As a simple fix, exclude /usr/bin since it's not a real path.
44480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44482      # a path prefixed by /cygdrive for fixpath to work.
44483      new_path="$CYGWIN_ROOT_PATH$input_path"
44484    fi
44485  fi
44486
44487
44488  if test "x$path" != "x$new_path"; then
44489    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44492  fi
44493
44494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44495
44496  path="$POTENTIAL_FREETYPE_LIB_PATH"
44497  has_colon=`$ECHO $path | $GREP ^.:`
44498  new_path="$path"
44499  if test "x$has_colon" = x; then
44500    # Not in mixed or Windows style, start by that.
44501    new_path=`cmd //c echo $path`
44502  fi
44503
44504
44505  input_path="$new_path"
44506  # Check if we need to convert this using DOS-style short mode. If the path
44507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44508  # take no chances and rewrite it.
44509  # Note: m4 eats our [], so we need to use [ and ] instead.
44510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44511  if test "x$has_forbidden_chars" != x; then
44512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44514  fi
44515
44516
44517  windows_path="$new_path"
44518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44519    unix_path=`$CYGPATH -u "$windows_path"`
44520    new_path="$unix_path"
44521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44523    new_path="$unix_path"
44524  fi
44525
44526  if test "x$path" != "x$new_path"; then
44527    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44530  fi
44531
44532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44534
44535  else
44536    # We're on a posix platform. Hooray! :)
44537    path="$POTENTIAL_FREETYPE_LIB_PATH"
44538    has_space=`$ECHO "$path" | $GREP " "`
44539    if test "x$has_space" != x; then
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44542      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44543    fi
44544
44545    # Use eval to expand a potential ~
44546    eval path="$path"
44547    if test ! -f "$path" && test ! -d "$path"; then
44548      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44549    fi
44550
44551    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44552  fi
44553
44554
44555    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44557$as_echo_n "checking for freetype includes... " >&6; }
44558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44559$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44560    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44562$as_echo_n "checking for freetype libraries... " >&6; }
44563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44564$as_echo "$FREETYPE_LIB_PATH" >&6; }
44565  fi
44566
44567          if test "x$FOUND_FREETYPE" != xyes; then
44568            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44569
44570  windows_path="$FREETYPE_BASE_DIR"
44571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44572    unix_path=`$CYGPATH -u "$windows_path"`
44573    FREETYPE_BASE_DIR="$unix_path"
44574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44576    FREETYPE_BASE_DIR="$unix_path"
44577  fi
44578
44579
44580  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44581  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44582  METHOD="well-known location"
44583
44584  # First check if the files exists.
44585  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44586    # We found an arbitrary include file. That's a good sign.
44587    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44588$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44589    FOUND_FREETYPE=yes
44590
44591    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44592    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44593      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44594$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44595      FOUND_FREETYPE=no
44596    else
44597      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44598        # On Windows, we will need both .lib and .dll file.
44599        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44600          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44601$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44602          FOUND_FREETYPE=no
44603        fi
44604      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
44605        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44606        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44607      fi
44608    fi
44609  fi
44610
44611  if test "x$FOUND_FREETYPE" = xyes; then
44612
44613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44614
44615  # Input might be given as Windows format, start by converting to
44616  # unix format.
44617  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44618  new_path=`$CYGPATH -u "$path"`
44619
44620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44623  # "foo.exe" is OK but "foo" is an error.
44624  #
44625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44626  # It is also a way to make sure we got the proper file name for the real test later on.
44627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44628  if test "x$test_shortpath" = x; then
44629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44631    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44632  fi
44633
44634  # Call helper function which possibly converts this using DOS-style short mode.
44635  # If so, the updated path is stored in $new_path.
44636
44637  input_path="$new_path"
44638  # Check if we need to convert this using DOS-style short mode. If the path
44639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44640  # take no chances and rewrite it.
44641  # Note: m4 eats our [], so we need to use [ and ] instead.
44642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44643  if test "x$has_forbidden_chars" != x; then
44644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44648      # Going to short mode and back again did indeed matter. Since short mode is
44649      # case insensitive, let's make it lowercase to improve readability.
44650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44651      # Now convert it back to Unix-stile (cygpath)
44652      input_path=`$CYGPATH -u "$shortmode_path"`
44653      new_path="$input_path"
44654    fi
44655  fi
44656
44657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44658  if test "x$test_cygdrive_prefix" = x; then
44659    # As a simple fix, exclude /usr/bin since it's not a real path.
44660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44662      # a path prefixed by /cygdrive for fixpath to work.
44663      new_path="$CYGWIN_ROOT_PATH$input_path"
44664    fi
44665  fi
44666
44667
44668  if test "x$path" != "x$new_path"; then
44669    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44672  fi
44673
44674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44675
44676  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44677  has_colon=`$ECHO $path | $GREP ^.:`
44678  new_path="$path"
44679  if test "x$has_colon" = x; then
44680    # Not in mixed or Windows style, start by that.
44681    new_path=`cmd //c echo $path`
44682  fi
44683
44684
44685  input_path="$new_path"
44686  # Check if we need to convert this using DOS-style short mode. If the path
44687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44688  # take no chances and rewrite it.
44689  # Note: m4 eats our [], so we need to use [ and ] instead.
44690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44691  if test "x$has_forbidden_chars" != x; then
44692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44694  fi
44695
44696
44697  windows_path="$new_path"
44698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44699    unix_path=`$CYGPATH -u "$windows_path"`
44700    new_path="$unix_path"
44701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44703    new_path="$unix_path"
44704  fi
44705
44706  if test "x$path" != "x$new_path"; then
44707    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44710  fi
44711
44712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44714
44715  else
44716    # We're on a posix platform. Hooray! :)
44717    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44718    has_space=`$ECHO "$path" | $GREP " "`
44719    if test "x$has_space" != x; then
44720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44722      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44723    fi
44724
44725    # Use eval to expand a potential ~
44726    eval path="$path"
44727    if test ! -f "$path" && test ! -d "$path"; then
44728      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44729    fi
44730
44731    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44732  fi
44733
44734
44735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44736
44737  # Input might be given as Windows format, start by converting to
44738  # unix format.
44739  path="$POTENTIAL_FREETYPE_LIB_PATH"
44740  new_path=`$CYGPATH -u "$path"`
44741
44742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44745  # "foo.exe" is OK but "foo" is an error.
44746  #
44747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44748  # It is also a way to make sure we got the proper file name for the real test later on.
44749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44750  if test "x$test_shortpath" = x; then
44751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44753    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44754  fi
44755
44756  # Call helper function which possibly converts this using DOS-style short mode.
44757  # If so, the updated path is stored in $new_path.
44758
44759  input_path="$new_path"
44760  # Check if we need to convert this using DOS-style short mode. If the path
44761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44762  # take no chances and rewrite it.
44763  # Note: m4 eats our [], so we need to use [ and ] instead.
44764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44765  if test "x$has_forbidden_chars" != x; then
44766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44770      # Going to short mode and back again did indeed matter. Since short mode is
44771      # case insensitive, let's make it lowercase to improve readability.
44772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44773      # Now convert it back to Unix-stile (cygpath)
44774      input_path=`$CYGPATH -u "$shortmode_path"`
44775      new_path="$input_path"
44776    fi
44777  fi
44778
44779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44780  if test "x$test_cygdrive_prefix" = x; then
44781    # As a simple fix, exclude /usr/bin since it's not a real path.
44782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44784      # a path prefixed by /cygdrive for fixpath to work.
44785      new_path="$CYGWIN_ROOT_PATH$input_path"
44786    fi
44787  fi
44788
44789
44790  if test "x$path" != "x$new_path"; then
44791    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44793$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44794  fi
44795
44796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44797
44798  path="$POTENTIAL_FREETYPE_LIB_PATH"
44799  has_colon=`$ECHO $path | $GREP ^.:`
44800  new_path="$path"
44801  if test "x$has_colon" = x; then
44802    # Not in mixed or Windows style, start by that.
44803    new_path=`cmd //c echo $path`
44804  fi
44805
44806
44807  input_path="$new_path"
44808  # Check if we need to convert this using DOS-style short mode. If the path
44809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44810  # take no chances and rewrite it.
44811  # Note: m4 eats our [], so we need to use [ and ] instead.
44812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44813  if test "x$has_forbidden_chars" != x; then
44814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44816  fi
44817
44818
44819  windows_path="$new_path"
44820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44821    unix_path=`$CYGPATH -u "$windows_path"`
44822    new_path="$unix_path"
44823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44825    new_path="$unix_path"
44826  fi
44827
44828  if test "x$path" != "x$new_path"; then
44829    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44832  fi
44833
44834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44836
44837  else
44838    # We're on a posix platform. Hooray! :)
44839    path="$POTENTIAL_FREETYPE_LIB_PATH"
44840    has_space=`$ECHO "$path" | $GREP " "`
44841    if test "x$has_space" != x; then
44842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44844      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44845    fi
44846
44847    # Use eval to expand a potential ~
44848    eval path="$path"
44849    if test ! -f "$path" && test ! -d "$path"; then
44850      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44851    fi
44852
44853    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44854  fi
44855
44856
44857    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44859$as_echo_n "checking for freetype includes... " >&6; }
44860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44861$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44862    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44864$as_echo_n "checking for freetype libraries... " >&6; }
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44866$as_echo "$FREETYPE_LIB_PATH" >&6; }
44867  fi
44868
44869          fi
44870        else
44871          if test "x$SYS_ROOT" = "x/"; then
44872            FREETYPE_ROOT=
44873          else
44874            FREETYPE_ROOT="$SYS_ROOT"
44875          fi
44876          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44877
44878  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44879  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44880  METHOD="well-known location"
44881
44882  # First check if the files exists.
44883  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44884    # We found an arbitrary include file. That's a good sign.
44885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44886$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44887    FOUND_FREETYPE=yes
44888
44889    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44890    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44891      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44893      FOUND_FREETYPE=no
44894    else
44895      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44896        # On Windows, we will need both .lib and .dll file.
44897        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44898          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44899$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44900          FOUND_FREETYPE=no
44901        fi
44902      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
44903        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44904        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44905      fi
44906    fi
44907  fi
44908
44909  if test "x$FOUND_FREETYPE" = xyes; then
44910
44911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44912
44913  # Input might be given as Windows format, start by converting to
44914  # unix format.
44915  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44916  new_path=`$CYGPATH -u "$path"`
44917
44918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44921  # "foo.exe" is OK but "foo" is an error.
44922  #
44923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44924  # It is also a way to make sure we got the proper file name for the real test later on.
44925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44926  if test "x$test_shortpath" = x; then
44927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44929    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44930  fi
44931
44932  # Call helper function which possibly converts this using DOS-style short mode.
44933  # If so, the updated path is stored in $new_path.
44934
44935  input_path="$new_path"
44936  # Check if we need to convert this using DOS-style short mode. If the path
44937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44938  # take no chances and rewrite it.
44939  # Note: m4 eats our [], so we need to use [ and ] instead.
44940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44941  if test "x$has_forbidden_chars" != x; then
44942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44946      # Going to short mode and back again did indeed matter. Since short mode is
44947      # case insensitive, let's make it lowercase to improve readability.
44948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44949      # Now convert it back to Unix-stile (cygpath)
44950      input_path=`$CYGPATH -u "$shortmode_path"`
44951      new_path="$input_path"
44952    fi
44953  fi
44954
44955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44956  if test "x$test_cygdrive_prefix" = x; then
44957    # As a simple fix, exclude /usr/bin since it's not a real path.
44958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44960      # a path prefixed by /cygdrive for fixpath to work.
44961      new_path="$CYGWIN_ROOT_PATH$input_path"
44962    fi
44963  fi
44964
44965
44966  if test "x$path" != "x$new_path"; then
44967    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44970  fi
44971
44972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44973
44974  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44975  has_colon=`$ECHO $path | $GREP ^.:`
44976  new_path="$path"
44977  if test "x$has_colon" = x; then
44978    # Not in mixed or Windows style, start by that.
44979    new_path=`cmd //c echo $path`
44980  fi
44981
44982
44983  input_path="$new_path"
44984  # Check if we need to convert this using DOS-style short mode. If the path
44985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44986  # take no chances and rewrite it.
44987  # Note: m4 eats our [], so we need to use [ and ] instead.
44988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44989  if test "x$has_forbidden_chars" != x; then
44990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44992  fi
44993
44994
44995  windows_path="$new_path"
44996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44997    unix_path=`$CYGPATH -u "$windows_path"`
44998    new_path="$unix_path"
44999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45001    new_path="$unix_path"
45002  fi
45003
45004  if test "x$path" != "x$new_path"; then
45005    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45008  fi
45009
45010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45012
45013  else
45014    # We're on a posix platform. Hooray! :)
45015    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45016    has_space=`$ECHO "$path" | $GREP " "`
45017    if test "x$has_space" != x; then
45018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45021    fi
45022
45023    # Use eval to expand a potential ~
45024    eval path="$path"
45025    if test ! -f "$path" && test ! -d "$path"; then
45026      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45027    fi
45028
45029    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45030  fi
45031
45032
45033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45034
45035  # Input might be given as Windows format, start by converting to
45036  # unix format.
45037  path="$POTENTIAL_FREETYPE_LIB_PATH"
45038  new_path=`$CYGPATH -u "$path"`
45039
45040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45043  # "foo.exe" is OK but "foo" is an error.
45044  #
45045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45046  # It is also a way to make sure we got the proper file name for the real test later on.
45047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45048  if test "x$test_shortpath" = x; then
45049    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45050$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45051    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45052  fi
45053
45054  # Call helper function which possibly converts this using DOS-style short mode.
45055  # If so, the updated path is stored in $new_path.
45056
45057  input_path="$new_path"
45058  # Check if we need to convert this using DOS-style short mode. If the path
45059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45060  # take no chances and rewrite it.
45061  # Note: m4 eats our [], so we need to use [ and ] instead.
45062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45063  if test "x$has_forbidden_chars" != x; then
45064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45068      # Going to short mode and back again did indeed matter. Since short mode is
45069      # case insensitive, let's make it lowercase to improve readability.
45070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45071      # Now convert it back to Unix-stile (cygpath)
45072      input_path=`$CYGPATH -u "$shortmode_path"`
45073      new_path="$input_path"
45074    fi
45075  fi
45076
45077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45078  if test "x$test_cygdrive_prefix" = x; then
45079    # As a simple fix, exclude /usr/bin since it's not a real path.
45080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45082      # a path prefixed by /cygdrive for fixpath to work.
45083      new_path="$CYGWIN_ROOT_PATH$input_path"
45084    fi
45085  fi
45086
45087
45088  if test "x$path" != "x$new_path"; then
45089    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45091$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45092  fi
45093
45094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45095
45096  path="$POTENTIAL_FREETYPE_LIB_PATH"
45097  has_colon=`$ECHO $path | $GREP ^.:`
45098  new_path="$path"
45099  if test "x$has_colon" = x; then
45100    # Not in mixed or Windows style, start by that.
45101    new_path=`cmd //c echo $path`
45102  fi
45103
45104
45105  input_path="$new_path"
45106  # Check if we need to convert this using DOS-style short mode. If the path
45107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45108  # take no chances and rewrite it.
45109  # Note: m4 eats our [], so we need to use [ and ] instead.
45110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45111  if test "x$has_forbidden_chars" != x; then
45112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45114  fi
45115
45116
45117  windows_path="$new_path"
45118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45119    unix_path=`$CYGPATH -u "$windows_path"`
45120    new_path="$unix_path"
45121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45123    new_path="$unix_path"
45124  fi
45125
45126  if test "x$path" != "x$new_path"; then
45127    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45130  fi
45131
45132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45134
45135  else
45136    # We're on a posix platform. Hooray! :)
45137    path="$POTENTIAL_FREETYPE_LIB_PATH"
45138    has_space=`$ECHO "$path" | $GREP " "`
45139    if test "x$has_space" != x; then
45140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45142      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45143    fi
45144
45145    # Use eval to expand a potential ~
45146    eval path="$path"
45147    if test ! -f "$path" && test ! -d "$path"; then
45148      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45149    fi
45150
45151    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45152  fi
45153
45154
45155    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45157$as_echo_n "checking for freetype includes... " >&6; }
45158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45159$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45160    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45162$as_echo_n "checking for freetype libraries... " >&6; }
45163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45164$as_echo "$FREETYPE_LIB_PATH" >&6; }
45165  fi
45166
45167
45168          if test "x$FOUND_FREETYPE" != xyes; then
45169            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
45170
45171  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45172  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45173  METHOD="well-known location"
45174
45175  # First check if the files exists.
45176  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45177    # We found an arbitrary include file. That's a good sign.
45178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45179$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45180    FOUND_FREETYPE=yes
45181
45182    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45183    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45184      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45185$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45186      FOUND_FREETYPE=no
45187    else
45188      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45189        # On Windows, we will need both .lib and .dll file.
45190        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45193          FOUND_FREETYPE=no
45194        fi
45195      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
45196        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45197        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45198      fi
45199    fi
45200  fi
45201
45202  if test "x$FOUND_FREETYPE" = xyes; then
45203
45204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45205
45206  # Input might be given as Windows format, start by converting to
45207  # unix format.
45208  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45209  new_path=`$CYGPATH -u "$path"`
45210
45211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45214  # "foo.exe" is OK but "foo" is an error.
45215  #
45216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45217  # It is also a way to make sure we got the proper file name for the real test later on.
45218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45219  if test "x$test_shortpath" = x; then
45220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45222    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45223  fi
45224
45225  # Call helper function which possibly converts this using DOS-style short mode.
45226  # If so, the updated path is stored in $new_path.
45227
45228  input_path="$new_path"
45229  # Check if we need to convert this using DOS-style short mode. If the path
45230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45231  # take no chances and rewrite it.
45232  # Note: m4 eats our [], so we need to use [ and ] instead.
45233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45234  if test "x$has_forbidden_chars" != x; then
45235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45239      # Going to short mode and back again did indeed matter. Since short mode is
45240      # case insensitive, let's make it lowercase to improve readability.
45241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45242      # Now convert it back to Unix-stile (cygpath)
45243      input_path=`$CYGPATH -u "$shortmode_path"`
45244      new_path="$input_path"
45245    fi
45246  fi
45247
45248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45249  if test "x$test_cygdrive_prefix" = x; then
45250    # As a simple fix, exclude /usr/bin since it's not a real path.
45251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45253      # a path prefixed by /cygdrive for fixpath to work.
45254      new_path="$CYGWIN_ROOT_PATH$input_path"
45255    fi
45256  fi
45257
45258
45259  if test "x$path" != "x$new_path"; then
45260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45263  fi
45264
45265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45266
45267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45268  has_colon=`$ECHO $path | $GREP ^.:`
45269  new_path="$path"
45270  if test "x$has_colon" = x; then
45271    # Not in mixed or Windows style, start by that.
45272    new_path=`cmd //c echo $path`
45273  fi
45274
45275
45276  input_path="$new_path"
45277  # Check if we need to convert this using DOS-style short mode. If the path
45278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45279  # take no chances and rewrite it.
45280  # Note: m4 eats our [], so we need to use [ and ] instead.
45281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45282  if test "x$has_forbidden_chars" != x; then
45283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285  fi
45286
45287
45288  windows_path="$new_path"
45289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45290    unix_path=`$CYGPATH -u "$windows_path"`
45291    new_path="$unix_path"
45292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45294    new_path="$unix_path"
45295  fi
45296
45297  if test "x$path" != "x$new_path"; then
45298    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45301  fi
45302
45303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45305
45306  else
45307    # We're on a posix platform. Hooray! :)
45308    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45309    has_space=`$ECHO "$path" | $GREP " "`
45310    if test "x$has_space" != x; then
45311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45314    fi
45315
45316    # Use eval to expand a potential ~
45317    eval path="$path"
45318    if test ! -f "$path" && test ! -d "$path"; then
45319      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45320    fi
45321
45322    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45323  fi
45324
45325
45326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327
45328  # Input might be given as Windows format, start by converting to
45329  # unix format.
45330  path="$POTENTIAL_FREETYPE_LIB_PATH"
45331  new_path=`$CYGPATH -u "$path"`
45332
45333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45336  # "foo.exe" is OK but "foo" is an error.
45337  #
45338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45339  # It is also a way to make sure we got the proper file name for the real test later on.
45340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45341  if test "x$test_shortpath" = x; then
45342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45344    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45345  fi
45346
45347  # Call helper function which possibly converts this using DOS-style short mode.
45348  # If so, the updated path is stored in $new_path.
45349
45350  input_path="$new_path"
45351  # Check if we need to convert this using DOS-style short mode. If the path
45352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45353  # take no chances and rewrite it.
45354  # Note: m4 eats our [], so we need to use [ and ] instead.
45355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45356  if test "x$has_forbidden_chars" != x; then
45357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45361      # Going to short mode and back again did indeed matter. Since short mode is
45362      # case insensitive, let's make it lowercase to improve readability.
45363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45364      # Now convert it back to Unix-stile (cygpath)
45365      input_path=`$CYGPATH -u "$shortmode_path"`
45366      new_path="$input_path"
45367    fi
45368  fi
45369
45370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45371  if test "x$test_cygdrive_prefix" = x; then
45372    # As a simple fix, exclude /usr/bin since it's not a real path.
45373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45375      # a path prefixed by /cygdrive for fixpath to work.
45376      new_path="$CYGWIN_ROOT_PATH$input_path"
45377    fi
45378  fi
45379
45380
45381  if test "x$path" != "x$new_path"; then
45382    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45385  fi
45386
45387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45388
45389  path="$POTENTIAL_FREETYPE_LIB_PATH"
45390  has_colon=`$ECHO $path | $GREP ^.:`
45391  new_path="$path"
45392  if test "x$has_colon" = x; then
45393    # Not in mixed or Windows style, start by that.
45394    new_path=`cmd //c echo $path`
45395  fi
45396
45397
45398  input_path="$new_path"
45399  # Check if we need to convert this using DOS-style short mode. If the path
45400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45401  # take no chances and rewrite it.
45402  # Note: m4 eats our [], so we need to use [ and ] instead.
45403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45404  if test "x$has_forbidden_chars" != x; then
45405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45407  fi
45408
45409
45410  windows_path="$new_path"
45411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45412    unix_path=`$CYGPATH -u "$windows_path"`
45413    new_path="$unix_path"
45414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45416    new_path="$unix_path"
45417  fi
45418
45419  if test "x$path" != "x$new_path"; then
45420    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45423  fi
45424
45425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45427
45428  else
45429    # We're on a posix platform. Hooray! :)
45430    path="$POTENTIAL_FREETYPE_LIB_PATH"
45431    has_space=`$ECHO "$path" | $GREP " "`
45432    if test "x$has_space" != x; then
45433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45435      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45436    fi
45437
45438    # Use eval to expand a potential ~
45439    eval path="$path"
45440    if test ! -f "$path" && test ! -d "$path"; then
45441      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45442    fi
45443
45444    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45445  fi
45446
45447
45448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45450$as_echo_n "checking for freetype includes... " >&6; }
45451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45455$as_echo_n "checking for freetype libraries... " >&6; }
45456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45457$as_echo "$FREETYPE_LIB_PATH" >&6; }
45458  fi
45459
45460          fi
45461
45462          if test "x$FOUND_FREETYPE" != xyes; then
45463            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45464            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45465
45466  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45467  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45468  METHOD="well-known location"
45469
45470  # First check if the files exists.
45471  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45472    # We found an arbitrary include file. That's a good sign.
45473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45474$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45475    FOUND_FREETYPE=yes
45476
45477    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45478    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45479      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45480$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45481      FOUND_FREETYPE=no
45482    else
45483      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45484        # On Windows, we will need both .lib and .dll file.
45485        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45486          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45487$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45488          FOUND_FREETYPE=no
45489        fi
45490      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
45491        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45492        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45493      fi
45494    fi
45495  fi
45496
45497  if test "x$FOUND_FREETYPE" = xyes; then
45498
45499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45500
45501  # Input might be given as Windows format, start by converting to
45502  # unix format.
45503  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45504  new_path=`$CYGPATH -u "$path"`
45505
45506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45509  # "foo.exe" is OK but "foo" is an error.
45510  #
45511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45512  # It is also a way to make sure we got the proper file name for the real test later on.
45513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45514  if test "x$test_shortpath" = x; then
45515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45517    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45518  fi
45519
45520  # Call helper function which possibly converts this using DOS-style short mode.
45521  # If so, the updated path is stored in $new_path.
45522
45523  input_path="$new_path"
45524  # Check if we need to convert this using DOS-style short mode. If the path
45525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45526  # take no chances and rewrite it.
45527  # Note: m4 eats our [], so we need to use [ and ] instead.
45528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45529  if test "x$has_forbidden_chars" != x; then
45530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45534      # Going to short mode and back again did indeed matter. Since short mode is
45535      # case insensitive, let's make it lowercase to improve readability.
45536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45537      # Now convert it back to Unix-stile (cygpath)
45538      input_path=`$CYGPATH -u "$shortmode_path"`
45539      new_path="$input_path"
45540    fi
45541  fi
45542
45543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45544  if test "x$test_cygdrive_prefix" = x; then
45545    # As a simple fix, exclude /usr/bin since it's not a real path.
45546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45548      # a path prefixed by /cygdrive for fixpath to work.
45549      new_path="$CYGWIN_ROOT_PATH$input_path"
45550    fi
45551  fi
45552
45553
45554  if test "x$path" != "x$new_path"; then
45555    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45557$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45558  fi
45559
45560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45561
45562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45563  has_colon=`$ECHO $path | $GREP ^.:`
45564  new_path="$path"
45565  if test "x$has_colon" = x; then
45566    # Not in mixed or Windows style, start by that.
45567    new_path=`cmd //c echo $path`
45568  fi
45569
45570
45571  input_path="$new_path"
45572  # Check if we need to convert this using DOS-style short mode. If the path
45573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45574  # take no chances and rewrite it.
45575  # Note: m4 eats our [], so we need to use [ and ] instead.
45576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45577  if test "x$has_forbidden_chars" != x; then
45578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45580  fi
45581
45582
45583  windows_path="$new_path"
45584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45585    unix_path=`$CYGPATH -u "$windows_path"`
45586    new_path="$unix_path"
45587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45589    new_path="$unix_path"
45590  fi
45591
45592  if test "x$path" != "x$new_path"; then
45593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45596  fi
45597
45598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45600
45601  else
45602    # We're on a posix platform. Hooray! :)
45603    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45604    has_space=`$ECHO "$path" | $GREP " "`
45605    if test "x$has_space" != x; then
45606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45608      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45609    fi
45610
45611    # Use eval to expand a potential ~
45612    eval path="$path"
45613    if test ! -f "$path" && test ! -d "$path"; then
45614      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45615    fi
45616
45617    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45618  fi
45619
45620
45621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45622
45623  # Input might be given as Windows format, start by converting to
45624  # unix format.
45625  path="$POTENTIAL_FREETYPE_LIB_PATH"
45626  new_path=`$CYGPATH -u "$path"`
45627
45628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45631  # "foo.exe" is OK but "foo" is an error.
45632  #
45633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45634  # It is also a way to make sure we got the proper file name for the real test later on.
45635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45636  if test "x$test_shortpath" = x; then
45637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45638$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45639    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45640  fi
45641
45642  # Call helper function which possibly converts this using DOS-style short mode.
45643  # If so, the updated path is stored in $new_path.
45644
45645  input_path="$new_path"
45646  # Check if we need to convert this using DOS-style short mode. If the path
45647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45648  # take no chances and rewrite it.
45649  # Note: m4 eats our [], so we need to use [ and ] instead.
45650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45651  if test "x$has_forbidden_chars" != x; then
45652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45656      # Going to short mode and back again did indeed matter. Since short mode is
45657      # case insensitive, let's make it lowercase to improve readability.
45658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45659      # Now convert it back to Unix-stile (cygpath)
45660      input_path=`$CYGPATH -u "$shortmode_path"`
45661      new_path="$input_path"
45662    fi
45663  fi
45664
45665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45666  if test "x$test_cygdrive_prefix" = x; then
45667    # As a simple fix, exclude /usr/bin since it's not a real path.
45668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45670      # a path prefixed by /cygdrive for fixpath to work.
45671      new_path="$CYGWIN_ROOT_PATH$input_path"
45672    fi
45673  fi
45674
45675
45676  if test "x$path" != "x$new_path"; then
45677    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45680  fi
45681
45682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45683
45684  path="$POTENTIAL_FREETYPE_LIB_PATH"
45685  has_colon=`$ECHO $path | $GREP ^.:`
45686  new_path="$path"
45687  if test "x$has_colon" = x; then
45688    # Not in mixed or Windows style, start by that.
45689    new_path=`cmd //c echo $path`
45690  fi
45691
45692
45693  input_path="$new_path"
45694  # Check if we need to convert this using DOS-style short mode. If the path
45695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45696  # take no chances and rewrite it.
45697  # Note: m4 eats our [], so we need to use [ and ] instead.
45698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45699  if test "x$has_forbidden_chars" != x; then
45700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45702  fi
45703
45704
45705  windows_path="$new_path"
45706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45707    unix_path=`$CYGPATH -u "$windows_path"`
45708    new_path="$unix_path"
45709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45711    new_path="$unix_path"
45712  fi
45713
45714  if test "x$path" != "x$new_path"; then
45715    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45718  fi
45719
45720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45722
45723  else
45724    # We're on a posix platform. Hooray! :)
45725    path="$POTENTIAL_FREETYPE_LIB_PATH"
45726    has_space=`$ECHO "$path" | $GREP " "`
45727    if test "x$has_space" != x; then
45728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45730      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45731    fi
45732
45733    # Use eval to expand a potential ~
45734    eval path="$path"
45735    if test ! -f "$path" && test ! -d "$path"; then
45736      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45737    fi
45738
45739    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45740  fi
45741
45742
45743    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45745$as_echo_n "checking for freetype includes... " >&6; }
45746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45747$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45748    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45750$as_echo_n "checking for freetype libraries... " >&6; }
45751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45752$as_echo "$FREETYPE_LIB_PATH" >&6; }
45753  fi
45754
45755            else
45756
45757  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45758  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45759  METHOD="well-known location"
45760
45761  # First check if the files exists.
45762  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45763    # We found an arbitrary include file. That's a good sign.
45764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45765$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45766    FOUND_FREETYPE=yes
45767
45768    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45769    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45770      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45771$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45772      FOUND_FREETYPE=no
45773    else
45774      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45775        # On Windows, we will need both .lib and .dll file.
45776        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45777          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45778$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45779          FOUND_FREETYPE=no
45780        fi
45781      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
45782        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45783        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45784      fi
45785    fi
45786  fi
45787
45788  if test "x$FOUND_FREETYPE" = xyes; then
45789
45790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45791
45792  # Input might be given as Windows format, start by converting to
45793  # unix format.
45794  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45795  new_path=`$CYGPATH -u "$path"`
45796
45797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45800  # "foo.exe" is OK but "foo" is an error.
45801  #
45802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45803  # It is also a way to make sure we got the proper file name for the real test later on.
45804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45805  if test "x$test_shortpath" = x; then
45806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45808    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45809  fi
45810
45811  # Call helper function which possibly converts this using DOS-style short mode.
45812  # If so, the updated path is stored in $new_path.
45813
45814  input_path="$new_path"
45815  # Check if we need to convert this using DOS-style short mode. If the path
45816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45817  # take no chances and rewrite it.
45818  # Note: m4 eats our [], so we need to use [ and ] instead.
45819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45820  if test "x$has_forbidden_chars" != x; then
45821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45825      # Going to short mode and back again did indeed matter. Since short mode is
45826      # case insensitive, let's make it lowercase to improve readability.
45827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45828      # Now convert it back to Unix-stile (cygpath)
45829      input_path=`$CYGPATH -u "$shortmode_path"`
45830      new_path="$input_path"
45831    fi
45832  fi
45833
45834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45835  if test "x$test_cygdrive_prefix" = x; then
45836    # As a simple fix, exclude /usr/bin since it's not a real path.
45837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45839      # a path prefixed by /cygdrive for fixpath to work.
45840      new_path="$CYGWIN_ROOT_PATH$input_path"
45841    fi
45842  fi
45843
45844
45845  if test "x$path" != "x$new_path"; then
45846    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45849  fi
45850
45851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852
45853  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45854  has_colon=`$ECHO $path | $GREP ^.:`
45855  new_path="$path"
45856  if test "x$has_colon" = x; then
45857    # Not in mixed or Windows style, start by that.
45858    new_path=`cmd //c echo $path`
45859  fi
45860
45861
45862  input_path="$new_path"
45863  # Check if we need to convert this using DOS-style short mode. If the path
45864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45865  # take no chances and rewrite it.
45866  # Note: m4 eats our [], so we need to use [ and ] instead.
45867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45868  if test "x$has_forbidden_chars" != x; then
45869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45871  fi
45872
45873
45874  windows_path="$new_path"
45875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45876    unix_path=`$CYGPATH -u "$windows_path"`
45877    new_path="$unix_path"
45878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45880    new_path="$unix_path"
45881  fi
45882
45883  if test "x$path" != "x$new_path"; then
45884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45887  fi
45888
45889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45891
45892  else
45893    # We're on a posix platform. Hooray! :)
45894    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45895    has_space=`$ECHO "$path" | $GREP " "`
45896    if test "x$has_space" != x; then
45897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45899      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45900    fi
45901
45902    # Use eval to expand a potential ~
45903    eval path="$path"
45904    if test ! -f "$path" && test ! -d "$path"; then
45905      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45906    fi
45907
45908    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45909  fi
45910
45911
45912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45913
45914  # Input might be given as Windows format, start by converting to
45915  # unix format.
45916  path="$POTENTIAL_FREETYPE_LIB_PATH"
45917  new_path=`$CYGPATH -u "$path"`
45918
45919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45922  # "foo.exe" is OK but "foo" is an error.
45923  #
45924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45925  # It is also a way to make sure we got the proper file name for the real test later on.
45926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45927  if test "x$test_shortpath" = x; then
45928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45930    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45931  fi
45932
45933  # Call helper function which possibly converts this using DOS-style short mode.
45934  # If so, the updated path is stored in $new_path.
45935
45936  input_path="$new_path"
45937  # Check if we need to convert this using DOS-style short mode. If the path
45938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45939  # take no chances and rewrite it.
45940  # Note: m4 eats our [], so we need to use [ and ] instead.
45941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45942  if test "x$has_forbidden_chars" != x; then
45943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45947      # Going to short mode and back again did indeed matter. Since short mode is
45948      # case insensitive, let's make it lowercase to improve readability.
45949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45950      # Now convert it back to Unix-stile (cygpath)
45951      input_path=`$CYGPATH -u "$shortmode_path"`
45952      new_path="$input_path"
45953    fi
45954  fi
45955
45956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45957  if test "x$test_cygdrive_prefix" = x; then
45958    # As a simple fix, exclude /usr/bin since it's not a real path.
45959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45961      # a path prefixed by /cygdrive for fixpath to work.
45962      new_path="$CYGWIN_ROOT_PATH$input_path"
45963    fi
45964  fi
45965
45966
45967  if test "x$path" != "x$new_path"; then
45968    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45971  fi
45972
45973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45974
45975  path="$POTENTIAL_FREETYPE_LIB_PATH"
45976  has_colon=`$ECHO $path | $GREP ^.:`
45977  new_path="$path"
45978  if test "x$has_colon" = x; then
45979    # Not in mixed or Windows style, start by that.
45980    new_path=`cmd //c echo $path`
45981  fi
45982
45983
45984  input_path="$new_path"
45985  # Check if we need to convert this using DOS-style short mode. If the path
45986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45987  # take no chances and rewrite it.
45988  # Note: m4 eats our [], so we need to use [ and ] instead.
45989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45990  if test "x$has_forbidden_chars" != x; then
45991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45993  fi
45994
45995
45996  windows_path="$new_path"
45997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45998    unix_path=`$CYGPATH -u "$windows_path"`
45999    new_path="$unix_path"
46000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46002    new_path="$unix_path"
46003  fi
46004
46005  if test "x$path" != "x$new_path"; then
46006    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46009  fi
46010
46011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46013
46014  else
46015    # We're on a posix platform. Hooray! :)
46016    path="$POTENTIAL_FREETYPE_LIB_PATH"
46017    has_space=`$ECHO "$path" | $GREP " "`
46018    if test "x$has_space" != x; then
46019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46021      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46022    fi
46023
46024    # Use eval to expand a potential ~
46025    eval path="$path"
46026    if test ! -f "$path" && test ! -d "$path"; then
46027      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46028    fi
46029
46030    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46031  fi
46032
46033
46034    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46036$as_echo_n "checking for freetype includes... " >&6; }
46037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46038$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46039    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46041$as_echo_n "checking for freetype libraries... " >&6; }
46042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46043$as_echo "$FREETYPE_LIB_PATH" >&6; }
46044  fi
46045
46046              if test "x$FOUND_FREETYPE" != xyes; then
46047
46048  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46049  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46050  METHOD="well-known location"
46051
46052  # First check if the files exists.
46053  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46054    # We found an arbitrary include file. That's a good sign.
46055    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46056$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46057    FOUND_FREETYPE=yes
46058
46059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46061      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46062$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46063      FOUND_FREETYPE=no
46064    else
46065      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46066        # On Windows, we will need both .lib and .dll file.
46067        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46068          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46069$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46070          FOUND_FREETYPE=no
46071        fi
46072      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
46073        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46074        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46075      fi
46076    fi
46077  fi
46078
46079  if test "x$FOUND_FREETYPE" = xyes; then
46080
46081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46082
46083  # Input might be given as Windows format, start by converting to
46084  # unix format.
46085  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46086  new_path=`$CYGPATH -u "$path"`
46087
46088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46091  # "foo.exe" is OK but "foo" is an error.
46092  #
46093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46094  # It is also a way to make sure we got the proper file name for the real test later on.
46095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46096  if test "x$test_shortpath" = x; then
46097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46099    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46100  fi
46101
46102  # Call helper function which possibly converts this using DOS-style short mode.
46103  # If so, the updated path is stored in $new_path.
46104
46105  input_path="$new_path"
46106  # Check if we need to convert this using DOS-style short mode. If the path
46107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46108  # take no chances and rewrite it.
46109  # Note: m4 eats our [], so we need to use [ and ] instead.
46110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46111  if test "x$has_forbidden_chars" != x; then
46112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46116      # Going to short mode and back again did indeed matter. Since short mode is
46117      # case insensitive, let's make it lowercase to improve readability.
46118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46119      # Now convert it back to Unix-stile (cygpath)
46120      input_path=`$CYGPATH -u "$shortmode_path"`
46121      new_path="$input_path"
46122    fi
46123  fi
46124
46125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46126  if test "x$test_cygdrive_prefix" = x; then
46127    # As a simple fix, exclude /usr/bin since it's not a real path.
46128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46130      # a path prefixed by /cygdrive for fixpath to work.
46131      new_path="$CYGWIN_ROOT_PATH$input_path"
46132    fi
46133  fi
46134
46135
46136  if test "x$path" != "x$new_path"; then
46137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46140  fi
46141
46142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46143
46144  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46145  has_colon=`$ECHO $path | $GREP ^.:`
46146  new_path="$path"
46147  if test "x$has_colon" = x; then
46148    # Not in mixed or Windows style, start by that.
46149    new_path=`cmd //c echo $path`
46150  fi
46151
46152
46153  input_path="$new_path"
46154  # Check if we need to convert this using DOS-style short mode. If the path
46155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46156  # take no chances and rewrite it.
46157  # Note: m4 eats our [], so we need to use [ and ] instead.
46158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46159  if test "x$has_forbidden_chars" != x; then
46160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46162  fi
46163
46164
46165  windows_path="$new_path"
46166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46167    unix_path=`$CYGPATH -u "$windows_path"`
46168    new_path="$unix_path"
46169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46171    new_path="$unix_path"
46172  fi
46173
46174  if test "x$path" != "x$new_path"; then
46175    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46177$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46178  fi
46179
46180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46182
46183  else
46184    # We're on a posix platform. Hooray! :)
46185    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46186    has_space=`$ECHO "$path" | $GREP " "`
46187    if test "x$has_space" != x; then
46188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46191    fi
46192
46193    # Use eval to expand a potential ~
46194    eval path="$path"
46195    if test ! -f "$path" && test ! -d "$path"; then
46196      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46197    fi
46198
46199    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46200  fi
46201
46202
46203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46204
46205  # Input might be given as Windows format, start by converting to
46206  # unix format.
46207  path="$POTENTIAL_FREETYPE_LIB_PATH"
46208  new_path=`$CYGPATH -u "$path"`
46209
46210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46213  # "foo.exe" is OK but "foo" is an error.
46214  #
46215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46216  # It is also a way to make sure we got the proper file name for the real test later on.
46217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46218  if test "x$test_shortpath" = x; then
46219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46220$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46221    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46222  fi
46223
46224  # Call helper function which possibly converts this using DOS-style short mode.
46225  # If so, the updated path is stored in $new_path.
46226
46227  input_path="$new_path"
46228  # Check if we need to convert this using DOS-style short mode. If the path
46229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46230  # take no chances and rewrite it.
46231  # Note: m4 eats our [], so we need to use [ and ] instead.
46232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46233  if test "x$has_forbidden_chars" != x; then
46234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46238      # Going to short mode and back again did indeed matter. Since short mode is
46239      # case insensitive, let's make it lowercase to improve readability.
46240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46241      # Now convert it back to Unix-stile (cygpath)
46242      input_path=`$CYGPATH -u "$shortmode_path"`
46243      new_path="$input_path"
46244    fi
46245  fi
46246
46247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46248  if test "x$test_cygdrive_prefix" = x; then
46249    # As a simple fix, exclude /usr/bin since it's not a real path.
46250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46252      # a path prefixed by /cygdrive for fixpath to work.
46253      new_path="$CYGWIN_ROOT_PATH$input_path"
46254    fi
46255  fi
46256
46257
46258  if test "x$path" != "x$new_path"; then
46259    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46262  fi
46263
46264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46265
46266  path="$POTENTIAL_FREETYPE_LIB_PATH"
46267  has_colon=`$ECHO $path | $GREP ^.:`
46268  new_path="$path"
46269  if test "x$has_colon" = x; then
46270    # Not in mixed or Windows style, start by that.
46271    new_path=`cmd //c echo $path`
46272  fi
46273
46274
46275  input_path="$new_path"
46276  # Check if we need to convert this using DOS-style short mode. If the path
46277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46278  # take no chances and rewrite it.
46279  # Note: m4 eats our [], so we need to use [ and ] instead.
46280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46281  if test "x$has_forbidden_chars" != x; then
46282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46284  fi
46285
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296  if test "x$path" != "x$new_path"; then
46297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46300  fi
46301
46302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46304
46305  else
46306    # We're on a posix platform. Hooray! :)
46307    path="$POTENTIAL_FREETYPE_LIB_PATH"
46308    has_space=`$ECHO "$path" | $GREP " "`
46309    if test "x$has_space" != x; then
46310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46313    fi
46314
46315    # Use eval to expand a potential ~
46316    eval path="$path"
46317    if test ! -f "$path" && test ! -d "$path"; then
46318      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46319    fi
46320
46321    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46322  fi
46323
46324
46325    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46327$as_echo_n "checking for freetype includes... " >&6; }
46328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46329$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46330    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46332$as_echo_n "checking for freetype libraries... " >&6; }
46333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46334$as_echo "$FREETYPE_LIB_PATH" >&6; }
46335  fi
46336
46337              fi
46338            fi
46339          fi
46340        fi
46341      fi # end check in well-known locations
46342
46343      if test "x$FOUND_FREETYPE" != xyes; then
46344
46345  # Print a helpful message on how to acquire the necessary build dependency.
46346  # freetype is the help tag: freetype, cups, pulse, alsa etc
46347  MISSING_DEPENDENCY=freetype
46348
46349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46350    cygwin_help $MISSING_DEPENDENCY
46351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352    msys_help $MISSING_DEPENDENCY
46353  else
46354    PKGHANDLER_COMMAND=
46355
46356    case $PKGHANDLER in
46357      apt-get)
46358        apt_help     $MISSING_DEPENDENCY ;;
46359      yum)
46360        yum_help     $MISSING_DEPENDENCY ;;
46361      port)
46362        port_help    $MISSING_DEPENDENCY ;;
46363      pkgutil)
46364        pkgutil_help $MISSING_DEPENDENCY ;;
46365      pkgadd)
46366        pkgadd_help  $MISSING_DEPENDENCY ;;
46367    esac
46368
46369    if test "x$PKGHANDLER_COMMAND" != x; then
46370      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46371    fi
46372  fi
46373
46374        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46375      fi
46376    fi # end user specified settings
46377
46378    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46379    if test "x$FREETYPE_CFLAGS" = x; then
46380
46381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46382
46383  # Input might be given as Windows format, start by converting to
46384  # unix format.
46385  path="$FREETYPE_INCLUDE_PATH"
46386  new_path=`$CYGPATH -u "$path"`
46387
46388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46391  # "foo.exe" is OK but "foo" is an error.
46392  #
46393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46394  # It is also a way to make sure we got the proper file name for the real test later on.
46395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46396  if test "x$test_shortpath" = x; then
46397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46398$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46399    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46400  fi
46401
46402  # Call helper function which possibly converts this using DOS-style short mode.
46403  # If so, the updated path is stored in $new_path.
46404
46405  input_path="$new_path"
46406  # Check if we need to convert this using DOS-style short mode. If the path
46407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46408  # take no chances and rewrite it.
46409  # Note: m4 eats our [], so we need to use [ and ] instead.
46410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46411  if test "x$has_forbidden_chars" != x; then
46412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46416      # Going to short mode and back again did indeed matter. Since short mode is
46417      # case insensitive, let's make it lowercase to improve readability.
46418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46419      # Now convert it back to Unix-stile (cygpath)
46420      input_path=`$CYGPATH -u "$shortmode_path"`
46421      new_path="$input_path"
46422    fi
46423  fi
46424
46425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46426  if test "x$test_cygdrive_prefix" = x; then
46427    # As a simple fix, exclude /usr/bin since it's not a real path.
46428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46430      # a path prefixed by /cygdrive for fixpath to work.
46431      new_path="$CYGWIN_ROOT_PATH$input_path"
46432    fi
46433  fi
46434
46435
46436  if test "x$path" != "x$new_path"; then
46437    FREETYPE_INCLUDE_PATH="$new_path"
46438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46439$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46440  fi
46441
46442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46443
46444  path="$FREETYPE_INCLUDE_PATH"
46445  has_colon=`$ECHO $path | $GREP ^.:`
46446  new_path="$path"
46447  if test "x$has_colon" = x; then
46448    # Not in mixed or Windows style, start by that.
46449    new_path=`cmd //c echo $path`
46450  fi
46451
46452
46453  input_path="$new_path"
46454  # Check if we need to convert this using DOS-style short mode. If the path
46455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46456  # take no chances and rewrite it.
46457  # Note: m4 eats our [], so we need to use [ and ] instead.
46458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46459  if test "x$has_forbidden_chars" != x; then
46460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46462  fi
46463
46464
46465  windows_path="$new_path"
46466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46467    unix_path=`$CYGPATH -u "$windows_path"`
46468    new_path="$unix_path"
46469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46471    new_path="$unix_path"
46472  fi
46473
46474  if test "x$path" != "x$new_path"; then
46475    FREETYPE_INCLUDE_PATH="$new_path"
46476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46477$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46478  fi
46479
46480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46482
46483  else
46484    # We're on a posix platform. Hooray! :)
46485    path="$FREETYPE_INCLUDE_PATH"
46486    has_space=`$ECHO "$path" | $GREP " "`
46487    if test "x$has_space" != x; then
46488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46489$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46490      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46491    fi
46492
46493    # Use eval to expand a potential ~
46494    eval path="$path"
46495    if test ! -f "$path" && test ! -d "$path"; then
46496      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46497    fi
46498
46499    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46500  fi
46501
46502      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46503        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46504      else
46505        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46506      fi
46507    fi
46508
46509    if test "x$FREETYPE_LIBS" = x; then
46510
46511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46512
46513  # Input might be given as Windows format, start by converting to
46514  # unix format.
46515  path="$FREETYPE_LIB_PATH"
46516  new_path=`$CYGPATH -u "$path"`
46517
46518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46521  # "foo.exe" is OK but "foo" is an error.
46522  #
46523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46524  # It is also a way to make sure we got the proper file name for the real test later on.
46525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46526  if test "x$test_shortpath" = x; then
46527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46528$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46529    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46530  fi
46531
46532  # Call helper function which possibly converts this using DOS-style short mode.
46533  # If so, the updated path is stored in $new_path.
46534
46535  input_path="$new_path"
46536  # Check if we need to convert this using DOS-style short mode. If the path
46537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46538  # take no chances and rewrite it.
46539  # Note: m4 eats our [], so we need to use [ and ] instead.
46540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46541  if test "x$has_forbidden_chars" != x; then
46542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46546      # Going to short mode and back again did indeed matter. Since short mode is
46547      # case insensitive, let's make it lowercase to improve readability.
46548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46549      # Now convert it back to Unix-stile (cygpath)
46550      input_path=`$CYGPATH -u "$shortmode_path"`
46551      new_path="$input_path"
46552    fi
46553  fi
46554
46555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46556  if test "x$test_cygdrive_prefix" = x; then
46557    # As a simple fix, exclude /usr/bin since it's not a real path.
46558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46560      # a path prefixed by /cygdrive for fixpath to work.
46561      new_path="$CYGWIN_ROOT_PATH$input_path"
46562    fi
46563  fi
46564
46565
46566  if test "x$path" != "x$new_path"; then
46567    FREETYPE_LIB_PATH="$new_path"
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46569$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46570  fi
46571
46572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46573
46574  path="$FREETYPE_LIB_PATH"
46575  has_colon=`$ECHO $path | $GREP ^.:`
46576  new_path="$path"
46577  if test "x$has_colon" = x; then
46578    # Not in mixed or Windows style, start by that.
46579    new_path=`cmd //c echo $path`
46580  fi
46581
46582
46583  input_path="$new_path"
46584  # Check if we need to convert this using DOS-style short mode. If the path
46585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46586  # take no chances and rewrite it.
46587  # Note: m4 eats our [], so we need to use [ and ] instead.
46588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46589  if test "x$has_forbidden_chars" != x; then
46590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46592  fi
46593
46594
46595  windows_path="$new_path"
46596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46597    unix_path=`$CYGPATH -u "$windows_path"`
46598    new_path="$unix_path"
46599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46601    new_path="$unix_path"
46602  fi
46603
46604  if test "x$path" != "x$new_path"; then
46605    FREETYPE_LIB_PATH="$new_path"
46606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46607$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46608  fi
46609
46610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46612
46613  else
46614    # We're on a posix platform. Hooray! :)
46615    path="$FREETYPE_LIB_PATH"
46616    has_space=`$ECHO "$path" | $GREP " "`
46617    if test "x$has_space" != x; then
46618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46619$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46620      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46621    fi
46622
46623    # Use eval to expand a potential ~
46624    eval path="$path"
46625    if test ! -f "$path" && test ! -d "$path"; then
46626      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46627    fi
46628
46629    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46630  fi
46631
46632      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46633        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46634      else
46635        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46636      fi
46637    fi
46638
46639    # Try to compile it
46640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46641$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46642    ac_ext=cpp
46643ac_cpp='$CXXCPP $CPPFLAGS'
46644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46647
46648    PREV_CXXCFLAGS="$CXXFLAGS"
46649    PREV_LIBS="$LIBS"
46650    PREV_CXX="$CXX"
46651    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46652    LIBS="$LIBS $FREETYPE_LIBS"
46653    CXX="$FIXPATH $CXX"
46654    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46655/* end confdefs.h.  */
46656
46657          #include<ft2build.h>
46658          #include FT_FREETYPE_H
46659          int main () {
46660            FT_Init_FreeType(NULL);
46661            return 0;
46662          }
46663
46664_ACEOF
46665if ac_fn_cxx_try_link "$LINENO"; then :
46666
46667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46668$as_echo "yes" >&6; }
46669
46670else
46671
46672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46673$as_echo "no" >&6; }
46674          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46675$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46676          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46677$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46678
46679
46680  # Print a helpful message on how to acquire the necessary build dependency.
46681  # freetype is the help tag: freetype, cups, pulse, alsa etc
46682  MISSING_DEPENDENCY=freetype
46683
46684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46685    cygwin_help $MISSING_DEPENDENCY
46686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46687    msys_help $MISSING_DEPENDENCY
46688  else
46689    PKGHANDLER_COMMAND=
46690
46691    case $PKGHANDLER in
46692      apt-get)
46693        apt_help     $MISSING_DEPENDENCY ;;
46694      yum)
46695        yum_help     $MISSING_DEPENDENCY ;;
46696      port)
46697        port_help    $MISSING_DEPENDENCY ;;
46698      pkgutil)
46699        pkgutil_help $MISSING_DEPENDENCY ;;
46700      pkgadd)
46701        pkgadd_help  $MISSING_DEPENDENCY ;;
46702    esac
46703
46704    if test "x$PKGHANDLER_COMMAND" != x; then
46705      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46706    fi
46707  fi
46708
46709
46710          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46711
46712
46713fi
46714rm -f core conftest.err conftest.$ac_objext \
46715    conftest$ac_exeext conftest.$ac_ext
46716    CXXCFLAGS="$PREV_CXXFLAGS"
46717    LIBS="$PREV_LIBS"
46718    CXX="$PREV_CXX"
46719    ac_ext=cpp
46720ac_cpp='$CXXCPP $CPPFLAGS'
46721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46724
46725
46726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46727$as_echo_n "checking if we should bundle freetype... " >&6; }
46728    if test "x$BUNDLE_FREETYPE" = xyes; then
46729      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46730    fi
46731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46732$as_echo "$BUNDLE_FREETYPE" >&6; }
46733
46734  fi # end freetype needed
46735
46736
46737
46738
46739
46740
46741
46742  ###############################################################################
46743  #
46744  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46745  #
46746
46747# Check whether --with-alsa was given.
46748if test "${with_alsa+set}" = set; then :
46749  withval=$with_alsa;
46750fi
46751
46752
46753# Check whether --with-alsa-include was given.
46754if test "${with_alsa_include+set}" = set; then :
46755  withval=$with_alsa_include;
46756fi
46757
46758
46759# Check whether --with-alsa-lib was given.
46760if test "${with_alsa_lib+set}" = set; then :
46761  withval=$with_alsa_lib;
46762fi
46763
46764
46765  if test "x$ALSA_NOT_NEEDED" = xyes; then
46766    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46767      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46768$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46769    fi
46770    ALSA_CFLAGS=
46771    ALSA_LIBS=
46772  else
46773    ALSA_FOUND=no
46774
46775    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46776      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46777    fi
46778
46779    if test "x${with_alsa}" != x; then
46780      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46781      ALSA_CFLAGS="-I${with_alsa}/include"
46782      ALSA_FOUND=yes
46783    fi
46784    if test "x${with_alsa_include}" != x; then
46785      ALSA_CFLAGS="-I${with_alsa_include}"
46786      ALSA_FOUND=yes
46787    fi
46788    if test "x${with_alsa_lib}" != x; then
46789      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46790      ALSA_FOUND=yes
46791    fi
46792    if test "x$ALSA_FOUND" = xno; then
46793
46794
46795  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46796    # Source the builddeps file again, to make sure it uses the latest variables!
46797    . $builddepsfile
46798    # Look for a target and build machine specific resource!
46799    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46800    if test "x$resource" = x; then
46801      # Ok, lets instead look for a target specific resource
46802      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46803    fi
46804    if test "x$resource" = x; then
46805      # Ok, lets instead look for a build specific resource
46806      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46807    fi
46808    if test "x$resource" = x; then
46809      # Ok, lets instead look for a generic resource
46810      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46811      resource=${builddep_alsa}
46812    fi
46813    if test "x$resource" != x; then
46814      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46815$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46816      # If the resource in the builddeps.conf file is an existing directory,
46817      # for example /java/linux/cups
46818      if test -d ${resource}; then
46819        depdir=${resource}
46820      else
46821
46822  # alsa is for example mymodule
46823  # $resource is for example libs/general/libmymod_1_2_3.zip
46824  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46825  # $with_builddeps_dir is for example /localhome/builddeps
46826  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46827  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46828  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46829  filename=`basename $resource`
46830  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46831  filebase=${filename%%.*}
46832  extension=${filename#*.}
46833  installdir=$with_builddeps_dir/$filebase
46834  if test ! -f $installdir/$filename.unpacked; then
46835    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46836$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46837    if test ! -d $installdir; then
46838      mkdir -p $installdir
46839    fi
46840    if test ! -d $installdir; then
46841      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46842    fi
46843    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46844    touch $tmpfile
46845    if test ! -f $tmpfile; then
46846      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46847    fi
46848
46849  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46850  # $tmpfile is the local file name for the downloaded file.
46851  VALID_TOOL=no
46852  if test "x$BDEPS_FTP" = xwget; then
46853    VALID_TOOL=yes
46854    wget -O $tmpfile $with_builddeps_server/$resource
46855  fi
46856  if test "x$BDEPS_FTP" = xlftp; then
46857    VALID_TOOL=yes
46858    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46859  fi
46860  if test "x$BDEPS_FTP" = xftp; then
46861    VALID_TOOL=yes
46862    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46863    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46864    FTPUSERPWD=${FTPSERVER%%@*}
46865    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46866      FTPUSER=${userpwd%%:*}
46867      FTPPWD=${userpwd#*@}
46868      FTPSERVER=${FTPSERVER#*@}
46869    else
46870      FTPUSER=ftp
46871      FTPPWD=ftp
46872    fi
46873    # the "pass" command does not work on some
46874    # ftp clients (read ftp.exe) but if it works,
46875    # passive mode is better!
46876    ( \
46877        echo "user $FTPUSER $FTPPWD"        ; \
46878        echo "pass"                         ; \
46879        echo "bin"                          ; \
46880        echo "get $FTPPATH $tmpfile"              ; \
46881    ) | ftp -in $FTPSERVER
46882  fi
46883  if test "x$VALID_TOOL" != xyes; then
46884    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46885  fi
46886
46887    mv $tmpfile $installdir/$filename
46888    if test ! -s $installdir/$filename; then
46889      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46890    fi
46891    case "$extension" in
46892      zip)  echo "Unzipping $installdir/$filename..."
46893        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46894        ;;
46895      tar.gz) echo "Untaring $installdir/$filename..."
46896        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46897        ;;
46898      tgz) echo "Untaring $installdir/$filename..."
46899        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46900        ;;
46901      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46902        ;;
46903    esac
46904  fi
46905  if test -f $installdir/$filename.unpacked; then
46906    depdir=$installdir
46907  fi
46908
46909      fi
46910      # Source the builddeps file again, because in the previous command, the depdir
46911      # was updated to point at the current build dependency install directory.
46912      . $builddepsfile
46913      # Now extract variables from the builddeps.conf files.
46914      theroot=${builddep_alsa_ROOT}
46915      thecflags=${builddep_alsa_CFLAGS}
46916      thelibs=${builddep_alsa_LIBS}
46917      if test "x$depdir" = x; then
46918        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46919      fi
46920      ALSA=$depdir
46921      if test "x$theroot" != x; then
46922        ALSA="$theroot"
46923      fi
46924      if test "x$thecflags" != x; then
46925        ALSA_CFLAGS="$thecflags"
46926      fi
46927      if test "x$thelibs" != x; then
46928        ALSA_LIBS="$thelibs"
46929      fi
46930      ALSA_FOUND=yes
46931      else ALSA_FOUND=no
46932
46933    fi
46934    else ALSA_FOUND=no
46935
46936  fi
46937
46938    fi
46939    if test "x$ALSA_FOUND" = xno; then
46940
46941pkg_failed=no
46942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46943$as_echo_n "checking for ALSA... " >&6; }
46944
46945if test -n "$ALSA_CFLAGS"; then
46946    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46947 elif test -n "$PKG_CONFIG"; then
46948    if test -n "$PKG_CONFIG" && \
46949    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46950  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46951  ac_status=$?
46952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46953  test $ac_status = 0; }; then
46954  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46955else
46956  pkg_failed=yes
46957fi
46958 else
46959    pkg_failed=untried
46960fi
46961if test -n "$ALSA_LIBS"; then
46962    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46963 elif test -n "$PKG_CONFIG"; then
46964    if test -n "$PKG_CONFIG" && \
46965    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46966  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46967  ac_status=$?
46968  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46969  test $ac_status = 0; }; then
46970  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46971else
46972  pkg_failed=yes
46973fi
46974 else
46975    pkg_failed=untried
46976fi
46977
46978
46979
46980if test $pkg_failed = yes; then
46981
46982if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46983        _pkg_short_errors_supported=yes
46984else
46985        _pkg_short_errors_supported=no
46986fi
46987        if test $_pkg_short_errors_supported = yes; then
46988	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46989        else
46990	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46991        fi
46992	# Put the nasty error message in config.log where it belongs
46993	echo "$ALSA_PKG_ERRORS" >&5
46994
46995	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46996$as_echo "no" >&6; }
46997                ALSA_FOUND=no
46998elif test $pkg_failed = untried; then
46999	ALSA_FOUND=no
47000else
47001	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47002	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47004$as_echo "yes" >&6; }
47005	ALSA_FOUND=yes
47006fi
47007    fi
47008    if test "x$ALSA_FOUND" = xno; then
47009      for ac_header in alsa/asoundlib.h
47010do :
47011  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47012if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47013  cat >>confdefs.h <<_ACEOF
47014#define HAVE_ALSA_ASOUNDLIB_H 1
47015_ACEOF
47016
47017            ALSA_FOUND=yes
47018            ALSA_CFLAGS=-Iignoreme
47019            ALSA_LIBS=-lasound
47020            DEFAULT_ALSA=yes
47021
47022else
47023  ALSA_FOUND=no
47024fi
47025
47026done
47027
47028    fi
47029    if test "x$ALSA_FOUND" = xno; then
47030
47031  # Print a helpful message on how to acquire the necessary build dependency.
47032  # alsa is the help tag: freetype, cups, pulse, alsa etc
47033  MISSING_DEPENDENCY=alsa
47034
47035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47036    cygwin_help $MISSING_DEPENDENCY
47037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47038    msys_help $MISSING_DEPENDENCY
47039  else
47040    PKGHANDLER_COMMAND=
47041
47042    case $PKGHANDLER in
47043      apt-get)
47044        apt_help     $MISSING_DEPENDENCY ;;
47045      yum)
47046        yum_help     $MISSING_DEPENDENCY ;;
47047      port)
47048        port_help    $MISSING_DEPENDENCY ;;
47049      pkgutil)
47050        pkgutil_help $MISSING_DEPENDENCY ;;
47051      pkgadd)
47052        pkgadd_help  $MISSING_DEPENDENCY ;;
47053    esac
47054
47055    if test "x$PKGHANDLER_COMMAND" != x; then
47056      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47057    fi
47058  fi
47059
47060      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47061    fi
47062  fi
47063
47064
47065
47066
47067
47068
47069  ###############################################################################
47070  #
47071  # Check for the jpeg library
47072  #
47073
47074  USE_EXTERNAL_LIBJPEG=true
47075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47076$as_echo_n "checking for main in -ljpeg... " >&6; }
47077if ${ac_cv_lib_jpeg_main+:} false; then :
47078  $as_echo_n "(cached) " >&6
47079else
47080  ac_check_lib_save_LIBS=$LIBS
47081LIBS="-ljpeg  $LIBS"
47082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47083/* end confdefs.h.  */
47084
47085
47086int
47087main ()
47088{
47089return main ();
47090  ;
47091  return 0;
47092}
47093_ACEOF
47094if ac_fn_cxx_try_link "$LINENO"; then :
47095  ac_cv_lib_jpeg_main=yes
47096else
47097  ac_cv_lib_jpeg_main=no
47098fi
47099rm -f core conftest.err conftest.$ac_objext \
47100    conftest$ac_exeext conftest.$ac_ext
47101LIBS=$ac_check_lib_save_LIBS
47102fi
47103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47104$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47105if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47106  cat >>confdefs.h <<_ACEOF
47107#define HAVE_LIBJPEG 1
47108_ACEOF
47109
47110  LIBS="-ljpeg $LIBS"
47111
47112else
47113   USE_EXTERNAL_LIBJPEG=false
47114      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47115$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47116
47117fi
47118
47119
47120
47121  ###############################################################################
47122  #
47123  # Check for the gif library
47124  #
47125
47126
47127# Check whether --with-giflib was given.
47128if test "${with_giflib+set}" = set; then :
47129  withval=$with_giflib;
47130fi
47131
47132
47133
47134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47135$as_echo_n "checking for which giflib to use... " >&6; }
47136
47137  # default is bundled
47138  DEFAULT_GIFLIB=bundled
47139
47140  #
47141  # if user didn't specify, use DEFAULT_GIFLIB
47142  #
47143  if test "x${with_giflib}" = "x"; then
47144    with_giflib=${DEFAULT_GIFLIB}
47145  fi
47146
47147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47148$as_echo "${with_giflib}" >&6; }
47149
47150  if test "x${with_giflib}" = "xbundled"; then
47151    USE_EXTERNAL_LIBGIF=false
47152  elif test "x${with_giflib}" = "xsystem"; then
47153    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47154if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47155
47156else
47157   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47158fi
47159
47160
47161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47162$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47163if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47164  $as_echo_n "(cached) " >&6
47165else
47166  ac_check_lib_save_LIBS=$LIBS
47167LIBS="-lgif  $LIBS"
47168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47169/* end confdefs.h.  */
47170
47171/* Override any GCC internal prototype to avoid an error.
47172   Use char because int might match the return type of a GCC
47173   builtin and then its argument prototype would still apply.  */
47174#ifdef __cplusplus
47175extern "C"
47176#endif
47177char DGifGetCode ();
47178int
47179main ()
47180{
47181return DGifGetCode ();
47182  ;
47183  return 0;
47184}
47185_ACEOF
47186if ac_fn_cxx_try_link "$LINENO"; then :
47187  ac_cv_lib_gif_DGifGetCode=yes
47188else
47189  ac_cv_lib_gif_DGifGetCode=no
47190fi
47191rm -f core conftest.err conftest.$ac_objext \
47192    conftest$ac_exeext conftest.$ac_ext
47193LIBS=$ac_check_lib_save_LIBS
47194fi
47195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47196$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47197if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47198  cat >>confdefs.h <<_ACEOF
47199#define HAVE_LIBGIF 1
47200_ACEOF
47201
47202  LIBS="-lgif $LIBS"
47203
47204else
47205   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47206fi
47207
47208
47209    USE_EXTERNAL_LIBGIF=true
47210  else
47211    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47212  fi
47213
47214
47215  ###############################################################################
47216  #
47217  # Check for the zlib library
47218  #
47219
47220
47221# Check whether --with-zlib was given.
47222if test "${with_zlib+set}" = set; then :
47223  withval=$with_zlib;
47224fi
47225
47226
47227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47228$as_echo_n "checking for compress in -lz... " >&6; }
47229if ${ac_cv_lib_z_compress+:} false; then :
47230  $as_echo_n "(cached) " >&6
47231else
47232  ac_check_lib_save_LIBS=$LIBS
47233LIBS="-lz  $LIBS"
47234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47235/* end confdefs.h.  */
47236
47237/* Override any GCC internal prototype to avoid an error.
47238   Use char because int might match the return type of a GCC
47239   builtin and then its argument prototype would still apply.  */
47240#ifdef __cplusplus
47241extern "C"
47242#endif
47243char compress ();
47244int
47245main ()
47246{
47247return compress ();
47248  ;
47249  return 0;
47250}
47251_ACEOF
47252if ac_fn_cxx_try_link "$LINENO"; then :
47253  ac_cv_lib_z_compress=yes
47254else
47255  ac_cv_lib_z_compress=no
47256fi
47257rm -f core conftest.err conftest.$ac_objext \
47258    conftest$ac_exeext conftest.$ac_ext
47259LIBS=$ac_check_lib_save_LIBS
47260fi
47261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47262$as_echo "$ac_cv_lib_z_compress" >&6; }
47263if test "x$ac_cv_lib_z_compress" = xyes; then :
47264   ZLIB_FOUND=yes
47265else
47266   ZLIB_FOUND=no
47267fi
47268
47269
47270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47271$as_echo_n "checking for which zlib to use... " >&6; }
47272
47273  DEFAULT_ZLIB=bundled
47274  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47275    #
47276    # On macosx default is system...on others default is
47277    #
47278    DEFAULT_ZLIB=system
47279  fi
47280
47281  if test "x${ZLIB_FOUND}" != "xyes"; then
47282    #
47283    # If we don't find any system...set default to bundled
47284    #
47285    DEFAULT_ZLIB=bundled
47286  fi
47287
47288  #
47289  # If user didn't specify, use DEFAULT_ZLIB
47290  #
47291  if test "x${with_zlib}" = "x"; then
47292    with_zlib=${DEFAULT_ZLIB}
47293  fi
47294
47295  if test "x${with_zlib}" = "xbundled"; then
47296    USE_EXTERNAL_LIBZ=false
47297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47298$as_echo "bundled" >&6; }
47299  elif test "x${with_zlib}" = "xsystem"; then
47300    if test "x${ZLIB_FOUND}" = "xyes"; then
47301      USE_EXTERNAL_LIBZ=true
47302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47303$as_echo "system" >&6; }
47304    else
47305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47306$as_echo "system not found" >&6; }
47307      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47308    fi
47309  else
47310    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47311  fi
47312
47313
47314
47315  ###############################################################################
47316  LIBZIP_CAN_USE_MMAP=true
47317
47318
47319
47320  ###############################################################################
47321  #
47322  # Check if altzone exists in time.h
47323  #
47324
47325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47326/* end confdefs.h.  */
47327#include <time.h>
47328int
47329main ()
47330{
47331return (int)altzone;
47332  ;
47333  return 0;
47334}
47335_ACEOF
47336if ac_fn_cxx_try_link "$LINENO"; then :
47337  has_altzone=yes
47338else
47339  has_altzone=no
47340fi
47341rm -f core conftest.err conftest.$ac_objext \
47342    conftest$ac_exeext conftest.$ac_ext
47343  if test "x$has_altzone" = xyes; then
47344
47345$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47346
47347  fi
47348
47349  ###############################################################################
47350  #
47351  # Check the maths library
47352  #
47353
47354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47355$as_echo_n "checking for cos in -lm... " >&6; }
47356if ${ac_cv_lib_m_cos+:} false; then :
47357  $as_echo_n "(cached) " >&6
47358else
47359  ac_check_lib_save_LIBS=$LIBS
47360LIBS="-lm  $LIBS"
47361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47362/* end confdefs.h.  */
47363
47364/* Override any GCC internal prototype to avoid an error.
47365   Use char because int might match the return type of a GCC
47366   builtin and then its argument prototype would still apply.  */
47367#ifdef __cplusplus
47368extern "C"
47369#endif
47370char cos ();
47371int
47372main ()
47373{
47374return cos ();
47375  ;
47376  return 0;
47377}
47378_ACEOF
47379if ac_fn_cxx_try_link "$LINENO"; then :
47380  ac_cv_lib_m_cos=yes
47381else
47382  ac_cv_lib_m_cos=no
47383fi
47384rm -f core conftest.err conftest.$ac_objext \
47385    conftest$ac_exeext conftest.$ac_ext
47386LIBS=$ac_check_lib_save_LIBS
47387fi
47388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47389$as_echo "$ac_cv_lib_m_cos" >&6; }
47390if test "x$ac_cv_lib_m_cos" = xyes; then :
47391  cat >>confdefs.h <<_ACEOF
47392#define HAVE_LIBM 1
47393_ACEOF
47394
47395  LIBS="-lm $LIBS"
47396
47397else
47398
47399        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47400$as_echo "$as_me: Maths library was not found" >&6;}
47401
47402
47403fi
47404
47405
47406
47407  ###############################################################################
47408  #
47409  # Check for libdl.so
47410
47411  save_LIBS="$LIBS"
47412  LIBS=""
47413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47414$as_echo_n "checking for dlopen in -ldl... " >&6; }
47415if ${ac_cv_lib_dl_dlopen+:} false; then :
47416  $as_echo_n "(cached) " >&6
47417else
47418  ac_check_lib_save_LIBS=$LIBS
47419LIBS="-ldl  $LIBS"
47420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47421/* end confdefs.h.  */
47422
47423/* Override any GCC internal prototype to avoid an error.
47424   Use char because int might match the return type of a GCC
47425   builtin and then its argument prototype would still apply.  */
47426#ifdef __cplusplus
47427extern "C"
47428#endif
47429char dlopen ();
47430int
47431main ()
47432{
47433return dlopen ();
47434  ;
47435  return 0;
47436}
47437_ACEOF
47438if ac_fn_cxx_try_link "$LINENO"; then :
47439  ac_cv_lib_dl_dlopen=yes
47440else
47441  ac_cv_lib_dl_dlopen=no
47442fi
47443rm -f core conftest.err conftest.$ac_objext \
47444    conftest$ac_exeext conftest.$ac_ext
47445LIBS=$ac_check_lib_save_LIBS
47446fi
47447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47448$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47449if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47450  cat >>confdefs.h <<_ACEOF
47451#define HAVE_LIBDL 1
47452_ACEOF
47453
47454  LIBS="-ldl $LIBS"
47455
47456fi
47457
47458  LIBDL="$LIBS"
47459
47460  LIBS="$save_LIBS"
47461
47462
47463  ###############################################################################
47464  #
47465  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47466  # dynamic build is configured on command line.
47467  #
47468
47469# Check whether --with-stdc++lib was given.
47470if test "${with_stdc__lib+set}" = set; then :
47471  withval=$with_stdc__lib;
47472        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47473                && test "x$with_stdc__lib" != xdefault; then
47474          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47475        fi
47476
47477else
47478  with_stdc__lib=default
47479
47480fi
47481
47482
47483  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47484    # Test if -lstdc++ works.
47485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47486$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47487    ac_ext=cpp
47488ac_cpp='$CXXCPP $CPPFLAGS'
47489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47492
47493    OLD_CXXFLAGS="$CXXFLAGS"
47494    CXXFLAGS="$CXXFLAGS -lstdc++"
47495    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47496/* end confdefs.h.  */
47497
47498int
47499main ()
47500{
47501return 0;
47502  ;
47503  return 0;
47504}
47505_ACEOF
47506if ac_fn_cxx_try_link "$LINENO"; then :
47507  has_dynamic_libstdcxx=yes
47508else
47509  has_dynamic_libstdcxx=no
47510fi
47511rm -f core conftest.err conftest.$ac_objext \
47512    conftest$ac_exeext conftest.$ac_ext
47513    CXXFLAGS="$OLD_CXXFLAGS"
47514    ac_ext=cpp
47515ac_cpp='$CXXCPP $CPPFLAGS'
47516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47519
47520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47521$as_echo "$has_dynamic_libstdcxx" >&6; }
47522
47523    # Test if stdc++ can be linked statically.
47524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47525$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47526    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47527    ac_ext=cpp
47528ac_cpp='$CXXCPP $CPPFLAGS'
47529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47532
47533    OLD_LIBS="$LIBS"
47534    OLD_CXX="$CXX"
47535    LIBS="$STATIC_STDCXX_FLAGS"
47536    CXX="$CC"
47537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47538/* end confdefs.h.  */
47539
47540int
47541main ()
47542{
47543return 0;
47544  ;
47545  return 0;
47546}
47547_ACEOF
47548if ac_fn_cxx_try_link "$LINENO"; then :
47549  has_static_libstdcxx=yes
47550else
47551  has_static_libstdcxx=no
47552fi
47553rm -f core conftest.err conftest.$ac_objext \
47554    conftest$ac_exeext conftest.$ac_ext
47555    LIBS="$OLD_LIBS"
47556    CXX="$OLD_CXX"
47557    ac_ext=cpp
47558ac_cpp='$CXXCPP $CPPFLAGS'
47559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47562
47563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47564$as_echo "$has_static_libstdcxx" >&6; }
47565
47566    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47567      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47568    fi
47569
47570    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47571      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47572    fi
47573
47574    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47575      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47576    fi
47577
47578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47579$as_echo_n "checking how to link with libstdc++... " >&6; }
47580    # If dynamic was requested, it's available since it would fail above otherwise.
47581    # If dynamic wasn't requested, go with static unless it isn't available.
47582    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47583      LIBCXX="$LIBCXX -lstdc++"
47584      LDCXX="$CXX"
47585      STATIC_CXX_SETTING="STATIC_CXX=false"
47586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47587$as_echo "dynamic" >&6; }
47588    else
47589      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47590      LDCXX="$CC"
47591      STATIC_CXX_SETTING="STATIC_CXX=true"
47592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47593$as_echo "static" >&6; }
47594    fi
47595  fi
47596
47597
47598  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47599    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47600
47601pkg_failed=no
47602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47603$as_echo_n "checking for LIBFFI... " >&6; }
47604
47605if test -n "$LIBFFI_CFLAGS"; then
47606    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47607 elif test -n "$PKG_CONFIG"; then
47608    if test -n "$PKG_CONFIG" && \
47609    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47610  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47611  ac_status=$?
47612  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47613  test $ac_status = 0; }; then
47614  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47615else
47616  pkg_failed=yes
47617fi
47618 else
47619    pkg_failed=untried
47620fi
47621if test -n "$LIBFFI_LIBS"; then
47622    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47623 elif test -n "$PKG_CONFIG"; then
47624    if test -n "$PKG_CONFIG" && \
47625    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47626  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47627  ac_status=$?
47628  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47629  test $ac_status = 0; }; then
47630  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47631else
47632  pkg_failed=yes
47633fi
47634 else
47635    pkg_failed=untried
47636fi
47637
47638
47639
47640if test $pkg_failed = yes; then
47641
47642if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47643        _pkg_short_errors_supported=yes
47644else
47645        _pkg_short_errors_supported=no
47646fi
47647        if test $_pkg_short_errors_supported = yes; then
47648	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47649        else
47650	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47651        fi
47652	# Put the nasty error message in config.log where it belongs
47653	echo "$LIBFFI_PKG_ERRORS" >&5
47654
47655	as_fn_error $? "Package requirements (libffi) were not met:
47656
47657$LIBFFI_PKG_ERRORS
47658
47659Consider adjusting the PKG_CONFIG_PATH environment variable if you
47660installed software in a non-standard prefix.
47661
47662Alternatively, you may set the environment variables LIBFFI_CFLAGS
47663and LIBFFI_LIBS to avoid the need to call pkg-config.
47664See the pkg-config man page for more details.
47665" "$LINENO" 5
47666elif test $pkg_failed = untried; then
47667	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47669as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47670is in your PATH or set the PKG_CONFIG environment variable to the full
47671path to pkg-config.
47672
47673Alternatively, you may set the environment variables LIBFFI_CFLAGS
47674and LIBFFI_LIBS to avoid the need to call pkg-config.
47675See the pkg-config man page for more details.
47676
47677To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47678See \`config.log' for more details" "$LINENO" 5; }
47679else
47680	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47681	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47683$as_echo "yes" >&6; }
47684	:
47685fi
47686
47687  fi
47688
47689  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47690    # Extract the first word of "llvm-config", so it can be a program name with args.
47691set dummy llvm-config; ac_word=$2
47692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47693$as_echo_n "checking for $ac_word... " >&6; }
47694if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47695  $as_echo_n "(cached) " >&6
47696else
47697  if test -n "$LLVM_CONFIG"; then
47698  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47699else
47700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47701for as_dir in $PATH
47702do
47703  IFS=$as_save_IFS
47704  test -z "$as_dir" && as_dir=.
47705    for ac_exec_ext in '' $ac_executable_extensions; do
47706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47707    ac_cv_prog_LLVM_CONFIG="llvm-config"
47708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47709    break 2
47710  fi
47711done
47712  done
47713IFS=$as_save_IFS
47714
47715fi
47716fi
47717LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47718if test -n "$LLVM_CONFIG"; then
47719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47720$as_echo "$LLVM_CONFIG" >&6; }
47721else
47722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47723$as_echo "no" >&6; }
47724fi
47725
47726
47727
47728    if test "x$LLVM_CONFIG" != xllvm-config; then
47729      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47730    fi
47731
47732    llvm_components="jit mcjit engine nativecodegen native"
47733    unset LLVM_CFLAGS
47734    for flag in $("$LLVM_CONFIG" --cxxflags); do
47735      if echo "${flag}" | grep -q '^-[ID]'; then
47736        if test "${flag}" != "-D_DEBUG" ; then
47737          if test "${LLVM_CFLAGS}" != "" ; then
47738            LLVM_CFLAGS="${LLVM_CFLAGS} "
47739          fi
47740          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47741        fi
47742      fi
47743    done
47744    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47745    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47746
47747    unset LLVM_LDFLAGS
47748    for flag in $("${LLVM_CONFIG}" --ldflags); do
47749      if echo "${flag}" | grep -q '^-L'; then
47750        if test "${LLVM_LDFLAGS}" != ""; then
47751          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47752        fi
47753        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47754      fi
47755    done
47756
47757    unset LLVM_LIBS
47758    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47759      if echo "${flag}" | grep -q '^-l'; then
47760        if test "${LLVM_LIBS}" != ""; then
47761          LLVM_LIBS="${LLVM_LIBS} "
47762        fi
47763        LLVM_LIBS="${LLVM_LIBS}${flag}"
47764      fi
47765    done
47766
47767
47768
47769
47770  fi
47771
47772  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47773  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
47774    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47775  fi
47776
47777  # TODO better (platform agnostic) test
47778  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
47779    LIBCXX="-lstdc++"
47780  fi
47781
47782
47783
47784
47785
47786###############################################################################
47787#
47788# We need to do some final tweaking, when everything else is done.
47789#
47790###############################################################################
47791
47792
47793  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47794
47795
47796  # The name of the Service Agent jar.
47797  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47798  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47799    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47800  fi
47801
47802
47803
47804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47805$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47806
47807    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47808      ENABLE_INTREE_EC=yes
47809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47810$as_echo "yes" >&6; }
47811    else
47812      ENABLE_INTREE_EC=no
47813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47814$as_echo "no" >&6; }
47815    fi
47816
47817
47818
47819
47820###############################################################################
47821#
47822# Configure parts of the build that only affect the build performance,
47823# not the result.
47824#
47825###############################################################################
47826
47827
47828  # How many cores do we have on this build system?
47829
47830# Check whether --with-num-cores was given.
47831if test "${with_num_cores+set}" = set; then :
47832  withval=$with_num_cores;
47833fi
47834
47835  if test "x$with_num_cores" = x; then
47836    # The number of cores were not specified, try to probe them.
47837
47838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47839$as_echo_n "checking for number of cores... " >&6; }
47840  NUM_CORES=1
47841  FOUND_CORES=no
47842
47843  if test -f /proc/cpuinfo; then
47844    # Looks like a Linux (or cygwin) system
47845    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47846    FOUND_CORES=yes
47847  elif test -x /usr/sbin/psrinfo; then
47848    # Looks like a Solaris system
47849    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47850    FOUND_CORES=yes
47851  elif test -x /usr/sbin/system_profiler; then
47852    # Looks like a MacOSX system
47853    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47854    FOUND_CORES=yes
47855  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47856    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47857    FOUND_CORES=yes
47858  elif test -n "$NUMBER_OF_PROCESSORS"; then
47859    # On windows, look in the env
47860    NUM_CORES=$NUMBER_OF_PROCESSORS
47861    FOUND_CORES=yes
47862  fi
47863
47864  if test "x$FOUND_CORES" = xyes; then
47865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47866$as_echo "$NUM_CORES" >&6; }
47867  else
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47869$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47871$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47872  fi
47873
47874  else
47875    NUM_CORES=$with_num_cores
47876  fi
47877
47878
47879
47880  # How much memory do we have on this build system?
47881
47882# Check whether --with-memory-size was given.
47883if test "${with_memory_size+set}" = set; then :
47884  withval=$with_memory_size;
47885fi
47886
47887  if test "x$with_memory_size" = x; then
47888    # The memory size was not specified, try to probe it.
47889
47890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47891$as_echo_n "checking for memory size... " >&6; }
47892  # Default to 1024 MB
47893  MEMORY_SIZE=1024
47894  FOUND_MEM=no
47895
47896  if test -f /proc/meminfo; then
47897    # Looks like a Linux (or cygwin) system
47898    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47899    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47900    FOUND_MEM=yes
47901  elif test -x /usr/sbin/prtconf; then
47902    # Looks like a Solaris or AIX system
47903    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47904    FOUND_MEM=yes
47905  elif test -x /usr/sbin/system_profiler; then
47906    # Looks like a MacOSX system
47907    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47908    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47909    FOUND_MEM=yes
47910  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47911    # Windows, but without cygwin
47912    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47913    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47914    FOUND_MEM=yes
47915  fi
47916
47917  if test "x$FOUND_MEM" = xyes; then
47918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47919$as_echo "$MEMORY_SIZE MB" >&6; }
47920  else
47921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47922$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47924$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47925  fi
47926
47927  else
47928    MEMORY_SIZE=$with_memory_size
47929  fi
47930
47931
47932
47933  # Provide a decent default number of parallel jobs for make depending on
47934  # number of cores, amount of memory and machine architecture.
47935
47936# Check whether --with-jobs was given.
47937if test "${with_jobs+set}" = set; then :
47938  withval=$with_jobs;
47939fi
47940
47941  if test "x$with_jobs" = x; then
47942    # Number of jobs was not specified, calculate.
47943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47944$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47945    # Approximate memory in GB, rounding up a bit.
47946    memory_gb=`expr $MEMORY_SIZE / 1100`
47947    # Pick the lowest of memory in gb and number of cores.
47948    if test "$memory_gb" -lt "$NUM_CORES"; then
47949      JOBS="$memory_gb"
47950    else
47951      JOBS="$NUM_CORES"
47952      # On bigger machines, leave some room for other processes to run
47953      if test "$JOBS" -gt "4"; then
47954        JOBS=`expr $JOBS '*' 90 / 100`
47955      fi
47956    fi
47957    # Cap number of jobs to 16
47958    if test "$JOBS" -gt "16"; then
47959      JOBS=16
47960    fi
47961    if test "$JOBS" -eq "0"; then
47962      JOBS=1
47963    fi
47964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47965$as_echo "$JOBS" >&6; }
47966  else
47967    JOBS=$with_jobs
47968  fi
47969
47970
47971
47972# Setup smart javac (after cores and memory have been setup)
47973
47974
47975# Check whether --with-sjavac-server-java was given.
47976if test "${with_sjavac_server_java+set}" = set; then :
47977  withval=$with_sjavac_server_java;
47978fi
47979
47980
47981  if test "x$with_sjavac_server_java" != x; then
47982    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
47983    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
47984    if test "x$FOUND_VERSION" = x; then
47985      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
47986    fi
47987  else
47988    SJAVAC_SERVER_JAVA=""
47989    # Hotspot specific options.
47990
47991  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
47992  $ECHO "Command: $JAVA -verbosegc -version" >&5
47993  OUTPUT=`$JAVA -verbosegc -version 2>&1`
47994  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
47995  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
47996  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
47997    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
47998    JVM_ARG_OK=true
47999  else
48000    $ECHO "Arg failed:" >&5
48001    $ECHO "$OUTPUT" >&5
48002    JVM_ARG_OK=false
48003  fi
48004
48005    # JRockit specific options.
48006
48007  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48008  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48009  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48010  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48011  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48012  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48013    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48014    JVM_ARG_OK=true
48015  else
48016    $ECHO "Arg failed:" >&5
48017    $ECHO "$OUTPUT" >&5
48018    JVM_ARG_OK=false
48019  fi
48020
48021    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48022  fi
48023
48024
48025  if test "$MEMORY_SIZE" -gt "2500"; then
48026
48027  $ECHO "Check if jvm arg is ok: -d64" >&5
48028  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48029  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48030  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48031  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48032  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48033    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48034    JVM_ARG_OK=true
48035  else
48036    $ECHO "Arg failed:" >&5
48037    $ECHO "$OUTPUT" >&5
48038    JVM_ARG_OK=false
48039  fi
48040
48041    if test "$JVM_ARG_OK" = true; then
48042      JVM_64BIT=true
48043      JVM_ARG_OK=false
48044    fi
48045  fi
48046
48047  if test "$JVM_64BIT" = true; then
48048    if test "$MEMORY_SIZE" -gt "17000"; then
48049
48050  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48051  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48052  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48053  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48054  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48055  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48056    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48057    JVM_ARG_OK=true
48058  else
48059    $ECHO "Arg failed:" >&5
48060    $ECHO "$OUTPUT" >&5
48061    JVM_ARG_OK=false
48062  fi
48063
48064    fi
48065    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48066
48067  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48068  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48069  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48070  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48071  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48072  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48073    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48074    JVM_ARG_OK=true
48075  else
48076    $ECHO "Arg failed:" >&5
48077    $ECHO "$OUTPUT" >&5
48078    JVM_ARG_OK=false
48079  fi
48080
48081    fi
48082    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48083
48084  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48085  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48086  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48087  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48088  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48089  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48090    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48091    JVM_ARG_OK=true
48092  else
48093    $ECHO "Arg failed:" >&5
48094    $ECHO "$OUTPUT" >&5
48095    JVM_ARG_OK=false
48096  fi
48097
48098    fi
48099    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48100
48101  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48102  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48103  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48104  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48105  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48106  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48107    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48108    JVM_ARG_OK=true
48109  else
48110    $ECHO "Arg failed:" >&5
48111    $ECHO "$OUTPUT" >&5
48112    JVM_ARG_OK=false
48113  fi
48114
48115    fi
48116  fi
48117  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48118
48119  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48120  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48121  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48122  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48123  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48125    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48126    JVM_ARG_OK=true
48127  else
48128    $ECHO "Arg failed:" >&5
48129    $ECHO "$OUTPUT" >&5
48130    JVM_ARG_OK=false
48131  fi
48132
48133  fi
48134  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48135
48136  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48137  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48138  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48139  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48140  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48141  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48142    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48143    JVM_ARG_OK=true
48144  else
48145    $ECHO "Arg failed:" >&5
48146    $ECHO "$OUTPUT" >&5
48147    JVM_ARG_OK=false
48148  fi
48149
48150  fi
48151  if test "$JVM_ARG_OK" = false; then
48152
48153  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48154  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48155  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48156  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48157  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48158  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48159    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48160    JVM_ARG_OK=true
48161  else
48162    $ECHO "Arg failed:" >&5
48163    $ECHO "$OUTPUT" >&5
48164    JVM_ARG_OK=false
48165  fi
48166
48167  fi
48168
48169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48170$as_echo_n "checking whether to use sjavac... " >&6; }
48171  # Check whether --enable-sjavac was given.
48172if test "${enable_sjavac+set}" = set; then :
48173  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48174else
48175  ENABLE_SJAVAC='no'
48176fi
48177
48178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48179$as_echo "$ENABLE_SJAVAC" >&6; }
48180
48181
48182  if test "x$ENABLE_SJAVAC" = xyes; then
48183    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48184  else
48185    SJAVAC_SERVER_DIR=
48186  fi
48187
48188
48189
48190# Can the C/C++ compiler use precompiled headers?
48191
48192
48193  ###############################################################################
48194  #
48195  # Can the C/C++ compiler use precompiled headers?
48196  #
48197  # Check whether --enable-precompiled-headers was given.
48198if test "${enable_precompiled_headers+set}" = set; then :
48199  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48200else
48201  ENABLE_PRECOMPH=yes
48202fi
48203
48204
48205  USE_PRECOMPILED_HEADER=1
48206  if test "x$ENABLE_PRECOMPH" = xno; then
48207    USE_PRECOMPILED_HEADER=0
48208  fi
48209
48210  if test "x$ENABLE_PRECOMPH" = xyes; then
48211    # Check that the compiler actually supports precomp headers.
48212    if test "x$GCC" = xyes; then
48213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48214$as_echo_n "checking that precompiled headers work... " >&6; }
48215      echo "int alfa();" > conftest.h
48216      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48217      if test ! -f conftest.hpp.gch; then
48218        USE_PRECOMPILED_HEADER=0
48219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48220$as_echo "no" >&6; }
48221      else
48222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48223$as_echo "yes" >&6; }
48224      fi
48225      rm -f conftest.h conftest.hpp.gch
48226    fi
48227  fi
48228
48229
48230
48231
48232# Setup use of ccache, if available
48233
48234  # Check whether --enable-ccache was given.
48235if test "${enable_ccache+set}" = set; then :
48236  enableval=$enable_ccache;
48237fi
48238
48239
48240  CCACHE=
48241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48242$as_echo_n "checking is ccache enabled... " >&6; }
48243  ENABLE_CCACHE=$enable_ccache
48244  if test "x$enable_ccache" = xyes; then
48245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48246$as_echo "yes" >&6; }
48247    OLD_PATH="$PATH"
48248    if test "x$TOOLS_DIR" != x; then
48249      PATH=$TOOLS_DIR:$PATH
48250    fi
48251
48252
48253
48254  # Publish this variable in the help.
48255
48256
48257  if test "x$CCACHE" = x; then
48258    # The variable is not set by user, try to locate tool using the code snippet
48259    for ac_prog in ccache
48260do
48261  # Extract the first word of "$ac_prog", so it can be a program name with args.
48262set dummy $ac_prog; ac_word=$2
48263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48264$as_echo_n "checking for $ac_word... " >&6; }
48265if ${ac_cv_path_CCACHE+:} false; then :
48266  $as_echo_n "(cached) " >&6
48267else
48268  case $CCACHE in
48269  [\\/]* | ?:[\\/]*)
48270  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48271  ;;
48272  *)
48273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48274for as_dir in $PATH
48275do
48276  IFS=$as_save_IFS
48277  test -z "$as_dir" && as_dir=.
48278    for ac_exec_ext in '' $ac_executable_extensions; do
48279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48280    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48282    break 2
48283  fi
48284done
48285  done
48286IFS=$as_save_IFS
48287
48288  ;;
48289esac
48290fi
48291CCACHE=$ac_cv_path_CCACHE
48292if test -n "$CCACHE"; then
48293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48294$as_echo "$CCACHE" >&6; }
48295else
48296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48297$as_echo "no" >&6; }
48298fi
48299
48300
48301  test -n "$CCACHE" && break
48302done
48303
48304  else
48305    # The variable is set, but is it from the command line or the environment?
48306
48307    # Try to remove the string !CCACHE! from our list.
48308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48310      # If it failed, the variable was not from the command line. Ignore it,
48311      # but warn the user (except for BASH, which is always set by the calling BASH).
48312      if test "xCCACHE" != xBASH; then
48313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48314$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48315      fi
48316      # Try to locate tool using the code snippet
48317      for ac_prog in ccache
48318do
48319  # Extract the first word of "$ac_prog", so it can be a program name with args.
48320set dummy $ac_prog; ac_word=$2
48321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48322$as_echo_n "checking for $ac_word... " >&6; }
48323if ${ac_cv_path_CCACHE+:} false; then :
48324  $as_echo_n "(cached) " >&6
48325else
48326  case $CCACHE in
48327  [\\/]* | ?:[\\/]*)
48328  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48329  ;;
48330  *)
48331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48332for as_dir in $PATH
48333do
48334  IFS=$as_save_IFS
48335  test -z "$as_dir" && as_dir=.
48336    for ac_exec_ext in '' $ac_executable_extensions; do
48337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48338    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48340    break 2
48341  fi
48342done
48343  done
48344IFS=$as_save_IFS
48345
48346  ;;
48347esac
48348fi
48349CCACHE=$ac_cv_path_CCACHE
48350if test -n "$CCACHE"; then
48351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48352$as_echo "$CCACHE" >&6; }
48353else
48354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48355$as_echo "no" >&6; }
48356fi
48357
48358
48359  test -n "$CCACHE" && break
48360done
48361
48362    else
48363      # If it succeeded, then it was overridden by the user. We will use it
48364      # for the tool.
48365
48366      # First remove it from the list of overridden variables, so we can test
48367      # for unknown variables in the end.
48368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48369
48370      # Check if the provided tool contains a complete path.
48371      tool_specified="$CCACHE"
48372      tool_basename="${tool_specified##*/}"
48373      if test "x$tool_basename" = "x$tool_specified"; then
48374        # A command without a complete path is provided, search $PATH.
48375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48376$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48377        # Extract the first word of "$tool_basename", so it can be a program name with args.
48378set dummy $tool_basename; ac_word=$2
48379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48380$as_echo_n "checking for $ac_word... " >&6; }
48381if ${ac_cv_path_CCACHE+:} false; then :
48382  $as_echo_n "(cached) " >&6
48383else
48384  case $CCACHE in
48385  [\\/]* | ?:[\\/]*)
48386  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48387  ;;
48388  *)
48389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48390for as_dir in $PATH
48391do
48392  IFS=$as_save_IFS
48393  test -z "$as_dir" && as_dir=.
48394    for ac_exec_ext in '' $ac_executable_extensions; do
48395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48396    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48398    break 2
48399  fi
48400done
48401  done
48402IFS=$as_save_IFS
48403
48404  ;;
48405esac
48406fi
48407CCACHE=$ac_cv_path_CCACHE
48408if test -n "$CCACHE"; then
48409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48410$as_echo "$CCACHE" >&6; }
48411else
48412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48413$as_echo "no" >&6; }
48414fi
48415
48416
48417        if test "x$CCACHE" = x; then
48418          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48419        fi
48420      else
48421        # Otherwise we believe it is a complete path. Use it as it is.
48422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48423$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48425$as_echo_n "checking for CCACHE... " >&6; }
48426        if test ! -x "$tool_specified"; then
48427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48428$as_echo "not found" >&6; }
48429          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48430        fi
48431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48432$as_echo "$tool_specified" >&6; }
48433      fi
48434    fi
48435  fi
48436
48437
48438
48439  if test "x$CCACHE" = x; then
48440    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48441  fi
48442
48443
48444    CCACHE_STATUS="enabled"
48445    PATH="$OLD_PATH"
48446  elif test "x$enable_ccache" = xno; then
48447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48448$as_echo "no, explicitly disabled" >&6; }
48449  elif test "x$enable_ccache" = x; then
48450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48451$as_echo "no" >&6; }
48452  else
48453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48454$as_echo "unknown" >&6; }
48455    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48456  fi
48457
48458
48459
48460# Check whether --with-ccache-dir was given.
48461if test "${with_ccache_dir+set}" = set; then :
48462  withval=$with_ccache_dir;
48463fi
48464
48465
48466  if test "x$with_ccache_dir" != x; then
48467    # When using a non home ccache directory, assume the use is to share ccache files
48468    # with other users. Thus change the umask.
48469    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48470    if test "x$CCACHE" = x; then
48471      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48472$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48473    fi
48474  fi
48475
48476  if test "x$CCACHE" != x; then
48477
48478  if test "x$CCACHE" != x; then
48479    # Only use ccache if it is 3.1.4 or later, which supports
48480    # precompiled headers.
48481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48482$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48483    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48484    if test "x$HAS_GOOD_CCACHE" = x; then
48485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48486$as_echo "no, disabling ccache" >&6; }
48487      CCACHE=
48488      CCACHE_STATUS="disabled"
48489    else
48490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48491$as_echo "yes" >&6; }
48492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48493$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48494      PUSHED_FLAGS="$CXXFLAGS"
48495      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48496      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48497/* end confdefs.h.  */
48498
48499int
48500main ()
48501{
48502
48503  ;
48504  return 0;
48505}
48506_ACEOF
48507if ac_fn_cxx_try_compile "$LINENO"; then :
48508  CC_KNOWS_CCACHE_TRICK=yes
48509else
48510  CC_KNOWS_CCACHE_TRICK=no
48511fi
48512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48513      CXXFLAGS="$PUSHED_FLAGS"
48514      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48516$as_echo "yes" >&6; }
48517      else
48518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48519$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48520        CCACHE=
48521        CCACHE_STATUS="disabled"
48522      fi
48523    fi
48524  fi
48525
48526  if test "x$CCACHE" != x; then
48527    CCACHE_SLOPPINESS=time_macros
48528    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48529    CCACHE_FLAGS=-fpch-preprocess
48530
48531    if test "x$SET_CCACHE_DIR" != x; then
48532      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48533      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48534    fi
48535  fi
48536
48537  fi
48538
48539
48540###############################################################################
48541#
48542# And now the finish...
48543#
48544###############################################################################
48545
48546# Check for some common pitfalls
48547
48548  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48549    file_to_test="$SRC_ROOT/LICENSE"
48550    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48551      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
48552    fi
48553  fi
48554
48555
48556  # Did user specify any unknown variables?
48557
48558  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48559    # Replace the separating ! with spaces before presenting for end user.
48560    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48561    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48562$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48563  fi
48564
48565
48566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48567$as_echo_n "checking if build directory is on local disk... " >&6; }
48568
48569  # df -l lists only local disks; if the given directory is not found then
48570  # a non-zero exit code is given
48571  if test "x$DF" = x; then
48572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48573      # msys does not have df; use Windows "net use" instead.
48574      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48575      if test "x$IS_NETWORK_DISK" = x; then
48576        OUTPUT_DIR_IS_LOCAL="yes"
48577      else
48578        OUTPUT_DIR_IS_LOCAL="no"
48579      fi
48580    else
48581      # No df here, say it's local
48582      OUTPUT_DIR_IS_LOCAL="yes"
48583    fi
48584  else
48585    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48586      OUTPUT_DIR_IS_LOCAL="yes"
48587    else
48588      OUTPUT_DIR_IS_LOCAL="no"
48589    fi
48590  fi
48591
48592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48593$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48594
48595
48596
48597  # Check if the user has any old-style ALT_ variables set.
48598  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48599
48600  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48601  # Since we can't properly handle the dependencies for this, warn the user about the situation
48602  if test -e $OUTPUT_ROOT/spec.gmk; then
48603    IS_RECONFIGURE=yes
48604  else
48605    IS_RECONFIGURE=no
48606  fi
48607
48608
48609# At the end, call the custom hook. (Dummy macro if no custom sources available)
48610
48611
48612# We're messing a bit with internal autoconf variables to put the config.status
48613# in the output directory instead of the current directory.
48614CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48615
48616# Create the actual output files. Now the main work of configure is done.
48617cat >confcache <<\_ACEOF
48618# This file is a shell script that caches the results of configure
48619# tests run on this system so they can be shared between configure
48620# scripts and configure runs, see configure's option --config-cache.
48621# It is not useful on other systems.  If it contains results you don't
48622# want to keep, you may remove or edit it.
48623#
48624# config.status only pays attention to the cache file if you give it
48625# the --recheck option to rerun configure.
48626#
48627# `ac_cv_env_foo' variables (set or unset) will be overridden when
48628# loading this file, other *unset* `ac_cv_foo' will be assigned the
48629# following values.
48630
48631_ACEOF
48632
48633# The following way of writing the cache mishandles newlines in values,
48634# but we know of no workaround that is simple, portable, and efficient.
48635# So, we kill variables containing newlines.
48636# Ultrix sh set writes to stderr and can't be redirected directly,
48637# and sets the high bit in the cache file unless we assign to the vars.
48638(
48639  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48640    eval ac_val=\$$ac_var
48641    case $ac_val in #(
48642    *${as_nl}*)
48643      case $ac_var in #(
48644      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48645$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48646      esac
48647      case $ac_var in #(
48648      _ | IFS | as_nl) ;; #(
48649      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48650      *) { eval $ac_var=; unset $ac_var;} ;;
48651      esac ;;
48652    esac
48653  done
48654
48655  (set) 2>&1 |
48656    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48657    *${as_nl}ac_space=\ *)
48658      # `set' does not quote correctly, so add quotes: double-quote
48659      # substitution turns \\\\ into \\, and sed turns \\ into \.
48660      sed -n \
48661	"s/'/'\\\\''/g;
48662	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48663      ;; #(
48664    *)
48665      # `set' quotes correctly as required by POSIX, so do not add quotes.
48666      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48667      ;;
48668    esac |
48669    sort
48670) |
48671  sed '
48672     /^ac_cv_env_/b end
48673     t clear
48674     :clear
48675     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48676     t end
48677     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48678     :end' >>confcache
48679if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48680  if test -w "$cache_file"; then
48681    if test "x$cache_file" != "x/dev/null"; then
48682      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48683$as_echo "$as_me: updating cache $cache_file" >&6;}
48684      if test ! -f "$cache_file" || test -h "$cache_file"; then
48685	cat confcache >"$cache_file"
48686      else
48687        case $cache_file in #(
48688        */* | ?:*)
48689	  mv -f confcache "$cache_file"$$ &&
48690	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48691        *)
48692	  mv -f confcache "$cache_file" ;;
48693	esac
48694      fi
48695    fi
48696  else
48697    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48698$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48699  fi
48700fi
48701rm -f confcache
48702
48703test "x$prefix" = xNONE && prefix=$ac_default_prefix
48704# Let make expand exec_prefix.
48705test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48706
48707DEFS=-DHAVE_CONFIG_H
48708
48709ac_libobjs=
48710ac_ltlibobjs=
48711U=
48712for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48713  # 1. Remove the extension, and $U if already installed.
48714  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48715  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48716  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48717  #    will be set to the directory where LIBOBJS objects are built.
48718  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48719  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48720done
48721LIBOBJS=$ac_libobjs
48722
48723LTLIBOBJS=$ac_ltlibobjs
48724
48725
48726
48727: "${CONFIG_STATUS=./config.status}"
48728ac_write_fail=0
48729ac_clean_files_save=$ac_clean_files
48730ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48731{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48732$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48733as_write_fail=0
48734cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48735#! $SHELL
48736# Generated by $as_me.
48737# Run this file to recreate the current configuration.
48738# Compiler output produced by configure, useful for debugging
48739# configure, is in config.log if it exists.
48740
48741debug=false
48742ac_cs_recheck=false
48743ac_cs_silent=false
48744
48745SHELL=\${CONFIG_SHELL-$SHELL}
48746export SHELL
48747_ASEOF
48748cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48749## -------------------- ##
48750## M4sh Initialization. ##
48751## -------------------- ##
48752
48753# Be more Bourne compatible
48754DUALCASE=1; export DUALCASE # for MKS sh
48755if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48756  emulate sh
48757  NULLCMD=:
48758  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48759  # is contrary to our usage.  Disable this feature.
48760  alias -g '${1+"$@"}'='"$@"'
48761  setopt NO_GLOB_SUBST
48762else
48763  case `(set -o) 2>/dev/null` in #(
48764  *posix*) :
48765    set -o posix ;; #(
48766  *) :
48767     ;;
48768esac
48769fi
48770
48771
48772as_nl='
48773'
48774export as_nl
48775# Printing a long string crashes Solaris 7 /usr/bin/printf.
48776as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48777as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48778as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48779# Prefer a ksh shell builtin over an external printf program on Solaris,
48780# but without wasting forks for bash or zsh.
48781if test -z "$BASH_VERSION$ZSH_VERSION" \
48782    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48783  as_echo='print -r --'
48784  as_echo_n='print -rn --'
48785elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48786  as_echo='printf %s\n'
48787  as_echo_n='printf %s'
48788else
48789  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48790    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48791    as_echo_n='/usr/ucb/echo -n'
48792  else
48793    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48794    as_echo_n_body='eval
48795      arg=$1;
48796      case $arg in #(
48797      *"$as_nl"*)
48798	expr "X$arg" : "X\\(.*\\)$as_nl";
48799	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48800      esac;
48801      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48802    '
48803    export as_echo_n_body
48804    as_echo_n='sh -c $as_echo_n_body as_echo'
48805  fi
48806  export as_echo_body
48807  as_echo='sh -c $as_echo_body as_echo'
48808fi
48809
48810# The user is always right.
48811if test "${PATH_SEPARATOR+set}" != set; then
48812  PATH_SEPARATOR=:
48813  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48814    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48815      PATH_SEPARATOR=';'
48816  }
48817fi
48818
48819
48820# IFS
48821# We need space, tab and new line, in precisely that order.  Quoting is
48822# there to prevent editors from complaining about space-tab.
48823# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48824# splitting by setting IFS to empty value.)
48825IFS=" ""	$as_nl"
48826
48827# Find who we are.  Look in the path if we contain no directory separator.
48828as_myself=
48829case $0 in #((
48830  *[\\/]* ) as_myself=$0 ;;
48831  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48832for as_dir in $PATH
48833do
48834  IFS=$as_save_IFS
48835  test -z "$as_dir" && as_dir=.
48836    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48837  done
48838IFS=$as_save_IFS
48839
48840     ;;
48841esac
48842# We did not find ourselves, most probably we were run as `sh COMMAND'
48843# in which case we are not to be found in the path.
48844if test "x$as_myself" = x; then
48845  as_myself=$0
48846fi
48847if test ! -f "$as_myself"; then
48848  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48849  exit 1
48850fi
48851
48852# Unset variables that we do not need and which cause bugs (e.g. in
48853# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48854# suppresses any "Segmentation fault" message there.  '((' could
48855# trigger a bug in pdksh 5.2.14.
48856for as_var in BASH_ENV ENV MAIL MAILPATH
48857do eval test x\${$as_var+set} = xset \
48858  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48859done
48860PS1='$ '
48861PS2='> '
48862PS4='+ '
48863
48864# NLS nuisances.
48865LC_ALL=C
48866export LC_ALL
48867LANGUAGE=C
48868export LANGUAGE
48869
48870# CDPATH.
48871(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48872
48873
48874# as_fn_error STATUS ERROR [LINENO LOG_FD]
48875# ----------------------------------------
48876# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48877# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48878# script with STATUS, using 1 if that was 0.
48879as_fn_error ()
48880{
48881  as_status=$1; test $as_status -eq 0 && as_status=1
48882  if test "$4"; then
48883    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48884    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48885  fi
48886  $as_echo "$as_me: error: $2" >&2
48887  as_fn_exit $as_status
48888} # as_fn_error
48889
48890
48891# as_fn_set_status STATUS
48892# -----------------------
48893# Set $? to STATUS, without forking.
48894as_fn_set_status ()
48895{
48896  return $1
48897} # as_fn_set_status
48898
48899# as_fn_exit STATUS
48900# -----------------
48901# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48902as_fn_exit ()
48903{
48904  set +e
48905  as_fn_set_status $1
48906  exit $1
48907} # as_fn_exit
48908
48909# as_fn_unset VAR
48910# ---------------
48911# Portably unset VAR.
48912as_fn_unset ()
48913{
48914  { eval $1=; unset $1;}
48915}
48916as_unset=as_fn_unset
48917# as_fn_append VAR VALUE
48918# ----------------------
48919# Append the text in VALUE to the end of the definition contained in VAR. Take
48920# advantage of any shell optimizations that allow amortized linear growth over
48921# repeated appends, instead of the typical quadratic growth present in naive
48922# implementations.
48923if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48924  eval 'as_fn_append ()
48925  {
48926    eval $1+=\$2
48927  }'
48928else
48929  as_fn_append ()
48930  {
48931    eval $1=\$$1\$2
48932  }
48933fi # as_fn_append
48934
48935# as_fn_arith ARG...
48936# ------------------
48937# Perform arithmetic evaluation on the ARGs, and store the result in the
48938# global $as_val. Take advantage of shells that can avoid forks. The arguments
48939# must be portable across $(()) and expr.
48940if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48941  eval 'as_fn_arith ()
48942  {
48943    as_val=$(( $* ))
48944  }'
48945else
48946  as_fn_arith ()
48947  {
48948    as_val=`expr "$@" || test $? -eq 1`
48949  }
48950fi # as_fn_arith
48951
48952
48953if expr a : '\(a\)' >/dev/null 2>&1 &&
48954   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48955  as_expr=expr
48956else
48957  as_expr=false
48958fi
48959
48960if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48961  as_basename=basename
48962else
48963  as_basename=false
48964fi
48965
48966if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48967  as_dirname=dirname
48968else
48969  as_dirname=false
48970fi
48971
48972as_me=`$as_basename -- "$0" ||
48973$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48974	 X"$0" : 'X\(//\)$' \| \
48975	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48976$as_echo X/"$0" |
48977    sed '/^.*\/\([^/][^/]*\)\/*$/{
48978	    s//\1/
48979	    q
48980	  }
48981	  /^X\/\(\/\/\)$/{
48982	    s//\1/
48983	    q
48984	  }
48985	  /^X\/\(\/\).*/{
48986	    s//\1/
48987	    q
48988	  }
48989	  s/.*/./; q'`
48990
48991# Avoid depending upon Character Ranges.
48992as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48993as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48994as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48995as_cr_digits='0123456789'
48996as_cr_alnum=$as_cr_Letters$as_cr_digits
48997
48998ECHO_C= ECHO_N= ECHO_T=
48999case `echo -n x` in #(((((
49000-n*)
49001  case `echo 'xy\c'` in
49002  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49003  xy)  ECHO_C='\c';;
49004  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49005       ECHO_T='	';;
49006  esac;;
49007*)
49008  ECHO_N='-n';;
49009esac
49010
49011rm -f conf$$ conf$$.exe conf$$.file
49012if test -d conf$$.dir; then
49013  rm -f conf$$.dir/conf$$.file
49014else
49015  rm -f conf$$.dir
49016  mkdir conf$$.dir 2>/dev/null
49017fi
49018if (echo >conf$$.file) 2>/dev/null; then
49019  if ln -s conf$$.file conf$$ 2>/dev/null; then
49020    as_ln_s='ln -s'
49021    # ... but there are two gotchas:
49022    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49023    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49024    # In both cases, we have to default to `cp -pR'.
49025    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49026      as_ln_s='cp -pR'
49027  elif ln conf$$.file conf$$ 2>/dev/null; then
49028    as_ln_s=ln
49029  else
49030    as_ln_s='cp -pR'
49031  fi
49032else
49033  as_ln_s='cp -pR'
49034fi
49035rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49036rmdir conf$$.dir 2>/dev/null
49037
49038
49039# as_fn_mkdir_p
49040# -------------
49041# Create "$as_dir" as a directory, including parents if necessary.
49042as_fn_mkdir_p ()
49043{
49044
49045  case $as_dir in #(
49046  -*) as_dir=./$as_dir;;
49047  esac
49048  test -d "$as_dir" || eval $as_mkdir_p || {
49049    as_dirs=
49050    while :; do
49051      case $as_dir in #(
49052      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49053      *) as_qdir=$as_dir;;
49054      esac
49055      as_dirs="'$as_qdir' $as_dirs"
49056      as_dir=`$as_dirname -- "$as_dir" ||
49057$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49058	 X"$as_dir" : 'X\(//\)[^/]' \| \
49059	 X"$as_dir" : 'X\(//\)$' \| \
49060	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49061$as_echo X"$as_dir" |
49062    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49063	    s//\1/
49064	    q
49065	  }
49066	  /^X\(\/\/\)[^/].*/{
49067	    s//\1/
49068	    q
49069	  }
49070	  /^X\(\/\/\)$/{
49071	    s//\1/
49072	    q
49073	  }
49074	  /^X\(\/\).*/{
49075	    s//\1/
49076	    q
49077	  }
49078	  s/.*/./; q'`
49079      test -d "$as_dir" && break
49080    done
49081    test -z "$as_dirs" || eval "mkdir $as_dirs"
49082  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49083
49084
49085} # as_fn_mkdir_p
49086if mkdir -p . 2>/dev/null; then
49087  as_mkdir_p='mkdir -p "$as_dir"'
49088else
49089  test -d ./-p && rmdir ./-p
49090  as_mkdir_p=false
49091fi
49092
49093
49094# as_fn_executable_p FILE
49095# -----------------------
49096# Test if FILE is an executable regular file.
49097as_fn_executable_p ()
49098{
49099  test -f "$1" && test -x "$1"
49100} # as_fn_executable_p
49101as_test_x='test -x'
49102as_executable_p=as_fn_executable_p
49103
49104# Sed expression to map a string onto a valid CPP name.
49105as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49106
49107# Sed expression to map a string onto a valid variable name.
49108as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49109
49110
49111exec 6>&1
49112## ----------------------------------- ##
49113## Main body of $CONFIG_STATUS script. ##
49114## ----------------------------------- ##
49115_ASEOF
49116test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49117
49118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49119# Save the log message, to keep $0 and so on meaningful, and to
49120# report actual input values of CONFIG_FILES etc. instead of their
49121# values after options handling.
49122ac_log="
49123This file was extended by OpenJDK $as_me jdk8, which was
49124generated by GNU Autoconf 2.69.  Invocation command line was
49125
49126  CONFIG_FILES    = $CONFIG_FILES
49127  CONFIG_HEADERS  = $CONFIG_HEADERS
49128  CONFIG_LINKS    = $CONFIG_LINKS
49129  CONFIG_COMMANDS = $CONFIG_COMMANDS
49130  $ $0 $@
49131
49132on `(hostname || uname -n) 2>/dev/null | sed 1q`
49133"
49134
49135_ACEOF
49136
49137case $ac_config_files in *"
49138"*) set x $ac_config_files; shift; ac_config_files=$*;;
49139esac
49140
49141case $ac_config_headers in *"
49142"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49143esac
49144
49145
49146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49147# Files that config.status was made for.
49148config_files="$ac_config_files"
49149config_headers="$ac_config_headers"
49150
49151_ACEOF
49152
49153cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49154ac_cs_usage="\
49155\`$as_me' instantiates files and other configuration actions
49156from templates according to the current configuration.  Unless the files
49157and actions are specified as TAGs, all are instantiated by default.
49158
49159Usage: $0 [OPTION]... [TAG]...
49160
49161  -h, --help       print this help, then exit
49162  -V, --version    print version number and configuration settings, then exit
49163      --config     print configuration, then exit
49164  -q, --quiet, --silent
49165                   do not print progress messages
49166  -d, --debug      don't remove temporary files
49167      --recheck    update $as_me by reconfiguring in the same conditions
49168      --file=FILE[:TEMPLATE]
49169                   instantiate the configuration file FILE
49170      --header=FILE[:TEMPLATE]
49171                   instantiate the configuration header FILE
49172
49173Configuration files:
49174$config_files
49175
49176Configuration headers:
49177$config_headers
49178
49179Report bugs to <build-dev@openjdk.java.net>.
49180OpenJDK home page: <http://openjdk.java.net>."
49181
49182_ACEOF
49183cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49184ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49185ac_cs_version="\\
49186OpenJDK config.status jdk8
49187configured by $0, generated by GNU Autoconf 2.69,
49188  with options \\"\$ac_cs_config\\"
49189
49190Copyright (C) 2012 Free Software Foundation, Inc.
49191This config.status script is free software; the Free Software Foundation
49192gives unlimited permission to copy, distribute and modify it."
49193
49194ac_pwd='$ac_pwd'
49195srcdir='$srcdir'
49196AWK='$AWK'
49197test -n "\$AWK" || AWK=awk
49198_ACEOF
49199
49200cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49201# The default lists apply if the user does not specify any file.
49202ac_need_defaults=:
49203while test $# != 0
49204do
49205  case $1 in
49206  --*=?*)
49207    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49208    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49209    ac_shift=:
49210    ;;
49211  --*=)
49212    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49213    ac_optarg=
49214    ac_shift=:
49215    ;;
49216  *)
49217    ac_option=$1
49218    ac_optarg=$2
49219    ac_shift=shift
49220    ;;
49221  esac
49222
49223  case $ac_option in
49224  # Handling of the options.
49225  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49226    ac_cs_recheck=: ;;
49227  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49228    $as_echo "$ac_cs_version"; exit ;;
49229  --config | --confi | --conf | --con | --co | --c )
49230    $as_echo "$ac_cs_config"; exit ;;
49231  --debug | --debu | --deb | --de | --d | -d )
49232    debug=: ;;
49233  --file | --fil | --fi | --f )
49234    $ac_shift
49235    case $ac_optarg in
49236    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49237    '') as_fn_error $? "missing file argument" ;;
49238    esac
49239    as_fn_append CONFIG_FILES " '$ac_optarg'"
49240    ac_need_defaults=false;;
49241  --header | --heade | --head | --hea )
49242    $ac_shift
49243    case $ac_optarg in
49244    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49245    esac
49246    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49247    ac_need_defaults=false;;
49248  --he | --h)
49249    # Conflict between --help and --header
49250    as_fn_error $? "ambiguous option: \`$1'
49251Try \`$0 --help' for more information.";;
49252  --help | --hel | -h )
49253    $as_echo "$ac_cs_usage"; exit ;;
49254  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49255  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49256    ac_cs_silent=: ;;
49257
49258  # This is an error.
49259  -*) as_fn_error $? "unrecognized option: \`$1'
49260Try \`$0 --help' for more information." ;;
49261
49262  *) as_fn_append ac_config_targets " $1"
49263     ac_need_defaults=false ;;
49264
49265  esac
49266  shift
49267done
49268
49269ac_configure_extra_args=
49270
49271if $ac_cs_silent; then
49272  exec 6>/dev/null
49273  ac_configure_extra_args="$ac_configure_extra_args --silent"
49274fi
49275
49276_ACEOF
49277cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49278if \$ac_cs_recheck; then
49279  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49280  shift
49281  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49282  CONFIG_SHELL='$SHELL'
49283  export CONFIG_SHELL
49284  exec "\$@"
49285fi
49286
49287_ACEOF
49288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49289exec 5>>config.log
49290{
49291  echo
49292  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49293## Running $as_me. ##
49294_ASBOX
49295  $as_echo "$ac_log"
49296} >&5
49297
49298_ACEOF
49299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49300_ACEOF
49301
49302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49303
49304# Handling of arguments.
49305for ac_config_target in $ac_config_targets
49306do
49307  case $ac_config_target in
49308    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49309    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49310    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49311    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49312    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49313    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49314    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49315
49316  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49317  esac
49318done
49319
49320
49321# If the user did not use the arguments to specify the items to instantiate,
49322# then the envvar interface is used.  Set only those that are not.
49323# We use the long form for the default assignment because of an extremely
49324# bizarre bug on SunOS 4.1.3.
49325if $ac_need_defaults; then
49326  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49327  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49328fi
49329
49330# Have a temporary directory for convenience.  Make it in the build tree
49331# simply because there is no reason against having it here, and in addition,
49332# creating and moving files from /tmp can sometimes cause problems.
49333# Hook for its removal unless debugging.
49334# Note that there is a small window in which the directory will not be cleaned:
49335# after its creation but before its name has been assigned to `$tmp'.
49336$debug ||
49337{
49338  tmp= ac_tmp=
49339  trap 'exit_status=$?
49340  : "${ac_tmp:=$tmp}"
49341  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49342' 0
49343  trap 'as_fn_exit 1' 1 2 13 15
49344}
49345# Create a (secure) tmp directory for tmp files.
49346
49347{
49348  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49349  test -d "$tmp"
49350}  ||
49351{
49352  tmp=./conf$$-$RANDOM
49353  (umask 077 && mkdir "$tmp")
49354} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49355ac_tmp=$tmp
49356
49357# Set up the scripts for CONFIG_FILES section.
49358# No need to generate them if there are no CONFIG_FILES.
49359# This happens for instance with `./config.status config.h'.
49360if test -n "$CONFIG_FILES"; then
49361
49362
49363ac_cr=`echo X | tr X '\015'`
49364# On cygwin, bash can eat \r inside `` if the user requested igncr.
49365# But we know of no other shell where ac_cr would be empty at this
49366# point, so we can use a bashism as a fallback.
49367if test "x$ac_cr" = x; then
49368  eval ac_cr=\$\'\\r\'
49369fi
49370ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49371if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49372  ac_cs_awk_cr='\\r'
49373else
49374  ac_cs_awk_cr=$ac_cr
49375fi
49376
49377echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49378_ACEOF
49379
49380
49381{
49382  echo "cat >conf$$subs.awk <<_ACEOF" &&
49383  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49384  echo "_ACEOF"
49385} >conf$$subs.sh ||
49386  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49387ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49388ac_delim='%!_!# '
49389for ac_last_try in false false false false false :; do
49390  . ./conf$$subs.sh ||
49391    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49392
49393  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49394  if test $ac_delim_n = $ac_delim_num; then
49395    break
49396  elif $ac_last_try; then
49397    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49398  else
49399    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49400  fi
49401done
49402rm -f conf$$subs.sh
49403
49404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49405cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49406_ACEOF
49407sed -n '
49408h
49409s/^/S["/; s/!.*/"]=/
49410p
49411g
49412s/^[^!]*!//
49413:repl
49414t repl
49415s/'"$ac_delim"'$//
49416t delim
49417:nl
49418h
49419s/\(.\{148\}\)..*/\1/
49420t more1
49421s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49422p
49423n
49424b repl
49425:more1
49426s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49427p
49428g
49429s/.\{148\}//
49430t nl
49431:delim
49432h
49433s/\(.\{148\}\)..*/\1/
49434t more2
49435s/["\\]/\\&/g; s/^/"/; s/$/"/
49436p
49437b
49438:more2
49439s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49440p
49441g
49442s/.\{148\}//
49443t delim
49444' <conf$$subs.awk | sed '
49445/^[^""]/{
49446  N
49447  s/\n//
49448}
49449' >>$CONFIG_STATUS || ac_write_fail=1
49450rm -f conf$$subs.awk
49451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49452_ACAWK
49453cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49454  for (key in S) S_is_set[key] = 1
49455  FS = ""
49456
49457}
49458{
49459  line = $ 0
49460  nfields = split(line, field, "@")
49461  substed = 0
49462  len = length(field[1])
49463  for (i = 2; i < nfields; i++) {
49464    key = field[i]
49465    keylen = length(key)
49466    if (S_is_set[key]) {
49467      value = S[key]
49468      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49469      len += length(value) + length(field[++i])
49470      substed = 1
49471    } else
49472      len += 1 + keylen
49473  }
49474
49475  print line
49476}
49477
49478_ACAWK
49479_ACEOF
49480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49481if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49482  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49483else
49484  cat
49485fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49486  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49487_ACEOF
49488
49489# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49490# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49491# trailing colons and then remove the whole line if VPATH becomes empty
49492# (actually we leave an empty line to preserve line numbers).
49493if test "x$srcdir" = x.; then
49494  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49495h
49496s///
49497s/^/:/
49498s/[	 ]*$/:/
49499s/:\$(srcdir):/:/g
49500s/:\${srcdir}:/:/g
49501s/:@srcdir@:/:/g
49502s/^:*//
49503s/:*$//
49504x
49505s/\(=[	 ]*\).*/\1/
49506G
49507s/\n//
49508s/^[^=]*=[	 ]*$//
49509}'
49510fi
49511
49512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49513fi # test -n "$CONFIG_FILES"
49514
49515# Set up the scripts for CONFIG_HEADERS section.
49516# No need to generate them if there are no CONFIG_HEADERS.
49517# This happens for instance with `./config.status Makefile'.
49518if test -n "$CONFIG_HEADERS"; then
49519cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49520BEGIN {
49521_ACEOF
49522
49523# Transform confdefs.h into an awk script `defines.awk', embedded as
49524# here-document in config.status, that substitutes the proper values into
49525# config.h.in to produce config.h.
49526
49527# Create a delimiter string that does not exist in confdefs.h, to ease
49528# handling of long lines.
49529ac_delim='%!_!# '
49530for ac_last_try in false false :; do
49531  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49532  if test -z "$ac_tt"; then
49533    break
49534  elif $ac_last_try; then
49535    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49536  else
49537    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49538  fi
49539done
49540
49541# For the awk script, D is an array of macro values keyed by name,
49542# likewise P contains macro parameters if any.  Preserve backslash
49543# newline sequences.
49544
49545ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49546sed -n '
49547s/.\{148\}/&'"$ac_delim"'/g
49548t rset
49549:rset
49550s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49551t def
49552d
49553:def
49554s/\\$//
49555t bsnl
49556s/["\\]/\\&/g
49557s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49558D["\1"]=" \3"/p
49559s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49560d
49561:bsnl
49562s/["\\]/\\&/g
49563s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49564D["\1"]=" \3\\\\\\n"\\/p
49565t cont
49566s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49567t cont
49568d
49569:cont
49570n
49571s/.\{148\}/&'"$ac_delim"'/g
49572t clear
49573:clear
49574s/\\$//
49575t bsnlc
49576s/["\\]/\\&/g; s/^/"/; s/$/"/p
49577d
49578:bsnlc
49579s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49580b cont
49581' <confdefs.h | sed '
49582s/'"$ac_delim"'/"\\\
49583"/g' >>$CONFIG_STATUS || ac_write_fail=1
49584
49585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49586  for (key in D) D_is_set[key] = 1
49587  FS = ""
49588}
49589/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49590  line = \$ 0
49591  split(line, arg, " ")
49592  if (arg[1] == "#") {
49593    defundef = arg[2]
49594    mac1 = arg[3]
49595  } else {
49596    defundef = substr(arg[1], 2)
49597    mac1 = arg[2]
49598  }
49599  split(mac1, mac2, "(") #)
49600  macro = mac2[1]
49601  prefix = substr(line, 1, index(line, defundef) - 1)
49602  if (D_is_set[macro]) {
49603    # Preserve the white space surrounding the "#".
49604    print prefix "define", macro P[macro] D[macro]
49605    next
49606  } else {
49607    # Replace #undef with comments.  This is necessary, for example,
49608    # in the case of _POSIX_SOURCE, which is predefined and required
49609    # on some systems where configure will not decide to define it.
49610    if (defundef == "undef") {
49611      print "/*", prefix defundef, macro, "*/"
49612      next
49613    }
49614  }
49615}
49616{ print }
49617_ACAWK
49618_ACEOF
49619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49620  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49621fi # test -n "$CONFIG_HEADERS"
49622
49623
49624eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49625shift
49626for ac_tag
49627do
49628  case $ac_tag in
49629  :[FHLC]) ac_mode=$ac_tag; continue;;
49630  esac
49631  case $ac_mode$ac_tag in
49632  :[FHL]*:*);;
49633  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49634  :[FH]-) ac_tag=-:-;;
49635  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49636  esac
49637  ac_save_IFS=$IFS
49638  IFS=:
49639  set x $ac_tag
49640  IFS=$ac_save_IFS
49641  shift
49642  ac_file=$1
49643  shift
49644
49645  case $ac_mode in
49646  :L) ac_source=$1;;
49647  :[FH])
49648    ac_file_inputs=
49649    for ac_f
49650    do
49651      case $ac_f in
49652      -) ac_f="$ac_tmp/stdin";;
49653      *) # Look for the file first in the build tree, then in the source tree
49654	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49655	 # because $ac_f cannot contain `:'.
49656	 test -f "$ac_f" ||
49657	   case $ac_f in
49658	   [\\/$]*) false;;
49659	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49660	   esac ||
49661	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49662      esac
49663      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49664      as_fn_append ac_file_inputs " '$ac_f'"
49665    done
49666
49667    # Let's still pretend it is `configure' which instantiates (i.e., don't
49668    # use $as_me), people would be surprised to read:
49669    #    /* config.h.  Generated by config.status.  */
49670    configure_input='Generated from '`
49671	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49672	`' by configure.'
49673    if test x"$ac_file" != x-; then
49674      configure_input="$ac_file.  $configure_input"
49675      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49676$as_echo "$as_me: creating $ac_file" >&6;}
49677    fi
49678    # Neutralize special characters interpreted by sed in replacement strings.
49679    case $configure_input in #(
49680    *\&* | *\|* | *\\* )
49681       ac_sed_conf_input=`$as_echo "$configure_input" |
49682       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49683    *) ac_sed_conf_input=$configure_input;;
49684    esac
49685
49686    case $ac_tag in
49687    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49688      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49689    esac
49690    ;;
49691  esac
49692
49693  ac_dir=`$as_dirname -- "$ac_file" ||
49694$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49695	 X"$ac_file" : 'X\(//\)[^/]' \| \
49696	 X"$ac_file" : 'X\(//\)$' \| \
49697	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49698$as_echo X"$ac_file" |
49699    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49700	    s//\1/
49701	    q
49702	  }
49703	  /^X\(\/\/\)[^/].*/{
49704	    s//\1/
49705	    q
49706	  }
49707	  /^X\(\/\/\)$/{
49708	    s//\1/
49709	    q
49710	  }
49711	  /^X\(\/\).*/{
49712	    s//\1/
49713	    q
49714	  }
49715	  s/.*/./; q'`
49716  as_dir="$ac_dir"; as_fn_mkdir_p
49717  ac_builddir=.
49718
49719case "$ac_dir" in
49720.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49721*)
49722  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49723  # A ".." for each directory in $ac_dir_suffix.
49724  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49725  case $ac_top_builddir_sub in
49726  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49727  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49728  esac ;;
49729esac
49730ac_abs_top_builddir=$ac_pwd
49731ac_abs_builddir=$ac_pwd$ac_dir_suffix
49732# for backward compatibility:
49733ac_top_builddir=$ac_top_build_prefix
49734
49735case $srcdir in
49736  .)  # We are building in place.
49737    ac_srcdir=.
49738    ac_top_srcdir=$ac_top_builddir_sub
49739    ac_abs_top_srcdir=$ac_pwd ;;
49740  [\\/]* | ?:[\\/]* )  # Absolute name.
49741    ac_srcdir=$srcdir$ac_dir_suffix;
49742    ac_top_srcdir=$srcdir
49743    ac_abs_top_srcdir=$srcdir ;;
49744  *) # Relative name.
49745    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49746    ac_top_srcdir=$ac_top_build_prefix$srcdir
49747    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49748esac
49749ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49750
49751
49752  case $ac_mode in
49753  :F)
49754  #
49755  # CONFIG_FILE
49756  #
49757
49758_ACEOF
49759
49760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49761# If the template does not know about datarootdir, expand it.
49762# FIXME: This hack should be removed a few years after 2.60.
49763ac_datarootdir_hack=; ac_datarootdir_seen=
49764ac_sed_dataroot='
49765/datarootdir/ {
49766  p
49767  q
49768}
49769/@datadir@/p
49770/@docdir@/p
49771/@infodir@/p
49772/@localedir@/p
49773/@mandir@/p'
49774case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49775*datarootdir*) ac_datarootdir_seen=yes;;
49776*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49777  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49778$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49779_ACEOF
49780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49781  ac_datarootdir_hack='
49782  s&@datadir@&$datadir&g
49783  s&@docdir@&$docdir&g
49784  s&@infodir@&$infodir&g
49785  s&@localedir@&$localedir&g
49786  s&@mandir@&$mandir&g
49787  s&\\\${datarootdir}&$datarootdir&g' ;;
49788esac
49789_ACEOF
49790
49791# Neutralize VPATH when `$srcdir' = `.'.
49792# Shell code in configure.ac might set extrasub.
49793# FIXME: do we really want to maintain this feature?
49794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49795ac_sed_extra="$ac_vpsub
49796$extrasub
49797_ACEOF
49798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49799:t
49800/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49801s|@configure_input@|$ac_sed_conf_input|;t t
49802s&@top_builddir@&$ac_top_builddir_sub&;t t
49803s&@top_build_prefix@&$ac_top_build_prefix&;t t
49804s&@srcdir@&$ac_srcdir&;t t
49805s&@abs_srcdir@&$ac_abs_srcdir&;t t
49806s&@top_srcdir@&$ac_top_srcdir&;t t
49807s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49808s&@builddir@&$ac_builddir&;t t
49809s&@abs_builddir@&$ac_abs_builddir&;t t
49810s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49811$ac_datarootdir_hack
49812"
49813eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49814  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49815
49816test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49817  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49818  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49819      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49820  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49821which seems to be undefined.  Please make sure it is defined" >&5
49822$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49823which seems to be undefined.  Please make sure it is defined" >&2;}
49824
49825  rm -f "$ac_tmp/stdin"
49826  case $ac_file in
49827  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49828  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49829  esac \
49830  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49831 ;;
49832  :H)
49833  #
49834  # CONFIG_HEADER
49835  #
49836  if test x"$ac_file" != x-; then
49837    {
49838      $as_echo "/* $configure_input  */" \
49839      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49840    } >"$ac_tmp/config.h" \
49841      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49842    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49843      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49844$as_echo "$as_me: $ac_file is unchanged" >&6;}
49845    else
49846      rm -f "$ac_file"
49847      mv "$ac_tmp/config.h" "$ac_file" \
49848	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49849    fi
49850  else
49851    $as_echo "/* $configure_input  */" \
49852      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49853      || as_fn_error $? "could not create -" "$LINENO" 5
49854  fi
49855 ;;
49856
49857
49858  esac
49859
49860done # for ac_tag
49861
49862
49863as_fn_exit 0
49864_ACEOF
49865ac_clean_files=$ac_clean_files_save
49866
49867test $ac_write_fail = 0 ||
49868  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49869
49870
49871# configure is writing to config.log, and then calls config.status.
49872# config.status does its own redirection, appending to config.log.
49873# Unfortunately, on DOS this fails, as config.log is still kept open
49874# by configure, so config.status won't be able to write to it; its
49875# output is simply discarded.  So we exec the FD to /dev/null,
49876# effectively closing config.log, so it can be properly (re)opened and
49877# appended to by config.status.  When coming back to configure, we
49878# need to make the FD available again.
49879if test "$no_create" != yes; then
49880  ac_cs_success=:
49881  ac_config_status_args=
49882  test "$silent" = yes &&
49883    ac_config_status_args="$ac_config_status_args --quiet"
49884  exec 5>/dev/null
49885  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49886  exec 5>>config.log
49887  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49888  # would make configure fail if this is the last instruction.
49889  $ac_cs_success || as_fn_exit 1
49890fi
49891if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49892  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49893$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49894fi
49895
49896
49897# Try to move the config.log file to the output directory.
49898if test -e ./config.log; then
49899  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49900fi
49901
49902# Make the compare script executable
49903$CHMOD +x $OUTPUT_ROOT/compare.sh
49904
49905# Finally output some useful information to the user
49906
49907  # Finally output some useful information to the user
49908
49909  printf "\n"
49910  printf "====================================================\n"
49911  if test "x$no_create" != "xyes"; then
49912    if test "x$IS_RECONFIGURE" != "xyes"; then
49913      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
49914    else
49915      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
49916    fi
49917  else
49918    if test "x$IS_RECONFIGURE" != "xyes"; then
49919      printf "A configuration has been successfully checked but not created\n"
49920    else
49921      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
49922    fi
49923  fi
49924  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49925    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49926  else
49927    printf "using default settings.\n"
49928  fi
49929
49930  printf "\n"
49931  printf "Configuration summary:\n"
49932  printf "* Debug level:    $DEBUG_LEVEL\n"
49933  printf "* JDK variant:    $JDK_VARIANT\n"
49934  printf "* JVM variants:   $with_jvm_variants\n"
49935  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49936
49937  printf "\n"
49938  printf "Tools summary:\n"
49939  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49940    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49941  fi
49942  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49943  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
49944  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
49945
49946  printf "\n"
49947  printf "Build performance summary:\n"
49948  printf "* Cores to use:   $JOBS\n"
49949  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49950  if test "x$CCACHE_STATUS" != "x"; then
49951    printf "* ccache status:  $CCACHE_STATUS\n"
49952  fi
49953  printf "\n"
49954
49955  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49956    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49957    printf "will result in longer build times.\n"
49958    printf "\n"
49959  fi
49960
49961  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49962    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49963    printf "These are not respected, and will be ignored. It is recommended\n"
49964    printf "that you clean your environment. The following variables are set:\n"
49965    printf "$FOUND_ALT_VARIABLES\n"
49966    printf "\n"
49967  fi
49968
49969  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49970    printf "WARNING: Your build output directory is not on a local disk.\n"
49971    printf "This will severely degrade build performance!\n"
49972    printf "It is recommended that you create an output directory on a local disk,\n"
49973    printf "and run the configure script again from that directory.\n"
49974    printf "\n"
49975  fi
49976
49977  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
49978    printf "WARNING: The result of this configuration has overridden an older\n"
49979    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
49980    printf "proper build. Failure to do so might result in strange build problems.\n"
49981    printf "\n"
49982  fi
49983
49984  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
49985    printf "WARNING: The result of this configuration was not saved.\n"
49986    printf "You should run without '--no-create | -n' to create the configuration.\n"
49987    printf "\n"
49988  fi
49989
49990