generated-configure.sh revision 975:b18872ff5379
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
637MSVCR_DLL
638LIBCXX
639LLVM_LIBS
640LLVM_LDFLAGS
641LLVM_CFLAGS
642LLVM_CONFIG
643LIBFFI_LIBS
644LIBFFI_CFLAGS
645STATIC_CXX_SETTING
646LIBDL
647LIBM
648LIBZIP_CAN_USE_MMAP
649USE_EXTERNAL_LIBZ
650USE_EXTERNAL_LIBGIF
651USE_EXTERNAL_LIBJPEG
652ALSA_LIBS
653ALSA_CFLAGS
654FREETYPE_BUNDLE_LIB_PATH
655FREETYPE_LIBS
656FREETYPE_CFLAGS
657CUPS_CFLAGS
658OPENWIN_HOME
659X_EXTRA_LIBS
660X_LIBS
661X_PRE_LIBS
662X_CFLAGS
663XMKMF
664FIXPATH
665ZIP_DEBUGINFO_FILES
666ENABLE_DEBUG_SYMBOLS
667COMPILER_SUPPORTS_TARGET_BITS_FLAG
668ZERO_ARCHFLAG
669LDFLAGS_CXX_JDK
670LDFLAGS_JDKEXE_SUFFIX
671LDFLAGS_JDKLIB_SUFFIX
672LDFLAGS_JDKEXE
673LDFLAGS_JDKLIB
674CXXFLAGS_JDKEXE
675CXXFLAGS_JDKLIB
676CFLAGS_JDKEXE
677CFLAGS_JDKLIB
678MACOSX_VERSION_MIN
679LEGACY_EXTRA_LDFLAGS
680LEGACY_EXTRA_CXXFLAGS
681LEGACY_EXTRA_CFLAGS
682CXX_O_FLAG_NONE
683CXX_O_FLAG_NORM
684CXX_O_FLAG_HI
685CXX_O_FLAG_HIGHEST
686C_O_FLAG_NONE
687C_O_FLAG_NORM
688C_O_FLAG_HI
689C_O_FLAG_HIGHEST
690CXXFLAGS_DEBUG_SYMBOLS
691CFLAGS_DEBUG_SYMBOLS
692CXX_FLAG_DEPS
693C_FLAG_DEPS
694SET_SHARED_LIBRARY_MAPFILE
695SET_SHARED_LIBRARY_NAME
696SET_SHARED_LIBRARY_ORIGIN
697SET_EXECUTABLE_ORIGIN
698SHARED_LIBRARY_FLAGS
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701RC_FLAGS
702AR_OUT_OPTION
703LD_OUT_OPTION
704EXE_OUT_OPTION
705CC_OUT_OPTION
706POST_MCS_CMD
707POST_STRIP_CMD
708ARFLAGS
709COMPILER_TARGET_BITS_FLAG
710JT_HOME
711JTREGEXE
712USING_BROKEN_SUSE_LD
713PACKAGE_PATH
714LDEXECXX
715LDEXE
716USE_CLANG
717HOTSPOT_LD
718HOTSPOT_CXX
719HOTSPOT_RC
720HOTSPOT_MT
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724ac_ct_OBJDUMP
725OBJDUMP
726ac_ct_OBJCOPY
727OBJCOPY
728ac_ct_NM
729ac_ct_STRIP
730MCS
731GNM
732NM
733STRIP
734DUMPBIN
735RC
736MT
737LIPO
738ac_ct_OBJC
739OBJCFLAGS
740OBJC
741ac_ct_AR
742AR
743AS
744LDCXX
745LD
746CXXCPP
747CPP
748ac_ct_CXX
749CXXFLAGS
750CXX
751ac_ct_PROPER_COMPILER_CXX
752PROPER_COMPILER_CXX
753TOOLS_DIR_CXX
754POTENTIAL_CXX
755OBJEXT
756EXEEXT
757ac_ct_CC
758CPPFLAGS
759LDFLAGS
760CFLAGS
761CC
762ac_ct_PROPER_COMPILER_CC
763PROPER_COMPILER_CC
764TOOLS_DIR_CC
765POTENTIAL_CC
766VS_PATH
767VS_LIB
768VS_INCLUDE
769CYGWIN_LINK
770EXE_SUFFIX
771OBJ_SUFFIX
772STATIC_LIBRARY
773SHARED_LIBRARY
774STATIC_LIBRARY_SUFFIX
775SHARED_LIBRARY_SUFFIX
776LIBRARY_PREFIX
777TOOLCHAIN_TYPE
778BUILD_HOTSPOT
779HOTSPOT_DIST
780BUILD_OUTPUT
781OVERRIDE_SRC_ROOT
782ADD_SRC_ROOT
783JDK_TOPDIR
784NASHORN_TOPDIR
785HOTSPOT_TOPDIR
786JAXWS_TOPDIR
787JAXP_TOPDIR
788CORBA_TOPDIR
789LANGTOOLS_TOPDIR
790BOOT_JDK_JVMARGS
791JAVAC_FLAGS
792BOOT_JDK_SOURCETARGET
793JARSIGNER
794NATIVE2ASCII
795JAR
796JAVAH
797JAVAC
798JAVA
799BOOT_JDK
800BOOT_TOOLSJAR
801BOOT_RTJAR
802JAVA_CHECK
803JAVAC_CHECK
804COOKED_BUILD_NUMBER
805JDK_VERSION
806COPYRIGHT_YEAR
807MACOSX_BUNDLE_ID_BASE
808MACOSX_BUNDLE_NAME_BASE
809COMPANY_NAME
810JDK_RC_PLATFORM_NAME
811PRODUCT_SUFFIX
812PRODUCT_NAME
813LAUNCHER_NAME
814MILESTONE
815JDK_BUILD_NUMBER
816JDK_UPDATE_VERSION
817JDK_MICRO_VERSION
818JDK_MINOR_VERSION
819JDK_MAJOR_VERSION
820USER_RELEASE_SUFFIX
821COMPRESS_JARS
822RMICONNECTOR_IIOP
823UNLIMITED_CRYPTO
824CACERTS_FILE
825TEST_IN_BUILD
826BUILD_HEADLESS
827SUPPORT_HEADFUL
828SUPPORT_HEADLESS
829BDEPS_FTP
830BDEPS_UNZIP
831OS_VERSION_MICRO
832OS_VERSION_MINOR
833OS_VERSION_MAJOR
834PKG_CONFIG
835CODESIGN
836XATTR
837DSYMUTIL
838IS_GNU_TIME
839TIME
840STAT
841HG
842READELF
843OTOOL
844LDD
845ZIP
846UNZIP
847FIND_DELETE
848MAKE
849CHECK_TOOLSDIR_MAKE
850CHECK_TOOLSDIR_GMAKE
851CHECK_MAKE
852CHECK_GMAKE
853PKGHANDLER
854OUTPUT_ROOT
855CONF_NAME
856SPEC
857BUILD_VARIANT_RELEASE
858DEBUG_CLASSFILES
859FASTDEBUG
860VARIANT
861DEBUG_LEVEL
862MACOSX_UNIVERSAL
863INCLUDE_SA
864JVM_VARIANT_CORE
865JVM_VARIANT_ZEROSHARK
866JVM_VARIANT_ZERO
867JVM_VARIANT_KERNEL
868JVM_VARIANT_MINIMAL1
869JVM_VARIANT_CLIENT
870JVM_VARIANT_SERVER
871JVM_VARIANTS
872JVM_INTERPRETER
873JDK_VARIANT
874SET_OPENJDK
875BUILD_LOG_WRAPPER
876BUILD_LOG_PREVIOUS
877BUILD_LOG
878SYS_ROOT
879PATH_SEP
880SRC_ROOT
881ZERO_ARCHDEF
882DEFINE_CROSS_COMPILE_ARCH
883LP64
884OPENJDK_TARGET_OS_EXPORT_DIR
885OPENJDK_TARGET_OS_API_DIR
886OPENJDK_TARGET_CPU_JLI_CFLAGS
887OPENJDK_TARGET_CPU_OSARCH
888OPENJDK_TARGET_CPU_ISADIR
889OPENJDK_TARGET_CPU_LIBDIR
890OPENJDK_TARGET_CPU_LEGACY_LIB
891OPENJDK_TARGET_CPU_LEGACY
892REQUIRED_OS_VERSION
893REQUIRED_OS_NAME
894COMPILE_TYPE
895OPENJDK_TARGET_CPU_ENDIAN
896OPENJDK_TARGET_CPU_BITS
897OPENJDK_TARGET_CPU_ARCH
898OPENJDK_TARGET_CPU
899OPENJDK_TARGET_OS_API
900OPENJDK_TARGET_OS
901OPENJDK_BUILD_CPU_ENDIAN
902OPENJDK_BUILD_CPU_BITS
903OPENJDK_BUILD_CPU_ARCH
904OPENJDK_BUILD_CPU
905OPENJDK_BUILD_OS_API
906OPENJDK_BUILD_OS
907OPENJDK_BUILD_AUTOCONF_NAME
908OPENJDK_TARGET_AUTOCONF_NAME
909target_os
910target_vendor
911target_cpu
912target
913host_os
914host_vendor
915host_cpu
916host
917build_os
918build_vendor
919build_cpu
920build
921SETFILE
922DF
923READLINK
924CYGPATH
925SED
926FGREP
927EGREP
928GREP
929AWK
930XARGS
931WHICH
932WC
933UNIQ
934UNAME
935TR
936TOUCH
937TEE
938TAR
939TAIL
940SORT
941SH
942RM
943PRINTF
944NAWK
945MV
946MKTEMP
947MKDIR
948LS
949LN
950HEAD
951FIND
952FILE
953EXPR
954ECHO
955DIRNAME
956DIFF
957DATE
958CUT
959CPIO
960CP
961COMM
962CMP
963CHMOD
964CAT
965BASH
966BASENAME
967DATE_WHEN_CONFIGURED
968CONFIGURE_COMMAND_LINE
969target_alias
970host_alias
971build_alias
972LIBS
973ECHO_T
974ECHO_N
975ECHO_C
976DEFS
977mandir
978localedir
979libdir
980psdir
981pdfdir
982dvidir
983htmldir
984infodir
985docdir
986oldincludedir
987includedir
988localstatedir
989sharedstatedir
990sysconfdir
991datadir
992datarootdir
993libexecdir
994sbindir
995bindir
996program_transform_name
997prefix
998exec_prefix
999PACKAGE_URL
1000PACKAGE_BUGREPORT
1001PACKAGE_STRING
1002PACKAGE_VERSION
1003PACKAGE_TARNAME
1004PACKAGE_NAME
1005PATH_SEPARATOR
1006SHELL'
1007ac_subst_files=''
1008ac_user_opts='
1009enable_option_checking
1010with_target_bits
1011with_sys_root
1012with_tools_dir
1013with_devkit
1014enable_openjdk_only
1015with_custom_make_dir
1016with_jdk_variant
1017with_jvm_interpreter
1018with_jvm_variants
1019enable_debug
1020with_debug_level
1021with_conf_name
1022with_builddeps_conf
1023with_builddeps_server
1024with_builddeps_dir
1025with_builddeps_group
1026enable_headful
1027enable_hotspot_test_in_build
1028with_cacerts_file
1029enable_unlimited_crypto
1030enable_rmiconnector_iiop
1031with_milestone
1032with_update_version
1033with_user_release_suffix
1034with_build_number
1035with_boot_jdk
1036with_boot_jdk_jvmargs
1037with_add_source_root
1038with_override_source_root
1039with_adds_and_overrides
1040with_override_langtools
1041with_override_corba
1042with_override_jaxp
1043with_override_jaxws
1044with_override_hotspot
1045with_override_nashorn
1046with_override_jdk
1047with_import_hotspot
1048with_toolchain_type
1049with_jtreg
1050with_extra_cflags
1051with_extra_cxxflags
1052with_extra_ldflags
1053enable_debug_symbols
1054enable_zip_debug_info
1055enable_macosx_runtime_support
1056with_x
1057with_cups
1058with_cups_include
1059with_freetype
1060with_freetype_include
1061with_freetype_lib
1062enable_freetype_bundling
1063with_alsa
1064with_alsa_include
1065with_alsa_lib
1066with_giflib
1067with_zlib
1068with_stdc__lib
1069with_msvcr_dll
1070with_dxsdk
1071with_dxsdk_lib
1072with_dxsdk_include
1073with_num_cores
1074with_memory_size
1075with_jobs
1076with_sjavac_server_java
1077enable_sjavac
1078enable_precompiled_headers
1079enable_ccache
1080with_ccache_dir
1081'
1082      ac_precious_vars='build_alias
1083host_alias
1084target_alias
1085BASENAME
1086BASH
1087CAT
1088CHMOD
1089CMP
1090COMM
1091CP
1092CPIO
1093CUT
1094DATE
1095DIFF
1096DIRNAME
1097ECHO
1098EXPR
1099FILE
1100FIND
1101HEAD
1102LN
1103LS
1104MKDIR
1105MKTEMP
1106MV
1107NAWK
1108PRINTF
1109RM
1110SH
1111SORT
1112TAIL
1113TAR
1114TEE
1115TOUCH
1116TR
1117UNAME
1118UNIQ
1119WC
1120WHICH
1121XARGS
1122AWK
1123GREP
1124EGREP
1125FGREP
1126SED
1127CYGPATH
1128READLINK
1129DF
1130SETFILE
1131UNZIP
1132ZIP
1133LDD
1134OTOOL
1135READELF
1136HG
1137STAT
1138TIME
1139DSYMUTIL
1140XATTR
1141CODESIGN
1142PKG_CONFIG
1143JAVA
1144JAVAC
1145JAVAH
1146JAR
1147NATIVE2ASCII
1148JARSIGNER
1149CC
1150CFLAGS
1151LDFLAGS
1152LIBS
1153CPPFLAGS
1154CXX
1155CXXFLAGS
1156CCC
1157CPP
1158CXXCPP
1159AS
1160AR
1161OBJC
1162OBJCFLAGS
1163LIPO
1164STRIP
1165NM
1166GNM
1167MCS
1168OBJCOPY
1169OBJDUMP
1170BUILD_CC
1171BUILD_CXX
1172BUILD_LD
1173JTREGEXE
1174XMKMF
1175FREETYPE_CFLAGS
1176FREETYPE_LIBS
1177ALSA_CFLAGS
1178ALSA_LIBS
1179LIBFFI_CFLAGS
1180LIBFFI_LIBS
1181CCACHE'
1182
1183
1184# Initialize some variables set by options.
1185ac_init_help=
1186ac_init_version=false
1187ac_unrecognized_opts=
1188ac_unrecognized_sep=
1189# The variables have the same names as the options, with
1190# dashes changed to underlines.
1191cache_file=/dev/null
1192exec_prefix=NONE
1193no_create=
1194no_recursion=
1195prefix=NONE
1196program_prefix=NONE
1197program_suffix=NONE
1198program_transform_name=s,x,x,
1199silent=
1200site=
1201srcdir=
1202verbose=
1203x_includes=NONE
1204x_libraries=NONE
1205
1206# Installation directory options.
1207# These are left unexpanded so users can "make install exec_prefix=/foo"
1208# and all the variables that are supposed to be based on exec_prefix
1209# by default will actually change.
1210# Use braces instead of parens because sh, perl, etc. also accept them.
1211# (The list follows the same order as the GNU Coding Standards.)
1212bindir='${exec_prefix}/bin'
1213sbindir='${exec_prefix}/sbin'
1214libexecdir='${exec_prefix}/libexec'
1215datarootdir='${prefix}/share'
1216datadir='${datarootdir}'
1217sysconfdir='${prefix}/etc'
1218sharedstatedir='${prefix}/com'
1219localstatedir='${prefix}/var'
1220includedir='${prefix}/include'
1221oldincludedir='/usr/include'
1222docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1223infodir='${datarootdir}/info'
1224htmldir='${docdir}'
1225dvidir='${docdir}'
1226pdfdir='${docdir}'
1227psdir='${docdir}'
1228libdir='${exec_prefix}/lib'
1229localedir='${datarootdir}/locale'
1230mandir='${datarootdir}/man'
1231
1232ac_prev=
1233ac_dashdash=
1234for ac_option
1235do
1236  # If the previous option needs an argument, assign it.
1237  if test -n "$ac_prev"; then
1238    eval $ac_prev=\$ac_option
1239    ac_prev=
1240    continue
1241  fi
1242
1243  case $ac_option in
1244  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1245  *=)   ac_optarg= ;;
1246  *)    ac_optarg=yes ;;
1247  esac
1248
1249  # Accept the important Cygnus configure options, so we can diagnose typos.
1250
1251  case $ac_dashdash$ac_option in
1252  --)
1253    ac_dashdash=yes ;;
1254
1255  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1256    ac_prev=bindir ;;
1257  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1258    bindir=$ac_optarg ;;
1259
1260  -build | --build | --buil | --bui | --bu)
1261    ac_prev=build_alias ;;
1262  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1263    build_alias=$ac_optarg ;;
1264
1265  -cache-file | --cache-file | --cache-fil | --cache-fi \
1266  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1267    ac_prev=cache_file ;;
1268  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1269  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1270    cache_file=$ac_optarg ;;
1271
1272  --config-cache | -C)
1273    cache_file=config.cache ;;
1274
1275  -datadir | --datadir | --datadi | --datad)
1276    ac_prev=datadir ;;
1277  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1278    datadir=$ac_optarg ;;
1279
1280  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1281  | --dataroo | --dataro | --datar)
1282    ac_prev=datarootdir ;;
1283  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1284  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1285    datarootdir=$ac_optarg ;;
1286
1287  -disable-* | --disable-*)
1288    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1289    # Reject names that are not valid shell variable names.
1290    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1291      as_fn_error $? "invalid feature name: $ac_useropt"
1292    ac_useropt_orig=$ac_useropt
1293    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1294    case $ac_user_opts in
1295      *"
1296"enable_$ac_useropt"
1297"*) ;;
1298      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1299	 ac_unrecognized_sep=', ';;
1300    esac
1301    eval enable_$ac_useropt=no ;;
1302
1303  -docdir | --docdir | --docdi | --doc | --do)
1304    ac_prev=docdir ;;
1305  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1306    docdir=$ac_optarg ;;
1307
1308  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1309    ac_prev=dvidir ;;
1310  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1311    dvidir=$ac_optarg ;;
1312
1313  -enable-* | --enable-*)
1314    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1315    # Reject names that are not valid shell variable names.
1316    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1317      as_fn_error $? "invalid feature name: $ac_useropt"
1318    ac_useropt_orig=$ac_useropt
1319    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1320    case $ac_user_opts in
1321      *"
1322"enable_$ac_useropt"
1323"*) ;;
1324      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1325	 ac_unrecognized_sep=', ';;
1326    esac
1327    eval enable_$ac_useropt=\$ac_optarg ;;
1328
1329  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1330  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1331  | --exec | --exe | --ex)
1332    ac_prev=exec_prefix ;;
1333  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1334  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1335  | --exec=* | --exe=* | --ex=*)
1336    exec_prefix=$ac_optarg ;;
1337
1338  -gas | --gas | --ga | --g)
1339    # Obsolete; use --with-gas.
1340    with_gas=yes ;;
1341
1342  -help | --help | --hel | --he | -h)
1343    ac_init_help=long ;;
1344  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1345    ac_init_help=recursive ;;
1346  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1347    ac_init_help=short ;;
1348
1349  -host | --host | --hos | --ho)
1350    ac_prev=host_alias ;;
1351  -host=* | --host=* | --hos=* | --ho=*)
1352    host_alias=$ac_optarg ;;
1353
1354  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1355    ac_prev=htmldir ;;
1356  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1357  | --ht=*)
1358    htmldir=$ac_optarg ;;
1359
1360  -includedir | --includedir | --includedi | --included | --include \
1361  | --includ | --inclu | --incl | --inc)
1362    ac_prev=includedir ;;
1363  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1364  | --includ=* | --inclu=* | --incl=* | --inc=*)
1365    includedir=$ac_optarg ;;
1366
1367  -infodir | --infodir | --infodi | --infod | --info | --inf)
1368    ac_prev=infodir ;;
1369  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1370    infodir=$ac_optarg ;;
1371
1372  -libdir | --libdir | --libdi | --libd)
1373    ac_prev=libdir ;;
1374  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1375    libdir=$ac_optarg ;;
1376
1377  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1378  | --libexe | --libex | --libe)
1379    ac_prev=libexecdir ;;
1380  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1381  | --libexe=* | --libex=* | --libe=*)
1382    libexecdir=$ac_optarg ;;
1383
1384  -localedir | --localedir | --localedi | --localed | --locale)
1385    ac_prev=localedir ;;
1386  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1387    localedir=$ac_optarg ;;
1388
1389  -localstatedir | --localstatedir | --localstatedi | --localstated \
1390  | --localstate | --localstat | --localsta | --localst | --locals)
1391    ac_prev=localstatedir ;;
1392  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1393  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1394    localstatedir=$ac_optarg ;;
1395
1396  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1397    ac_prev=mandir ;;
1398  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1399    mandir=$ac_optarg ;;
1400
1401  -nfp | --nfp | --nf)
1402    # Obsolete; use --without-fp.
1403    with_fp=no ;;
1404
1405  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1406  | --no-cr | --no-c | -n)
1407    no_create=yes ;;
1408
1409  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1410  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1411    no_recursion=yes ;;
1412
1413  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1414  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1415  | --oldin | --oldi | --old | --ol | --o)
1416    ac_prev=oldincludedir ;;
1417  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1418  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1419  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1420    oldincludedir=$ac_optarg ;;
1421
1422  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1423    ac_prev=prefix ;;
1424  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1425    prefix=$ac_optarg ;;
1426
1427  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1428  | --program-pre | --program-pr | --program-p)
1429    ac_prev=program_prefix ;;
1430  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1431  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1432    program_prefix=$ac_optarg ;;
1433
1434  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1435  | --program-suf | --program-su | --program-s)
1436    ac_prev=program_suffix ;;
1437  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1438  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1439    program_suffix=$ac_optarg ;;
1440
1441  -program-transform-name | --program-transform-name \
1442  | --program-transform-nam | --program-transform-na \
1443  | --program-transform-n | --program-transform- \
1444  | --program-transform | --program-transfor \
1445  | --program-transfo | --program-transf \
1446  | --program-trans | --program-tran \
1447  | --progr-tra | --program-tr | --program-t)
1448    ac_prev=program_transform_name ;;
1449  -program-transform-name=* | --program-transform-name=* \
1450  | --program-transform-nam=* | --program-transform-na=* \
1451  | --program-transform-n=* | --program-transform-=* \
1452  | --program-transform=* | --program-transfor=* \
1453  | --program-transfo=* | --program-transf=* \
1454  | --program-trans=* | --program-tran=* \
1455  | --progr-tra=* | --program-tr=* | --program-t=*)
1456    program_transform_name=$ac_optarg ;;
1457
1458  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1459    ac_prev=pdfdir ;;
1460  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1461    pdfdir=$ac_optarg ;;
1462
1463  -psdir | --psdir | --psdi | --psd | --ps)
1464    ac_prev=psdir ;;
1465  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1466    psdir=$ac_optarg ;;
1467
1468  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1469  | -silent | --silent | --silen | --sile | --sil)
1470    silent=yes ;;
1471
1472  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1473    ac_prev=sbindir ;;
1474  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1475  | --sbi=* | --sb=*)
1476    sbindir=$ac_optarg ;;
1477
1478  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1479  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1480  | --sharedst | --shareds | --shared | --share | --shar \
1481  | --sha | --sh)
1482    ac_prev=sharedstatedir ;;
1483  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1484  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1485  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1486  | --sha=* | --sh=*)
1487    sharedstatedir=$ac_optarg ;;
1488
1489  -site | --site | --sit)
1490    ac_prev=site ;;
1491  -site=* | --site=* | --sit=*)
1492    site=$ac_optarg ;;
1493
1494  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1495    ac_prev=srcdir ;;
1496  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1497    srcdir=$ac_optarg ;;
1498
1499  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1500  | --syscon | --sysco | --sysc | --sys | --sy)
1501    ac_prev=sysconfdir ;;
1502  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1503  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1504    sysconfdir=$ac_optarg ;;
1505
1506  -target | --target | --targe | --targ | --tar | --ta | --t)
1507    ac_prev=target_alias ;;
1508  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1509    target_alias=$ac_optarg ;;
1510
1511  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1512    verbose=yes ;;
1513
1514  -version | --version | --versio | --versi | --vers | -V)
1515    ac_init_version=: ;;
1516
1517  -with-* | --with-*)
1518    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1519    # Reject names that are not valid shell variable names.
1520    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1521      as_fn_error $? "invalid package name: $ac_useropt"
1522    ac_useropt_orig=$ac_useropt
1523    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1524    case $ac_user_opts in
1525      *"
1526"with_$ac_useropt"
1527"*) ;;
1528      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1529	 ac_unrecognized_sep=', ';;
1530    esac
1531    eval with_$ac_useropt=\$ac_optarg ;;
1532
1533  -without-* | --without-*)
1534    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1535    # Reject names that are not valid shell variable names.
1536    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1537      as_fn_error $? "invalid package name: $ac_useropt"
1538    ac_useropt_orig=$ac_useropt
1539    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1540    case $ac_user_opts in
1541      *"
1542"with_$ac_useropt"
1543"*) ;;
1544      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1545	 ac_unrecognized_sep=', ';;
1546    esac
1547    eval with_$ac_useropt=no ;;
1548
1549  --x)
1550    # Obsolete; use --with-x.
1551    with_x=yes ;;
1552
1553  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1554  | --x-incl | --x-inc | --x-in | --x-i)
1555    ac_prev=x_includes ;;
1556  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1557  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1558    x_includes=$ac_optarg ;;
1559
1560  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1561  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1562    ac_prev=x_libraries ;;
1563  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1564  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1565    x_libraries=$ac_optarg ;;
1566
1567  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1568Try \`$0 --help' for more information"
1569    ;;
1570
1571  *=*)
1572    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1573    # Reject names that are not valid shell variable names.
1574    case $ac_envvar in #(
1575      '' | [0-9]* | *[!_$as_cr_alnum]* )
1576      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1577    esac
1578    eval $ac_envvar=\$ac_optarg
1579    export $ac_envvar ;;
1580
1581  *)
1582    # FIXME: should be removed in autoconf 3.0.
1583    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1584    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1585      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1586    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1587    ;;
1588
1589  esac
1590done
1591
1592if test -n "$ac_prev"; then
1593  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1594  as_fn_error $? "missing argument to $ac_option"
1595fi
1596
1597if test -n "$ac_unrecognized_opts"; then
1598  case $enable_option_checking in
1599    no) ;;
1600    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1601    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1602  esac
1603fi
1604
1605# Check all directory arguments for consistency.
1606for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1607		datadir sysconfdir sharedstatedir localstatedir includedir \
1608		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1609		libdir localedir mandir
1610do
1611  eval ac_val=\$$ac_var
1612  # Remove trailing slashes.
1613  case $ac_val in
1614    */ )
1615      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1616      eval $ac_var=\$ac_val;;
1617  esac
1618  # Be sure to have absolute directory names.
1619  case $ac_val in
1620    [\\/$]* | ?:[\\/]* )  continue;;
1621    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1622  esac
1623  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1624done
1625
1626# There might be people who depend on the old broken behavior: `$host'
1627# used to hold the argument of --host etc.
1628# FIXME: To remove some day.
1629build=$build_alias
1630host=$host_alias
1631target=$target_alias
1632
1633# FIXME: To remove some day.
1634if test "x$host_alias" != x; then
1635  if test "x$build_alias" = x; then
1636    cross_compiling=maybe
1637  elif test "x$build_alias" != "x$host_alias"; then
1638    cross_compiling=yes
1639  fi
1640fi
1641
1642ac_tool_prefix=
1643test -n "$host_alias" && ac_tool_prefix=$host_alias-
1644
1645test "$silent" = yes && exec 6>/dev/null
1646
1647
1648ac_pwd=`pwd` && test -n "$ac_pwd" &&
1649ac_ls_di=`ls -di .` &&
1650ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1651  as_fn_error $? "working directory cannot be determined"
1652test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1653  as_fn_error $? "pwd does not report name of working directory"
1654
1655
1656# Find the source files, if location was not specified.
1657if test -z "$srcdir"; then
1658  ac_srcdir_defaulted=yes
1659  # Try the directory containing this script, then the parent directory.
1660  ac_confdir=`$as_dirname -- "$as_myself" ||
1661$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1662	 X"$as_myself" : 'X\(//\)[^/]' \| \
1663	 X"$as_myself" : 'X\(//\)$' \| \
1664	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1665$as_echo X"$as_myself" |
1666    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1667	    s//\1/
1668	    q
1669	  }
1670	  /^X\(\/\/\)[^/].*/{
1671	    s//\1/
1672	    q
1673	  }
1674	  /^X\(\/\/\)$/{
1675	    s//\1/
1676	    q
1677	  }
1678	  /^X\(\/\).*/{
1679	    s//\1/
1680	    q
1681	  }
1682	  s/.*/./; q'`
1683  srcdir=$ac_confdir
1684  if test ! -r "$srcdir/$ac_unique_file"; then
1685    srcdir=..
1686  fi
1687else
1688  ac_srcdir_defaulted=no
1689fi
1690if test ! -r "$srcdir/$ac_unique_file"; then
1691  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1692  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1693fi
1694ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1695ac_abs_confdir=`(
1696	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1697	pwd)`
1698# When building in place, set srcdir=.
1699if test "$ac_abs_confdir" = "$ac_pwd"; then
1700  srcdir=.
1701fi
1702# Remove unnecessary trailing slashes from srcdir.
1703# Double slashes in file names in object file debugging info
1704# mess up M-x gdb in Emacs.
1705case $srcdir in
1706*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1707esac
1708for ac_var in $ac_precious_vars; do
1709  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1710  eval ac_env_${ac_var}_value=\$${ac_var}
1711  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1712  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1713done
1714
1715#
1716# Report the --help message.
1717#
1718if test "$ac_init_help" = "long"; then
1719  # Omit some internal or obsolete options to make the list less imposing.
1720  # This message is too long to be a string in the A/UX 3.1 sh.
1721  cat <<_ACEOF
1722\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1723
1724Usage: $0 [OPTION]... [VAR=VALUE]...
1725
1726To assign environment variables (e.g., CC, CFLAGS...), specify them as
1727VAR=VALUE.  See below for descriptions of some of the useful variables.
1728
1729Defaults for the options are specified in brackets.
1730
1731Configuration:
1732  -h, --help              display this help and exit
1733      --help=short        display options specific to this package
1734      --help=recursive    display the short help of all the included packages
1735  -V, --version           display version information and exit
1736  -q, --quiet, --silent   do not print \`checking ...' messages
1737      --cache-file=FILE   cache test results in FILE [disabled]
1738  -C, --config-cache      alias for \`--cache-file=config.cache'
1739  -n, --no-create         do not create output files
1740      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1741
1742Installation directories:
1743  --prefix=PREFIX         install architecture-independent files in PREFIX
1744                          [$ac_default_prefix]
1745  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1746                          [PREFIX]
1747
1748By default, \`make install' will install all the files in
1749\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1750an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1751for instance \`--prefix=\$HOME'.
1752
1753For better control, use the options below.
1754
1755Fine tuning of the installation directories:
1756  --bindir=DIR            user executables [EPREFIX/bin]
1757  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1758  --libexecdir=DIR        program executables [EPREFIX/libexec]
1759  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1760  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1761  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1762  --libdir=DIR            object code libraries [EPREFIX/lib]
1763  --includedir=DIR        C header files [PREFIX/include]
1764  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1765  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1766  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1767  --infodir=DIR           info documentation [DATAROOTDIR/info]
1768  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1769  --mandir=DIR            man documentation [DATAROOTDIR/man]
1770  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1771  --htmldir=DIR           html documentation [DOCDIR]
1772  --dvidir=DIR            dvi documentation [DOCDIR]
1773  --pdfdir=DIR            pdf documentation [DOCDIR]
1774  --psdir=DIR             ps documentation [DOCDIR]
1775_ACEOF
1776
1777  cat <<\_ACEOF
1778
1779X features:
1780  --x-includes=DIR    X include files are in DIR
1781  --x-libraries=DIR   X library files are in DIR
1782
1783System types:
1784  --build=BUILD     configure for building on BUILD [guessed]
1785  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1786  --target=TARGET   configure for building compilers for TARGET [HOST]
1787_ACEOF
1788fi
1789
1790if test -n "$ac_init_help"; then
1791  case $ac_init_help in
1792     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1793   esac
1794  cat <<\_ACEOF
1795
1796Optional Features:
1797  --disable-option-checking  ignore unrecognized --enable/--with options
1798  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1799  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1800  --enable-openjdk-only   suppress building custom source even if present
1801                          [disabled]
1802  --enable-debug          set the debug level to fastdebug (shorthand for
1803                          --with-debug-level=fastdebug) [disabled]
1804  --disable-headful       disable building headful support (graphical UI
1805                          support) [enabled]
1806  --enable-hotspot-test-in-build
1807                          run the Queens test after Hotspot build [disabled]
1808  --enable-unlimited-crypto
1809                          Enable unlimited crypto policy [disabled]
1810  --enable-rmiconnector-iiop
1811                          enable the JMX RMIConnector iiop transport
1812                          [disabled]
1813  --disable-debug-symbols disable generation of debug symbols [enabled]
1814  --disable-zip-debug-info
1815                          disable zipping of debug-info files [enabled]
1816  --enable-macosx-runtime-support
1817                          Deprecated. Option is kept for backwards
1818                          compatibility and is ignored
1819  --disable-freetype-bundling
1820                          disable bundling of the freetype library with the
1821                          build result [enabled on Windows or when using
1822                          --with-freetype, disabled otherwise]
1823  --enable-sjavac         use sjavac to do fast incremental compiles
1824                          [disabled]
1825  --disable-precompiled-headers
1826                          disable using precompiled headers when compiling C++
1827                          [enabled]
1828  --enable-ccache         enable using ccache to speed up recompilations
1829                          [disabled]
1830
1831Optional Packages:
1832  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1833  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1834  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1835                          support it), e.g. --with-target-bits=32 [guessed]
1836  --with-sys-root         pass this sys-root to the compilers and tools (for
1837                          cross-compiling)
1838  --with-tools-dir        search this directory for compilers and tools (for
1839                          cross-compiling)
1840  --with-devkit           use this directory as base for tools-dir and
1841                          sys-root (for cross-compiling)
1842  --with-custom-make-dir  Deprecated. Option is kept for backwards
1843                          compatibility and is ignored
1844  --with-jdk-variant      JDK variant to build (normal) [normal]
1845  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1846  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1847                          client, minimal1, kernel, zero, zeroshark, core)
1848                          [server]
1849  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1850                          [release]
1851  --with-conf-name        use this as the name of the configuration [generated
1852                          from important configuration options]
1853  --with-builddeps-conf   use this configuration file for the builddeps
1854  --with-builddeps-server download and use build dependencies from this server
1855                          url
1856  --with-builddeps-dir    store downloaded build dependencies here
1857                          [/localhome/builddeps]
1858  --with-builddeps-group  chgrp the downloaded build dependencies to this
1859                          group
1860  --with-cacerts-file     specify alternative cacerts file
1861  --with-milestone        Set milestone value for build [internal]
1862  --with-update-version   Set update version value for build [b00]
1863  --with-user-release-suffix
1864                          Add a custom string to the version string if build
1865                          number is not set.[username_builddateb00]
1866  --with-build-number     Set build number value for build [b00]
1867  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1868  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1869                          invocations of the Boot JDK, overriding the default
1870                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1871                          -enableassertions"
1872  --with-add-source-root  for each and every source directory, look in this
1873                          additional source root for the same directory; if it
1874                          exists and have files in it, include it in the build
1875  --with-override-source-root
1876                          for each and every source directory, look in this
1877                          override source root for the same directory; if it
1878                          exists, use that directory instead and ignore the
1879                          directory in the original source root
1880  --with-adds-and-overrides
1881                          use the subdirs 'adds' and 'overrides' in the
1882                          specified directory as add-source-root and
1883                          override-source-root
1884  --with-override-langtools
1885                          use this langtools dir for the build
1886  --with-override-corba   use this corba dir for the build
1887  --with-override-jaxp    use this jaxp dir for the build
1888  --with-override-jaxws   use this jaxws dir for the build
1889  --with-override-hotspot use this hotspot dir for the build
1890  --with-override-nashorn use this nashorn dir for the build
1891  --with-override-jdk     use this jdk dir for the build
1892  --with-import-hotspot   import hotspot binaries from this jdk image or
1893                          hotspot build dist dir instead of building from
1894                          source
1895  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1896                          to show possible values [platform dependent]
1897  --with-jtreg            Regression Test Harness [probed]
1898  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1899  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1900  --with-extra-ldflags    extra flags to be used when linking jdk
1901  --with-x                use the X Window System
1902  --with-cups             specify prefix directory for the cups package
1903                          (expecting the headers under PATH/include)
1904  --with-cups-include     specify directory for the cups include files
1905  --with-freetype         specify prefix directory for the freetype package
1906                          (expecting the libraries under PATH/lib and the
1907                          headers under PATH/include)
1908  --with-freetype-include specify directory for the freetype include files
1909  --with-freetype-lib     specify directory for the freetype library
1910  --with-alsa             specify prefix directory for the alsa package
1911                          (expecting the libraries under PATH/lib and the
1912                          headers under PATH/include)
1913  --with-alsa-include     specify directory for the alsa include files
1914  --with-alsa-lib         specify directory for the alsa library
1915  --with-giflib           use giflib from build system or OpenJDK source
1916                          (system, bundled) [bundled]
1917  --with-zlib             use zlib from build system or OpenJDK source
1918                          (system, bundled) [bundled]
1919  --with-stdc++lib=<static>,<dynamic>,<default>
1920                          force linking of the C++ runtime on Linux to either
1921                          static or dynamic, default is static with dynamic as
1922                          fallback
1923  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1924                          only) [probed]
1925  --with-dxsdk            Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1928                          compatibility and is ignored
1929  --with-dxsdk-include    Deprecated. Option is kept for backwards
1930                          compatibility and is ignored
1931  --with-num-cores        number of cores in the build system, e.g.
1932                          --with-num-cores=8 [probed]
1933  --with-memory-size      memory (in MB) available in the build system, e.g.
1934                          --with-memory-size=1024 [probed]
1935  --with-jobs             number of parallel jobs to let make run [calculated
1936                          based on cores and memory]
1937  --with-sjavac-server-java
1938                          use this java binary for running the sjavac
1939                          background server [Boot JDK java]
1940  --with-ccache-dir       where to store ccache files [~/.ccache]
1941
1942Some influential environment variables:
1943  BASENAME    Override default value for BASENAME
1944  BASH        Override default value for BASH
1945  CAT         Override default value for CAT
1946  CHMOD       Override default value for CHMOD
1947  CMP         Override default value for CMP
1948  COMM        Override default value for COMM
1949  CP          Override default value for CP
1950  CPIO        Override default value for CPIO
1951  CUT         Override default value for CUT
1952  DATE        Override default value for DATE
1953  DIFF        Override default value for DIFF
1954  DIRNAME     Override default value for DIRNAME
1955  ECHO        Override default value for ECHO
1956  EXPR        Override default value for EXPR
1957  FILE        Override default value for FILE
1958  FIND        Override default value for FIND
1959  HEAD        Override default value for HEAD
1960  LN          Override default value for LN
1961  LS          Override default value for LS
1962  MKDIR       Override default value for MKDIR
1963  MKTEMP      Override default value for MKTEMP
1964  MV          Override default value for MV
1965  NAWK        Override default value for NAWK
1966  PRINTF      Override default value for PRINTF
1967  RM          Override default value for RM
1968  SH          Override default value for SH
1969  SORT        Override default value for SORT
1970  TAIL        Override default value for TAIL
1971  TAR         Override default value for TAR
1972  TEE         Override default value for TEE
1973  TOUCH       Override default value for TOUCH
1974  TR          Override default value for TR
1975  UNAME       Override default value for UNAME
1976  UNIQ        Override default value for UNIQ
1977  WC          Override default value for WC
1978  WHICH       Override default value for WHICH
1979  XARGS       Override default value for XARGS
1980  AWK         Override default value for AWK
1981  GREP        Override default value for GREP
1982  EGREP       Override default value for EGREP
1983  FGREP       Override default value for FGREP
1984  SED         Override default value for SED
1985  CYGPATH     Override default value for CYGPATH
1986  READLINK    Override default value for READLINK
1987  DF          Override default value for DF
1988  SETFILE     Override default value for SETFILE
1989  UNZIP       Override default value for UNZIP
1990  ZIP         Override default value for ZIP
1991  LDD         Override default value for LDD
1992  OTOOL       Override default value for OTOOL
1993  READELF     Override default value for READELF
1994  HG          Override default value for HG
1995  STAT        Override default value for STAT
1996  TIME        Override default value for TIME
1997  DSYMUTIL    Override default value for DSYMUTIL
1998  XATTR       Override default value for XATTR
1999  CODESIGN    Override default value for CODESIGN
2000  PKG_CONFIG  path to pkg-config utility
2001  JAVA        Override default value for JAVA
2002  JAVAC       Override default value for JAVAC
2003  JAVAH       Override default value for JAVAH
2004  JAR         Override default value for JAR
2005  NATIVE2ASCII
2006              Override default value for NATIVE2ASCII
2007  JARSIGNER   Override default value for JARSIGNER
2008  CC          C compiler command
2009  CFLAGS      C compiler flags
2010  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2011              nonstandard directory <lib dir>
2012  LIBS        libraries to pass to the linker, e.g. -l<library>
2013  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2014              you have headers in a nonstandard directory <include dir>
2015  CXX         C++ compiler command
2016  CXXFLAGS    C++ compiler flags
2017  CPP         C preprocessor
2018  CXXCPP      C++ preprocessor
2019  AS          Override default value for AS
2020  AR          Override default value for AR
2021  OBJC        Objective C compiler command
2022  OBJCFLAGS   Objective C compiler flags
2023  LIPO        Override default value for LIPO
2024  STRIP       Override default value for STRIP
2025  NM          Override default value for NM
2026  GNM         Override default value for GNM
2027  MCS         Override default value for MCS
2028  OBJCOPY     Override default value for OBJCOPY
2029  OBJDUMP     Override default value for OBJDUMP
2030  BUILD_CC    Override default value for BUILD_CC
2031  BUILD_CXX   Override default value for BUILD_CXX
2032  BUILD_LD    Override default value for BUILD_LD
2033  JTREGEXE    Override default value for JTREGEXE
2034  XMKMF       Path to xmkmf, Makefile generator for X Window System
2035  FREETYPE_CFLAGS
2036              C compiler flags for FREETYPE, overriding pkg-config
2037  FREETYPE_LIBS
2038              linker flags for FREETYPE, overriding pkg-config
2039  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2040  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2041  LIBFFI_CFLAGS
2042              C compiler flags for LIBFFI, overriding pkg-config
2043  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2044  CCACHE      Override default value for CCACHE
2045
2046Use these variables to override the choices made by `configure' or to help
2047it to find libraries and programs with nonstandard names/locations.
2048
2049Report bugs to <build-dev@openjdk.java.net>.
2050OpenJDK home page: <http://openjdk.java.net>.
2051_ACEOF
2052ac_status=$?
2053fi
2054
2055if test "$ac_init_help" = "recursive"; then
2056  # If there are subdirs, report their specific --help.
2057  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2058    test -d "$ac_dir" ||
2059      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2060      continue
2061    ac_builddir=.
2062
2063case "$ac_dir" in
2064.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2065*)
2066  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2067  # A ".." for each directory in $ac_dir_suffix.
2068  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2069  case $ac_top_builddir_sub in
2070  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2071  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2072  esac ;;
2073esac
2074ac_abs_top_builddir=$ac_pwd
2075ac_abs_builddir=$ac_pwd$ac_dir_suffix
2076# for backward compatibility:
2077ac_top_builddir=$ac_top_build_prefix
2078
2079case $srcdir in
2080  .)  # We are building in place.
2081    ac_srcdir=.
2082    ac_top_srcdir=$ac_top_builddir_sub
2083    ac_abs_top_srcdir=$ac_pwd ;;
2084  [\\/]* | ?:[\\/]* )  # Absolute name.
2085    ac_srcdir=$srcdir$ac_dir_suffix;
2086    ac_top_srcdir=$srcdir
2087    ac_abs_top_srcdir=$srcdir ;;
2088  *) # Relative name.
2089    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2090    ac_top_srcdir=$ac_top_build_prefix$srcdir
2091    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2092esac
2093ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2094
2095    cd "$ac_dir" || { ac_status=$?; continue; }
2096    # Check for guested configure.
2097    if test -f "$ac_srcdir/configure.gnu"; then
2098      echo &&
2099      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2100    elif test -f "$ac_srcdir/configure"; then
2101      echo &&
2102      $SHELL "$ac_srcdir/configure" --help=recursive
2103    else
2104      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2105    fi || ac_status=$?
2106    cd "$ac_pwd" || { ac_status=$?; break; }
2107  done
2108fi
2109
2110test -n "$ac_init_help" && exit $ac_status
2111if $ac_init_version; then
2112  cat <<\_ACEOF
2113OpenJDK configure jdk8
2114generated by GNU Autoconf 2.69
2115
2116Copyright (C) 2012 Free Software Foundation, Inc.
2117This configure script is free software; the Free Software Foundation
2118gives unlimited permission to copy, distribute and modify it.
2119_ACEOF
2120  exit
2121fi
2122
2123## ------------------------ ##
2124## Autoconf initialization. ##
2125## ------------------------ ##
2126
2127# ac_fn_c_try_compile LINENO
2128# --------------------------
2129# Try to compile conftest.$ac_ext, and return whether this succeeded.
2130ac_fn_c_try_compile ()
2131{
2132  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2133  rm -f conftest.$ac_objext
2134  if { { ac_try="$ac_compile"
2135case "(($ac_try" in
2136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2137  *) ac_try_echo=$ac_try;;
2138esac
2139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2140$as_echo "$ac_try_echo"; } >&5
2141  (eval "$ac_compile") 2>conftest.err
2142  ac_status=$?
2143  if test -s conftest.err; then
2144    grep -v '^ *+' conftest.err >conftest.er1
2145    cat conftest.er1 >&5
2146    mv -f conftest.er1 conftest.err
2147  fi
2148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2149  test $ac_status = 0; } && {
2150	 test -z "$ac_c_werror_flag" ||
2151	 test ! -s conftest.err
2152       } && test -s conftest.$ac_objext; then :
2153  ac_retval=0
2154else
2155  $as_echo "$as_me: failed program was:" >&5
2156sed 's/^/| /' conftest.$ac_ext >&5
2157
2158	ac_retval=1
2159fi
2160  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2161  as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_try_compile
2164
2165# ac_fn_cxx_try_compile LINENO
2166# ----------------------------
2167# Try to compile conftest.$ac_ext, and return whether this succeeded.
2168ac_fn_cxx_try_compile ()
2169{
2170  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171  rm -f conftest.$ac_objext
2172  if { { ac_try="$ac_compile"
2173case "(($ac_try" in
2174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175  *) ac_try_echo=$ac_try;;
2176esac
2177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178$as_echo "$ac_try_echo"; } >&5
2179  (eval "$ac_compile") 2>conftest.err
2180  ac_status=$?
2181  if test -s conftest.err; then
2182    grep -v '^ *+' conftest.err >conftest.er1
2183    cat conftest.er1 >&5
2184    mv -f conftest.er1 conftest.err
2185  fi
2186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2187  test $ac_status = 0; } && {
2188	 test -z "$ac_cxx_werror_flag" ||
2189	 test ! -s conftest.err
2190       } && test -s conftest.$ac_objext; then :
2191  ac_retval=0
2192else
2193  $as_echo "$as_me: failed program was:" >&5
2194sed 's/^/| /' conftest.$ac_ext >&5
2195
2196	ac_retval=1
2197fi
2198  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199  as_fn_set_status $ac_retval
2200
2201} # ac_fn_cxx_try_compile
2202
2203# ac_fn_c_try_cpp LINENO
2204# ----------------------
2205# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2206ac_fn_c_try_cpp ()
2207{
2208  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209  if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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; } > conftest.i && {
2225	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2226	 test ! -s conftest.err
2227       }; 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_c_try_cpp
2239
2240# ac_fn_cxx_try_cpp LINENO
2241# ------------------------
2242# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2243ac_fn_cxx_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_cxx_preproc_warn_flag$ac_cxx_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_cxx_try_cpp
2276
2277# ac_fn_objc_try_compile LINENO
2278# -----------------------------
2279# Try to compile conftest.$ac_ext, and return whether this succeeded.
2280ac_fn_objc_try_compile ()
2281{
2282  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283  rm -f conftest.$ac_objext
2284  if { { ac_try="$ac_compile"
2285case "(($ac_try" in
2286  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2287  *) ac_try_echo=$ac_try;;
2288esac
2289eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2290$as_echo "$ac_try_echo"; } >&5
2291  (eval "$ac_compile") 2>conftest.err
2292  ac_status=$?
2293  if test -s conftest.err; then
2294    grep -v '^ *+' conftest.err >conftest.er1
2295    cat conftest.er1 >&5
2296    mv -f conftest.er1 conftest.err
2297  fi
2298  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2299  test $ac_status = 0; } && {
2300	 test -z "$ac_objc_werror_flag" ||
2301	 test ! -s conftest.err
2302       } && test -s conftest.$ac_objext; then :
2303  ac_retval=0
2304else
2305  $as_echo "$as_me: failed program was:" >&5
2306sed 's/^/| /' conftest.$ac_ext >&5
2307
2308	ac_retval=1
2309fi
2310  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311  as_fn_set_status $ac_retval
2312
2313} # ac_fn_objc_try_compile
2314
2315# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2316# ---------------------------------------------------------
2317# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2318# the include files in INCLUDES and setting the cache variable VAR
2319# accordingly.
2320ac_fn_cxx_check_header_mongrel ()
2321{
2322  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323  if eval \${$3+:} false; then :
2324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2325$as_echo_n "checking for $2... " >&6; }
2326if eval \${$3+:} false; then :
2327  $as_echo_n "(cached) " >&6
2328fi
2329eval ac_res=\$$3
2330	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
2332else
2333  # Is the header compilable?
2334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2335$as_echo_n "checking $2 usability... " >&6; }
2336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339#include <$2>
2340_ACEOF
2341if ac_fn_cxx_try_compile "$LINENO"; then :
2342  ac_header_compiler=yes
2343else
2344  ac_header_compiler=no
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2348$as_echo "$ac_header_compiler" >&6; }
2349
2350# Is the header present?
2351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2352$as_echo_n "checking $2 presence... " >&6; }
2353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h.  */
2355#include <$2>
2356_ACEOF
2357if ac_fn_cxx_try_cpp "$LINENO"; then :
2358  ac_header_preproc=yes
2359else
2360  ac_header_preproc=no
2361fi
2362rm -f conftest.err conftest.i conftest.$ac_ext
2363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2364$as_echo "$ac_header_preproc" >&6; }
2365
2366# So?  What about this header?
2367case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2368  yes:no: )
2369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2370$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2371    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2372$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2373    ;;
2374  no:yes:* )
2375    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2376$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2378$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2379    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2380$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2381    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2382$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2383    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2384$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2385( $as_echo "## ----------------------------------------- ##
2386## Report this to build-dev@openjdk.java.net ##
2387## ----------------------------------------- ##"
2388     ) | sed "s/^/$as_me: WARNING:     /" >&2
2389    ;;
2390esac
2391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2392$as_echo_n "checking for $2... " >&6; }
2393if eval \${$3+:} false; then :
2394  $as_echo_n "(cached) " >&6
2395else
2396  eval "$3=\$ac_header_compiler"
2397fi
2398eval ac_res=\$$3
2399	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401fi
2402  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2403
2404} # ac_fn_cxx_check_header_mongrel
2405
2406# ac_fn_cxx_try_run LINENO
2407# ------------------------
2408# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2409# that executables *can* be run.
2410ac_fn_cxx_try_run ()
2411{
2412  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2413  if { { ac_try="$ac_link"
2414case "(($ac_try" in
2415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2416  *) ac_try_echo=$ac_try;;
2417esac
2418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2419$as_echo "$ac_try_echo"; } >&5
2420  (eval "$ac_link") 2>&5
2421  ac_status=$?
2422  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2423  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2424  { { case "(($ac_try" in
2425  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2426  *) ac_try_echo=$ac_try;;
2427esac
2428eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2429$as_echo "$ac_try_echo"; } >&5
2430  (eval "$ac_try") 2>&5
2431  ac_status=$?
2432  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2433  test $ac_status = 0; }; }; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: program exited with status $ac_status" >&5
2437       $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440       ac_retval=$ac_status
2441fi
2442  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2443  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444  as_fn_set_status $ac_retval
2445
2446} # ac_fn_cxx_try_run
2447
2448# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2449# ---------------------------------------------------------
2450# Tests whether HEADER exists and can be compiled using the include files in
2451# INCLUDES, setting the cache variable VAR accordingly.
2452ac_fn_cxx_check_header_compile ()
2453{
2454  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2456$as_echo_n "checking for $2... " >&6; }
2457if eval \${$3+:} false; then :
2458  $as_echo_n "(cached) " >&6
2459else
2460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461/* end confdefs.h.  */
2462$4
2463#include <$2>
2464_ACEOF
2465if ac_fn_cxx_try_compile "$LINENO"; then :
2466  eval "$3=yes"
2467else
2468  eval "$3=no"
2469fi
2470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2471fi
2472eval ac_res=\$$3
2473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2474$as_echo "$ac_res" >&6; }
2475  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2476
2477} # ac_fn_cxx_check_header_compile
2478
2479# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2480# ----------------------------------------------
2481# Tries to find the compile-time value of EXPR in a program that includes
2482# INCLUDES, setting VAR accordingly. Returns whether the value could be
2483# computed
2484ac_fn_cxx_compute_int ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if test "$cross_compiling" = yes; then
2488    # Depending upon the size, compute the lo and hi bounds.
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492int
2493main ()
2494{
2495static int test_array [1 - 2 * !(($2) >= 0)];
2496test_array [0] = 0;
2497return test_array [0];
2498
2499  ;
2500  return 0;
2501}
2502_ACEOF
2503if ac_fn_cxx_try_compile "$LINENO"; then :
2504  ac_lo=0 ac_mid=0
2505  while :; do
2506    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508$4
2509int
2510main ()
2511{
2512static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2513test_array [0] = 0;
2514return test_array [0];
2515
2516  ;
2517  return 0;
2518}
2519_ACEOF
2520if ac_fn_cxx_try_compile "$LINENO"; then :
2521  ac_hi=$ac_mid; break
2522else
2523  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2524			if test $ac_lo -le $ac_mid; then
2525			  ac_lo= ac_hi=
2526			  break
2527			fi
2528			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2529fi
2530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2531  done
2532else
2533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534/* end confdefs.h.  */
2535$4
2536int
2537main ()
2538{
2539static int test_array [1 - 2 * !(($2) < 0)];
2540test_array [0] = 0;
2541return test_array [0];
2542
2543  ;
2544  return 0;
2545}
2546_ACEOF
2547if ac_fn_cxx_try_compile "$LINENO"; then :
2548  ac_hi=-1 ac_mid=-1
2549  while :; do
2550    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2551/* end confdefs.h.  */
2552$4
2553int
2554main ()
2555{
2556static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2557test_array [0] = 0;
2558return test_array [0];
2559
2560  ;
2561  return 0;
2562}
2563_ACEOF
2564if ac_fn_cxx_try_compile "$LINENO"; then :
2565  ac_lo=$ac_mid; break
2566else
2567  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2568			if test $ac_mid -le $ac_hi; then
2569			  ac_lo= ac_hi=
2570			  break
2571			fi
2572			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2573fi
2574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2575  done
2576else
2577  ac_lo= ac_hi=
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582# Binary search between lo and hi bounds.
2583while test "x$ac_lo" != "x$ac_hi"; do
2584  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586/* end confdefs.h.  */
2587$4
2588int
2589main ()
2590{
2591static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2592test_array [0] = 0;
2593return test_array [0];
2594
2595  ;
2596  return 0;
2597}
2598_ACEOF
2599if ac_fn_cxx_try_compile "$LINENO"; then :
2600  ac_hi=$ac_mid
2601else
2602  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2603fi
2604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2605done
2606case $ac_lo in #((
2607?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2608'') ac_retval=1 ;;
2609esac
2610  else
2611    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612/* end confdefs.h.  */
2613$4
2614static long int longval () { return $2; }
2615static unsigned long int ulongval () { return $2; }
2616#include <stdio.h>
2617#include <stdlib.h>
2618int
2619main ()
2620{
2621
2622  FILE *f = fopen ("conftest.val", "w");
2623  if (! f)
2624    return 1;
2625  if (($2) < 0)
2626    {
2627      long int i = longval ();
2628      if (i != ($2))
2629	return 1;
2630      fprintf (f, "%ld", i);
2631    }
2632  else
2633    {
2634      unsigned long int i = ulongval ();
2635      if (i != ($2))
2636	return 1;
2637      fprintf (f, "%lu", i);
2638    }
2639  /* Do not output a trailing newline, as this causes \r\n confusion
2640     on some platforms.  */
2641  return ferror (f) || fclose (f) != 0;
2642
2643  ;
2644  return 0;
2645}
2646_ACEOF
2647if ac_fn_cxx_try_run "$LINENO"; then :
2648  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2649else
2650  ac_retval=1
2651fi
2652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2653  conftest.$ac_objext conftest.beam conftest.$ac_ext
2654rm -f conftest.val
2655
2656  fi
2657  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2658  as_fn_set_status $ac_retval
2659
2660} # ac_fn_cxx_compute_int
2661
2662# ac_fn_cxx_try_link LINENO
2663# -------------------------
2664# Try to link conftest.$ac_ext, and return whether this succeeded.
2665ac_fn_cxx_try_link ()
2666{
2667  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2668  rm -f conftest.$ac_objext conftest$ac_exeext
2669  if { { ac_try="$ac_link"
2670case "(($ac_try" in
2671  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2672  *) ac_try_echo=$ac_try;;
2673esac
2674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2675$as_echo "$ac_try_echo"; } >&5
2676  (eval "$ac_link") 2>conftest.err
2677  ac_status=$?
2678  if test -s conftest.err; then
2679    grep -v '^ *+' conftest.err >conftest.er1
2680    cat conftest.er1 >&5
2681    mv -f conftest.er1 conftest.err
2682  fi
2683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2684  test $ac_status = 0; } && {
2685	 test -z "$ac_cxx_werror_flag" ||
2686	 test ! -s conftest.err
2687       } && test -s conftest$ac_exeext && {
2688	 test "$cross_compiling" = yes ||
2689	 test -x conftest$ac_exeext
2690       }; then :
2691  ac_retval=0
2692else
2693  $as_echo "$as_me: failed program was:" >&5
2694sed 's/^/| /' conftest.$ac_ext >&5
2695
2696	ac_retval=1
2697fi
2698  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2699  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2700  # interfere with the next link command; also delete a directory that is
2701  # left behind by Apple's compiler.  We do this before executing the actions.
2702  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2703  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2704  as_fn_set_status $ac_retval
2705
2706} # ac_fn_cxx_try_link
2707
2708# ac_fn_cxx_check_func LINENO FUNC VAR
2709# ------------------------------------
2710# Tests whether FUNC exists, setting the cache variable VAR accordingly
2711ac_fn_cxx_check_func ()
2712{
2713  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715$as_echo_n "checking for $2... " >&6; }
2716if eval \${$3+:} false; then :
2717  $as_echo_n "(cached) " >&6
2718else
2719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720/* end confdefs.h.  */
2721/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2722   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2723#define $2 innocuous_$2
2724
2725/* System header to define __stub macros and hopefully few prototypes,
2726    which can conflict with char $2 (); below.
2727    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2728    <limits.h> exists even on freestanding compilers.  */
2729
2730#ifdef __STDC__
2731# include <limits.h>
2732#else
2733# include <assert.h>
2734#endif
2735
2736#undef $2
2737
2738/* Override any GCC internal prototype to avoid an error.
2739   Use char because int might match the return type of a GCC
2740   builtin and then its argument prototype would still apply.  */
2741#ifdef __cplusplus
2742extern "C"
2743#endif
2744char $2 ();
2745/* The GNU C library defines this for functions which it implements
2746    to always fail with ENOSYS.  Some functions are actually named
2747    something starting with __ and the normal name is an alias.  */
2748#if defined __stub_$2 || defined __stub___$2
2749choke me
2750#endif
2751
2752int
2753main ()
2754{
2755return $2 ();
2756  ;
2757  return 0;
2758}
2759_ACEOF
2760if ac_fn_cxx_try_link "$LINENO"; then :
2761  eval "$3=yes"
2762else
2763  eval "$3=no"
2764fi
2765rm -f core conftest.err conftest.$ac_objext \
2766    conftest$ac_exeext conftest.$ac_ext
2767fi
2768eval ac_res=\$$3
2769	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2770$as_echo "$ac_res" >&6; }
2771  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2772
2773} # ac_fn_cxx_check_func
2774
2775# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2776# -------------------------------------------------------
2777# Tests whether HEADER exists and can be compiled using the include files in
2778# INCLUDES, setting the cache variable VAR accordingly.
2779ac_fn_c_check_header_compile ()
2780{
2781  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2783$as_echo_n "checking for $2... " >&6; }
2784if eval \${$3+:} false; then :
2785  $as_echo_n "(cached) " >&6
2786else
2787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2788/* end confdefs.h.  */
2789$4
2790#include <$2>
2791_ACEOF
2792if ac_fn_c_try_compile "$LINENO"; then :
2793  eval "$3=yes"
2794else
2795  eval "$3=no"
2796fi
2797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2798fi
2799eval ac_res=\$$3
2800	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2801$as_echo "$ac_res" >&6; }
2802  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2803
2804} # ac_fn_c_check_header_compile
2805cat >config.log <<_ACEOF
2806This file contains any messages produced by compilers while
2807running configure, to aid debugging if configure makes a mistake.
2808
2809It was created by OpenJDK $as_me jdk8, which was
2810generated by GNU Autoconf 2.69.  Invocation command line was
2811
2812  $ $0 $@
2813
2814_ACEOF
2815exec 5>>config.log
2816{
2817cat <<_ASUNAME
2818## --------- ##
2819## Platform. ##
2820## --------- ##
2821
2822hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2823uname -m = `(uname -m) 2>/dev/null || echo unknown`
2824uname -r = `(uname -r) 2>/dev/null || echo unknown`
2825uname -s = `(uname -s) 2>/dev/null || echo unknown`
2826uname -v = `(uname -v) 2>/dev/null || echo unknown`
2827
2828/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2829/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2830
2831/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2832/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2833/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2834/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2835/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2836/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2837/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2838
2839_ASUNAME
2840
2841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2842for as_dir in $PATH
2843do
2844  IFS=$as_save_IFS
2845  test -z "$as_dir" && as_dir=.
2846    $as_echo "PATH: $as_dir"
2847  done
2848IFS=$as_save_IFS
2849
2850} >&5
2851
2852cat >&5 <<_ACEOF
2853
2854
2855## ----------- ##
2856## Core tests. ##
2857## ----------- ##
2858
2859_ACEOF
2860
2861
2862# Keep a trace of the command line.
2863# Strip out --no-create and --no-recursion so they do not pile up.
2864# Strip out --silent because we don't want to record it for future runs.
2865# Also quote any args containing shell meta-characters.
2866# Make two passes to allow for proper duplicate-argument suppression.
2867ac_configure_args=
2868ac_configure_args0=
2869ac_configure_args1=
2870ac_must_keep_next=false
2871for ac_pass in 1 2
2872do
2873  for ac_arg
2874  do
2875    case $ac_arg in
2876    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2877    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2878    | -silent | --silent | --silen | --sile | --sil)
2879      continue ;;
2880    *\'*)
2881      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2882    esac
2883    case $ac_pass in
2884    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2885    2)
2886      as_fn_append ac_configure_args1 " '$ac_arg'"
2887      if test $ac_must_keep_next = true; then
2888	ac_must_keep_next=false # Got value, back to normal.
2889      else
2890	case $ac_arg in
2891	  *=* | --config-cache | -C | -disable-* | --disable-* \
2892	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2893	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2894	  | -with-* | --with-* | -without-* | --without-* | --x)
2895	    case "$ac_configure_args0 " in
2896	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2897	    esac
2898	    ;;
2899	  -* ) ac_must_keep_next=true ;;
2900	esac
2901      fi
2902      as_fn_append ac_configure_args " '$ac_arg'"
2903      ;;
2904    esac
2905  done
2906done
2907{ ac_configure_args0=; unset ac_configure_args0;}
2908{ ac_configure_args1=; unset ac_configure_args1;}
2909
2910# When interrupted or exit'd, cleanup temporary files, and complete
2911# config.log.  We remove comments because anyway the quotes in there
2912# would cause problems or look ugly.
2913# WARNING: Use '\'' to represent an apostrophe within the trap.
2914# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2915trap 'exit_status=$?
2916  # Save into config.log some information that might help in debugging.
2917  {
2918    echo
2919
2920    $as_echo "## ---------------- ##
2921## Cache variables. ##
2922## ---------------- ##"
2923    echo
2924    # The following way of writing the cache mishandles newlines in values,
2925(
2926  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2927    eval ac_val=\$$ac_var
2928    case $ac_val in #(
2929    *${as_nl}*)
2930      case $ac_var in #(
2931      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2932$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2933      esac
2934      case $ac_var in #(
2935      _ | IFS | as_nl) ;; #(
2936      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2937      *) { eval $ac_var=; unset $ac_var;} ;;
2938      esac ;;
2939    esac
2940  done
2941  (set) 2>&1 |
2942    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2943    *${as_nl}ac_space=\ *)
2944      sed -n \
2945	"s/'\''/'\''\\\\'\'''\''/g;
2946	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2947      ;; #(
2948    *)
2949      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2950      ;;
2951    esac |
2952    sort
2953)
2954    echo
2955
2956    $as_echo "## ----------------- ##
2957## Output variables. ##
2958## ----------------- ##"
2959    echo
2960    for ac_var in $ac_subst_vars
2961    do
2962      eval ac_val=\$$ac_var
2963      case $ac_val in
2964      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2965      esac
2966      $as_echo "$ac_var='\''$ac_val'\''"
2967    done | sort
2968    echo
2969
2970    if test -n "$ac_subst_files"; then
2971      $as_echo "## ------------------- ##
2972## File substitutions. ##
2973## ------------------- ##"
2974      echo
2975      for ac_var in $ac_subst_files
2976      do
2977	eval ac_val=\$$ac_var
2978	case $ac_val in
2979	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2980	esac
2981	$as_echo "$ac_var='\''$ac_val'\''"
2982      done | sort
2983      echo
2984    fi
2985
2986    if test -s confdefs.h; then
2987      $as_echo "## ----------- ##
2988## confdefs.h. ##
2989## ----------- ##"
2990      echo
2991      cat confdefs.h
2992      echo
2993    fi
2994    test "$ac_signal" != 0 &&
2995      $as_echo "$as_me: caught signal $ac_signal"
2996    $as_echo "$as_me: exit $exit_status"
2997  } >&5
2998  rm -f core *.core core.conftest.* &&
2999    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3000    exit $exit_status
3001' 0
3002for ac_signal in 1 2 13 15; do
3003  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3004done
3005ac_signal=0
3006
3007# confdefs.h avoids OS command line length limits that DEFS can exceed.
3008rm -f -r conftest* confdefs.h
3009
3010$as_echo "/* confdefs.h */" > confdefs.h
3011
3012# Predefined preprocessor variables.
3013
3014cat >>confdefs.h <<_ACEOF
3015#define PACKAGE_NAME "$PACKAGE_NAME"
3016_ACEOF
3017
3018cat >>confdefs.h <<_ACEOF
3019#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3020_ACEOF
3021
3022cat >>confdefs.h <<_ACEOF
3023#define PACKAGE_VERSION "$PACKAGE_VERSION"
3024_ACEOF
3025
3026cat >>confdefs.h <<_ACEOF
3027#define PACKAGE_STRING "$PACKAGE_STRING"
3028_ACEOF
3029
3030cat >>confdefs.h <<_ACEOF
3031#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3032_ACEOF
3033
3034cat >>confdefs.h <<_ACEOF
3035#define PACKAGE_URL "$PACKAGE_URL"
3036_ACEOF
3037
3038
3039# Let the site file select an alternate cache file if it wants to.
3040# Prefer an explicitly selected file to automatically selected ones.
3041ac_site_file1=NONE
3042ac_site_file2=NONE
3043if test -n "$CONFIG_SITE"; then
3044  # We do not want a PATH search for config.site.
3045  case $CONFIG_SITE in #((
3046    -*)  ac_site_file1=./$CONFIG_SITE;;
3047    */*) ac_site_file1=$CONFIG_SITE;;
3048    *)   ac_site_file1=./$CONFIG_SITE;;
3049  esac
3050elif test "x$prefix" != xNONE; then
3051  ac_site_file1=$prefix/share/config.site
3052  ac_site_file2=$prefix/etc/config.site
3053else
3054  ac_site_file1=$ac_default_prefix/share/config.site
3055  ac_site_file2=$ac_default_prefix/etc/config.site
3056fi
3057for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3058do
3059  test "x$ac_site_file" = xNONE && continue
3060  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3061    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3062$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3063    sed 's/^/| /' "$ac_site_file" >&5
3064    . "$ac_site_file" \
3065      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3067as_fn_error $? "failed to load site script $ac_site_file
3068See \`config.log' for more details" "$LINENO" 5; }
3069  fi
3070done
3071
3072if test -r "$cache_file"; then
3073  # Some versions of bash will fail to source /dev/null (special files
3074  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3075  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3076    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3077$as_echo "$as_me: loading cache $cache_file" >&6;}
3078    case $cache_file in
3079      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3080      *)                      . "./$cache_file";;
3081    esac
3082  fi
3083else
3084  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3085$as_echo "$as_me: creating cache $cache_file" >&6;}
3086  >$cache_file
3087fi
3088
3089# Check that the precious variables saved in the cache have kept the same
3090# value.
3091ac_cache_corrupted=false
3092for ac_var in $ac_precious_vars; do
3093  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3094  eval ac_new_set=\$ac_env_${ac_var}_set
3095  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3096  eval ac_new_val=\$ac_env_${ac_var}_value
3097  case $ac_old_set,$ac_new_set in
3098    set,)
3099      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3100$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3101      ac_cache_corrupted=: ;;
3102    ,set)
3103      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3104$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3105      ac_cache_corrupted=: ;;
3106    ,);;
3107    *)
3108      if test "x$ac_old_val" != "x$ac_new_val"; then
3109	# differences in whitespace do not lead to failure.
3110	ac_old_val_w=`echo x $ac_old_val`
3111	ac_new_val_w=`echo x $ac_new_val`
3112	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3113	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3114$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3115	  ac_cache_corrupted=:
3116	else
3117	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3118$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3119	  eval $ac_var=\$ac_old_val
3120	fi
3121	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3122$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3123	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3124$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3125      fi;;
3126  esac
3127  # Pass precious variables to config.status.
3128  if test "$ac_new_set" = set; then
3129    case $ac_new_val in
3130    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3131    *) ac_arg=$ac_var=$ac_new_val ;;
3132    esac
3133    case " $ac_configure_args " in
3134      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3135      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3136    esac
3137  fi
3138done
3139if $ac_cache_corrupted; then
3140  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3142  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3143$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3144  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3145fi
3146## -------------------- ##
3147## Main body of script. ##
3148## -------------------- ##
3149
3150ac_ext=c
3151ac_cpp='$CPP $CPPFLAGS'
3152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3154ac_compiler_gnu=$ac_cv_c_compiler_gnu
3155
3156
3157
3158ac_aux_dir=
3159for ac_dir in build-aux "$srcdir"/build-aux; do
3160  if test -f "$ac_dir/install-sh"; then
3161    ac_aux_dir=$ac_dir
3162    ac_install_sh="$ac_aux_dir/install-sh -c"
3163    break
3164  elif test -f "$ac_dir/install.sh"; then
3165    ac_aux_dir=$ac_dir
3166    ac_install_sh="$ac_aux_dir/install.sh -c"
3167    break
3168  elif test -f "$ac_dir/shtool"; then
3169    ac_aux_dir=$ac_dir
3170    ac_install_sh="$ac_aux_dir/shtool install -c"
3171    break
3172  fi
3173done
3174if test -z "$ac_aux_dir"; then
3175  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3176fi
3177
3178# These three variables are undocumented and unsupported,
3179# and are intended to be withdrawn in a future Autoconf release.
3180# They can cause serious problems if a builder's source tree is in a directory
3181# whose full name contains unusual characters.
3182ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3183ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3184ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3185
3186
3187# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3188
3189#
3190# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3191# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3192#
3193# This code is free software; you can redistribute it and/or modify it
3194# under the terms of the GNU General Public License version 2 only, as
3195# published by the Free Software Foundation.  Oracle designates this
3196# particular file as subject to the "Classpath" exception as provided
3197# by Oracle in the LICENSE file that accompanied this code.
3198#
3199# This code is distributed in the hope that it will be useful, but WITHOUT
3200# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3201# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3202# version 2 for more details (a copy is included in the LICENSE file that
3203# accompanied this code).
3204#
3205# You should have received a copy of the GNU General Public License version
3206# 2 along with this work; if not, write to the Free Software Foundation,
3207# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3208#
3209# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3210# or visit www.oracle.com if you need additional information or have any
3211# questions.
3212#
3213
3214#
3215# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3216#
3217# This program is free software; you can redistribute it and/or modify
3218# it under the terms of the GNU General Public License as published by
3219# the Free Software Foundation; either version 2 of the License, or
3220# (at your option) any later version.
3221#
3222# This program is distributed in the hope that it will be useful, but
3223# WITHOUT ANY WARRANTY; without even the implied warranty of
3224# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3225# General Public License for more details.
3226#
3227# You should have received a copy of the GNU General Public License
3228# along with this program; if not, write to the Free Software
3229# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3230#
3231# As a special exception to the GNU General Public License, if you
3232# distribute this file as part of a program that contains a
3233# configuration script generated by Autoconf, you may include it under
3234# the same distribution terms that you use for the rest of that program.
3235
3236# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3237# ----------------------------------
3238# PKG_PROG_PKG_CONFIG
3239
3240# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3241#
3242# Check to see whether a particular set of modules exists.  Similar
3243# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3244#
3245#
3246# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3247# this or PKG_CHECK_MODULES is called, or make sure to call
3248# PKG_CHECK_EXISTS manually
3249# --------------------------------------------------------------
3250
3251
3252
3253# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3254# ---------------------------------------------
3255# _PKG_CONFIG
3256
3257# _PKG_SHORT_ERRORS_SUPPORTED
3258# -----------------------------
3259# _PKG_SHORT_ERRORS_SUPPORTED
3260
3261
3262# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3263# [ACTION-IF-NOT-FOUND])
3264#
3265#
3266# Note that if there is a possibility the first call to
3267# PKG_CHECK_MODULES might not happen, you should be sure to include an
3268# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3269#
3270#
3271# --------------------------------------------------------------
3272# PKG_CHECK_MODULES
3273
3274
3275# Include these first...
3276#
3277# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279#
3280# This code is free software; you can redistribute it and/or modify it
3281# under the terms of the GNU General Public License version 2 only, as
3282# published by the Free Software Foundation.  Oracle designates this
3283# particular file as subject to the "Classpath" exception as provided
3284# by Oracle in the LICENSE file that accompanied this code.
3285#
3286# This code is distributed in the hope that it will be useful, but WITHOUT
3287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289# version 2 for more details (a copy is included in the LICENSE file that
3290# accompanied this code).
3291#
3292# You should have received a copy of the GNU General Public License version
3293# 2 along with this work; if not, write to the Free Software Foundation,
3294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295#
3296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297# or visit www.oracle.com if you need additional information or have any
3298# questions.
3299#
3300
3301# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3302# If so, then append $1 to $2 \
3303# Also set JVM_ARG_OK to true/false depending on outcome.
3304
3305
3306# Appends a string to a path variable, only adding the : when needed.
3307
3308
3309# This will make sure the given variable points to a full and proper
3310# path. This means:
3311# 1) There will be no spaces in the path. On posix platforms,
3312#    spaces in the path will result in an error. On Windows,
3313#    the path will be rewritten using short-style to be space-free.
3314# 2) The path will be absolute, and it will be in unix-style (on
3315#     cygwin).
3316# $1: The name of the variable to fix
3317
3318
3319# This will make sure the given variable points to a executable
3320# with a full and proper path. This means:
3321# 1) There will be no spaces in the path. On posix platforms,
3322#    spaces in the path will result in an error. On Windows,
3323#    the path will be rewritten using short-style to be space-free.
3324# 2) The path will be absolute, and it will be in unix-style (on
3325#     cygwin).
3326# Any arguments given to the executable is preserved.
3327# If the input variable does not have a directory specification, then
3328# it need to be in the PATH.
3329# $1: The name of the variable to fix
3330
3331
3332
3333
3334# Register a --with argument but mark it as deprecated
3335# $1: The name of the with argument to deprecate, not including --with-
3336
3337
3338# Register a --enable argument but mark it as deprecated
3339# $1: The name of the with argument to deprecate, not including --enable-
3340# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3341
3342
3343
3344
3345# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3346# $1: variable to check
3347
3348
3349# Check that there are no unprocessed overridden variables left.
3350# If so, they are an incorrect argument and we will exit with an error.
3351
3352
3353# Setup a tool for the given variable. If correctly specified by the user,
3354# use that value, otherwise search for the tool using the supplied code snippet.
3355# $1: variable to set
3356# $2: code snippet to call to look for the tool
3357
3358
3359# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3360# $1: variable to set
3361# $2: executable name (or list of names) to look for
3362
3363
3364# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3365# $1: variable to set
3366# $2: executable name (or list of names) to look for
3367
3368
3369# Like BASIC_PATH_PROGS but fails if no tool was found.
3370# $1: variable to set
3371# $2: executable name (or list of names) to look for
3372
3373
3374# Like BASIC_SETUP_TOOL but fails if no tool was found.
3375# $1: variable to set
3376# $2: autoconf macro to call to look for the special tool
3377
3378
3379# Setup the most fundamental tools that relies on not much else to set up,
3380# but is used by much of the early bootstrap code.
3381
3382
3383# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3384
3385
3386
3387
3388
3389
3390
3391#%%% Simple tools %%%
3392
3393# Check if we have found a usable version of make
3394# $1: the path to a potential make binary (or empty)
3395# $2: the description on how we found this
3396
3397
3398# Goes looking for a usable version of GNU make.
3399
3400
3401
3402
3403
3404
3405# Check if build directory is on local disk. If not possible to determine,
3406# we prefer to claim it's local.
3407# Argument 1: directory to test
3408# Argument 2: what to do if it is on local disk
3409# Argument 3: what to do otherwise (remote disk or failure)
3410
3411
3412# Check that source files have basic read permissions set. This might
3413# not be the case in cygwin in certain conditions.
3414
3415
3416
3417
3418#
3419# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3420# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3421#
3422# This code is free software; you can redistribute it and/or modify it
3423# under the terms of the GNU General Public License version 2 only, as
3424# published by the Free Software Foundation.  Oracle designates this
3425# particular file as subject to the "Classpath" exception as provided
3426# by Oracle in the LICENSE file that accompanied this code.
3427#
3428# This code is distributed in the hope that it will be useful, but WITHOUT
3429# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3430# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3431# version 2 for more details (a copy is included in the LICENSE file that
3432# accompanied this code).
3433#
3434# You should have received a copy of the GNU General Public License version
3435# 2 along with this work; if not, write to the Free Software Foundation,
3436# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3437#
3438# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3439# or visit www.oracle.com if you need additional information or have any
3440# questions.
3441#
3442
3443
3444
3445
3446
3447# Helper function which possibly converts a path using DOS-style short mode.
3448# If so, the updated path is stored in $new_path.
3449# $1: The path to check
3450
3451
3452# Helper function which possibly converts a path using DOS-style short mode.
3453# If so, the updated path is stored in $new_path.
3454# $1: The path to check
3455
3456
3457# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3458# and could probably be heavily simplified. However, all changes in this
3459# area tend to need lot of testing in different scenarios, and in lack of
3460# proper unit testing, cleaning this up has not been deemed worth the effort
3461# at the moment.
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3472
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511# ... then the rest
3512#
3513# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3514# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3515#
3516# This code is free software; you can redistribute it and/or modify it
3517# under the terms of the GNU General Public License version 2 only, as
3518# published by the Free Software Foundation.  Oracle designates this
3519# particular file as subject to the "Classpath" exception as provided
3520# by Oracle in the LICENSE file that accompanied this code.
3521#
3522# This code is distributed in the hope that it will be useful, but WITHOUT
3523# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3524# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3525# version 2 for more details (a copy is included in the LICENSE file that
3526# accompanied this code).
3527#
3528# You should have received a copy of the GNU General Public License version
3529# 2 along with this work; if not, write to the Free Software Foundation,
3530# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3531#
3532# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3533# or visit www.oracle.com if you need additional information or have any
3534# questions.
3535#
3536
3537########################################################################
3538# This file handles detection of the Boot JDK. The Boot JDK detection
3539# process has been developed as a response to solve a complex real-world
3540# problem. Initially, it was simple, but it has grown as platform after
3541# platform, idiosyncracy after idiosyncracy has been supported.
3542#
3543# The basic idea is this:
3544# 1) You need an acceptable *) JDK to use as a Boot JDK
3545# 2) There are several ways to locate a JDK, that are mostly platform
3546#    dependent **)
3547# 3) You can have multiple JDKs installed
3548# 4) If possible, configure should try to dig out an acceptable JDK
3549#    automatically, without having to resort to command-line options
3550#
3551# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3552#     javac) and not a JRE, etc.
3553#
3554# **) On Windows we typically use a well-known path.
3555#     On MacOSX we typically use the tool java_home.
3556#     On Linux we typically find javac in the $PATH, and then follow a
3557#     chain of symlinks that often ends up in a real JDK.
3558#
3559# This leads to the code where we check in different ways to locate a
3560# JDK, and if one is found, check if it is acceptable. If not, we print
3561# our reasons for rejecting it (useful when debugging non-working
3562# configure situations) and continue checking the next one.
3563########################################################################
3564
3565# Execute the check given as argument, and verify the result
3566# If the Boot JDK was previously found, do nothing
3567# $1 A command line (typically autoconf macro) to execute
3568
3569
3570# Test: Is bootjdk explicitely set by command line arguments?
3571
3572
3573# Test: Is bootjdk available from builddeps?
3574
3575
3576# Test: Is $JAVA_HOME set?
3577
3578
3579# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3580
3581
3582# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3583# $1: Argument to the java_home binary (optional)
3584
3585
3586# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3587
3588
3589# Look for a jdk in the given path. If there are multiple, try to select the newest.
3590# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3591# $1 = Path to directory containing jdk installations.
3592# $2 = String to append to the found JDK directory to get the proper JDK home
3593
3594
3595# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3596# environmental variable as base for where to look.
3597# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3598
3599
3600# Test: Is there a JDK installed in default, well-known locations?
3601
3602
3603# Check that a command-line tool in the Boot JDK is correct
3604# $1 = name of variable to assign
3605# $2 = name of binary
3606
3607
3608###############################################################################
3609#
3610# We need a Boot JDK to bootstrap the build.
3611#
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661#
3662# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3664#
3665# This code is free software; you can redistribute it and/or modify it
3666# under the terms of the GNU General Public License version 2 only, as
3667# published by the Free Software Foundation.  Oracle designates this
3668# particular file as subject to the "Classpath" exception as provided
3669# by Oracle in the LICENSE file that accompanied this code.
3670#
3671# This code is distributed in the hope that it will be useful, but WITHOUT
3672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3674# version 2 for more details (a copy is included in the LICENSE file that
3675# accompanied this code).
3676#
3677# You should have received a copy of the GNU General Public License version
3678# 2 along with this work; if not, write to the Free Software Foundation,
3679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3680#
3681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3682# or visit www.oracle.com if you need additional information or have any
3683# questions.
3684#
3685
3686
3687
3688
3689
3690# Documentation on common flags used for solstudio in HIGHEST.
3691#
3692# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3693#          done with care, there are some assumptions below that need to
3694#          be understood about the use of pointers, and IEEE behavior.
3695#
3696# -fns: Use non-standard floating point mode (not IEEE 754)
3697# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3698# -fsingle: Use single precision floating point with 'float'
3699# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3700#   (Source with excessing pointer casting and data access with mixed
3701#    pointer types are not recommended)
3702# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3703#   (If you expect perfect errno behavior, do not use this)
3704# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3705# -xrestrict: Pointer parameters to functions do not overlap
3706#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3707#    If you pass in multiple pointers to the same data, do not use this)
3708# -xlibmil: Inline some library routines
3709#   (If you expect perfect errno behavior, do not use this)
3710# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3711#   (If you expect perfect errno behavior, do not use this)
3712#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3713
3714    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3715    # Bug?
3716    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3717    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3718    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3719    #fi
3720
3721
3722
3723
3724
3725
3726# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3727#                                   [RUN-IF-FALSE])
3728# ------------------------------------------------------------
3729# Check that the c and c++ compilers support an argument
3730
3731
3732
3733
3734#
3735# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3736# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3737#
3738# This code is free software; you can redistribute it and/or modify it
3739# under the terms of the GNU General Public License version 2 only, as
3740# published by the Free Software Foundation.  Oracle designates this
3741# particular file as subject to the "Classpath" exception as provided
3742# by Oracle in the LICENSE file that accompanied this code.
3743#
3744# This code is distributed in the hope that it will be useful, but WITHOUT
3745# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3746# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3747# version 2 for more details (a copy is included in the LICENSE file that
3748# accompanied this code).
3749#
3750# You should have received a copy of the GNU General Public License version
3751# 2 along with this work; if not, write to the Free Software Foundation,
3752# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3753#
3754# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3755# or visit www.oracle.com if you need additional information or have any
3756# questions.
3757#
3758
3759
3760
3761
3762
3763cygwin_help() {
3764  case $1 in
3765    unzip)
3766      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3767      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3768      ;;
3769    zip)
3770      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3771      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3772      ;;
3773    make)
3774      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3775      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3776      ;;
3777    freetype)
3778      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3779        HELP_MSG="To install freetype, run:
3780wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3781chmod +x /tmp/freetype-setup.exe
3782/tmp/freetype-setup.exe
3783Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3784After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3785      else
3786        HELP_MSG="You need to build a 64-bit version of freetype.
3787This is not readily available.
3788You can find source code and build instructions on
3789http://www.freetype.org/
3790If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3791      fi
3792      ;;
3793  esac
3794}
3795
3796msys_help() {
3797  PKGHANDLER_COMMAND=""
3798}
3799
3800apt_help() {
3801  case $1 in
3802    devkit)
3803      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3804    openjdk)
3805      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3806    alsa)
3807      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3808    cups)
3809      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3810    freetype)
3811      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3812    pulse)
3813      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3814    x11)
3815      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3816    ccache)
3817      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3818  esac
3819}
3820
3821yum_help() {
3822  case $1 in
3823    devkit)
3824      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3825    openjdk)
3826      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3827    alsa)
3828      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3829    cups)
3830      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3831    freetype)
3832      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3833    pulse)
3834      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3835    x11)
3836      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3837    ccache)
3838      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3839  esac
3840}
3841
3842port_help() {
3843  PKGHANDLER_COMMAND=""
3844}
3845
3846pkgutil_help() {
3847  PKGHANDLER_COMMAND=""
3848}
3849
3850pkgadd_help() {
3851  PKGHANDLER_COMMAND=""
3852}
3853
3854# This function will check if we're called from the "configure" wrapper while
3855# printing --help. If so, we will print out additional information that can
3856# only be extracted within the autoconf script, and then exit. This must be
3857# called at the very beginning in configure.ac.
3858
3859
3860
3861
3862#
3863# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3864# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3865#
3866# This code is free software; you can redistribute it and/or modify it
3867# under the terms of the GNU General Public License version 2 only, as
3868# published by the Free Software Foundation.  Oracle designates this
3869# particular file as subject to the "Classpath" exception as provided
3870# by Oracle in the LICENSE file that accompanied this code.
3871#
3872# This code is distributed in the hope that it will be useful, but WITHOUT
3873# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3874# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3875# version 2 for more details (a copy is included in the LICENSE file that
3876# accompanied this code).
3877#
3878# You should have received a copy of the GNU General Public License version
3879# 2 along with this work; if not, write to the Free Software Foundation,
3880# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3881#
3882# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3883# or visit www.oracle.com if you need additional information or have any
3884# questions.
3885#
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896###############################################################################
3897#
3898# Should we build only OpenJDK even if closed sources are present?
3899#
3900
3901
3902
3903
3904###############################################################################
3905#
3906# Setup version numbers
3907#
3908
3909
3910
3911
3912
3913
3914#
3915# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3916# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3917#
3918# This code is free software; you can redistribute it and/or modify it
3919# under the terms of the GNU General Public License version 2 only, as
3920# published by the Free Software Foundation.  Oracle designates this
3921# particular file as subject to the "Classpath" exception as provided
3922# by Oracle in the LICENSE file that accompanied this code.
3923#
3924# This code is distributed in the hope that it will be useful, but WITHOUT
3925# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3926# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3927# version 2 for more details (a copy is included in the LICENSE file that
3928# accompanied this code).
3929#
3930# You should have received a copy of the GNU General Public License version
3931# 2 along with this work; if not, write to the Free Software Foundation,
3932# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3933#
3934# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3935# or visit www.oracle.com if you need additional information or have any
3936# questions.
3937#
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957#
3958# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3959# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3960#
3961# This code is free software; you can redistribute it and/or modify it
3962# under the terms of the GNU General Public License version 2 only, as
3963# published by the Free Software Foundation.  Oracle designates this
3964# particular file as subject to the "Classpath" exception as provided
3965# by Oracle in the LICENSE file that accompanied this code.
3966#
3967# This code is distributed in the hope that it will be useful, but WITHOUT
3968# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3969# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3970# version 2 for more details (a copy is included in the LICENSE file that
3971# accompanied this code).
3972#
3973# You should have received a copy of the GNU General Public License version
3974# 2 along with this work; if not, write to the Free Software Foundation,
3975# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3976#
3977# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3978# or visit www.oracle.com if you need additional information or have any
3979# questions.
3980#
3981
3982# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3983# Converts autoconf style CPU name to OpenJDK style, into
3984# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3985
3986
3987# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3988# Converts autoconf style OS name to OpenJDK style, into
3989# VAR_OS and VAR_OS_API.
3990
3991
3992# Expects $host_os $host_cpu $build_os and $build_cpu
3993# and $with_target_bits to have been setup!
3994#
3995# Translate the standard triplet(quadruplet) definition
3996# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3997# OPENJDK_BUILD_OS, etc.
3998
3999
4000# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4001# accordingly. Must be done after setting up build and target system, but before
4002# doing anything else with these values.
4003
4004
4005# Setup the legacy variables, for controlling the old makefiles.
4006#
4007
4008
4009
4010
4011#%%% Build and target systems %%%
4012
4013
4014
4015
4016# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4017# Add -mX to various FLAGS variables.
4018
4019
4020
4021
4022
4023
4024#
4025# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4026# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4027#
4028# This code is free software; you can redistribute it and/or modify it
4029# under the terms of the GNU General Public License version 2 only, as
4030# published by the Free Software Foundation.  Oracle designates this
4031# particular file as subject to the "Classpath" exception as provided
4032# by Oracle in the LICENSE file that accompanied this code.
4033#
4034# This code is distributed in the hope that it will be useful, but WITHOUT
4035# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4036# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4037# version 2 for more details (a copy is included in the LICENSE file that
4038# accompanied this code).
4039#
4040# You should have received a copy of the GNU General Public License version
4041# 2 along with this work; if not, write to the Free Software Foundation,
4042# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4043#
4044# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4045# or visit www.oracle.com if you need additional information or have any
4046# questions.
4047#
4048
4049
4050
4051
4052
4053
4054
4055
4056#
4057# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4059#
4060# This code is free software; you can redistribute it and/or modify it
4061# under the terms of the GNU General Public License version 2 only, as
4062# published by the Free Software Foundation.  Oracle designates this
4063# particular file as subject to the "Classpath" exception as provided
4064# by Oracle in the LICENSE file that accompanied this code.
4065#
4066# This code is distributed in the hope that it will be useful, but WITHOUT
4067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4069# version 2 for more details (a copy is included in the LICENSE file that
4070# accompanied this code).
4071#
4072# You should have received a copy of the GNU General Public License version
4073# 2 along with this work; if not, write to the Free Software Foundation,
4074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4075#
4076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4077# or visit www.oracle.com if you need additional information or have any
4078# questions.
4079#
4080
4081########################################################################
4082# This file is responsible for detecting, verifying and setting up the
4083# toolchain, i.e. the compiler, linker and related utilities. It will setup
4084# proper paths to the binaries, but it will not setup any flags.
4085#
4086# The binaries used is determined by the toolchain type, which is the family of
4087# compilers and related tools that are used.
4088########################################################################
4089
4090
4091# All valid toolchains, regardless of platform (used by help.m4)
4092VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4093
4094# These toolchains are valid on different platforms
4095VALID_TOOLCHAINS_linux="gcc clang"
4096VALID_TOOLCHAINS_solaris="solstudio"
4097VALID_TOOLCHAINS_macosx="gcc clang"
4098VALID_TOOLCHAINS_aix="xlc"
4099VALID_TOOLCHAINS_windows="microsoft"
4100
4101# Toolchain descriptions
4102TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4103TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4104TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4105TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4106TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4107
4108# Setup a number of variables describing how native output files are
4109# named on this platform/toolchain.
4110
4111
4112# Determine which toolchain type to use, and make sure it is valid for this
4113# platform. Setup various information about the selected toolchain.
4114
4115
4116# Before we start detecting the toolchain executables, we might need some
4117# special setup, e.g. additional paths etc.
4118
4119
4120# Restore path, etc
4121
4122
4123# Check if a compiler is of the toolchain type we expect, and save the version
4124# information from it. If the compiler does not match the expected type,
4125# this function will abort using AC_MSG_ERROR. If it matches, the version will
4126# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4127# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4128#
4129# $1 = compiler to test (CC or CXX)
4130# $2 = human readable name of compiler (C or C++)
4131
4132
4133# Try to locate the given C or C++ compiler in the path, or otherwise.
4134#
4135# $1 = compiler to test (CC or CXX)
4136# $2 = human readable name of compiler (C or C++)
4137# $3 = list of compiler names to search for
4138
4139
4140# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4141# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4142# archiver (AR). Verify that the compilers are correct according to the
4143# toolchain type.
4144
4145
4146# Setup additional tools that is considered a part of the toolchain, but not the
4147# core part. Many of these are highly platform-specific and do not exist,
4148# and/or are not needed on all platforms.
4149
4150
4151# Setup the build tools (i.e, the compiler and linker used to build programs
4152# that should be run on the build platform, not the target platform, as a build
4153# helper). Since the non-cross-compile case uses the normal, target compilers
4154# for this, we can only do this after these have been setup.
4155
4156
4157# Setup legacy variables that are still needed as alternative ways to refer to
4158# parts of the toolchain.
4159
4160
4161# Do some additional checks on the detected tools.
4162
4163
4164# Setup the JTReg Regression Test Harness.
4165
4166
4167#
4168# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4170#
4171# This code is free software; you can redistribute it and/or modify it
4172# under the terms of the GNU General Public License version 2 only, as
4173# published by the Free Software Foundation.  Oracle designates this
4174# particular file as subject to the "Classpath" exception as provided
4175# by Oracle in the LICENSE file that accompanied this code.
4176#
4177# This code is distributed in the hope that it will be useful, but WITHOUT
4178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4180# version 2 for more details (a copy is included in the LICENSE file that
4181# accompanied this code).
4182#
4183# You should have received a copy of the GNU General Public License version
4184# 2 along with this work; if not, write to the Free Software Foundation,
4185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4186#
4187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4188# or visit www.oracle.com if you need additional information or have any
4189# questions.
4190#
4191
4192
4193
4194
4195
4196
4197
4198# Check if the VS env variables were setup prior to running configure.
4199# If not, then find vcvarsall.bat and run it automatically, and integrate
4200# the set env variables into the spec file.
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211# This line needs to be here, verbatim, after all includes and the dummy hook
4212# definitions. It is replaced with custom functionality when building
4213# custom sources.
4214#CUSTOM_AUTOCONF_INCLUDE
4215
4216# Do not change or remove the following line, it is needed for consistency checks:
4217DATE_WHEN_GENERATED=1393240361
4218
4219###############################################################################
4220#
4221# Initialization / Boot-strapping
4222#
4223# The bootstrapping process needs to solve the "chicken or the egg" problem,
4224# thus it jumps back and forth, each time gaining something needed later on.
4225#
4226###############################################################################
4227
4228# If we are requested to print additional help, do that and then exit.
4229# This must be the very first call.
4230
4231  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4232    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4233    $PRINTF "Which are valid to use depends on the build platform.\n"
4234    for toolchain in $VALID_TOOLCHAINS_all; do
4235      # Use indirect variable referencing
4236      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4237      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4238      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4239    done
4240
4241    # And now exit directly
4242    exit 0
4243  fi
4244
4245
4246# Basic initialization that must happen first of all in the normal process.
4247
4248  # Save the original command line. This is passed to us by the wrapper configure script.
4249
4250  DATE_WHEN_CONFIGURED=`LANG=C date`
4251
4252  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4253$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4254  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4255$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4256
4257
4258  # Start with tools that do not need have cross compilation support
4259  # and can be expected to be found in the default PATH. These tools are
4260  # used by configure. Nor are these tools expected to be found in the
4261  # devkit from the builddeps server either, since they are
4262  # needed to download the devkit.
4263
4264  # First are all the simple required tools.
4265
4266
4267
4268  # Publish this variable in the help.
4269
4270
4271  if test "x$BASENAME" = x; then
4272    # The variable is not set by user, try to locate tool using the code snippet
4273    for ac_prog in basename
4274do
4275  # Extract the first word of "$ac_prog", so it can be a program name with args.
4276set dummy $ac_prog; ac_word=$2
4277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4278$as_echo_n "checking for $ac_word... " >&6; }
4279if ${ac_cv_path_BASENAME+:} false; then :
4280  $as_echo_n "(cached) " >&6
4281else
4282  case $BASENAME in
4283  [\\/]* | ?:[\\/]*)
4284  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4285  ;;
4286  *)
4287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290  IFS=$as_save_IFS
4291  test -z "$as_dir" && as_dir=.
4292    for ac_exec_ext in '' $ac_executable_extensions; do
4293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4294    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4296    break 2
4297  fi
4298done
4299  done
4300IFS=$as_save_IFS
4301
4302  ;;
4303esac
4304fi
4305BASENAME=$ac_cv_path_BASENAME
4306if test -n "$BASENAME"; then
4307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4308$as_echo "$BASENAME" >&6; }
4309else
4310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4311$as_echo "no" >&6; }
4312fi
4313
4314
4315  test -n "$BASENAME" && break
4316done
4317
4318  else
4319    # The variable is set, but is it from the command line or the environment?
4320
4321    # Try to remove the string !BASENAME! from our list.
4322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4324      # If it failed, the variable was not from the command line. Ignore it,
4325      # but warn the user (except for BASH, which is always set by the calling BASH).
4326      if test "xBASENAME" != xBASH; then
4327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4328$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4329      fi
4330      # Try to locate tool using the code snippet
4331      for ac_prog in basename
4332do
4333  # Extract the first word of "$ac_prog", so it can be a program name with args.
4334set dummy $ac_prog; ac_word=$2
4335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4336$as_echo_n "checking for $ac_word... " >&6; }
4337if ${ac_cv_path_BASENAME+:} false; then :
4338  $as_echo_n "(cached) " >&6
4339else
4340  case $BASENAME in
4341  [\\/]* | ?:[\\/]*)
4342  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4343  ;;
4344  *)
4345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346for as_dir in $PATH
4347do
4348  IFS=$as_save_IFS
4349  test -z "$as_dir" && as_dir=.
4350    for ac_exec_ext in '' $ac_executable_extensions; do
4351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4352    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4354    break 2
4355  fi
4356done
4357  done
4358IFS=$as_save_IFS
4359
4360  ;;
4361esac
4362fi
4363BASENAME=$ac_cv_path_BASENAME
4364if test -n "$BASENAME"; then
4365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4366$as_echo "$BASENAME" >&6; }
4367else
4368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4369$as_echo "no" >&6; }
4370fi
4371
4372
4373  test -n "$BASENAME" && break
4374done
4375
4376    else
4377      # If it succeeded, then it was overridden by the user. We will use it
4378      # for the tool.
4379
4380      # First remove it from the list of overridden variables, so we can test
4381      # for unknown variables in the end.
4382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4383
4384      # Check if the provided tool contains a complete path.
4385      tool_specified="$BASENAME"
4386      tool_basename="${tool_specified##*/}"
4387      if test "x$tool_basename" = "x$tool_specified"; then
4388        # A command without a complete path is provided, search $PATH.
4389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4390$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4391        # Extract the first word of "$tool_basename", so it can be a program name with args.
4392set dummy $tool_basename; ac_word=$2
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4394$as_echo_n "checking for $ac_word... " >&6; }
4395if ${ac_cv_path_BASENAME+:} false; then :
4396  $as_echo_n "(cached) " >&6
4397else
4398  case $BASENAME in
4399  [\\/]* | ?:[\\/]*)
4400  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4401  ;;
4402  *)
4403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4404for as_dir in $PATH
4405do
4406  IFS=$as_save_IFS
4407  test -z "$as_dir" && as_dir=.
4408    for ac_exec_ext in '' $ac_executable_extensions; do
4409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4410    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4412    break 2
4413  fi
4414done
4415  done
4416IFS=$as_save_IFS
4417
4418  ;;
4419esac
4420fi
4421BASENAME=$ac_cv_path_BASENAME
4422if test -n "$BASENAME"; then
4423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4424$as_echo "$BASENAME" >&6; }
4425else
4426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4427$as_echo "no" >&6; }
4428fi
4429
4430
4431        if test "x$BASENAME" = x; then
4432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4433        fi
4434      else
4435        # Otherwise we believe it is a complete path. Use it as it is.
4436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4437$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4439$as_echo_n "checking for BASENAME... " >&6; }
4440        if test ! -x "$tool_specified"; then
4441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4442$as_echo "not found" >&6; }
4443          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4444        fi
4445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4446$as_echo "$tool_specified" >&6; }
4447      fi
4448    fi
4449  fi
4450
4451
4452
4453  if test "x$BASENAME" = x; then
4454    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4455  fi
4456
4457
4458
4459
4460
4461  # Publish this variable in the help.
4462
4463
4464  if test "x$BASH" = x; then
4465    # The variable is not set by user, try to locate tool using the code snippet
4466    for ac_prog in bash
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if ${ac_cv_path_BASH+:} false; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $BASH in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4487    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498BASH=$ac_cv_path_BASH
4499if test -n "$BASH"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4501$as_echo "$BASH" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$BASH" && break
4509done
4510
4511  else
4512    # The variable is set, but is it from the command line or the environment?
4513
4514    # Try to remove the string !BASH! from our list.
4515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4517      # If it failed, the variable was not from the command line. Ignore it,
4518      # but warn the user (except for BASH, which is always set by the calling BASH).
4519      if test "xBASH" != xBASH; then
4520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4521$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4522      fi
4523      # Try to locate tool using the code snippet
4524      for ac_prog in bash
4525do
4526  # Extract the first word of "$ac_prog", so it can be a program name with args.
4527set dummy $ac_prog; ac_word=$2
4528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529$as_echo_n "checking for $ac_word... " >&6; }
4530if ${ac_cv_path_BASH+:} false; then :
4531  $as_echo_n "(cached) " >&6
4532else
4533  case $BASH in
4534  [\\/]* | ?:[\\/]*)
4535  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4536  ;;
4537  *)
4538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in $PATH
4540do
4541  IFS=$as_save_IFS
4542  test -z "$as_dir" && as_dir=.
4543    for ac_exec_ext in '' $ac_executable_extensions; do
4544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4545    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4547    break 2
4548  fi
4549done
4550  done
4551IFS=$as_save_IFS
4552
4553  ;;
4554esac
4555fi
4556BASH=$ac_cv_path_BASH
4557if test -n "$BASH"; then
4558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4559$as_echo "$BASH" >&6; }
4560else
4561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4562$as_echo "no" >&6; }
4563fi
4564
4565
4566  test -n "$BASH" && break
4567done
4568
4569    else
4570      # If it succeeded, then it was overridden by the user. We will use it
4571      # for the tool.
4572
4573      # First remove it from the list of overridden variables, so we can test
4574      # for unknown variables in the end.
4575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4576
4577      # Check if the provided tool contains a complete path.
4578      tool_specified="$BASH"
4579      tool_basename="${tool_specified##*/}"
4580      if test "x$tool_basename" = "x$tool_specified"; then
4581        # A command without a complete path is provided, search $PATH.
4582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4583$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4584        # Extract the first word of "$tool_basename", so it can be a program name with args.
4585set dummy $tool_basename; ac_word=$2
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
4588if ${ac_cv_path_BASH+:} false; then :
4589  $as_echo_n "(cached) " >&6
4590else
4591  case $BASH in
4592  [\\/]* | ?:[\\/]*)
4593  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4594  ;;
4595  *)
4596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in $PATH
4598do
4599  IFS=$as_save_IFS
4600  test -z "$as_dir" && as_dir=.
4601    for ac_exec_ext in '' $ac_executable_extensions; do
4602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4603    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605    break 2
4606  fi
4607done
4608  done
4609IFS=$as_save_IFS
4610
4611  ;;
4612esac
4613fi
4614BASH=$ac_cv_path_BASH
4615if test -n "$BASH"; then
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4617$as_echo "$BASH" >&6; }
4618else
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
4621fi
4622
4623
4624        if test "x$BASH" = x; then
4625          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4626        fi
4627      else
4628        # Otherwise we believe it is a complete path. Use it as it is.
4629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4630$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4632$as_echo_n "checking for BASH... " >&6; }
4633        if test ! -x "$tool_specified"; then
4634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4635$as_echo "not found" >&6; }
4636          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4637        fi
4638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4639$as_echo "$tool_specified" >&6; }
4640      fi
4641    fi
4642  fi
4643
4644
4645
4646  if test "x$BASH" = x; then
4647    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4648  fi
4649
4650
4651
4652
4653
4654  # Publish this variable in the help.
4655
4656
4657  if test "x$CAT" = x; then
4658    # The variable is not set by user, try to locate tool using the code snippet
4659    for ac_prog in cat
4660do
4661  # Extract the first word of "$ac_prog", so it can be a program name with args.
4662set dummy $ac_prog; ac_word=$2
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4664$as_echo_n "checking for $ac_word... " >&6; }
4665if ${ac_cv_path_CAT+:} false; then :
4666  $as_echo_n "(cached) " >&6
4667else
4668  case $CAT in
4669  [\\/]* | ?:[\\/]*)
4670  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4671  ;;
4672  *)
4673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in $PATH
4675do
4676  IFS=$as_save_IFS
4677  test -z "$as_dir" && as_dir=.
4678    for ac_exec_ext in '' $ac_executable_extensions; do
4679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4680    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682    break 2
4683  fi
4684done
4685  done
4686IFS=$as_save_IFS
4687
4688  ;;
4689esac
4690fi
4691CAT=$ac_cv_path_CAT
4692if test -n "$CAT"; then
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4694$as_echo "$CAT" >&6; }
4695else
4696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700
4701  test -n "$CAT" && break
4702done
4703
4704  else
4705    # The variable is set, but is it from the command line or the environment?
4706
4707    # Try to remove the string !CAT! from our list.
4708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4710      # If it failed, the variable was not from the command line. Ignore it,
4711      # but warn the user (except for BASH, which is always set by the calling BASH).
4712      if test "xCAT" != xBASH; then
4713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4714$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4715      fi
4716      # Try to locate tool using the code snippet
4717      for ac_prog in cat
4718do
4719  # Extract the first word of "$ac_prog", so it can be a program name with args.
4720set dummy $ac_prog; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
4723if ${ac_cv_path_CAT+:} false; then :
4724  $as_echo_n "(cached) " >&6
4725else
4726  case $CAT in
4727  [\\/]* | ?:[\\/]*)
4728  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4729  ;;
4730  *)
4731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in $PATH
4733do
4734  IFS=$as_save_IFS
4735  test -z "$as_dir" && as_dir=.
4736    for ac_exec_ext in '' $ac_executable_extensions; do
4737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4738    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740    break 2
4741  fi
4742done
4743  done
4744IFS=$as_save_IFS
4745
4746  ;;
4747esac
4748fi
4749CAT=$ac_cv_path_CAT
4750if test -n "$CAT"; then
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4752$as_echo "$CAT" >&6; }
4753else
4754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
4756fi
4757
4758
4759  test -n "$CAT" && break
4760done
4761
4762    else
4763      # If it succeeded, then it was overridden by the user. We will use it
4764      # for the tool.
4765
4766      # First remove it from the list of overridden variables, so we can test
4767      # for unknown variables in the end.
4768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4769
4770      # Check if the provided tool contains a complete path.
4771      tool_specified="$CAT"
4772      tool_basename="${tool_specified##*/}"
4773      if test "x$tool_basename" = "x$tool_specified"; then
4774        # A command without a complete path is provided, search $PATH.
4775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4776$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4777        # Extract the first word of "$tool_basename", so it can be a program name with args.
4778set dummy $tool_basename; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
4781if ${ac_cv_path_CAT+:} false; then :
4782  $as_echo_n "(cached) " >&6
4783else
4784  case $CAT in
4785  [\\/]* | ?:[\\/]*)
4786  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4787  ;;
4788  *)
4789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in $PATH
4791do
4792  IFS=$as_save_IFS
4793  test -z "$as_dir" && as_dir=.
4794    for ac_exec_ext in '' $ac_executable_extensions; do
4795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4796    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4798    break 2
4799  fi
4800done
4801  done
4802IFS=$as_save_IFS
4803
4804  ;;
4805esac
4806fi
4807CAT=$ac_cv_path_CAT
4808if test -n "$CAT"; then
4809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4810$as_echo "$CAT" >&6; }
4811else
4812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
4814fi
4815
4816
4817        if test "x$CAT" = x; then
4818          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4819        fi
4820      else
4821        # Otherwise we believe it is a complete path. Use it as it is.
4822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4823$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4825$as_echo_n "checking for CAT... " >&6; }
4826        if test ! -x "$tool_specified"; then
4827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4828$as_echo "not found" >&6; }
4829          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4830        fi
4831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4832$as_echo "$tool_specified" >&6; }
4833      fi
4834    fi
4835  fi
4836
4837
4838
4839  if test "x$CAT" = x; then
4840    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4841  fi
4842
4843
4844
4845
4846
4847  # Publish this variable in the help.
4848
4849
4850  if test "x$CHMOD" = x; then
4851    # The variable is not set by user, try to locate tool using the code snippet
4852    for ac_prog in chmod
4853do
4854  # Extract the first word of "$ac_prog", so it can be a program name with args.
4855set dummy $ac_prog; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
4858if ${ac_cv_path_CHMOD+:} false; then :
4859  $as_echo_n "(cached) " >&6
4860else
4861  case $CHMOD in
4862  [\\/]* | ?:[\\/]*)
4863  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4864  ;;
4865  *)
4866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4867for as_dir in $PATH
4868do
4869  IFS=$as_save_IFS
4870  test -z "$as_dir" && as_dir=.
4871    for ac_exec_ext in '' $ac_executable_extensions; do
4872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4873    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4875    break 2
4876  fi
4877done
4878  done
4879IFS=$as_save_IFS
4880
4881  ;;
4882esac
4883fi
4884CHMOD=$ac_cv_path_CHMOD
4885if test -n "$CHMOD"; then
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4887$as_echo "$CHMOD" >&6; }
4888else
4889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4890$as_echo "no" >&6; }
4891fi
4892
4893
4894  test -n "$CHMOD" && break
4895done
4896
4897  else
4898    # The variable is set, but is it from the command line or the environment?
4899
4900    # Try to remove the string !CHMOD! from our list.
4901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4903      # If it failed, the variable was not from the command line. Ignore it,
4904      # but warn the user (except for BASH, which is always set by the calling BASH).
4905      if test "xCHMOD" != xBASH; then
4906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4907$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4908      fi
4909      # Try to locate tool using the code snippet
4910      for ac_prog in chmod
4911do
4912  # Extract the first word of "$ac_prog", so it can be a program name with args.
4913set dummy $ac_prog; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if ${ac_cv_path_CHMOD+:} false; then :
4917  $as_echo_n "(cached) " >&6
4918else
4919  case $CHMOD in
4920  [\\/]* | ?:[\\/]*)
4921  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4922  ;;
4923  *)
4924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in $PATH
4926do
4927  IFS=$as_save_IFS
4928  test -z "$as_dir" && as_dir=.
4929    for ac_exec_ext in '' $ac_executable_extensions; do
4930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4931    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933    break 2
4934  fi
4935done
4936  done
4937IFS=$as_save_IFS
4938
4939  ;;
4940esac
4941fi
4942CHMOD=$ac_cv_path_CHMOD
4943if test -n "$CHMOD"; then
4944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4945$as_echo "$CHMOD" >&6; }
4946else
4947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948$as_echo "no" >&6; }
4949fi
4950
4951
4952  test -n "$CHMOD" && break
4953done
4954
4955    else
4956      # If it succeeded, then it was overridden by the user. We will use it
4957      # for the tool.
4958
4959      # First remove it from the list of overridden variables, so we can test
4960      # for unknown variables in the end.
4961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4962
4963      # Check if the provided tool contains a complete path.
4964      tool_specified="$CHMOD"
4965      tool_basename="${tool_specified##*/}"
4966      if test "x$tool_basename" = "x$tool_specified"; then
4967        # A command without a complete path is provided, search $PATH.
4968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4969$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4970        # Extract the first word of "$tool_basename", so it can be a program name with args.
4971set dummy $tool_basename; ac_word=$2
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973$as_echo_n "checking for $ac_word... " >&6; }
4974if ${ac_cv_path_CHMOD+:} false; then :
4975  $as_echo_n "(cached) " >&6
4976else
4977  case $CHMOD in
4978  [\\/]* | ?:[\\/]*)
4979  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4980  ;;
4981  *)
4982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983for as_dir in $PATH
4984do
4985  IFS=$as_save_IFS
4986  test -z "$as_dir" && as_dir=.
4987    for ac_exec_ext in '' $ac_executable_extensions; do
4988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4989    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991    break 2
4992  fi
4993done
4994  done
4995IFS=$as_save_IFS
4996
4997  ;;
4998esac
4999fi
5000CHMOD=$ac_cv_path_CHMOD
5001if test -n "$CHMOD"; then
5002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5003$as_echo "$CHMOD" >&6; }
5004else
5005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006$as_echo "no" >&6; }
5007fi
5008
5009
5010        if test "x$CHMOD" = x; then
5011          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5012        fi
5013      else
5014        # Otherwise we believe it is a complete path. Use it as it is.
5015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5016$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5018$as_echo_n "checking for CHMOD... " >&6; }
5019        if test ! -x "$tool_specified"; then
5020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5021$as_echo "not found" >&6; }
5022          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5023        fi
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5025$as_echo "$tool_specified" >&6; }
5026      fi
5027    fi
5028  fi
5029
5030
5031
5032  if test "x$CHMOD" = x; then
5033    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5034  fi
5035
5036
5037
5038
5039
5040  # Publish this variable in the help.
5041
5042
5043  if test "x$CMP" = x; then
5044    # The variable is not set by user, try to locate tool using the code snippet
5045    for ac_prog in cmp
5046do
5047  # Extract the first word of "$ac_prog", so it can be a program name with args.
5048set dummy $ac_prog; ac_word=$2
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5050$as_echo_n "checking for $ac_word... " >&6; }
5051if ${ac_cv_path_CMP+:} false; then :
5052  $as_echo_n "(cached) " >&6
5053else
5054  case $CMP in
5055  [\\/]* | ?:[\\/]*)
5056  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5057  ;;
5058  *)
5059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5060for as_dir in $PATH
5061do
5062  IFS=$as_save_IFS
5063  test -z "$as_dir" && as_dir=.
5064    for ac_exec_ext in '' $ac_executable_extensions; do
5065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5066    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5068    break 2
5069  fi
5070done
5071  done
5072IFS=$as_save_IFS
5073
5074  ;;
5075esac
5076fi
5077CMP=$ac_cv_path_CMP
5078if test -n "$CMP"; then
5079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5080$as_echo "$CMP" >&6; }
5081else
5082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
5084fi
5085
5086
5087  test -n "$CMP" && break
5088done
5089
5090  else
5091    # The variable is set, but is it from the command line or the environment?
5092
5093    # Try to remove the string !CMP! from our list.
5094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5096      # If it failed, the variable was not from the command line. Ignore it,
5097      # but warn the user (except for BASH, which is always set by the calling BASH).
5098      if test "xCMP" != xBASH; then
5099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5100$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5101      fi
5102      # Try to locate tool using the code snippet
5103      for ac_prog in cmp
5104do
5105  # Extract the first word of "$ac_prog", so it can be a program name with args.
5106set dummy $ac_prog; ac_word=$2
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5108$as_echo_n "checking for $ac_word... " >&6; }
5109if ${ac_cv_path_CMP+:} false; then :
5110  $as_echo_n "(cached) " >&6
5111else
5112  case $CMP in
5113  [\\/]* | ?:[\\/]*)
5114  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5115  ;;
5116  *)
5117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120  IFS=$as_save_IFS
5121  test -z "$as_dir" && as_dir=.
5122    for ac_exec_ext in '' $ac_executable_extensions; do
5123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5124    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126    break 2
5127  fi
5128done
5129  done
5130IFS=$as_save_IFS
5131
5132  ;;
5133esac
5134fi
5135CMP=$ac_cv_path_CMP
5136if test -n "$CMP"; then
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5138$as_echo "$CMP" >&6; }
5139else
5140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
5142fi
5143
5144
5145  test -n "$CMP" && break
5146done
5147
5148    else
5149      # If it succeeded, then it was overridden by the user. We will use it
5150      # for the tool.
5151
5152      # First remove it from the list of overridden variables, so we can test
5153      # for unknown variables in the end.
5154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5155
5156      # Check if the provided tool contains a complete path.
5157      tool_specified="$CMP"
5158      tool_basename="${tool_specified##*/}"
5159      if test "x$tool_basename" = "x$tool_specified"; then
5160        # A command without a complete path is provided, search $PATH.
5161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5162$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5163        # Extract the first word of "$tool_basename", so it can be a program name with args.
5164set dummy $tool_basename; ac_word=$2
5165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166$as_echo_n "checking for $ac_word... " >&6; }
5167if ${ac_cv_path_CMP+:} false; then :
5168  $as_echo_n "(cached) " >&6
5169else
5170  case $CMP in
5171  [\\/]* | ?:[\\/]*)
5172  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5173  ;;
5174  *)
5175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178  IFS=$as_save_IFS
5179  test -z "$as_dir" && as_dir=.
5180    for ac_exec_ext in '' $ac_executable_extensions; do
5181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5182    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184    break 2
5185  fi
5186done
5187  done
5188IFS=$as_save_IFS
5189
5190  ;;
5191esac
5192fi
5193CMP=$ac_cv_path_CMP
5194if test -n "$CMP"; then
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5196$as_echo "$CMP" >&6; }
5197else
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
5200fi
5201
5202
5203        if test "x$CMP" = x; then
5204          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5205        fi
5206      else
5207        # Otherwise we believe it is a complete path. Use it as it is.
5208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5209$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5211$as_echo_n "checking for CMP... " >&6; }
5212        if test ! -x "$tool_specified"; then
5213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5214$as_echo "not found" >&6; }
5215          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5216        fi
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5218$as_echo "$tool_specified" >&6; }
5219      fi
5220    fi
5221  fi
5222
5223
5224
5225  if test "x$CMP" = x; then
5226    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5227  fi
5228
5229
5230
5231
5232
5233  # Publish this variable in the help.
5234
5235
5236  if test "x$COMM" = x; then
5237    # The variable is not set by user, try to locate tool using the code snippet
5238    for ac_prog in comm
5239do
5240  # Extract the first word of "$ac_prog", so it can be a program name with args.
5241set dummy $ac_prog; ac_word=$2
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5243$as_echo_n "checking for $ac_word... " >&6; }
5244if ${ac_cv_path_COMM+:} false; then :
5245  $as_echo_n "(cached) " >&6
5246else
5247  case $COMM in
5248  [\\/]* | ?:[\\/]*)
5249  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5250  ;;
5251  *)
5252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5253for as_dir in $PATH
5254do
5255  IFS=$as_save_IFS
5256  test -z "$as_dir" && as_dir=.
5257    for ac_exec_ext in '' $ac_executable_extensions; do
5258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5259    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5261    break 2
5262  fi
5263done
5264  done
5265IFS=$as_save_IFS
5266
5267  ;;
5268esac
5269fi
5270COMM=$ac_cv_path_COMM
5271if test -n "$COMM"; then
5272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5273$as_echo "$COMM" >&6; }
5274else
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5276$as_echo "no" >&6; }
5277fi
5278
5279
5280  test -n "$COMM" && break
5281done
5282
5283  else
5284    # The variable is set, but is it from the command line or the environment?
5285
5286    # Try to remove the string !COMM! from our list.
5287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5289      # If it failed, the variable was not from the command line. Ignore it,
5290      # but warn the user (except for BASH, which is always set by the calling BASH).
5291      if test "xCOMM" != xBASH; then
5292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5293$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5294      fi
5295      # Try to locate tool using the code snippet
5296      for ac_prog in comm
5297do
5298  # Extract the first word of "$ac_prog", so it can be a program name with args.
5299set dummy $ac_prog; ac_word=$2
5300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5301$as_echo_n "checking for $ac_word... " >&6; }
5302if ${ac_cv_path_COMM+:} false; then :
5303  $as_echo_n "(cached) " >&6
5304else
5305  case $COMM in
5306  [\\/]* | ?:[\\/]*)
5307  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5308  ;;
5309  *)
5310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5311for as_dir in $PATH
5312do
5313  IFS=$as_save_IFS
5314  test -z "$as_dir" && as_dir=.
5315    for ac_exec_ext in '' $ac_executable_extensions; do
5316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5317    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5319    break 2
5320  fi
5321done
5322  done
5323IFS=$as_save_IFS
5324
5325  ;;
5326esac
5327fi
5328COMM=$ac_cv_path_COMM
5329if test -n "$COMM"; then
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5331$as_echo "$COMM" >&6; }
5332else
5333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
5335fi
5336
5337
5338  test -n "$COMM" && break
5339done
5340
5341    else
5342      # If it succeeded, then it was overridden by the user. We will use it
5343      # for the tool.
5344
5345      # First remove it from the list of overridden variables, so we can test
5346      # for unknown variables in the end.
5347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5348
5349      # Check if the provided tool contains a complete path.
5350      tool_specified="$COMM"
5351      tool_basename="${tool_specified##*/}"
5352      if test "x$tool_basename" = "x$tool_specified"; then
5353        # A command without a complete path is provided, search $PATH.
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5355$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5356        # Extract the first word of "$tool_basename", so it can be a program name with args.
5357set dummy $tool_basename; ac_word=$2
5358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5359$as_echo_n "checking for $ac_word... " >&6; }
5360if ${ac_cv_path_COMM+:} false; then :
5361  $as_echo_n "(cached) " >&6
5362else
5363  case $COMM in
5364  [\\/]* | ?:[\\/]*)
5365  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5366  ;;
5367  *)
5368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5369for as_dir in $PATH
5370do
5371  IFS=$as_save_IFS
5372  test -z "$as_dir" && as_dir=.
5373    for ac_exec_ext in '' $ac_executable_extensions; do
5374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5375    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5377    break 2
5378  fi
5379done
5380  done
5381IFS=$as_save_IFS
5382
5383  ;;
5384esac
5385fi
5386COMM=$ac_cv_path_COMM
5387if test -n "$COMM"; then
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5389$as_echo "$COMM" >&6; }
5390else
5391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392$as_echo "no" >&6; }
5393fi
5394
5395
5396        if test "x$COMM" = x; then
5397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5398        fi
5399      else
5400        # Otherwise we believe it is a complete path. Use it as it is.
5401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5402$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5404$as_echo_n "checking for COMM... " >&6; }
5405        if test ! -x "$tool_specified"; then
5406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5407$as_echo "not found" >&6; }
5408          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5409        fi
5410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5411$as_echo "$tool_specified" >&6; }
5412      fi
5413    fi
5414  fi
5415
5416
5417
5418  if test "x$COMM" = x; then
5419    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5420  fi
5421
5422
5423
5424
5425
5426  # Publish this variable in the help.
5427
5428
5429  if test "x$CP" = x; then
5430    # The variable is not set by user, try to locate tool using the code snippet
5431    for ac_prog in cp
5432do
5433  # Extract the first word of "$ac_prog", so it can be a program name with args.
5434set dummy $ac_prog; ac_word=$2
5435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5436$as_echo_n "checking for $ac_word... " >&6; }
5437if ${ac_cv_path_CP+:} false; then :
5438  $as_echo_n "(cached) " >&6
5439else
5440  case $CP in
5441  [\\/]* | ?:[\\/]*)
5442  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5443  ;;
5444  *)
5445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5446for as_dir in $PATH
5447do
5448  IFS=$as_save_IFS
5449  test -z "$as_dir" && as_dir=.
5450    for ac_exec_ext in '' $ac_executable_extensions; do
5451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5452    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5454    break 2
5455  fi
5456done
5457  done
5458IFS=$as_save_IFS
5459
5460  ;;
5461esac
5462fi
5463CP=$ac_cv_path_CP
5464if test -n "$CP"; then
5465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5466$as_echo "$CP" >&6; }
5467else
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
5470fi
5471
5472
5473  test -n "$CP" && break
5474done
5475
5476  else
5477    # The variable is set, but is it from the command line or the environment?
5478
5479    # Try to remove the string !CP! from our list.
5480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5482      # If it failed, the variable was not from the command line. Ignore it,
5483      # but warn the user (except for BASH, which is always set by the calling BASH).
5484      if test "xCP" != xBASH; then
5485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5486$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5487      fi
5488      # Try to locate tool using the code snippet
5489      for ac_prog in cp
5490do
5491  # Extract the first word of "$ac_prog", so it can be a program name with args.
5492set dummy $ac_prog; ac_word=$2
5493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494$as_echo_n "checking for $ac_word... " >&6; }
5495if ${ac_cv_path_CP+:} false; then :
5496  $as_echo_n "(cached) " >&6
5497else
5498  case $CP in
5499  [\\/]* | ?:[\\/]*)
5500  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5501  ;;
5502  *)
5503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504for as_dir in $PATH
5505do
5506  IFS=$as_save_IFS
5507  test -z "$as_dir" && as_dir=.
5508    for ac_exec_ext in '' $ac_executable_extensions; do
5509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5510    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5512    break 2
5513  fi
5514done
5515  done
5516IFS=$as_save_IFS
5517
5518  ;;
5519esac
5520fi
5521CP=$ac_cv_path_CP
5522if test -n "$CP"; then
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5524$as_echo "$CP" >&6; }
5525else
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527$as_echo "no" >&6; }
5528fi
5529
5530
5531  test -n "$CP" && break
5532done
5533
5534    else
5535      # If it succeeded, then it was overridden by the user. We will use it
5536      # for the tool.
5537
5538      # First remove it from the list of overridden variables, so we can test
5539      # for unknown variables in the end.
5540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5541
5542      # Check if the provided tool contains a complete path.
5543      tool_specified="$CP"
5544      tool_basename="${tool_specified##*/}"
5545      if test "x$tool_basename" = "x$tool_specified"; then
5546        # A command without a complete path is provided, search $PATH.
5547        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5548$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5549        # Extract the first word of "$tool_basename", so it can be a program name with args.
5550set dummy $tool_basename; ac_word=$2
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552$as_echo_n "checking for $ac_word... " >&6; }
5553if ${ac_cv_path_CP+:} false; then :
5554  $as_echo_n "(cached) " >&6
5555else
5556  case $CP in
5557  [\\/]* | ?:[\\/]*)
5558  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5559  ;;
5560  *)
5561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564  IFS=$as_save_IFS
5565  test -z "$as_dir" && as_dir=.
5566    for ac_exec_ext in '' $ac_executable_extensions; do
5567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5568    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570    break 2
5571  fi
5572done
5573  done
5574IFS=$as_save_IFS
5575
5576  ;;
5577esac
5578fi
5579CP=$ac_cv_path_CP
5580if test -n "$CP"; then
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5582$as_echo "$CP" >&6; }
5583else
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5585$as_echo "no" >&6; }
5586fi
5587
5588
5589        if test "x$CP" = x; then
5590          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5591        fi
5592      else
5593        # Otherwise we believe it is a complete path. Use it as it is.
5594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5595$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5597$as_echo_n "checking for CP... " >&6; }
5598        if test ! -x "$tool_specified"; then
5599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5600$as_echo "not found" >&6; }
5601          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5602        fi
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5604$as_echo "$tool_specified" >&6; }
5605      fi
5606    fi
5607  fi
5608
5609
5610
5611  if test "x$CP" = x; then
5612    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5613  fi
5614
5615
5616
5617
5618
5619  # Publish this variable in the help.
5620
5621
5622  if test "x$CPIO" = x; then
5623    # The variable is not set by user, try to locate tool using the code snippet
5624    for ac_prog in cpio
5625do
5626  # Extract the first word of "$ac_prog", so it can be a program name with args.
5627set dummy $ac_prog; ac_word=$2
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
5630if ${ac_cv_path_CPIO+:} false; then :
5631  $as_echo_n "(cached) " >&6
5632else
5633  case $CPIO in
5634  [\\/]* | ?:[\\/]*)
5635  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5636  ;;
5637  *)
5638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH
5640do
5641  IFS=$as_save_IFS
5642  test -z "$as_dir" && as_dir=.
5643    for ac_exec_ext in '' $ac_executable_extensions; do
5644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647    break 2
5648  fi
5649done
5650  done
5651IFS=$as_save_IFS
5652
5653  ;;
5654esac
5655fi
5656CPIO=$ac_cv_path_CPIO
5657if test -n "$CPIO"; then
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5659$as_echo "$CPIO" >&6; }
5660else
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663fi
5664
5665
5666  test -n "$CPIO" && break
5667done
5668
5669  else
5670    # The variable is set, but is it from the command line or the environment?
5671
5672    # Try to remove the string !CPIO! from our list.
5673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5675      # If it failed, the variable was not from the command line. Ignore it,
5676      # but warn the user (except for BASH, which is always set by the calling BASH).
5677      if test "xCPIO" != xBASH; then
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5679$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5680      fi
5681      # Try to locate tool using the code snippet
5682      for ac_prog in cpio
5683do
5684  # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_path_CPIO+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  case $CPIO in
5692  [\\/]* | ?:[\\/]*)
5693  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5694  ;;
5695  *)
5696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699  IFS=$as_save_IFS
5700  test -z "$as_dir" && as_dir=.
5701    for ac_exec_ext in '' $ac_executable_extensions; do
5702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705    break 2
5706  fi
5707done
5708  done
5709IFS=$as_save_IFS
5710
5711  ;;
5712esac
5713fi
5714CPIO=$ac_cv_path_CPIO
5715if test -n "$CPIO"; then
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5717$as_echo "$CPIO" >&6; }
5718else
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724  test -n "$CPIO" && break
5725done
5726
5727    else
5728      # If it succeeded, then it was overridden by the user. We will use it
5729      # for the tool.
5730
5731      # First remove it from the list of overridden variables, so we can test
5732      # for unknown variables in the end.
5733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5734
5735      # Check if the provided tool contains a complete path.
5736      tool_specified="$CPIO"
5737      tool_basename="${tool_specified##*/}"
5738      if test "x$tool_basename" = "x$tool_specified"; then
5739        # A command without a complete path is provided, search $PATH.
5740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5741$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5742        # Extract the first word of "$tool_basename", so it can be a program name with args.
5743set dummy $tool_basename; ac_word=$2
5744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5745$as_echo_n "checking for $ac_word... " >&6; }
5746if ${ac_cv_path_CPIO+:} false; then :
5747  $as_echo_n "(cached) " >&6
5748else
5749  case $CPIO in
5750  [\\/]* | ?:[\\/]*)
5751  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5752  ;;
5753  *)
5754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5755for as_dir in $PATH
5756do
5757  IFS=$as_save_IFS
5758  test -z "$as_dir" && as_dir=.
5759    for ac_exec_ext in '' $ac_executable_extensions; do
5760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5761    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5763    break 2
5764  fi
5765done
5766  done
5767IFS=$as_save_IFS
5768
5769  ;;
5770esac
5771fi
5772CPIO=$ac_cv_path_CPIO
5773if test -n "$CPIO"; then
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5775$as_echo "$CPIO" >&6; }
5776else
5777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5778$as_echo "no" >&6; }
5779fi
5780
5781
5782        if test "x$CPIO" = x; then
5783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5784        fi
5785      else
5786        # Otherwise we believe it is a complete path. Use it as it is.
5787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5788$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5790$as_echo_n "checking for CPIO... " >&6; }
5791        if test ! -x "$tool_specified"; then
5792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5793$as_echo "not found" >&6; }
5794          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5795        fi
5796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5797$as_echo "$tool_specified" >&6; }
5798      fi
5799    fi
5800  fi
5801
5802
5803
5804  if test "x$CPIO" = x; then
5805    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5806  fi
5807
5808
5809
5810
5811
5812  # Publish this variable in the help.
5813
5814
5815  if test "x$CUT" = x; then
5816    # The variable is not set by user, try to locate tool using the code snippet
5817    for ac_prog in cut
5818do
5819  # Extract the first word of "$ac_prog", so it can be a program name with args.
5820set dummy $ac_prog; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_path_CUT+:} false; then :
5824  $as_echo_n "(cached) " >&6
5825else
5826  case $CUT in
5827  [\\/]* | ?:[\\/]*)
5828  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5829  ;;
5830  *)
5831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834  IFS=$as_save_IFS
5835  test -z "$as_dir" && as_dir=.
5836    for ac_exec_ext in '' $ac_executable_extensions; do
5837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840    break 2
5841  fi
5842done
5843  done
5844IFS=$as_save_IFS
5845
5846  ;;
5847esac
5848fi
5849CUT=$ac_cv_path_CUT
5850if test -n "$CUT"; then
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5852$as_echo "$CUT" >&6; }
5853else
5854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855$as_echo "no" >&6; }
5856fi
5857
5858
5859  test -n "$CUT" && break
5860done
5861
5862  else
5863    # The variable is set, but is it from the command line or the environment?
5864
5865    # Try to remove the string !CUT! from our list.
5866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5868      # If it failed, the variable was not from the command line. Ignore it,
5869      # but warn the user (except for BASH, which is always set by the calling BASH).
5870      if test "xCUT" != xBASH; then
5871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5872$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5873      fi
5874      # Try to locate tool using the code snippet
5875      for ac_prog in cut
5876do
5877  # Extract the first word of "$ac_prog", so it can be a program name with args.
5878set dummy $ac_prog; ac_word=$2
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5880$as_echo_n "checking for $ac_word... " >&6; }
5881if ${ac_cv_path_CUT+:} false; then :
5882  $as_echo_n "(cached) " >&6
5883else
5884  case $CUT in
5885  [\\/]* | ?:[\\/]*)
5886  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5887  ;;
5888  *)
5889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5890for as_dir in $PATH
5891do
5892  IFS=$as_save_IFS
5893  test -z "$as_dir" && as_dir=.
5894    for ac_exec_ext in '' $ac_executable_extensions; do
5895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5896    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5898    break 2
5899  fi
5900done
5901  done
5902IFS=$as_save_IFS
5903
5904  ;;
5905esac
5906fi
5907CUT=$ac_cv_path_CUT
5908if test -n "$CUT"; then
5909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5910$as_echo "$CUT" >&6; }
5911else
5912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5913$as_echo "no" >&6; }
5914fi
5915
5916
5917  test -n "$CUT" && break
5918done
5919
5920    else
5921      # If it succeeded, then it was overridden by the user. We will use it
5922      # for the tool.
5923
5924      # First remove it from the list of overridden variables, so we can test
5925      # for unknown variables in the end.
5926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5927
5928      # Check if the provided tool contains a complete path.
5929      tool_specified="$CUT"
5930      tool_basename="${tool_specified##*/}"
5931      if test "x$tool_basename" = "x$tool_specified"; then
5932        # A command without a complete path is provided, search $PATH.
5933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5934$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5935        # Extract the first word of "$tool_basename", so it can be a program name with args.
5936set dummy $tool_basename; ac_word=$2
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5938$as_echo_n "checking for $ac_word... " >&6; }
5939if ${ac_cv_path_CUT+:} false; then :
5940  $as_echo_n "(cached) " >&6
5941else
5942  case $CUT in
5943  [\\/]* | ?:[\\/]*)
5944  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5945  ;;
5946  *)
5947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948for as_dir in $PATH
5949do
5950  IFS=$as_save_IFS
5951  test -z "$as_dir" && as_dir=.
5952    for ac_exec_ext in '' $ac_executable_extensions; do
5953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5954    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5956    break 2
5957  fi
5958done
5959  done
5960IFS=$as_save_IFS
5961
5962  ;;
5963esac
5964fi
5965CUT=$ac_cv_path_CUT
5966if test -n "$CUT"; then
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5968$as_echo "$CUT" >&6; }
5969else
5970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
5972fi
5973
5974
5975        if test "x$CUT" = x; then
5976          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5977        fi
5978      else
5979        # Otherwise we believe it is a complete path. Use it as it is.
5980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5981$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5983$as_echo_n "checking for CUT... " >&6; }
5984        if test ! -x "$tool_specified"; then
5985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5986$as_echo "not found" >&6; }
5987          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5988        fi
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5990$as_echo "$tool_specified" >&6; }
5991      fi
5992    fi
5993  fi
5994
5995
5996
5997  if test "x$CUT" = x; then
5998    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5999  fi
6000
6001
6002
6003
6004
6005  # Publish this variable in the help.
6006
6007
6008  if test "x$DATE" = x; then
6009    # The variable is not set by user, try to locate tool using the code snippet
6010    for ac_prog in date
6011do
6012  # Extract the first word of "$ac_prog", so it can be a program name with args.
6013set dummy $ac_prog; ac_word=$2
6014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6015$as_echo_n "checking for $ac_word... " >&6; }
6016if ${ac_cv_path_DATE+:} false; then :
6017  $as_echo_n "(cached) " >&6
6018else
6019  case $DATE in
6020  [\\/]* | ?:[\\/]*)
6021  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6022  ;;
6023  *)
6024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027  IFS=$as_save_IFS
6028  test -z "$as_dir" && as_dir=.
6029    for ac_exec_ext in '' $ac_executable_extensions; do
6030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6031    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6033    break 2
6034  fi
6035done
6036  done
6037IFS=$as_save_IFS
6038
6039  ;;
6040esac
6041fi
6042DATE=$ac_cv_path_DATE
6043if test -n "$DATE"; then
6044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6045$as_echo "$DATE" >&6; }
6046else
6047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048$as_echo "no" >&6; }
6049fi
6050
6051
6052  test -n "$DATE" && break
6053done
6054
6055  else
6056    # The variable is set, but is it from the command line or the environment?
6057
6058    # Try to remove the string !DATE! from our list.
6059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6061      # If it failed, the variable was not from the command line. Ignore it,
6062      # but warn the user (except for BASH, which is always set by the calling BASH).
6063      if test "xDATE" != xBASH; then
6064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6065$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6066      fi
6067      # Try to locate tool using the code snippet
6068      for ac_prog in date
6069do
6070  # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_path_DATE+:} false; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  case $DATE in
6078  [\\/]* | ?:[\\/]*)
6079  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6080  ;;
6081  *)
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_exec_ext in '' $ac_executable_extensions; do
6088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6089    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6091    break 2
6092  fi
6093done
6094  done
6095IFS=$as_save_IFS
6096
6097  ;;
6098esac
6099fi
6100DATE=$ac_cv_path_DATE
6101if test -n "$DATE"; then
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6103$as_echo "$DATE" >&6; }
6104else
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6106$as_echo "no" >&6; }
6107fi
6108
6109
6110  test -n "$DATE" && break
6111done
6112
6113    else
6114      # If it succeeded, then it was overridden by the user. We will use it
6115      # for the tool.
6116
6117      # First remove it from the list of overridden variables, so we can test
6118      # for unknown variables in the end.
6119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6120
6121      # Check if the provided tool contains a complete path.
6122      tool_specified="$DATE"
6123      tool_basename="${tool_specified##*/}"
6124      if test "x$tool_basename" = "x$tool_specified"; then
6125        # A command without a complete path is provided, search $PATH.
6126        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6127$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6128        # Extract the first word of "$tool_basename", so it can be a program name with args.
6129set dummy $tool_basename; ac_word=$2
6130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131$as_echo_n "checking for $ac_word... " >&6; }
6132if ${ac_cv_path_DATE+:} false; then :
6133  $as_echo_n "(cached) " >&6
6134else
6135  case $DATE in
6136  [\\/]* | ?:[\\/]*)
6137  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6138  ;;
6139  *)
6140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143  IFS=$as_save_IFS
6144  test -z "$as_dir" && as_dir=.
6145    for ac_exec_ext in '' $ac_executable_extensions; do
6146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149    break 2
6150  fi
6151done
6152  done
6153IFS=$as_save_IFS
6154
6155  ;;
6156esac
6157fi
6158DATE=$ac_cv_path_DATE
6159if test -n "$DATE"; then
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6161$as_echo "$DATE" >&6; }
6162else
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164$as_echo "no" >&6; }
6165fi
6166
6167
6168        if test "x$DATE" = x; then
6169          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6170        fi
6171      else
6172        # Otherwise we believe it is a complete path. Use it as it is.
6173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6174$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6176$as_echo_n "checking for DATE... " >&6; }
6177        if test ! -x "$tool_specified"; then
6178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6179$as_echo "not found" >&6; }
6180          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6181        fi
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6183$as_echo "$tool_specified" >&6; }
6184      fi
6185    fi
6186  fi
6187
6188
6189
6190  if test "x$DATE" = x; then
6191    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6192  fi
6193
6194
6195
6196
6197
6198  # Publish this variable in the help.
6199
6200
6201  if test "x$DIFF" = x; then
6202    # The variable is not set by user, try to locate tool using the code snippet
6203    for ac_prog in gdiff diff
6204do
6205  # Extract the first word of "$ac_prog", so it can be a program name with args.
6206set dummy $ac_prog; ac_word=$2
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6208$as_echo_n "checking for $ac_word... " >&6; }
6209if ${ac_cv_path_DIFF+:} false; then :
6210  $as_echo_n "(cached) " >&6
6211else
6212  case $DIFF in
6213  [\\/]* | ?:[\\/]*)
6214  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6215  ;;
6216  *)
6217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_exec_ext in '' $ac_executable_extensions; do
6223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226    break 2
6227  fi
6228done
6229  done
6230IFS=$as_save_IFS
6231
6232  ;;
6233esac
6234fi
6235DIFF=$ac_cv_path_DIFF
6236if test -n "$DIFF"; then
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6238$as_echo "$DIFF" >&6; }
6239else
6240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241$as_echo "no" >&6; }
6242fi
6243
6244
6245  test -n "$DIFF" && break
6246done
6247
6248  else
6249    # The variable is set, but is it from the command line or the environment?
6250
6251    # Try to remove the string !DIFF! from our list.
6252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6254      # If it failed, the variable was not from the command line. Ignore it,
6255      # but warn the user (except for BASH, which is always set by the calling BASH).
6256      if test "xDIFF" != xBASH; then
6257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6258$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6259      fi
6260      # Try to locate tool using the code snippet
6261      for ac_prog in gdiff diff
6262do
6263  # Extract the first word of "$ac_prog", so it can be a program name with args.
6264set dummy $ac_prog; ac_word=$2
6265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6266$as_echo_n "checking for $ac_word... " >&6; }
6267if ${ac_cv_path_DIFF+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270  case $DIFF in
6271  [\\/]* | ?:[\\/]*)
6272  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6273  ;;
6274  *)
6275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6276for as_dir in $PATH
6277do
6278  IFS=$as_save_IFS
6279  test -z "$as_dir" && as_dir=.
6280    for ac_exec_ext in '' $ac_executable_extensions; do
6281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6282    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6284    break 2
6285  fi
6286done
6287  done
6288IFS=$as_save_IFS
6289
6290  ;;
6291esac
6292fi
6293DIFF=$ac_cv_path_DIFF
6294if test -n "$DIFF"; then
6295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6296$as_echo "$DIFF" >&6; }
6297else
6298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6299$as_echo "no" >&6; }
6300fi
6301
6302
6303  test -n "$DIFF" && break
6304done
6305
6306    else
6307      # If it succeeded, then it was overridden by the user. We will use it
6308      # for the tool.
6309
6310      # First remove it from the list of overridden variables, so we can test
6311      # for unknown variables in the end.
6312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6313
6314      # Check if the provided tool contains a complete path.
6315      tool_specified="$DIFF"
6316      tool_basename="${tool_specified##*/}"
6317      if test "x$tool_basename" = "x$tool_specified"; then
6318        # A command without a complete path is provided, search $PATH.
6319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6320$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6321        # Extract the first word of "$tool_basename", so it can be a program name with args.
6322set dummy $tool_basename; ac_word=$2
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324$as_echo_n "checking for $ac_word... " >&6; }
6325if ${ac_cv_path_DIFF+:} false; then :
6326  $as_echo_n "(cached) " >&6
6327else
6328  case $DIFF in
6329  [\\/]* | ?:[\\/]*)
6330  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6331  ;;
6332  *)
6333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334for as_dir in $PATH
6335do
6336  IFS=$as_save_IFS
6337  test -z "$as_dir" && as_dir=.
6338    for ac_exec_ext in '' $ac_executable_extensions; do
6339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6340    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6342    break 2
6343  fi
6344done
6345  done
6346IFS=$as_save_IFS
6347
6348  ;;
6349esac
6350fi
6351DIFF=$ac_cv_path_DIFF
6352if test -n "$DIFF"; then
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6354$as_echo "$DIFF" >&6; }
6355else
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357$as_echo "no" >&6; }
6358fi
6359
6360
6361        if test "x$DIFF" = x; then
6362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6363        fi
6364      else
6365        # Otherwise we believe it is a complete path. Use it as it is.
6366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6367$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6369$as_echo_n "checking for DIFF... " >&6; }
6370        if test ! -x "$tool_specified"; then
6371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6372$as_echo "not found" >&6; }
6373          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6374        fi
6375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6376$as_echo "$tool_specified" >&6; }
6377      fi
6378    fi
6379  fi
6380
6381
6382
6383  if test "x$DIFF" = x; then
6384    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6385  fi
6386
6387
6388
6389
6390
6391  # Publish this variable in the help.
6392
6393
6394  if test "x$DIRNAME" = x; then
6395    # The variable is not set by user, try to locate tool using the code snippet
6396    for ac_prog in dirname
6397do
6398  # Extract the first word of "$ac_prog", so it can be a program name with args.
6399set dummy $ac_prog; ac_word=$2
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6401$as_echo_n "checking for $ac_word... " >&6; }
6402if ${ac_cv_path_DIRNAME+:} false; then :
6403  $as_echo_n "(cached) " >&6
6404else
6405  case $DIRNAME in
6406  [\\/]* | ?:[\\/]*)
6407  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6408  ;;
6409  *)
6410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411for as_dir in $PATH
6412do
6413  IFS=$as_save_IFS
6414  test -z "$as_dir" && as_dir=.
6415    for ac_exec_ext in '' $ac_executable_extensions; do
6416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6417    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419    break 2
6420  fi
6421done
6422  done
6423IFS=$as_save_IFS
6424
6425  ;;
6426esac
6427fi
6428DIRNAME=$ac_cv_path_DIRNAME
6429if test -n "$DIRNAME"; then
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6431$as_echo "$DIRNAME" >&6; }
6432else
6433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; }
6435fi
6436
6437
6438  test -n "$DIRNAME" && break
6439done
6440
6441  else
6442    # The variable is set, but is it from the command line or the environment?
6443
6444    # Try to remove the string !DIRNAME! from our list.
6445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6447      # If it failed, the variable was not from the command line. Ignore it,
6448      # but warn the user (except for BASH, which is always set by the calling BASH).
6449      if test "xDIRNAME" != xBASH; then
6450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6451$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6452      fi
6453      # Try to locate tool using the code snippet
6454      for ac_prog in dirname
6455do
6456  # Extract the first word of "$ac_prog", so it can be a program name with args.
6457set dummy $ac_prog; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if ${ac_cv_path_DIRNAME+:} false; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $DIRNAME in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6475    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486DIRNAME=$ac_cv_path_DIRNAME
6487if test -n "$DIRNAME"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6489$as_echo "$DIRNAME" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496  test -n "$DIRNAME" && break
6497done
6498
6499    else
6500      # If it succeeded, then it was overridden by the user. We will use it
6501      # for the tool.
6502
6503      # First remove it from the list of overridden variables, so we can test
6504      # for unknown variables in the end.
6505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6506
6507      # Check if the provided tool contains a complete path.
6508      tool_specified="$DIRNAME"
6509      tool_basename="${tool_specified##*/}"
6510      if test "x$tool_basename" = "x$tool_specified"; then
6511        # A command without a complete path is provided, search $PATH.
6512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6513$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6514        # Extract the first word of "$tool_basename", so it can be a program name with args.
6515set dummy $tool_basename; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_DIRNAME+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $DIRNAME in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544DIRNAME=$ac_cv_path_DIRNAME
6545if test -n "$DIRNAME"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6547$as_echo "$DIRNAME" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554        if test "x$DIRNAME" = x; then
6555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6556        fi
6557      else
6558        # Otherwise we believe it is a complete path. Use it as it is.
6559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6560$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6562$as_echo_n "checking for DIRNAME... " >&6; }
6563        if test ! -x "$tool_specified"; then
6564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6565$as_echo "not found" >&6; }
6566          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6567        fi
6568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6569$as_echo "$tool_specified" >&6; }
6570      fi
6571    fi
6572  fi
6573
6574
6575
6576  if test "x$DIRNAME" = x; then
6577    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6578  fi
6579
6580
6581
6582
6583
6584  # Publish this variable in the help.
6585
6586
6587  if test "x$ECHO" = x; then
6588    # The variable is not set by user, try to locate tool using the code snippet
6589    for ac_prog in echo
6590do
6591  # Extract the first word of "$ac_prog", so it can be a program name with args.
6592set dummy $ac_prog; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_ECHO+:} false; then :
6596  $as_echo_n "(cached) " >&6
6597else
6598  case $ECHO in
6599  [\\/]* | ?:[\\/]*)
6600  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6601  ;;
6602  *)
6603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in $PATH
6605do
6606  IFS=$as_save_IFS
6607  test -z "$as_dir" && as_dir=.
6608    for ac_exec_ext in '' $ac_executable_extensions; do
6609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612    break 2
6613  fi
6614done
6615  done
6616IFS=$as_save_IFS
6617
6618  ;;
6619esac
6620fi
6621ECHO=$ac_cv_path_ECHO
6622if test -n "$ECHO"; then
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6624$as_echo "$ECHO" >&6; }
6625else
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
6628fi
6629
6630
6631  test -n "$ECHO" && break
6632done
6633
6634  else
6635    # The variable is set, but is it from the command line or the environment?
6636
6637    # Try to remove the string !ECHO! from our list.
6638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6640      # If it failed, the variable was not from the command line. Ignore it,
6641      # but warn the user (except for BASH, which is always set by the calling BASH).
6642      if test "xECHO" != xBASH; then
6643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6644$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6645      fi
6646      # Try to locate tool using the code snippet
6647      for ac_prog in echo
6648do
6649  # Extract the first word of "$ac_prog", so it can be a program name with args.
6650set dummy $ac_prog; ac_word=$2
6651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_ECHO+:} false; then :
6654  $as_echo_n "(cached) " >&6
6655else
6656  case $ECHO in
6657  [\\/]* | ?:[\\/]*)
6658  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6659  ;;
6660  *)
6661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in $PATH
6663do
6664  IFS=$as_save_IFS
6665  test -z "$as_dir" && as_dir=.
6666    for ac_exec_ext in '' $ac_executable_extensions; do
6667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6668    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6670    break 2
6671  fi
6672done
6673  done
6674IFS=$as_save_IFS
6675
6676  ;;
6677esac
6678fi
6679ECHO=$ac_cv_path_ECHO
6680if test -n "$ECHO"; then
6681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6682$as_echo "$ECHO" >&6; }
6683else
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
6686fi
6687
6688
6689  test -n "$ECHO" && break
6690done
6691
6692    else
6693      # If it succeeded, then it was overridden by the user. We will use it
6694      # for the tool.
6695
6696      # First remove it from the list of overridden variables, so we can test
6697      # for unknown variables in the end.
6698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6699
6700      # Check if the provided tool contains a complete path.
6701      tool_specified="$ECHO"
6702      tool_basename="${tool_specified##*/}"
6703      if test "x$tool_basename" = "x$tool_specified"; then
6704        # A command without a complete path is provided, search $PATH.
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6706$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6707        # Extract the first word of "$tool_basename", so it can be a program name with args.
6708set dummy $tool_basename; ac_word=$2
6709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6710$as_echo_n "checking for $ac_word... " >&6; }
6711if ${ac_cv_path_ECHO+:} false; then :
6712  $as_echo_n "(cached) " >&6
6713else
6714  case $ECHO in
6715  [\\/]* | ?:[\\/]*)
6716  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6717  ;;
6718  *)
6719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6720for as_dir in $PATH
6721do
6722  IFS=$as_save_IFS
6723  test -z "$as_dir" && as_dir=.
6724    for ac_exec_ext in '' $ac_executable_extensions; do
6725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6726    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6728    break 2
6729  fi
6730done
6731  done
6732IFS=$as_save_IFS
6733
6734  ;;
6735esac
6736fi
6737ECHO=$ac_cv_path_ECHO
6738if test -n "$ECHO"; then
6739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6740$as_echo "$ECHO" >&6; }
6741else
6742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6743$as_echo "no" >&6; }
6744fi
6745
6746
6747        if test "x$ECHO" = x; then
6748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6749        fi
6750      else
6751        # Otherwise we believe it is a complete path. Use it as it is.
6752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6753$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6755$as_echo_n "checking for ECHO... " >&6; }
6756        if test ! -x "$tool_specified"; then
6757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6758$as_echo "not found" >&6; }
6759          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6760        fi
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6762$as_echo "$tool_specified" >&6; }
6763      fi
6764    fi
6765  fi
6766
6767
6768
6769  if test "x$ECHO" = x; then
6770    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6771  fi
6772
6773
6774
6775
6776
6777  # Publish this variable in the help.
6778
6779
6780  if test "x$EXPR" = x; then
6781    # The variable is not set by user, try to locate tool using the code snippet
6782    for ac_prog in expr
6783do
6784  # Extract the first word of "$ac_prog", so it can be a program name with args.
6785set dummy $ac_prog; ac_word=$2
6786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6787$as_echo_n "checking for $ac_word... " >&6; }
6788if ${ac_cv_path_EXPR+:} false; then :
6789  $as_echo_n "(cached) " >&6
6790else
6791  case $EXPR in
6792  [\\/]* | ?:[\\/]*)
6793  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6794  ;;
6795  *)
6796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6797for as_dir in $PATH
6798do
6799  IFS=$as_save_IFS
6800  test -z "$as_dir" && as_dir=.
6801    for ac_exec_ext in '' $ac_executable_extensions; do
6802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6803    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6805    break 2
6806  fi
6807done
6808  done
6809IFS=$as_save_IFS
6810
6811  ;;
6812esac
6813fi
6814EXPR=$ac_cv_path_EXPR
6815if test -n "$EXPR"; then
6816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6817$as_echo "$EXPR" >&6; }
6818else
6819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6820$as_echo "no" >&6; }
6821fi
6822
6823
6824  test -n "$EXPR" && break
6825done
6826
6827  else
6828    # The variable is set, but is it from the command line or the environment?
6829
6830    # Try to remove the string !EXPR! from our list.
6831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6833      # If it failed, the variable was not from the command line. Ignore it,
6834      # but warn the user (except for BASH, which is always set by the calling BASH).
6835      if test "xEXPR" != xBASH; then
6836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6837$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6838      fi
6839      # Try to locate tool using the code snippet
6840      for ac_prog in expr
6841do
6842  # Extract the first word of "$ac_prog", so it can be a program name with args.
6843set dummy $ac_prog; ac_word=$2
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6845$as_echo_n "checking for $ac_word... " >&6; }
6846if ${ac_cv_path_EXPR+:} false; then :
6847  $as_echo_n "(cached) " >&6
6848else
6849  case $EXPR in
6850  [\\/]* | ?:[\\/]*)
6851  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6852  ;;
6853  *)
6854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6855for as_dir in $PATH
6856do
6857  IFS=$as_save_IFS
6858  test -z "$as_dir" && as_dir=.
6859    for ac_exec_ext in '' $ac_executable_extensions; do
6860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6861    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6863    break 2
6864  fi
6865done
6866  done
6867IFS=$as_save_IFS
6868
6869  ;;
6870esac
6871fi
6872EXPR=$ac_cv_path_EXPR
6873if test -n "$EXPR"; then
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6875$as_echo "$EXPR" >&6; }
6876else
6877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6878$as_echo "no" >&6; }
6879fi
6880
6881
6882  test -n "$EXPR" && break
6883done
6884
6885    else
6886      # If it succeeded, then it was overridden by the user. We will use it
6887      # for the tool.
6888
6889      # First remove it from the list of overridden variables, so we can test
6890      # for unknown variables in the end.
6891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6892
6893      # Check if the provided tool contains a complete path.
6894      tool_specified="$EXPR"
6895      tool_basename="${tool_specified##*/}"
6896      if test "x$tool_basename" = "x$tool_specified"; then
6897        # A command without a complete path is provided, search $PATH.
6898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6899$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6900        # Extract the first word of "$tool_basename", so it can be a program name with args.
6901set dummy $tool_basename; ac_word=$2
6902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6903$as_echo_n "checking for $ac_word... " >&6; }
6904if ${ac_cv_path_EXPR+:} false; then :
6905  $as_echo_n "(cached) " >&6
6906else
6907  case $EXPR in
6908  [\\/]* | ?:[\\/]*)
6909  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6910  ;;
6911  *)
6912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6913for as_dir in $PATH
6914do
6915  IFS=$as_save_IFS
6916  test -z "$as_dir" && as_dir=.
6917    for ac_exec_ext in '' $ac_executable_extensions; do
6918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6919    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6921    break 2
6922  fi
6923done
6924  done
6925IFS=$as_save_IFS
6926
6927  ;;
6928esac
6929fi
6930EXPR=$ac_cv_path_EXPR
6931if test -n "$EXPR"; then
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6933$as_echo "$EXPR" >&6; }
6934else
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6936$as_echo "no" >&6; }
6937fi
6938
6939
6940        if test "x$EXPR" = x; then
6941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6942        fi
6943      else
6944        # Otherwise we believe it is a complete path. Use it as it is.
6945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6946$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6948$as_echo_n "checking for EXPR... " >&6; }
6949        if test ! -x "$tool_specified"; then
6950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6951$as_echo "not found" >&6; }
6952          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6953        fi
6954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6955$as_echo "$tool_specified" >&6; }
6956      fi
6957    fi
6958  fi
6959
6960
6961
6962  if test "x$EXPR" = x; then
6963    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6964  fi
6965
6966
6967
6968
6969
6970  # Publish this variable in the help.
6971
6972
6973  if test "x$FILE" = x; then
6974    # The variable is not set by user, try to locate tool using the code snippet
6975    for ac_prog in file
6976do
6977  # Extract the first word of "$ac_prog", so it can be a program name with args.
6978set dummy $ac_prog; ac_word=$2
6979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6980$as_echo_n "checking for $ac_word... " >&6; }
6981if ${ac_cv_path_FILE+:} false; then :
6982  $as_echo_n "(cached) " >&6
6983else
6984  case $FILE in
6985  [\\/]* | ?:[\\/]*)
6986  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6987  ;;
6988  *)
6989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6990for as_dir in $PATH
6991do
6992  IFS=$as_save_IFS
6993  test -z "$as_dir" && as_dir=.
6994    for ac_exec_ext in '' $ac_executable_extensions; do
6995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6996    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6998    break 2
6999  fi
7000done
7001  done
7002IFS=$as_save_IFS
7003
7004  ;;
7005esac
7006fi
7007FILE=$ac_cv_path_FILE
7008if test -n "$FILE"; then
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7010$as_echo "$FILE" >&6; }
7011else
7012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7013$as_echo "no" >&6; }
7014fi
7015
7016
7017  test -n "$FILE" && break
7018done
7019
7020  else
7021    # The variable is set, but is it from the command line or the environment?
7022
7023    # Try to remove the string !FILE! from our list.
7024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7026      # If it failed, the variable was not from the command line. Ignore it,
7027      # but warn the user (except for BASH, which is always set by the calling BASH).
7028      if test "xFILE" != xBASH; then
7029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7030$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7031      fi
7032      # Try to locate tool using the code snippet
7033      for ac_prog in file
7034do
7035  # Extract the first word of "$ac_prog", so it can be a program name with args.
7036set dummy $ac_prog; ac_word=$2
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7038$as_echo_n "checking for $ac_word... " >&6; }
7039if ${ac_cv_path_FILE+:} false; then :
7040  $as_echo_n "(cached) " >&6
7041else
7042  case $FILE in
7043  [\\/]* | ?:[\\/]*)
7044  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7045  ;;
7046  *)
7047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7048for as_dir in $PATH
7049do
7050  IFS=$as_save_IFS
7051  test -z "$as_dir" && as_dir=.
7052    for ac_exec_ext in '' $ac_executable_extensions; do
7053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7054    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7056    break 2
7057  fi
7058done
7059  done
7060IFS=$as_save_IFS
7061
7062  ;;
7063esac
7064fi
7065FILE=$ac_cv_path_FILE
7066if test -n "$FILE"; then
7067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7068$as_echo "$FILE" >&6; }
7069else
7070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7071$as_echo "no" >&6; }
7072fi
7073
7074
7075  test -n "$FILE" && break
7076done
7077
7078    else
7079      # If it succeeded, then it was overridden by the user. We will use it
7080      # for the tool.
7081
7082      # First remove it from the list of overridden variables, so we can test
7083      # for unknown variables in the end.
7084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7085
7086      # Check if the provided tool contains a complete path.
7087      tool_specified="$FILE"
7088      tool_basename="${tool_specified##*/}"
7089      if test "x$tool_basename" = "x$tool_specified"; then
7090        # A command without a complete path is provided, search $PATH.
7091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7092$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7093        # Extract the first word of "$tool_basename", so it can be a program name with args.
7094set dummy $tool_basename; ac_word=$2
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7096$as_echo_n "checking for $ac_word... " >&6; }
7097if ${ac_cv_path_FILE+:} false; then :
7098  $as_echo_n "(cached) " >&6
7099else
7100  case $FILE in
7101  [\\/]* | ?:[\\/]*)
7102  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7103  ;;
7104  *)
7105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7106for as_dir in $PATH
7107do
7108  IFS=$as_save_IFS
7109  test -z "$as_dir" && as_dir=.
7110    for ac_exec_ext in '' $ac_executable_extensions; do
7111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7112    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7114    break 2
7115  fi
7116done
7117  done
7118IFS=$as_save_IFS
7119
7120  ;;
7121esac
7122fi
7123FILE=$ac_cv_path_FILE
7124if test -n "$FILE"; then
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7126$as_echo "$FILE" >&6; }
7127else
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
7130fi
7131
7132
7133        if test "x$FILE" = x; then
7134          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7135        fi
7136      else
7137        # Otherwise we believe it is a complete path. Use it as it is.
7138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7139$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7141$as_echo_n "checking for FILE... " >&6; }
7142        if test ! -x "$tool_specified"; then
7143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7144$as_echo "not found" >&6; }
7145          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7146        fi
7147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7148$as_echo "$tool_specified" >&6; }
7149      fi
7150    fi
7151  fi
7152
7153
7154
7155  if test "x$FILE" = x; then
7156    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7157  fi
7158
7159
7160
7161
7162
7163  # Publish this variable in the help.
7164
7165
7166  if test "x$FIND" = x; then
7167    # The variable is not set by user, try to locate tool using the code snippet
7168    for ac_prog in find
7169do
7170  # Extract the first word of "$ac_prog", so it can be a program name with args.
7171set dummy $ac_prog; ac_word=$2
7172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7173$as_echo_n "checking for $ac_word... " >&6; }
7174if ${ac_cv_path_FIND+:} false; then :
7175  $as_echo_n "(cached) " >&6
7176else
7177  case $FIND in
7178  [\\/]* | ?:[\\/]*)
7179  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7180  ;;
7181  *)
7182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7183for as_dir in $PATH
7184do
7185  IFS=$as_save_IFS
7186  test -z "$as_dir" && as_dir=.
7187    for ac_exec_ext in '' $ac_executable_extensions; do
7188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7189    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7191    break 2
7192  fi
7193done
7194  done
7195IFS=$as_save_IFS
7196
7197  ;;
7198esac
7199fi
7200FIND=$ac_cv_path_FIND
7201if test -n "$FIND"; then
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7203$as_echo "$FIND" >&6; }
7204else
7205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206$as_echo "no" >&6; }
7207fi
7208
7209
7210  test -n "$FIND" && break
7211done
7212
7213  else
7214    # The variable is set, but is it from the command line or the environment?
7215
7216    # Try to remove the string !FIND! from our list.
7217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7219      # If it failed, the variable was not from the command line. Ignore it,
7220      # but warn the user (except for BASH, which is always set by the calling BASH).
7221      if test "xFIND" != xBASH; then
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7223$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7224      fi
7225      # Try to locate tool using the code snippet
7226      for ac_prog in find
7227do
7228  # Extract the first word of "$ac_prog", so it can be a program name with args.
7229set dummy $ac_prog; ac_word=$2
7230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231$as_echo_n "checking for $ac_word... " >&6; }
7232if ${ac_cv_path_FIND+:} false; then :
7233  $as_echo_n "(cached) " >&6
7234else
7235  case $FIND in
7236  [\\/]* | ?:[\\/]*)
7237  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7238  ;;
7239  *)
7240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241for as_dir in $PATH
7242do
7243  IFS=$as_save_IFS
7244  test -z "$as_dir" && as_dir=.
7245    for ac_exec_ext in '' $ac_executable_extensions; do
7246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249    break 2
7250  fi
7251done
7252  done
7253IFS=$as_save_IFS
7254
7255  ;;
7256esac
7257fi
7258FIND=$ac_cv_path_FIND
7259if test -n "$FIND"; then
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7261$as_echo "$FIND" >&6; }
7262else
7263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264$as_echo "no" >&6; }
7265fi
7266
7267
7268  test -n "$FIND" && break
7269done
7270
7271    else
7272      # If it succeeded, then it was overridden by the user. We will use it
7273      # for the tool.
7274
7275      # First remove it from the list of overridden variables, so we can test
7276      # for unknown variables in the end.
7277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7278
7279      # Check if the provided tool contains a complete path.
7280      tool_specified="$FIND"
7281      tool_basename="${tool_specified##*/}"
7282      if test "x$tool_basename" = "x$tool_specified"; then
7283        # A command without a complete path is provided, search $PATH.
7284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7285$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7286        # Extract the first word of "$tool_basename", so it can be a program name with args.
7287set dummy $tool_basename; ac_word=$2
7288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289$as_echo_n "checking for $ac_word... " >&6; }
7290if ${ac_cv_path_FIND+:} false; then :
7291  $as_echo_n "(cached) " >&6
7292else
7293  case $FIND in
7294  [\\/]* | ?:[\\/]*)
7295  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7296  ;;
7297  *)
7298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299for as_dir in $PATH
7300do
7301  IFS=$as_save_IFS
7302  test -z "$as_dir" && as_dir=.
7303    for ac_exec_ext in '' $ac_executable_extensions; do
7304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307    break 2
7308  fi
7309done
7310  done
7311IFS=$as_save_IFS
7312
7313  ;;
7314esac
7315fi
7316FIND=$ac_cv_path_FIND
7317if test -n "$FIND"; then
7318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7319$as_echo "$FIND" >&6; }
7320else
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322$as_echo "no" >&6; }
7323fi
7324
7325
7326        if test "x$FIND" = x; then
7327          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7328        fi
7329      else
7330        # Otherwise we believe it is a complete path. Use it as it is.
7331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7332$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7333        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7334$as_echo_n "checking for FIND... " >&6; }
7335        if test ! -x "$tool_specified"; then
7336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7337$as_echo "not found" >&6; }
7338          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7339        fi
7340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7341$as_echo "$tool_specified" >&6; }
7342      fi
7343    fi
7344  fi
7345
7346
7347
7348  if test "x$FIND" = x; then
7349    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7350  fi
7351
7352
7353
7354
7355
7356  # Publish this variable in the help.
7357
7358
7359  if test "x$HEAD" = x; then
7360    # The variable is not set by user, try to locate tool using the code snippet
7361    for ac_prog in head
7362do
7363  # Extract the first word of "$ac_prog", so it can be a program name with args.
7364set dummy $ac_prog; ac_word=$2
7365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7366$as_echo_n "checking for $ac_word... " >&6; }
7367if ${ac_cv_path_HEAD+:} false; then :
7368  $as_echo_n "(cached) " >&6
7369else
7370  case $HEAD in
7371  [\\/]* | ?:[\\/]*)
7372  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7373  ;;
7374  *)
7375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376for as_dir in $PATH
7377do
7378  IFS=$as_save_IFS
7379  test -z "$as_dir" && as_dir=.
7380    for ac_exec_ext in '' $ac_executable_extensions; do
7381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7382    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7384    break 2
7385  fi
7386done
7387  done
7388IFS=$as_save_IFS
7389
7390  ;;
7391esac
7392fi
7393HEAD=$ac_cv_path_HEAD
7394if test -n "$HEAD"; then
7395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7396$as_echo "$HEAD" >&6; }
7397else
7398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7399$as_echo "no" >&6; }
7400fi
7401
7402
7403  test -n "$HEAD" && break
7404done
7405
7406  else
7407    # The variable is set, but is it from the command line or the environment?
7408
7409    # Try to remove the string !HEAD! from our list.
7410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7412      # If it failed, the variable was not from the command line. Ignore it,
7413      # but warn the user (except for BASH, which is always set by the calling BASH).
7414      if test "xHEAD" != xBASH; then
7415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7416$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7417      fi
7418      # Try to locate tool using the code snippet
7419      for ac_prog in head
7420do
7421  # Extract the first word of "$ac_prog", so it can be a program name with args.
7422set dummy $ac_prog; ac_word=$2
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7424$as_echo_n "checking for $ac_word... " >&6; }
7425if ${ac_cv_path_HEAD+:} false; then :
7426  $as_echo_n "(cached) " >&6
7427else
7428  case $HEAD in
7429  [\\/]* | ?:[\\/]*)
7430  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7431  ;;
7432  *)
7433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434for as_dir in $PATH
7435do
7436  IFS=$as_save_IFS
7437  test -z "$as_dir" && as_dir=.
7438    for ac_exec_ext in '' $ac_executable_extensions; do
7439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7440    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7442    break 2
7443  fi
7444done
7445  done
7446IFS=$as_save_IFS
7447
7448  ;;
7449esac
7450fi
7451HEAD=$ac_cv_path_HEAD
7452if test -n "$HEAD"; then
7453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7454$as_echo "$HEAD" >&6; }
7455else
7456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457$as_echo "no" >&6; }
7458fi
7459
7460
7461  test -n "$HEAD" && break
7462done
7463
7464    else
7465      # If it succeeded, then it was overridden by the user. We will use it
7466      # for the tool.
7467
7468      # First remove it from the list of overridden variables, so we can test
7469      # for unknown variables in the end.
7470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7471
7472      # Check if the provided tool contains a complete path.
7473      tool_specified="$HEAD"
7474      tool_basename="${tool_specified##*/}"
7475      if test "x$tool_basename" = "x$tool_specified"; then
7476        # A command without a complete path is provided, search $PATH.
7477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7478$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7479        # Extract the first word of "$tool_basename", so it can be a program name with args.
7480set dummy $tool_basename; ac_word=$2
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7482$as_echo_n "checking for $ac_word... " >&6; }
7483if ${ac_cv_path_HEAD+:} false; then :
7484  $as_echo_n "(cached) " >&6
7485else
7486  case $HEAD in
7487  [\\/]* | ?:[\\/]*)
7488  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7489  ;;
7490  *)
7491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494  IFS=$as_save_IFS
7495  test -z "$as_dir" && as_dir=.
7496    for ac_exec_ext in '' $ac_executable_extensions; do
7497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7498    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7500    break 2
7501  fi
7502done
7503  done
7504IFS=$as_save_IFS
7505
7506  ;;
7507esac
7508fi
7509HEAD=$ac_cv_path_HEAD
7510if test -n "$HEAD"; then
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7512$as_echo "$HEAD" >&6; }
7513else
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515$as_echo "no" >&6; }
7516fi
7517
7518
7519        if test "x$HEAD" = x; then
7520          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7521        fi
7522      else
7523        # Otherwise we believe it is a complete path. Use it as it is.
7524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7525$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7527$as_echo_n "checking for HEAD... " >&6; }
7528        if test ! -x "$tool_specified"; then
7529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7530$as_echo "not found" >&6; }
7531          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7532        fi
7533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7534$as_echo "$tool_specified" >&6; }
7535      fi
7536    fi
7537  fi
7538
7539
7540
7541  if test "x$HEAD" = x; then
7542    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7543  fi
7544
7545
7546
7547
7548
7549  # Publish this variable in the help.
7550
7551
7552  if test "x$LN" = x; then
7553    # The variable is not set by user, try to locate tool using the code snippet
7554    for ac_prog in ln
7555do
7556  # Extract the first word of "$ac_prog", so it can be a program name with args.
7557set dummy $ac_prog; ac_word=$2
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
7560if ${ac_cv_path_LN+:} false; then :
7561  $as_echo_n "(cached) " >&6
7562else
7563  case $LN in
7564  [\\/]* | ?:[\\/]*)
7565  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7566  ;;
7567  *)
7568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569for as_dir in $PATH
7570do
7571  IFS=$as_save_IFS
7572  test -z "$as_dir" && as_dir=.
7573    for ac_exec_ext in '' $ac_executable_extensions; do
7574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577    break 2
7578  fi
7579done
7580  done
7581IFS=$as_save_IFS
7582
7583  ;;
7584esac
7585fi
7586LN=$ac_cv_path_LN
7587if test -n "$LN"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7589$as_echo "$LN" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
7593fi
7594
7595
7596  test -n "$LN" && break
7597done
7598
7599  else
7600    # The variable is set, but is it from the command line or the environment?
7601
7602    # Try to remove the string !LN! from our list.
7603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7605      # If it failed, the variable was not from the command line. Ignore it,
7606      # but warn the user (except for BASH, which is always set by the calling BASH).
7607      if test "xLN" != xBASH; then
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7609$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7610      fi
7611      # Try to locate tool using the code snippet
7612      for ac_prog in ln
7613do
7614  # Extract the first word of "$ac_prog", so it can be a program name with args.
7615set dummy $ac_prog; ac_word=$2
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617$as_echo_n "checking for $ac_word... " >&6; }
7618if ${ac_cv_path_LN+:} false; then :
7619  $as_echo_n "(cached) " >&6
7620else
7621  case $LN in
7622  [\\/]* | ?:[\\/]*)
7623  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7624  ;;
7625  *)
7626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627for as_dir in $PATH
7628do
7629  IFS=$as_save_IFS
7630  test -z "$as_dir" && as_dir=.
7631    for ac_exec_ext in '' $ac_executable_extensions; do
7632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635    break 2
7636  fi
7637done
7638  done
7639IFS=$as_save_IFS
7640
7641  ;;
7642esac
7643fi
7644LN=$ac_cv_path_LN
7645if test -n "$LN"; then
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7647$as_echo "$LN" >&6; }
7648else
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650$as_echo "no" >&6; }
7651fi
7652
7653
7654  test -n "$LN" && break
7655done
7656
7657    else
7658      # If it succeeded, then it was overridden by the user. We will use it
7659      # for the tool.
7660
7661      # First remove it from the list of overridden variables, so we can test
7662      # for unknown variables in the end.
7663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7664
7665      # Check if the provided tool contains a complete path.
7666      tool_specified="$LN"
7667      tool_basename="${tool_specified##*/}"
7668      if test "x$tool_basename" = "x$tool_specified"; then
7669        # A command without a complete path is provided, search $PATH.
7670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7671$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7672        # Extract the first word of "$tool_basename", so it can be a program name with args.
7673set dummy $tool_basename; ac_word=$2
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675$as_echo_n "checking for $ac_word... " >&6; }
7676if ${ac_cv_path_LN+:} false; then :
7677  $as_echo_n "(cached) " >&6
7678else
7679  case $LN in
7680  [\\/]* | ?:[\\/]*)
7681  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7682  ;;
7683  *)
7684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685for as_dir in $PATH
7686do
7687  IFS=$as_save_IFS
7688  test -z "$as_dir" && as_dir=.
7689    for ac_exec_ext in '' $ac_executable_extensions; do
7690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693    break 2
7694  fi
7695done
7696  done
7697IFS=$as_save_IFS
7698
7699  ;;
7700esac
7701fi
7702LN=$ac_cv_path_LN
7703if test -n "$LN"; then
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7705$as_echo "$LN" >&6; }
7706else
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708$as_echo "no" >&6; }
7709fi
7710
7711
7712        if test "x$LN" = x; then
7713          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7714        fi
7715      else
7716        # Otherwise we believe it is a complete path. Use it as it is.
7717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7718$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7720$as_echo_n "checking for LN... " >&6; }
7721        if test ! -x "$tool_specified"; then
7722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7723$as_echo "not found" >&6; }
7724          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7725        fi
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7727$as_echo "$tool_specified" >&6; }
7728      fi
7729    fi
7730  fi
7731
7732
7733
7734  if test "x$LN" = x; then
7735    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7736  fi
7737
7738
7739
7740
7741
7742  # Publish this variable in the help.
7743
7744
7745  if test "x$LS" = x; then
7746    # The variable is not set by user, try to locate tool using the code snippet
7747    for ac_prog in ls
7748do
7749  # Extract the first word of "$ac_prog", so it can be a program name with args.
7750set dummy $ac_prog; ac_word=$2
7751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7752$as_echo_n "checking for $ac_word... " >&6; }
7753if ${ac_cv_path_LS+:} false; then :
7754  $as_echo_n "(cached) " >&6
7755else
7756  case $LS in
7757  [\\/]* | ?:[\\/]*)
7758  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7759  ;;
7760  *)
7761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7762for as_dir in $PATH
7763do
7764  IFS=$as_save_IFS
7765  test -z "$as_dir" && as_dir=.
7766    for ac_exec_ext in '' $ac_executable_extensions; do
7767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7768    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7770    break 2
7771  fi
7772done
7773  done
7774IFS=$as_save_IFS
7775
7776  ;;
7777esac
7778fi
7779LS=$ac_cv_path_LS
7780if test -n "$LS"; then
7781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7782$as_echo "$LS" >&6; }
7783else
7784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7785$as_echo "no" >&6; }
7786fi
7787
7788
7789  test -n "$LS" && break
7790done
7791
7792  else
7793    # The variable is set, but is it from the command line or the environment?
7794
7795    # Try to remove the string !LS! from our list.
7796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7798      # If it failed, the variable was not from the command line. Ignore it,
7799      # but warn the user (except for BASH, which is always set by the calling BASH).
7800      if test "xLS" != xBASH; then
7801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7802$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7803      fi
7804      # Try to locate tool using the code snippet
7805      for ac_prog in ls
7806do
7807  # Extract the first word of "$ac_prog", so it can be a program name with args.
7808set dummy $ac_prog; ac_word=$2
7809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7810$as_echo_n "checking for $ac_word... " >&6; }
7811if ${ac_cv_path_LS+:} false; then :
7812  $as_echo_n "(cached) " >&6
7813else
7814  case $LS in
7815  [\\/]* | ?:[\\/]*)
7816  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7817  ;;
7818  *)
7819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7820for as_dir in $PATH
7821do
7822  IFS=$as_save_IFS
7823  test -z "$as_dir" && as_dir=.
7824    for ac_exec_ext in '' $ac_executable_extensions; do
7825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7826    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7828    break 2
7829  fi
7830done
7831  done
7832IFS=$as_save_IFS
7833
7834  ;;
7835esac
7836fi
7837LS=$ac_cv_path_LS
7838if test -n "$LS"; then
7839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7840$as_echo "$LS" >&6; }
7841else
7842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7843$as_echo "no" >&6; }
7844fi
7845
7846
7847  test -n "$LS" && break
7848done
7849
7850    else
7851      # If it succeeded, then it was overridden by the user. We will use it
7852      # for the tool.
7853
7854      # First remove it from the list of overridden variables, so we can test
7855      # for unknown variables in the end.
7856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7857
7858      # Check if the provided tool contains a complete path.
7859      tool_specified="$LS"
7860      tool_basename="${tool_specified##*/}"
7861      if test "x$tool_basename" = "x$tool_specified"; then
7862        # A command without a complete path is provided, search $PATH.
7863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7864$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7865        # Extract the first word of "$tool_basename", so it can be a program name with args.
7866set dummy $tool_basename; ac_word=$2
7867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7868$as_echo_n "checking for $ac_word... " >&6; }
7869if ${ac_cv_path_LS+:} false; then :
7870  $as_echo_n "(cached) " >&6
7871else
7872  case $LS in
7873  [\\/]* | ?:[\\/]*)
7874  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7875  ;;
7876  *)
7877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878for as_dir in $PATH
7879do
7880  IFS=$as_save_IFS
7881  test -z "$as_dir" && as_dir=.
7882    for ac_exec_ext in '' $ac_executable_extensions; do
7883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7884    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7886    break 2
7887  fi
7888done
7889  done
7890IFS=$as_save_IFS
7891
7892  ;;
7893esac
7894fi
7895LS=$ac_cv_path_LS
7896if test -n "$LS"; then
7897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7898$as_echo "$LS" >&6; }
7899else
7900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7901$as_echo "no" >&6; }
7902fi
7903
7904
7905        if test "x$LS" = x; then
7906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7907        fi
7908      else
7909        # Otherwise we believe it is a complete path. Use it as it is.
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7911$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7913$as_echo_n "checking for LS... " >&6; }
7914        if test ! -x "$tool_specified"; then
7915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7916$as_echo "not found" >&6; }
7917          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7918        fi
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7920$as_echo "$tool_specified" >&6; }
7921      fi
7922    fi
7923  fi
7924
7925
7926
7927  if test "x$LS" = x; then
7928    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7929  fi
7930
7931
7932
7933
7934
7935  # Publish this variable in the help.
7936
7937
7938  if test "x$MKDIR" = x; then
7939    # The variable is not set by user, try to locate tool using the code snippet
7940    for ac_prog in mkdir
7941do
7942  # Extract the first word of "$ac_prog", so it can be a program name with args.
7943set dummy $ac_prog; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_MKDIR+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $MKDIR in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972MKDIR=$ac_cv_path_MKDIR
7973if test -n "$MKDIR"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7975$as_echo "$MKDIR" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982  test -n "$MKDIR" && break
7983done
7984
7985  else
7986    # The variable is set, but is it from the command line or the environment?
7987
7988    # Try to remove the string !MKDIR! from our list.
7989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7991      # If it failed, the variable was not from the command line. Ignore it,
7992      # but warn the user (except for BASH, which is always set by the calling BASH).
7993      if test "xMKDIR" != xBASH; then
7994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7995$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7996      fi
7997      # Try to locate tool using the code snippet
7998      for ac_prog in mkdir
7999do
8000  # Extract the first word of "$ac_prog", so it can be a program name with args.
8001set dummy $ac_prog; ac_word=$2
8002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8003$as_echo_n "checking for $ac_word... " >&6; }
8004if ${ac_cv_path_MKDIR+:} false; then :
8005  $as_echo_n "(cached) " >&6
8006else
8007  case $MKDIR in
8008  [\\/]* | ?:[\\/]*)
8009  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8010  ;;
8011  *)
8012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8013for as_dir in $PATH
8014do
8015  IFS=$as_save_IFS
8016  test -z "$as_dir" && as_dir=.
8017    for ac_exec_ext in '' $ac_executable_extensions; do
8018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8019    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8021    break 2
8022  fi
8023done
8024  done
8025IFS=$as_save_IFS
8026
8027  ;;
8028esac
8029fi
8030MKDIR=$ac_cv_path_MKDIR
8031if test -n "$MKDIR"; then
8032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8033$as_echo "$MKDIR" >&6; }
8034else
8035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036$as_echo "no" >&6; }
8037fi
8038
8039
8040  test -n "$MKDIR" && break
8041done
8042
8043    else
8044      # If it succeeded, then it was overridden by the user. We will use it
8045      # for the tool.
8046
8047      # First remove it from the list of overridden variables, so we can test
8048      # for unknown variables in the end.
8049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8050
8051      # Check if the provided tool contains a complete path.
8052      tool_specified="$MKDIR"
8053      tool_basename="${tool_specified##*/}"
8054      if test "x$tool_basename" = "x$tool_specified"; then
8055        # A command without a complete path is provided, search $PATH.
8056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8057$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8058        # Extract the first word of "$tool_basename", so it can be a program name with args.
8059set dummy $tool_basename; ac_word=$2
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8061$as_echo_n "checking for $ac_word... " >&6; }
8062if ${ac_cv_path_MKDIR+:} false; then :
8063  $as_echo_n "(cached) " >&6
8064else
8065  case $MKDIR in
8066  [\\/]* | ?:[\\/]*)
8067  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8068  ;;
8069  *)
8070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8071for as_dir in $PATH
8072do
8073  IFS=$as_save_IFS
8074  test -z "$as_dir" && as_dir=.
8075    for ac_exec_ext in '' $ac_executable_extensions; do
8076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8077    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8079    break 2
8080  fi
8081done
8082  done
8083IFS=$as_save_IFS
8084
8085  ;;
8086esac
8087fi
8088MKDIR=$ac_cv_path_MKDIR
8089if test -n "$MKDIR"; then
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8091$as_echo "$MKDIR" >&6; }
8092else
8093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094$as_echo "no" >&6; }
8095fi
8096
8097
8098        if test "x$MKDIR" = x; then
8099          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8100        fi
8101      else
8102        # Otherwise we believe it is a complete path. Use it as it is.
8103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8104$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8106$as_echo_n "checking for MKDIR... " >&6; }
8107        if test ! -x "$tool_specified"; then
8108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8109$as_echo "not found" >&6; }
8110          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8111        fi
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8113$as_echo "$tool_specified" >&6; }
8114      fi
8115    fi
8116  fi
8117
8118
8119
8120  if test "x$MKDIR" = x; then
8121    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8122  fi
8123
8124
8125
8126
8127
8128  # Publish this variable in the help.
8129
8130
8131  if test "x$MKTEMP" = x; then
8132    # The variable is not set by user, try to locate tool using the code snippet
8133    for ac_prog in mktemp
8134do
8135  # Extract the first word of "$ac_prog", so it can be a program name with args.
8136set dummy $ac_prog; ac_word=$2
8137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8138$as_echo_n "checking for $ac_word... " >&6; }
8139if ${ac_cv_path_MKTEMP+:} false; then :
8140  $as_echo_n "(cached) " >&6
8141else
8142  case $MKTEMP in
8143  [\\/]* | ?:[\\/]*)
8144  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8145  ;;
8146  *)
8147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8148for as_dir in $PATH
8149do
8150  IFS=$as_save_IFS
8151  test -z "$as_dir" && as_dir=.
8152    for ac_exec_ext in '' $ac_executable_extensions; do
8153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8154    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8156    break 2
8157  fi
8158done
8159  done
8160IFS=$as_save_IFS
8161
8162  ;;
8163esac
8164fi
8165MKTEMP=$ac_cv_path_MKTEMP
8166if test -n "$MKTEMP"; then
8167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8168$as_echo "$MKTEMP" >&6; }
8169else
8170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171$as_echo "no" >&6; }
8172fi
8173
8174
8175  test -n "$MKTEMP" && break
8176done
8177
8178  else
8179    # The variable is set, but is it from the command line or the environment?
8180
8181    # Try to remove the string !MKTEMP! from our list.
8182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8184      # If it failed, the variable was not from the command line. Ignore it,
8185      # but warn the user (except for BASH, which is always set by the calling BASH).
8186      if test "xMKTEMP" != xBASH; then
8187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8188$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8189      fi
8190      # Try to locate tool using the code snippet
8191      for ac_prog in mktemp
8192do
8193  # Extract the first word of "$ac_prog", so it can be a program name with args.
8194set dummy $ac_prog; ac_word=$2
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8196$as_echo_n "checking for $ac_word... " >&6; }
8197if ${ac_cv_path_MKTEMP+:} false; then :
8198  $as_echo_n "(cached) " >&6
8199else
8200  case $MKTEMP in
8201  [\\/]* | ?:[\\/]*)
8202  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8203  ;;
8204  *)
8205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8206for as_dir in $PATH
8207do
8208  IFS=$as_save_IFS
8209  test -z "$as_dir" && as_dir=.
8210    for ac_exec_ext in '' $ac_executable_extensions; do
8211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8212    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8214    break 2
8215  fi
8216done
8217  done
8218IFS=$as_save_IFS
8219
8220  ;;
8221esac
8222fi
8223MKTEMP=$ac_cv_path_MKTEMP
8224if test -n "$MKTEMP"; then
8225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8226$as_echo "$MKTEMP" >&6; }
8227else
8228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229$as_echo "no" >&6; }
8230fi
8231
8232
8233  test -n "$MKTEMP" && break
8234done
8235
8236    else
8237      # If it succeeded, then it was overridden by the user. We will use it
8238      # for the tool.
8239
8240      # First remove it from the list of overridden variables, so we can test
8241      # for unknown variables in the end.
8242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8243
8244      # Check if the provided tool contains a complete path.
8245      tool_specified="$MKTEMP"
8246      tool_basename="${tool_specified##*/}"
8247      if test "x$tool_basename" = "x$tool_specified"; then
8248        # A command without a complete path is provided, search $PATH.
8249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8250$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8251        # Extract the first word of "$tool_basename", so it can be a program name with args.
8252set dummy $tool_basename; ac_word=$2
8253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8254$as_echo_n "checking for $ac_word... " >&6; }
8255if ${ac_cv_path_MKTEMP+:} false; then :
8256  $as_echo_n "(cached) " >&6
8257else
8258  case $MKTEMP in
8259  [\\/]* | ?:[\\/]*)
8260  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8261  ;;
8262  *)
8263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8264for as_dir in $PATH
8265do
8266  IFS=$as_save_IFS
8267  test -z "$as_dir" && as_dir=.
8268    for ac_exec_ext in '' $ac_executable_extensions; do
8269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8270    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8272    break 2
8273  fi
8274done
8275  done
8276IFS=$as_save_IFS
8277
8278  ;;
8279esac
8280fi
8281MKTEMP=$ac_cv_path_MKTEMP
8282if test -n "$MKTEMP"; then
8283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8284$as_echo "$MKTEMP" >&6; }
8285else
8286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287$as_echo "no" >&6; }
8288fi
8289
8290
8291        if test "x$MKTEMP" = x; then
8292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8293        fi
8294      else
8295        # Otherwise we believe it is a complete path. Use it as it is.
8296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8297$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8299$as_echo_n "checking for MKTEMP... " >&6; }
8300        if test ! -x "$tool_specified"; then
8301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8302$as_echo "not found" >&6; }
8303          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8304        fi
8305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8306$as_echo "$tool_specified" >&6; }
8307      fi
8308    fi
8309  fi
8310
8311
8312
8313  if test "x$MKTEMP" = x; then
8314    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8315  fi
8316
8317
8318
8319
8320
8321  # Publish this variable in the help.
8322
8323
8324  if test "x$MV" = x; then
8325    # The variable is not set by user, try to locate tool using the code snippet
8326    for ac_prog in mv
8327do
8328  # Extract the first word of "$ac_prog", so it can be a program name with args.
8329set dummy $ac_prog; ac_word=$2
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331$as_echo_n "checking for $ac_word... " >&6; }
8332if ${ac_cv_path_MV+:} false; then :
8333  $as_echo_n "(cached) " >&6
8334else
8335  case $MV in
8336  [\\/]* | ?:[\\/]*)
8337  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8338  ;;
8339  *)
8340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8341for as_dir in $PATH
8342do
8343  IFS=$as_save_IFS
8344  test -z "$as_dir" && as_dir=.
8345    for ac_exec_ext in '' $ac_executable_extensions; do
8346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8347    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8349    break 2
8350  fi
8351done
8352  done
8353IFS=$as_save_IFS
8354
8355  ;;
8356esac
8357fi
8358MV=$ac_cv_path_MV
8359if test -n "$MV"; then
8360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8361$as_echo "$MV" >&6; }
8362else
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
8365fi
8366
8367
8368  test -n "$MV" && break
8369done
8370
8371  else
8372    # The variable is set, but is it from the command line or the environment?
8373
8374    # Try to remove the string !MV! from our list.
8375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8377      # If it failed, the variable was not from the command line. Ignore it,
8378      # but warn the user (except for BASH, which is always set by the calling BASH).
8379      if test "xMV" != xBASH; then
8380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8381$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8382      fi
8383      # Try to locate tool using the code snippet
8384      for ac_prog in mv
8385do
8386  # Extract the first word of "$ac_prog", so it can be a program name with args.
8387set dummy $ac_prog; ac_word=$2
8388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8389$as_echo_n "checking for $ac_word... " >&6; }
8390if ${ac_cv_path_MV+:} false; then :
8391  $as_echo_n "(cached) " >&6
8392else
8393  case $MV in
8394  [\\/]* | ?:[\\/]*)
8395  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8396  ;;
8397  *)
8398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8399for as_dir in $PATH
8400do
8401  IFS=$as_save_IFS
8402  test -z "$as_dir" && as_dir=.
8403    for ac_exec_ext in '' $ac_executable_extensions; do
8404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8405    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8407    break 2
8408  fi
8409done
8410  done
8411IFS=$as_save_IFS
8412
8413  ;;
8414esac
8415fi
8416MV=$ac_cv_path_MV
8417if test -n "$MV"; then
8418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8419$as_echo "$MV" >&6; }
8420else
8421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8422$as_echo "no" >&6; }
8423fi
8424
8425
8426  test -n "$MV" && break
8427done
8428
8429    else
8430      # If it succeeded, then it was overridden by the user. We will use it
8431      # for the tool.
8432
8433      # First remove it from the list of overridden variables, so we can test
8434      # for unknown variables in the end.
8435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8436
8437      # Check if the provided tool contains a complete path.
8438      tool_specified="$MV"
8439      tool_basename="${tool_specified##*/}"
8440      if test "x$tool_basename" = "x$tool_specified"; then
8441        # A command without a complete path is provided, search $PATH.
8442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8443$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8444        # Extract the first word of "$tool_basename", so it can be a program name with args.
8445set dummy $tool_basename; ac_word=$2
8446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8447$as_echo_n "checking for $ac_word... " >&6; }
8448if ${ac_cv_path_MV+:} false; then :
8449  $as_echo_n "(cached) " >&6
8450else
8451  case $MV in
8452  [\\/]* | ?:[\\/]*)
8453  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8454  ;;
8455  *)
8456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8457for as_dir in $PATH
8458do
8459  IFS=$as_save_IFS
8460  test -z "$as_dir" && as_dir=.
8461    for ac_exec_ext in '' $ac_executable_extensions; do
8462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8463    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8465    break 2
8466  fi
8467done
8468  done
8469IFS=$as_save_IFS
8470
8471  ;;
8472esac
8473fi
8474MV=$ac_cv_path_MV
8475if test -n "$MV"; then
8476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8477$as_echo "$MV" >&6; }
8478else
8479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8480$as_echo "no" >&6; }
8481fi
8482
8483
8484        if test "x$MV" = x; then
8485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8486        fi
8487      else
8488        # Otherwise we believe it is a complete path. Use it as it is.
8489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8490$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8492$as_echo_n "checking for MV... " >&6; }
8493        if test ! -x "$tool_specified"; then
8494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8495$as_echo "not found" >&6; }
8496          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8497        fi
8498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8499$as_echo "$tool_specified" >&6; }
8500      fi
8501    fi
8502  fi
8503
8504
8505
8506  if test "x$MV" = x; then
8507    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8508  fi
8509
8510
8511
8512
8513
8514  # Publish this variable in the help.
8515
8516
8517  if test "x$NAWK" = x; then
8518    # The variable is not set by user, try to locate tool using the code snippet
8519    for ac_prog in nawk gawk awk
8520do
8521  # Extract the first word of "$ac_prog", so it can be a program name with args.
8522set dummy $ac_prog; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if ${ac_cv_path_NAWK+:} false; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  case $NAWK in
8529  [\\/]* | ?:[\\/]*)
8530  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8531  ;;
8532  *)
8533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8534for as_dir in $PATH
8535do
8536  IFS=$as_save_IFS
8537  test -z "$as_dir" && as_dir=.
8538    for ac_exec_ext in '' $ac_executable_extensions; do
8539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8540    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8542    break 2
8543  fi
8544done
8545  done
8546IFS=$as_save_IFS
8547
8548  ;;
8549esac
8550fi
8551NAWK=$ac_cv_path_NAWK
8552if test -n "$NAWK"; then
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8554$as_echo "$NAWK" >&6; }
8555else
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8557$as_echo "no" >&6; }
8558fi
8559
8560
8561  test -n "$NAWK" && break
8562done
8563
8564  else
8565    # The variable is set, but is it from the command line or the environment?
8566
8567    # Try to remove the string !NAWK! from our list.
8568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8570      # If it failed, the variable was not from the command line. Ignore it,
8571      # but warn the user (except for BASH, which is always set by the calling BASH).
8572      if test "xNAWK" != xBASH; then
8573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8574$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8575      fi
8576      # Try to locate tool using the code snippet
8577      for ac_prog in nawk gawk awk
8578do
8579  # Extract the first word of "$ac_prog", so it can be a program name with args.
8580set dummy $ac_prog; ac_word=$2
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8582$as_echo_n "checking for $ac_word... " >&6; }
8583if ${ac_cv_path_NAWK+:} false; then :
8584  $as_echo_n "(cached) " >&6
8585else
8586  case $NAWK in
8587  [\\/]* | ?:[\\/]*)
8588  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8589  ;;
8590  *)
8591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8592for as_dir in $PATH
8593do
8594  IFS=$as_save_IFS
8595  test -z "$as_dir" && as_dir=.
8596    for ac_exec_ext in '' $ac_executable_extensions; do
8597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8598    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8600    break 2
8601  fi
8602done
8603  done
8604IFS=$as_save_IFS
8605
8606  ;;
8607esac
8608fi
8609NAWK=$ac_cv_path_NAWK
8610if test -n "$NAWK"; then
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8612$as_echo "$NAWK" >&6; }
8613else
8614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
8616fi
8617
8618
8619  test -n "$NAWK" && break
8620done
8621
8622    else
8623      # If it succeeded, then it was overridden by the user. We will use it
8624      # for the tool.
8625
8626      # First remove it from the list of overridden variables, so we can test
8627      # for unknown variables in the end.
8628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8629
8630      # Check if the provided tool contains a complete path.
8631      tool_specified="$NAWK"
8632      tool_basename="${tool_specified##*/}"
8633      if test "x$tool_basename" = "x$tool_specified"; then
8634        # A command without a complete path is provided, search $PATH.
8635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8636$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8637        # Extract the first word of "$tool_basename", so it can be a program name with args.
8638set dummy $tool_basename; ac_word=$2
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640$as_echo_n "checking for $ac_word... " >&6; }
8641if ${ac_cv_path_NAWK+:} false; then :
8642  $as_echo_n "(cached) " >&6
8643else
8644  case $NAWK in
8645  [\\/]* | ?:[\\/]*)
8646  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8647  ;;
8648  *)
8649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650for as_dir in $PATH
8651do
8652  IFS=$as_save_IFS
8653  test -z "$as_dir" && as_dir=.
8654    for ac_exec_ext in '' $ac_executable_extensions; do
8655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658    break 2
8659  fi
8660done
8661  done
8662IFS=$as_save_IFS
8663
8664  ;;
8665esac
8666fi
8667NAWK=$ac_cv_path_NAWK
8668if test -n "$NAWK"; then
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8670$as_echo "$NAWK" >&6; }
8671else
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673$as_echo "no" >&6; }
8674fi
8675
8676
8677        if test "x$NAWK" = x; then
8678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8679        fi
8680      else
8681        # Otherwise we believe it is a complete path. Use it as it is.
8682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8683$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8685$as_echo_n "checking for NAWK... " >&6; }
8686        if test ! -x "$tool_specified"; then
8687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8688$as_echo "not found" >&6; }
8689          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8690        fi
8691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8692$as_echo "$tool_specified" >&6; }
8693      fi
8694    fi
8695  fi
8696
8697
8698
8699  if test "x$NAWK" = x; then
8700    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8701  fi
8702
8703
8704
8705
8706
8707  # Publish this variable in the help.
8708
8709
8710  if test "x$PRINTF" = x; then
8711    # The variable is not set by user, try to locate tool using the code snippet
8712    for ac_prog in printf
8713do
8714  # Extract the first word of "$ac_prog", so it can be a program name with args.
8715set dummy $ac_prog; ac_word=$2
8716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8717$as_echo_n "checking for $ac_word... " >&6; }
8718if ${ac_cv_path_PRINTF+:} false; then :
8719  $as_echo_n "(cached) " >&6
8720else
8721  case $PRINTF in
8722  [\\/]* | ?:[\\/]*)
8723  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8724  ;;
8725  *)
8726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727for as_dir in $PATH
8728do
8729  IFS=$as_save_IFS
8730  test -z "$as_dir" && as_dir=.
8731    for ac_exec_ext in '' $ac_executable_extensions; do
8732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735    break 2
8736  fi
8737done
8738  done
8739IFS=$as_save_IFS
8740
8741  ;;
8742esac
8743fi
8744PRINTF=$ac_cv_path_PRINTF
8745if test -n "$PRINTF"; then
8746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8747$as_echo "$PRINTF" >&6; }
8748else
8749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750$as_echo "no" >&6; }
8751fi
8752
8753
8754  test -n "$PRINTF" && break
8755done
8756
8757  else
8758    # The variable is set, but is it from the command line or the environment?
8759
8760    # Try to remove the string !PRINTF! from our list.
8761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8763      # If it failed, the variable was not from the command line. Ignore it,
8764      # but warn the user (except for BASH, which is always set by the calling BASH).
8765      if test "xPRINTF" != xBASH; then
8766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8767$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8768      fi
8769      # Try to locate tool using the code snippet
8770      for ac_prog in printf
8771do
8772  # Extract the first word of "$ac_prog", so it can be a program name with args.
8773set dummy $ac_prog; ac_word=$2
8774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8775$as_echo_n "checking for $ac_word... " >&6; }
8776if ${ac_cv_path_PRINTF+:} false; then :
8777  $as_echo_n "(cached) " >&6
8778else
8779  case $PRINTF in
8780  [\\/]* | ?:[\\/]*)
8781  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8782  ;;
8783  *)
8784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8785for as_dir in $PATH
8786do
8787  IFS=$as_save_IFS
8788  test -z "$as_dir" && as_dir=.
8789    for ac_exec_ext in '' $ac_executable_extensions; do
8790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8791    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8793    break 2
8794  fi
8795done
8796  done
8797IFS=$as_save_IFS
8798
8799  ;;
8800esac
8801fi
8802PRINTF=$ac_cv_path_PRINTF
8803if test -n "$PRINTF"; then
8804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8805$as_echo "$PRINTF" >&6; }
8806else
8807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8808$as_echo "no" >&6; }
8809fi
8810
8811
8812  test -n "$PRINTF" && break
8813done
8814
8815    else
8816      # If it succeeded, then it was overridden by the user. We will use it
8817      # for the tool.
8818
8819      # First remove it from the list of overridden variables, so we can test
8820      # for unknown variables in the end.
8821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8822
8823      # Check if the provided tool contains a complete path.
8824      tool_specified="$PRINTF"
8825      tool_basename="${tool_specified##*/}"
8826      if test "x$tool_basename" = "x$tool_specified"; then
8827        # A command without a complete path is provided, search $PATH.
8828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8829$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8830        # Extract the first word of "$tool_basename", so it can be a program name with args.
8831set dummy $tool_basename; ac_word=$2
8832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8833$as_echo_n "checking for $ac_word... " >&6; }
8834if ${ac_cv_path_PRINTF+:} false; then :
8835  $as_echo_n "(cached) " >&6
8836else
8837  case $PRINTF in
8838  [\\/]* | ?:[\\/]*)
8839  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8840  ;;
8841  *)
8842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843for as_dir in $PATH
8844do
8845  IFS=$as_save_IFS
8846  test -z "$as_dir" && as_dir=.
8847    for ac_exec_ext in '' $ac_executable_extensions; do
8848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8849    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8851    break 2
8852  fi
8853done
8854  done
8855IFS=$as_save_IFS
8856
8857  ;;
8858esac
8859fi
8860PRINTF=$ac_cv_path_PRINTF
8861if test -n "$PRINTF"; then
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8863$as_echo "$PRINTF" >&6; }
8864else
8865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8866$as_echo "no" >&6; }
8867fi
8868
8869
8870        if test "x$PRINTF" = x; then
8871          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8872        fi
8873      else
8874        # Otherwise we believe it is a complete path. Use it as it is.
8875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8876$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8878$as_echo_n "checking for PRINTF... " >&6; }
8879        if test ! -x "$tool_specified"; then
8880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8881$as_echo "not found" >&6; }
8882          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8883        fi
8884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8885$as_echo "$tool_specified" >&6; }
8886      fi
8887    fi
8888  fi
8889
8890
8891
8892  if test "x$PRINTF" = x; then
8893    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8894  fi
8895
8896
8897
8898
8899
8900  # Publish this variable in the help.
8901
8902
8903  if test "x$RM" = x; then
8904    # The variable is not set by user, try to locate tool using the code snippet
8905    for ac_prog in rm
8906do
8907  # Extract the first word of "$ac_prog", so it can be a program name with args.
8908set dummy $ac_prog; ac_word=$2
8909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8910$as_echo_n "checking for $ac_word... " >&6; }
8911if ${ac_cv_path_RM+:} false; then :
8912  $as_echo_n "(cached) " >&6
8913else
8914  case $RM in
8915  [\\/]* | ?:[\\/]*)
8916  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8917  ;;
8918  *)
8919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8920for as_dir in $PATH
8921do
8922  IFS=$as_save_IFS
8923  test -z "$as_dir" && as_dir=.
8924    for ac_exec_ext in '' $ac_executable_extensions; do
8925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8926    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8928    break 2
8929  fi
8930done
8931  done
8932IFS=$as_save_IFS
8933
8934  ;;
8935esac
8936fi
8937RM=$ac_cv_path_RM
8938if test -n "$RM"; then
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8940$as_echo "$RM" >&6; }
8941else
8942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8943$as_echo "no" >&6; }
8944fi
8945
8946
8947  test -n "$RM" && break
8948done
8949
8950  else
8951    # The variable is set, but is it from the command line or the environment?
8952
8953    # Try to remove the string !RM! from our list.
8954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8956      # If it failed, the variable was not from the command line. Ignore it,
8957      # but warn the user (except for BASH, which is always set by the calling BASH).
8958      if test "xRM" != xBASH; then
8959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8960$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8961      fi
8962      # Try to locate tool using the code snippet
8963      for ac_prog in rm
8964do
8965  # Extract the first word of "$ac_prog", so it can be a program name with args.
8966set dummy $ac_prog; ac_word=$2
8967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8968$as_echo_n "checking for $ac_word... " >&6; }
8969if ${ac_cv_path_RM+:} false; then :
8970  $as_echo_n "(cached) " >&6
8971else
8972  case $RM in
8973  [\\/]* | ?:[\\/]*)
8974  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8975  ;;
8976  *)
8977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8978for as_dir in $PATH
8979do
8980  IFS=$as_save_IFS
8981  test -z "$as_dir" && as_dir=.
8982    for ac_exec_ext in '' $ac_executable_extensions; do
8983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8984    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8986    break 2
8987  fi
8988done
8989  done
8990IFS=$as_save_IFS
8991
8992  ;;
8993esac
8994fi
8995RM=$ac_cv_path_RM
8996if test -n "$RM"; then
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8998$as_echo "$RM" >&6; }
8999else
9000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9001$as_echo "no" >&6; }
9002fi
9003
9004
9005  test -n "$RM" && break
9006done
9007
9008    else
9009      # If it succeeded, then it was overridden by the user. We will use it
9010      # for the tool.
9011
9012      # First remove it from the list of overridden variables, so we can test
9013      # for unknown variables in the end.
9014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9015
9016      # Check if the provided tool contains a complete path.
9017      tool_specified="$RM"
9018      tool_basename="${tool_specified##*/}"
9019      if test "x$tool_basename" = "x$tool_specified"; then
9020        # A command without a complete path is provided, search $PATH.
9021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9022$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9023        # Extract the first word of "$tool_basename", so it can be a program name with args.
9024set dummy $tool_basename; ac_word=$2
9025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9026$as_echo_n "checking for $ac_word... " >&6; }
9027if ${ac_cv_path_RM+:} false; then :
9028  $as_echo_n "(cached) " >&6
9029else
9030  case $RM in
9031  [\\/]* | ?:[\\/]*)
9032  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9033  ;;
9034  *)
9035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9036for as_dir in $PATH
9037do
9038  IFS=$as_save_IFS
9039  test -z "$as_dir" && as_dir=.
9040    for ac_exec_ext in '' $ac_executable_extensions; do
9041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9042    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9044    break 2
9045  fi
9046done
9047  done
9048IFS=$as_save_IFS
9049
9050  ;;
9051esac
9052fi
9053RM=$ac_cv_path_RM
9054if test -n "$RM"; then
9055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9056$as_echo "$RM" >&6; }
9057else
9058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9059$as_echo "no" >&6; }
9060fi
9061
9062
9063        if test "x$RM" = x; then
9064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9065        fi
9066      else
9067        # Otherwise we believe it is a complete path. Use it as it is.
9068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9069$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9071$as_echo_n "checking for RM... " >&6; }
9072        if test ! -x "$tool_specified"; then
9073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9074$as_echo "not found" >&6; }
9075          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9076        fi
9077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9078$as_echo "$tool_specified" >&6; }
9079      fi
9080    fi
9081  fi
9082
9083
9084
9085  if test "x$RM" = x; then
9086    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9087  fi
9088
9089
9090
9091
9092
9093  # Publish this variable in the help.
9094
9095
9096  if test "x$SH" = x; then
9097    # The variable is not set by user, try to locate tool using the code snippet
9098    for ac_prog in sh
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if ${ac_cv_path_SH+:} false; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $SH in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130SH=$ac_cv_path_SH
9131if test -n "$SH"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9133$as_echo "$SH" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$SH" && break
9141done
9142
9143  else
9144    # The variable is set, but is it from the command line or the environment?
9145
9146    # Try to remove the string !SH! from our list.
9147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9149      # If it failed, the variable was not from the command line. Ignore it,
9150      # but warn the user (except for BASH, which is always set by the calling BASH).
9151      if test "xSH" != xBASH; then
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9153$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9154      fi
9155      # Try to locate tool using the code snippet
9156      for ac_prog in sh
9157do
9158  # Extract the first word of "$ac_prog", so it can be a program name with args.
9159set dummy $ac_prog; ac_word=$2
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9161$as_echo_n "checking for $ac_word... " >&6; }
9162if ${ac_cv_path_SH+:} false; then :
9163  $as_echo_n "(cached) " >&6
9164else
9165  case $SH in
9166  [\\/]* | ?:[\\/]*)
9167  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9168  ;;
9169  *)
9170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9171for as_dir in $PATH
9172do
9173  IFS=$as_save_IFS
9174  test -z "$as_dir" && as_dir=.
9175    for ac_exec_ext in '' $ac_executable_extensions; do
9176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9177    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9179    break 2
9180  fi
9181done
9182  done
9183IFS=$as_save_IFS
9184
9185  ;;
9186esac
9187fi
9188SH=$ac_cv_path_SH
9189if test -n "$SH"; then
9190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9191$as_echo "$SH" >&6; }
9192else
9193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
9195fi
9196
9197
9198  test -n "$SH" && break
9199done
9200
9201    else
9202      # If it succeeded, then it was overridden by the user. We will use it
9203      # for the tool.
9204
9205      # First remove it from the list of overridden variables, so we can test
9206      # for unknown variables in the end.
9207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9208
9209      # Check if the provided tool contains a complete path.
9210      tool_specified="$SH"
9211      tool_basename="${tool_specified##*/}"
9212      if test "x$tool_basename" = "x$tool_specified"; then
9213        # A command without a complete path is provided, search $PATH.
9214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9215$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9216        # Extract the first word of "$tool_basename", so it can be a program name with args.
9217set dummy $tool_basename; ac_word=$2
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9219$as_echo_n "checking for $ac_word... " >&6; }
9220if ${ac_cv_path_SH+:} false; then :
9221  $as_echo_n "(cached) " >&6
9222else
9223  case $SH in
9224  [\\/]* | ?:[\\/]*)
9225  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9226  ;;
9227  *)
9228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9229for as_dir in $PATH
9230do
9231  IFS=$as_save_IFS
9232  test -z "$as_dir" && as_dir=.
9233    for ac_exec_ext in '' $ac_executable_extensions; do
9234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9235    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9237    break 2
9238  fi
9239done
9240  done
9241IFS=$as_save_IFS
9242
9243  ;;
9244esac
9245fi
9246SH=$ac_cv_path_SH
9247if test -n "$SH"; then
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9249$as_echo "$SH" >&6; }
9250else
9251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9252$as_echo "no" >&6; }
9253fi
9254
9255
9256        if test "x$SH" = x; then
9257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9258        fi
9259      else
9260        # Otherwise we believe it is a complete path. Use it as it is.
9261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9262$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9264$as_echo_n "checking for SH... " >&6; }
9265        if test ! -x "$tool_specified"; then
9266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9267$as_echo "not found" >&6; }
9268          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9269        fi
9270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9271$as_echo "$tool_specified" >&6; }
9272      fi
9273    fi
9274  fi
9275
9276
9277
9278  if test "x$SH" = x; then
9279    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9280  fi
9281
9282
9283
9284
9285
9286  # Publish this variable in the help.
9287
9288
9289  if test "x$SORT" = x; then
9290    # The variable is not set by user, try to locate tool using the code snippet
9291    for ac_prog in sort
9292do
9293  # Extract the first word of "$ac_prog", so it can be a program name with args.
9294set dummy $ac_prog; ac_word=$2
9295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9296$as_echo_n "checking for $ac_word... " >&6; }
9297if ${ac_cv_path_SORT+:} false; then :
9298  $as_echo_n "(cached) " >&6
9299else
9300  case $SORT in
9301  [\\/]* | ?:[\\/]*)
9302  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9303  ;;
9304  *)
9305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9306for as_dir in $PATH
9307do
9308  IFS=$as_save_IFS
9309  test -z "$as_dir" && as_dir=.
9310    for ac_exec_ext in '' $ac_executable_extensions; do
9311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9312    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9314    break 2
9315  fi
9316done
9317  done
9318IFS=$as_save_IFS
9319
9320  ;;
9321esac
9322fi
9323SORT=$ac_cv_path_SORT
9324if test -n "$SORT"; then
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9326$as_echo "$SORT" >&6; }
9327else
9328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9329$as_echo "no" >&6; }
9330fi
9331
9332
9333  test -n "$SORT" && break
9334done
9335
9336  else
9337    # The variable is set, but is it from the command line or the environment?
9338
9339    # Try to remove the string !SORT! from our list.
9340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9342      # If it failed, the variable was not from the command line. Ignore it,
9343      # but warn the user (except for BASH, which is always set by the calling BASH).
9344      if test "xSORT" != xBASH; then
9345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9346$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9347      fi
9348      # Try to locate tool using the code snippet
9349      for ac_prog in sort
9350do
9351  # Extract the first word of "$ac_prog", so it can be a program name with args.
9352set dummy $ac_prog; ac_word=$2
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354$as_echo_n "checking for $ac_word... " >&6; }
9355if ${ac_cv_path_SORT+:} false; then :
9356  $as_echo_n "(cached) " >&6
9357else
9358  case $SORT in
9359  [\\/]* | ?:[\\/]*)
9360  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9361  ;;
9362  *)
9363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9364for as_dir in $PATH
9365do
9366  IFS=$as_save_IFS
9367  test -z "$as_dir" && as_dir=.
9368    for ac_exec_ext in '' $ac_executable_extensions; do
9369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9370    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372    break 2
9373  fi
9374done
9375  done
9376IFS=$as_save_IFS
9377
9378  ;;
9379esac
9380fi
9381SORT=$ac_cv_path_SORT
9382if test -n "$SORT"; then
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9384$as_echo "$SORT" >&6; }
9385else
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387$as_echo "no" >&6; }
9388fi
9389
9390
9391  test -n "$SORT" && break
9392done
9393
9394    else
9395      # If it succeeded, then it was overridden by the user. We will use it
9396      # for the tool.
9397
9398      # First remove it from the list of overridden variables, so we can test
9399      # for unknown variables in the end.
9400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9401
9402      # Check if the provided tool contains a complete path.
9403      tool_specified="$SORT"
9404      tool_basename="${tool_specified##*/}"
9405      if test "x$tool_basename" = "x$tool_specified"; then
9406        # A command without a complete path is provided, search $PATH.
9407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9408$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9409        # Extract the first word of "$tool_basename", so it can be a program name with args.
9410set dummy $tool_basename; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_path_SORT+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  case $SORT in
9417  [\\/]* | ?:[\\/]*)
9418  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9419  ;;
9420  *)
9421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9422for as_dir in $PATH
9423do
9424  IFS=$as_save_IFS
9425  test -z "$as_dir" && as_dir=.
9426    for ac_exec_ext in '' $ac_executable_extensions; do
9427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9428    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9430    break 2
9431  fi
9432done
9433  done
9434IFS=$as_save_IFS
9435
9436  ;;
9437esac
9438fi
9439SORT=$ac_cv_path_SORT
9440if test -n "$SORT"; then
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9442$as_echo "$SORT" >&6; }
9443else
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
9446fi
9447
9448
9449        if test "x$SORT" = x; then
9450          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9451        fi
9452      else
9453        # Otherwise we believe it is a complete path. Use it as it is.
9454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9455$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9457$as_echo_n "checking for SORT... " >&6; }
9458        if test ! -x "$tool_specified"; then
9459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9460$as_echo "not found" >&6; }
9461          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9462        fi
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9464$as_echo "$tool_specified" >&6; }
9465      fi
9466    fi
9467  fi
9468
9469
9470
9471  if test "x$SORT" = x; then
9472    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9473  fi
9474
9475
9476
9477
9478
9479  # Publish this variable in the help.
9480
9481
9482  if test "x$TAIL" = x; then
9483    # The variable is not set by user, try to locate tool using the code snippet
9484    for ac_prog in tail
9485do
9486  # Extract the first word of "$ac_prog", so it can be a program name with args.
9487set dummy $ac_prog; ac_word=$2
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9489$as_echo_n "checking for $ac_word... " >&6; }
9490if ${ac_cv_path_TAIL+:} false; then :
9491  $as_echo_n "(cached) " >&6
9492else
9493  case $TAIL in
9494  [\\/]* | ?:[\\/]*)
9495  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9496  ;;
9497  *)
9498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9499for as_dir in $PATH
9500do
9501  IFS=$as_save_IFS
9502  test -z "$as_dir" && as_dir=.
9503    for ac_exec_ext in '' $ac_executable_extensions; do
9504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9505    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9507    break 2
9508  fi
9509done
9510  done
9511IFS=$as_save_IFS
9512
9513  ;;
9514esac
9515fi
9516TAIL=$ac_cv_path_TAIL
9517if test -n "$TAIL"; then
9518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9519$as_echo "$TAIL" >&6; }
9520else
9521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
9523fi
9524
9525
9526  test -n "$TAIL" && break
9527done
9528
9529  else
9530    # The variable is set, but is it from the command line or the environment?
9531
9532    # Try to remove the string !TAIL! from our list.
9533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9535      # If it failed, the variable was not from the command line. Ignore it,
9536      # but warn the user (except for BASH, which is always set by the calling BASH).
9537      if test "xTAIL" != xBASH; then
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9539$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9540      fi
9541      # Try to locate tool using the code snippet
9542      for ac_prog in tail
9543do
9544  # Extract the first word of "$ac_prog", so it can be a program name with args.
9545set dummy $ac_prog; ac_word=$2
9546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9547$as_echo_n "checking for $ac_word... " >&6; }
9548if ${ac_cv_path_TAIL+:} false; then :
9549  $as_echo_n "(cached) " >&6
9550else
9551  case $TAIL in
9552  [\\/]* | ?:[\\/]*)
9553  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9554  ;;
9555  *)
9556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9557for as_dir in $PATH
9558do
9559  IFS=$as_save_IFS
9560  test -z "$as_dir" && as_dir=.
9561    for ac_exec_ext in '' $ac_executable_extensions; do
9562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9563    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9565    break 2
9566  fi
9567done
9568  done
9569IFS=$as_save_IFS
9570
9571  ;;
9572esac
9573fi
9574TAIL=$ac_cv_path_TAIL
9575if test -n "$TAIL"; then
9576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9577$as_echo "$TAIL" >&6; }
9578else
9579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580$as_echo "no" >&6; }
9581fi
9582
9583
9584  test -n "$TAIL" && break
9585done
9586
9587    else
9588      # If it succeeded, then it was overridden by the user. We will use it
9589      # for the tool.
9590
9591      # First remove it from the list of overridden variables, so we can test
9592      # for unknown variables in the end.
9593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9594
9595      # Check if the provided tool contains a complete path.
9596      tool_specified="$TAIL"
9597      tool_basename="${tool_specified##*/}"
9598      if test "x$tool_basename" = "x$tool_specified"; then
9599        # A command without a complete path is provided, search $PATH.
9600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9601$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9602        # Extract the first word of "$tool_basename", so it can be a program name with args.
9603set dummy $tool_basename; ac_word=$2
9604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9605$as_echo_n "checking for $ac_word... " >&6; }
9606if ${ac_cv_path_TAIL+:} false; then :
9607  $as_echo_n "(cached) " >&6
9608else
9609  case $TAIL in
9610  [\\/]* | ?:[\\/]*)
9611  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9612  ;;
9613  *)
9614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9615for as_dir in $PATH
9616do
9617  IFS=$as_save_IFS
9618  test -z "$as_dir" && as_dir=.
9619    for ac_exec_ext in '' $ac_executable_extensions; do
9620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9621    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9623    break 2
9624  fi
9625done
9626  done
9627IFS=$as_save_IFS
9628
9629  ;;
9630esac
9631fi
9632TAIL=$ac_cv_path_TAIL
9633if test -n "$TAIL"; then
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9635$as_echo "$TAIL" >&6; }
9636else
9637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
9639fi
9640
9641
9642        if test "x$TAIL" = x; then
9643          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9644        fi
9645      else
9646        # Otherwise we believe it is a complete path. Use it as it is.
9647        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9648$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9650$as_echo_n "checking for TAIL... " >&6; }
9651        if test ! -x "$tool_specified"; then
9652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9653$as_echo "not found" >&6; }
9654          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9655        fi
9656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9657$as_echo "$tool_specified" >&6; }
9658      fi
9659    fi
9660  fi
9661
9662
9663
9664  if test "x$TAIL" = x; then
9665    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9666  fi
9667
9668
9669
9670
9671
9672  # Publish this variable in the help.
9673
9674
9675  if test "x$TAR" = x; then
9676    # The variable is not set by user, try to locate tool using the code snippet
9677    for ac_prog in tar
9678do
9679  # Extract the first word of "$ac_prog", so it can be a program name with args.
9680set dummy $ac_prog; ac_word=$2
9681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9682$as_echo_n "checking for $ac_word... " >&6; }
9683if ${ac_cv_path_TAR+:} false; then :
9684  $as_echo_n "(cached) " >&6
9685else
9686  case $TAR in
9687  [\\/]* | ?:[\\/]*)
9688  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9689  ;;
9690  *)
9691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9692for as_dir in $PATH
9693do
9694  IFS=$as_save_IFS
9695  test -z "$as_dir" && as_dir=.
9696    for ac_exec_ext in '' $ac_executable_extensions; do
9697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9698    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9700    break 2
9701  fi
9702done
9703  done
9704IFS=$as_save_IFS
9705
9706  ;;
9707esac
9708fi
9709TAR=$ac_cv_path_TAR
9710if test -n "$TAR"; then
9711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9712$as_echo "$TAR" >&6; }
9713else
9714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9715$as_echo "no" >&6; }
9716fi
9717
9718
9719  test -n "$TAR" && break
9720done
9721
9722  else
9723    # The variable is set, but is it from the command line or the environment?
9724
9725    # Try to remove the string !TAR! from our list.
9726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9728      # If it failed, the variable was not from the command line. Ignore it,
9729      # but warn the user (except for BASH, which is always set by the calling BASH).
9730      if test "xTAR" != xBASH; then
9731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9732$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9733      fi
9734      # Try to locate tool using the code snippet
9735      for ac_prog in tar
9736do
9737  # Extract the first word of "$ac_prog", so it can be a program name with args.
9738set dummy $ac_prog; ac_word=$2
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9740$as_echo_n "checking for $ac_word... " >&6; }
9741if ${ac_cv_path_TAR+:} false; then :
9742  $as_echo_n "(cached) " >&6
9743else
9744  case $TAR in
9745  [\\/]* | ?:[\\/]*)
9746  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9747  ;;
9748  *)
9749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9750for as_dir in $PATH
9751do
9752  IFS=$as_save_IFS
9753  test -z "$as_dir" && as_dir=.
9754    for ac_exec_ext in '' $ac_executable_extensions; do
9755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9756    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9758    break 2
9759  fi
9760done
9761  done
9762IFS=$as_save_IFS
9763
9764  ;;
9765esac
9766fi
9767TAR=$ac_cv_path_TAR
9768if test -n "$TAR"; then
9769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9770$as_echo "$TAR" >&6; }
9771else
9772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
9774fi
9775
9776
9777  test -n "$TAR" && break
9778done
9779
9780    else
9781      # If it succeeded, then it was overridden by the user. We will use it
9782      # for the tool.
9783
9784      # First remove it from the list of overridden variables, so we can test
9785      # for unknown variables in the end.
9786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9787
9788      # Check if the provided tool contains a complete path.
9789      tool_specified="$TAR"
9790      tool_basename="${tool_specified##*/}"
9791      if test "x$tool_basename" = "x$tool_specified"; then
9792        # A command without a complete path is provided, search $PATH.
9793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9794$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9795        # Extract the first word of "$tool_basename", so it can be a program name with args.
9796set dummy $tool_basename; ac_word=$2
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798$as_echo_n "checking for $ac_word... " >&6; }
9799if ${ac_cv_path_TAR+:} false; then :
9800  $as_echo_n "(cached) " >&6
9801else
9802  case $TAR in
9803  [\\/]* | ?:[\\/]*)
9804  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9805  ;;
9806  *)
9807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808for as_dir in $PATH
9809do
9810  IFS=$as_save_IFS
9811  test -z "$as_dir" && as_dir=.
9812    for ac_exec_ext in '' $ac_executable_extensions; do
9813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9814    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9816    break 2
9817  fi
9818done
9819  done
9820IFS=$as_save_IFS
9821
9822  ;;
9823esac
9824fi
9825TAR=$ac_cv_path_TAR
9826if test -n "$TAR"; then
9827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9828$as_echo "$TAR" >&6; }
9829else
9830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831$as_echo "no" >&6; }
9832fi
9833
9834
9835        if test "x$TAR" = x; then
9836          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9837        fi
9838      else
9839        # Otherwise we believe it is a complete path. Use it as it is.
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9841$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9843$as_echo_n "checking for TAR... " >&6; }
9844        if test ! -x "$tool_specified"; then
9845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9846$as_echo "not found" >&6; }
9847          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9848        fi
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9850$as_echo "$tool_specified" >&6; }
9851      fi
9852    fi
9853  fi
9854
9855
9856
9857  if test "x$TAR" = x; then
9858    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9859  fi
9860
9861
9862
9863
9864
9865  # Publish this variable in the help.
9866
9867
9868  if test "x$TEE" = x; then
9869    # The variable is not set by user, try to locate tool using the code snippet
9870    for ac_prog in tee
9871do
9872  # Extract the first word of "$ac_prog", so it can be a program name with args.
9873set dummy $ac_prog; ac_word=$2
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9875$as_echo_n "checking for $ac_word... " >&6; }
9876if ${ac_cv_path_TEE+:} false; then :
9877  $as_echo_n "(cached) " >&6
9878else
9879  case $TEE in
9880  [\\/]* | ?:[\\/]*)
9881  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9882  ;;
9883  *)
9884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9885for as_dir in $PATH
9886do
9887  IFS=$as_save_IFS
9888  test -z "$as_dir" && as_dir=.
9889    for ac_exec_ext in '' $ac_executable_extensions; do
9890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9891    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9893    break 2
9894  fi
9895done
9896  done
9897IFS=$as_save_IFS
9898
9899  ;;
9900esac
9901fi
9902TEE=$ac_cv_path_TEE
9903if test -n "$TEE"; then
9904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9905$as_echo "$TEE" >&6; }
9906else
9907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
9909fi
9910
9911
9912  test -n "$TEE" && break
9913done
9914
9915  else
9916    # The variable is set, but is it from the command line or the environment?
9917
9918    # Try to remove the string !TEE! from our list.
9919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9921      # If it failed, the variable was not from the command line. Ignore it,
9922      # but warn the user (except for BASH, which is always set by the calling BASH).
9923      if test "xTEE" != xBASH; then
9924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9925$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9926      fi
9927      # Try to locate tool using the code snippet
9928      for ac_prog in tee
9929do
9930  # Extract the first word of "$ac_prog", so it can be a program name with args.
9931set dummy $ac_prog; ac_word=$2
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933$as_echo_n "checking for $ac_word... " >&6; }
9934if ${ac_cv_path_TEE+:} false; then :
9935  $as_echo_n "(cached) " >&6
9936else
9937  case $TEE in
9938  [\\/]* | ?:[\\/]*)
9939  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9940  ;;
9941  *)
9942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943for as_dir in $PATH
9944do
9945  IFS=$as_save_IFS
9946  test -z "$as_dir" && as_dir=.
9947    for ac_exec_ext in '' $ac_executable_extensions; do
9948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951    break 2
9952  fi
9953done
9954  done
9955IFS=$as_save_IFS
9956
9957  ;;
9958esac
9959fi
9960TEE=$ac_cv_path_TEE
9961if test -n "$TEE"; then
9962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9963$as_echo "$TEE" >&6; }
9964else
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
9967fi
9968
9969
9970  test -n "$TEE" && break
9971done
9972
9973    else
9974      # If it succeeded, then it was overridden by the user. We will use it
9975      # for the tool.
9976
9977      # First remove it from the list of overridden variables, so we can test
9978      # for unknown variables in the end.
9979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9980
9981      # Check if the provided tool contains a complete path.
9982      tool_specified="$TEE"
9983      tool_basename="${tool_specified##*/}"
9984      if test "x$tool_basename" = "x$tool_specified"; then
9985        # A command without a complete path is provided, search $PATH.
9986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9987$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9988        # Extract the first word of "$tool_basename", so it can be a program name with args.
9989set dummy $tool_basename; ac_word=$2
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991$as_echo_n "checking for $ac_word... " >&6; }
9992if ${ac_cv_path_TEE+:} false; then :
9993  $as_echo_n "(cached) " >&6
9994else
9995  case $TEE in
9996  [\\/]* | ?:[\\/]*)
9997  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9998  ;;
9999  *)
10000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001for as_dir in $PATH
10002do
10003  IFS=$as_save_IFS
10004  test -z "$as_dir" && as_dir=.
10005    for ac_exec_ext in '' $ac_executable_extensions; do
10006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10007    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009    break 2
10010  fi
10011done
10012  done
10013IFS=$as_save_IFS
10014
10015  ;;
10016esac
10017fi
10018TEE=$ac_cv_path_TEE
10019if test -n "$TEE"; then
10020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10021$as_echo "$TEE" >&6; }
10022else
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
10025fi
10026
10027
10028        if test "x$TEE" = x; then
10029          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10030        fi
10031      else
10032        # Otherwise we believe it is a complete path. Use it as it is.
10033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10034$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10036$as_echo_n "checking for TEE... " >&6; }
10037        if test ! -x "$tool_specified"; then
10038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10039$as_echo "not found" >&6; }
10040          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10041        fi
10042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10043$as_echo "$tool_specified" >&6; }
10044      fi
10045    fi
10046  fi
10047
10048
10049
10050  if test "x$TEE" = x; then
10051    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10052  fi
10053
10054
10055
10056
10057
10058  # Publish this variable in the help.
10059
10060
10061  if test "x$TOUCH" = x; then
10062    # The variable is not set by user, try to locate tool using the code snippet
10063    for ac_prog in touch
10064do
10065  # Extract the first word of "$ac_prog", so it can be a program name with args.
10066set dummy $ac_prog; ac_word=$2
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10068$as_echo_n "checking for $ac_word... " >&6; }
10069if ${ac_cv_path_TOUCH+:} false; then :
10070  $as_echo_n "(cached) " >&6
10071else
10072  case $TOUCH in
10073  [\\/]* | ?:[\\/]*)
10074  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10075  ;;
10076  *)
10077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10078for as_dir in $PATH
10079do
10080  IFS=$as_save_IFS
10081  test -z "$as_dir" && as_dir=.
10082    for ac_exec_ext in '' $ac_executable_extensions; do
10083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10084    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10086    break 2
10087  fi
10088done
10089  done
10090IFS=$as_save_IFS
10091
10092  ;;
10093esac
10094fi
10095TOUCH=$ac_cv_path_TOUCH
10096if test -n "$TOUCH"; then
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10098$as_echo "$TOUCH" >&6; }
10099else
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104
10105  test -n "$TOUCH" && break
10106done
10107
10108  else
10109    # The variable is set, but is it from the command line or the environment?
10110
10111    # Try to remove the string !TOUCH! from our list.
10112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10114      # If it failed, the variable was not from the command line. Ignore it,
10115      # but warn the user (except for BASH, which is always set by the calling BASH).
10116      if test "xTOUCH" != xBASH; then
10117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10118$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10119      fi
10120      # Try to locate tool using the code snippet
10121      for ac_prog in touch
10122do
10123  # Extract the first word of "$ac_prog", so it can be a program name with args.
10124set dummy $ac_prog; ac_word=$2
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if ${ac_cv_path_TOUCH+:} false; then :
10128  $as_echo_n "(cached) " >&6
10129else
10130  case $TOUCH in
10131  [\\/]* | ?:[\\/]*)
10132  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10133  ;;
10134  *)
10135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138  IFS=$as_save_IFS
10139  test -z "$as_dir" && as_dir=.
10140    for ac_exec_ext in '' $ac_executable_extensions; do
10141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10142    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144    break 2
10145  fi
10146done
10147  done
10148IFS=$as_save_IFS
10149
10150  ;;
10151esac
10152fi
10153TOUCH=$ac_cv_path_TOUCH
10154if test -n "$TOUCH"; then
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10156$as_echo "$TOUCH" >&6; }
10157else
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163  test -n "$TOUCH" && break
10164done
10165
10166    else
10167      # If it succeeded, then it was overridden by the user. We will use it
10168      # for the tool.
10169
10170      # First remove it from the list of overridden variables, so we can test
10171      # for unknown variables in the end.
10172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10173
10174      # Check if the provided tool contains a complete path.
10175      tool_specified="$TOUCH"
10176      tool_basename="${tool_specified##*/}"
10177      if test "x$tool_basename" = "x$tool_specified"; then
10178        # A command without a complete path is provided, search $PATH.
10179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10180$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10181        # Extract the first word of "$tool_basename", so it can be a program name with args.
10182set dummy $tool_basename; ac_word=$2
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184$as_echo_n "checking for $ac_word... " >&6; }
10185if ${ac_cv_path_TOUCH+:} false; then :
10186  $as_echo_n "(cached) " >&6
10187else
10188  case $TOUCH in
10189  [\\/]* | ?:[\\/]*)
10190  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10191  ;;
10192  *)
10193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194for as_dir in $PATH
10195do
10196  IFS=$as_save_IFS
10197  test -z "$as_dir" && as_dir=.
10198    for ac_exec_ext in '' $ac_executable_extensions; do
10199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10200    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202    break 2
10203  fi
10204done
10205  done
10206IFS=$as_save_IFS
10207
10208  ;;
10209esac
10210fi
10211TOUCH=$ac_cv_path_TOUCH
10212if test -n "$TOUCH"; then
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10214$as_echo "$TOUCH" >&6; }
10215else
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
10218fi
10219
10220
10221        if test "x$TOUCH" = x; then
10222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10223        fi
10224      else
10225        # Otherwise we believe it is a complete path. Use it as it is.
10226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10227$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10229$as_echo_n "checking for TOUCH... " >&6; }
10230        if test ! -x "$tool_specified"; then
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10232$as_echo "not found" >&6; }
10233          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10234        fi
10235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10236$as_echo "$tool_specified" >&6; }
10237      fi
10238    fi
10239  fi
10240
10241
10242
10243  if test "x$TOUCH" = x; then
10244    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10245  fi
10246
10247
10248
10249
10250
10251  # Publish this variable in the help.
10252
10253
10254  if test "x$TR" = x; then
10255    # The variable is not set by user, try to locate tool using the code snippet
10256    for ac_prog in tr
10257do
10258  # Extract the first word of "$ac_prog", so it can be a program name with args.
10259set dummy $ac_prog; ac_word=$2
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10261$as_echo_n "checking for $ac_word... " >&6; }
10262if ${ac_cv_path_TR+:} false; then :
10263  $as_echo_n "(cached) " >&6
10264else
10265  case $TR in
10266  [\\/]* | ?:[\\/]*)
10267  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10268  ;;
10269  *)
10270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10271for as_dir in $PATH
10272do
10273  IFS=$as_save_IFS
10274  test -z "$as_dir" && as_dir=.
10275    for ac_exec_ext in '' $ac_executable_extensions; do
10276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10277    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10279    break 2
10280  fi
10281done
10282  done
10283IFS=$as_save_IFS
10284
10285  ;;
10286esac
10287fi
10288TR=$ac_cv_path_TR
10289if test -n "$TR"; then
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10291$as_echo "$TR" >&6; }
10292else
10293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
10295fi
10296
10297
10298  test -n "$TR" && break
10299done
10300
10301  else
10302    # The variable is set, but is it from the command line or the environment?
10303
10304    # Try to remove the string !TR! from our list.
10305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10307      # If it failed, the variable was not from the command line. Ignore it,
10308      # but warn the user (except for BASH, which is always set by the calling BASH).
10309      if test "xTR" != xBASH; then
10310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10311$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10312      fi
10313      # Try to locate tool using the code snippet
10314      for ac_prog in tr
10315do
10316  # Extract the first word of "$ac_prog", so it can be a program name with args.
10317set dummy $ac_prog; ac_word=$2
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10319$as_echo_n "checking for $ac_word... " >&6; }
10320if ${ac_cv_path_TR+:} false; then :
10321  $as_echo_n "(cached) " >&6
10322else
10323  case $TR in
10324  [\\/]* | ?:[\\/]*)
10325  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10326  ;;
10327  *)
10328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10329for as_dir in $PATH
10330do
10331  IFS=$as_save_IFS
10332  test -z "$as_dir" && as_dir=.
10333    for ac_exec_ext in '' $ac_executable_extensions; do
10334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10335    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10337    break 2
10338  fi
10339done
10340  done
10341IFS=$as_save_IFS
10342
10343  ;;
10344esac
10345fi
10346TR=$ac_cv_path_TR
10347if test -n "$TR"; then
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10349$as_echo "$TR" >&6; }
10350else
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
10353fi
10354
10355
10356  test -n "$TR" && break
10357done
10358
10359    else
10360      # If it succeeded, then it was overridden by the user. We will use it
10361      # for the tool.
10362
10363      # First remove it from the list of overridden variables, so we can test
10364      # for unknown variables in the end.
10365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10366
10367      # Check if the provided tool contains a complete path.
10368      tool_specified="$TR"
10369      tool_basename="${tool_specified##*/}"
10370      if test "x$tool_basename" = "x$tool_specified"; then
10371        # A command without a complete path is provided, search $PATH.
10372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10373$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10374        # Extract the first word of "$tool_basename", so it can be a program name with args.
10375set dummy $tool_basename; ac_word=$2
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377$as_echo_n "checking for $ac_word... " >&6; }
10378if ${ac_cv_path_TR+:} false; then :
10379  $as_echo_n "(cached) " >&6
10380else
10381  case $TR in
10382  [\\/]* | ?:[\\/]*)
10383  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10384  ;;
10385  *)
10386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387for as_dir in $PATH
10388do
10389  IFS=$as_save_IFS
10390  test -z "$as_dir" && as_dir=.
10391    for ac_exec_ext in '' $ac_executable_extensions; do
10392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10393    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395    break 2
10396  fi
10397done
10398  done
10399IFS=$as_save_IFS
10400
10401  ;;
10402esac
10403fi
10404TR=$ac_cv_path_TR
10405if test -n "$TR"; then
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10407$as_echo "$TR" >&6; }
10408else
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
10411fi
10412
10413
10414        if test "x$TR" = x; then
10415          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10416        fi
10417      else
10418        # Otherwise we believe it is a complete path. Use it as it is.
10419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10420$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10422$as_echo_n "checking for TR... " >&6; }
10423        if test ! -x "$tool_specified"; then
10424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10425$as_echo "not found" >&6; }
10426          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10427        fi
10428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10429$as_echo "$tool_specified" >&6; }
10430      fi
10431    fi
10432  fi
10433
10434
10435
10436  if test "x$TR" = x; then
10437    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10438  fi
10439
10440
10441
10442
10443
10444  # Publish this variable in the help.
10445
10446
10447  if test "x$UNAME" = x; then
10448    # The variable is not set by user, try to locate tool using the code snippet
10449    for ac_prog in uname
10450do
10451  # Extract the first word of "$ac_prog", so it can be a program name with args.
10452set dummy $ac_prog; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if ${ac_cv_path_UNAME+:} false; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $UNAME in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10470    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481UNAME=$ac_cv_path_UNAME
10482if test -n "$UNAME"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10484$as_echo "$UNAME" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490
10491  test -n "$UNAME" && break
10492done
10493
10494  else
10495    # The variable is set, but is it from the command line or the environment?
10496
10497    # Try to remove the string !UNAME! from our list.
10498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10500      # If it failed, the variable was not from the command line. Ignore it,
10501      # but warn the user (except for BASH, which is always set by the calling BASH).
10502      if test "xUNAME" != xBASH; then
10503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10504$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10505      fi
10506      # Try to locate tool using the code snippet
10507      for ac_prog in uname
10508do
10509  # Extract the first word of "$ac_prog", so it can be a program name with args.
10510set dummy $ac_prog; ac_word=$2
10511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10512$as_echo_n "checking for $ac_word... " >&6; }
10513if ${ac_cv_path_UNAME+:} false; then :
10514  $as_echo_n "(cached) " >&6
10515else
10516  case $UNAME in
10517  [\\/]* | ?:[\\/]*)
10518  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10519  ;;
10520  *)
10521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10522for as_dir in $PATH
10523do
10524  IFS=$as_save_IFS
10525  test -z "$as_dir" && as_dir=.
10526    for ac_exec_ext in '' $ac_executable_extensions; do
10527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10528    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10530    break 2
10531  fi
10532done
10533  done
10534IFS=$as_save_IFS
10535
10536  ;;
10537esac
10538fi
10539UNAME=$ac_cv_path_UNAME
10540if test -n "$UNAME"; then
10541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10542$as_echo "$UNAME" >&6; }
10543else
10544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10545$as_echo "no" >&6; }
10546fi
10547
10548
10549  test -n "$UNAME" && break
10550done
10551
10552    else
10553      # If it succeeded, then it was overridden by the user. We will use it
10554      # for the tool.
10555
10556      # First remove it from the list of overridden variables, so we can test
10557      # for unknown variables in the end.
10558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10559
10560      # Check if the provided tool contains a complete path.
10561      tool_specified="$UNAME"
10562      tool_basename="${tool_specified##*/}"
10563      if test "x$tool_basename" = "x$tool_specified"; then
10564        # A command without a complete path is provided, search $PATH.
10565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10566$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10567        # Extract the first word of "$tool_basename", so it can be a program name with args.
10568set dummy $tool_basename; ac_word=$2
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10570$as_echo_n "checking for $ac_word... " >&6; }
10571if ${ac_cv_path_UNAME+:} false; then :
10572  $as_echo_n "(cached) " >&6
10573else
10574  case $UNAME in
10575  [\\/]* | ?:[\\/]*)
10576  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10577  ;;
10578  *)
10579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10580for as_dir in $PATH
10581do
10582  IFS=$as_save_IFS
10583  test -z "$as_dir" && as_dir=.
10584    for ac_exec_ext in '' $ac_executable_extensions; do
10585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10586    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10588    break 2
10589  fi
10590done
10591  done
10592IFS=$as_save_IFS
10593
10594  ;;
10595esac
10596fi
10597UNAME=$ac_cv_path_UNAME
10598if test -n "$UNAME"; then
10599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10600$as_echo "$UNAME" >&6; }
10601else
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
10604fi
10605
10606
10607        if test "x$UNAME" = x; then
10608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10609        fi
10610      else
10611        # Otherwise we believe it is a complete path. Use it as it is.
10612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10613$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10615$as_echo_n "checking for UNAME... " >&6; }
10616        if test ! -x "$tool_specified"; then
10617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10618$as_echo "not found" >&6; }
10619          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10620        fi
10621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10622$as_echo "$tool_specified" >&6; }
10623      fi
10624    fi
10625  fi
10626
10627
10628
10629  if test "x$UNAME" = x; then
10630    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10631  fi
10632
10633
10634
10635
10636
10637  # Publish this variable in the help.
10638
10639
10640  if test "x$UNIQ" = x; then
10641    # The variable is not set by user, try to locate tool using the code snippet
10642    for ac_prog in uniq
10643do
10644  # Extract the first word of "$ac_prog", so it can be a program name with args.
10645set dummy $ac_prog; ac_word=$2
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10647$as_echo_n "checking for $ac_word... " >&6; }
10648if ${ac_cv_path_UNIQ+:} false; then :
10649  $as_echo_n "(cached) " >&6
10650else
10651  case $UNIQ in
10652  [\\/]* | ?:[\\/]*)
10653  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10654  ;;
10655  *)
10656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10657for as_dir in $PATH
10658do
10659  IFS=$as_save_IFS
10660  test -z "$as_dir" && as_dir=.
10661    for ac_exec_ext in '' $ac_executable_extensions; do
10662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10663    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10665    break 2
10666  fi
10667done
10668  done
10669IFS=$as_save_IFS
10670
10671  ;;
10672esac
10673fi
10674UNIQ=$ac_cv_path_UNIQ
10675if test -n "$UNIQ"; then
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10677$as_echo "$UNIQ" >&6; }
10678else
10679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
10681fi
10682
10683
10684  test -n "$UNIQ" && break
10685done
10686
10687  else
10688    # The variable is set, but is it from the command line or the environment?
10689
10690    # Try to remove the string !UNIQ! from our list.
10691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10693      # If it failed, the variable was not from the command line. Ignore it,
10694      # but warn the user (except for BASH, which is always set by the calling BASH).
10695      if test "xUNIQ" != xBASH; then
10696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10697$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10698      fi
10699      # Try to locate tool using the code snippet
10700      for ac_prog in uniq
10701do
10702  # Extract the first word of "$ac_prog", so it can be a program name with args.
10703set dummy $ac_prog; ac_word=$2
10704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10705$as_echo_n "checking for $ac_word... " >&6; }
10706if ${ac_cv_path_UNIQ+:} false; then :
10707  $as_echo_n "(cached) " >&6
10708else
10709  case $UNIQ in
10710  [\\/]* | ?:[\\/]*)
10711  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10712  ;;
10713  *)
10714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715for as_dir in $PATH
10716do
10717  IFS=$as_save_IFS
10718  test -z "$as_dir" && as_dir=.
10719    for ac_exec_ext in '' $ac_executable_extensions; do
10720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10721    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10723    break 2
10724  fi
10725done
10726  done
10727IFS=$as_save_IFS
10728
10729  ;;
10730esac
10731fi
10732UNIQ=$ac_cv_path_UNIQ
10733if test -n "$UNIQ"; then
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10735$as_echo "$UNIQ" >&6; }
10736else
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739fi
10740
10741
10742  test -n "$UNIQ" && break
10743done
10744
10745    else
10746      # If it succeeded, then it was overridden by the user. We will use it
10747      # for the tool.
10748
10749      # First remove it from the list of overridden variables, so we can test
10750      # for unknown variables in the end.
10751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10752
10753      # Check if the provided tool contains a complete path.
10754      tool_specified="$UNIQ"
10755      tool_basename="${tool_specified##*/}"
10756      if test "x$tool_basename" = "x$tool_specified"; then
10757        # A command without a complete path is provided, search $PATH.
10758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10759$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10760        # Extract the first word of "$tool_basename", so it can be a program name with args.
10761set dummy $tool_basename; ac_word=$2
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763$as_echo_n "checking for $ac_word... " >&6; }
10764if ${ac_cv_path_UNIQ+:} false; then :
10765  $as_echo_n "(cached) " >&6
10766else
10767  case $UNIQ in
10768  [\\/]* | ?:[\\/]*)
10769  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10770  ;;
10771  *)
10772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773for as_dir in $PATH
10774do
10775  IFS=$as_save_IFS
10776  test -z "$as_dir" && as_dir=.
10777    for ac_exec_ext in '' $ac_executable_extensions; do
10778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781    break 2
10782  fi
10783done
10784  done
10785IFS=$as_save_IFS
10786
10787  ;;
10788esac
10789fi
10790UNIQ=$ac_cv_path_UNIQ
10791if test -n "$UNIQ"; then
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10793$as_echo "$UNIQ" >&6; }
10794else
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797fi
10798
10799
10800        if test "x$UNIQ" = x; then
10801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10802        fi
10803      else
10804        # Otherwise we believe it is a complete path. Use it as it is.
10805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10806$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10808$as_echo_n "checking for UNIQ... " >&6; }
10809        if test ! -x "$tool_specified"; then
10810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10811$as_echo "not found" >&6; }
10812          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10813        fi
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10815$as_echo "$tool_specified" >&6; }
10816      fi
10817    fi
10818  fi
10819
10820
10821
10822  if test "x$UNIQ" = x; then
10823    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10824  fi
10825
10826
10827
10828
10829
10830  # Publish this variable in the help.
10831
10832
10833  if test "x$WC" = x; then
10834    # The variable is not set by user, try to locate tool using the code snippet
10835    for ac_prog in wc
10836do
10837  # Extract the first word of "$ac_prog", so it can be a program name with args.
10838set dummy $ac_prog; ac_word=$2
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10840$as_echo_n "checking for $ac_word... " >&6; }
10841if ${ac_cv_path_WC+:} false; then :
10842  $as_echo_n "(cached) " >&6
10843else
10844  case $WC in
10845  [\\/]* | ?:[\\/]*)
10846  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10847  ;;
10848  *)
10849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10850for as_dir in $PATH
10851do
10852  IFS=$as_save_IFS
10853  test -z "$as_dir" && as_dir=.
10854    for ac_exec_ext in '' $ac_executable_extensions; do
10855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10856    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10858    break 2
10859  fi
10860done
10861  done
10862IFS=$as_save_IFS
10863
10864  ;;
10865esac
10866fi
10867WC=$ac_cv_path_WC
10868if test -n "$WC"; then
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10870$as_echo "$WC" >&6; }
10871else
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10873$as_echo "no" >&6; }
10874fi
10875
10876
10877  test -n "$WC" && break
10878done
10879
10880  else
10881    # The variable is set, but is it from the command line or the environment?
10882
10883    # Try to remove the string !WC! from our list.
10884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10886      # If it failed, the variable was not from the command line. Ignore it,
10887      # but warn the user (except for BASH, which is always set by the calling BASH).
10888      if test "xWC" != xBASH; then
10889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10890$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10891      fi
10892      # Try to locate tool using the code snippet
10893      for ac_prog in wc
10894do
10895  # Extract the first word of "$ac_prog", so it can be a program name with args.
10896set dummy $ac_prog; ac_word=$2
10897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10898$as_echo_n "checking for $ac_word... " >&6; }
10899if ${ac_cv_path_WC+:} false; then :
10900  $as_echo_n "(cached) " >&6
10901else
10902  case $WC in
10903  [\\/]* | ?:[\\/]*)
10904  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10905  ;;
10906  *)
10907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10908for as_dir in $PATH
10909do
10910  IFS=$as_save_IFS
10911  test -z "$as_dir" && as_dir=.
10912    for ac_exec_ext in '' $ac_executable_extensions; do
10913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10914    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10916    break 2
10917  fi
10918done
10919  done
10920IFS=$as_save_IFS
10921
10922  ;;
10923esac
10924fi
10925WC=$ac_cv_path_WC
10926if test -n "$WC"; then
10927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10928$as_echo "$WC" >&6; }
10929else
10930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10931$as_echo "no" >&6; }
10932fi
10933
10934
10935  test -n "$WC" && break
10936done
10937
10938    else
10939      # If it succeeded, then it was overridden by the user. We will use it
10940      # for the tool.
10941
10942      # First remove it from the list of overridden variables, so we can test
10943      # for unknown variables in the end.
10944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10945
10946      # Check if the provided tool contains a complete path.
10947      tool_specified="$WC"
10948      tool_basename="${tool_specified##*/}"
10949      if test "x$tool_basename" = "x$tool_specified"; then
10950        # A command without a complete path is provided, search $PATH.
10951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10952$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10953        # Extract the first word of "$tool_basename", so it can be a program name with args.
10954set dummy $tool_basename; ac_word=$2
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956$as_echo_n "checking for $ac_word... " >&6; }
10957if ${ac_cv_path_WC+:} false; then :
10958  $as_echo_n "(cached) " >&6
10959else
10960  case $WC in
10961  [\\/]* | ?:[\\/]*)
10962  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10963  ;;
10964  *)
10965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966for as_dir in $PATH
10967do
10968  IFS=$as_save_IFS
10969  test -z "$as_dir" && as_dir=.
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980  ;;
10981esac
10982fi
10983WC=$ac_cv_path_WC
10984if test -n "$WC"; then
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10986$as_echo "$WC" >&6; }
10987else
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990fi
10991
10992
10993        if test "x$WC" = x; then
10994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10995        fi
10996      else
10997        # Otherwise we believe it is a complete path. Use it as it is.
10998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10999$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11001$as_echo_n "checking for WC... " >&6; }
11002        if test ! -x "$tool_specified"; then
11003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11004$as_echo "not found" >&6; }
11005          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11006        fi
11007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11008$as_echo "$tool_specified" >&6; }
11009      fi
11010    fi
11011  fi
11012
11013
11014
11015  if test "x$WC" = x; then
11016    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11017  fi
11018
11019
11020
11021
11022
11023  # Publish this variable in the help.
11024
11025
11026  if test "x$WHICH" = x; then
11027    # The variable is not set by user, try to locate tool using the code snippet
11028    for ac_prog in which
11029do
11030  # Extract the first word of "$ac_prog", so it can be a program name with args.
11031set dummy $ac_prog; ac_word=$2
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11033$as_echo_n "checking for $ac_word... " >&6; }
11034if ${ac_cv_path_WHICH+:} false; then :
11035  $as_echo_n "(cached) " >&6
11036else
11037  case $WHICH in
11038  [\\/]* | ?:[\\/]*)
11039  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11040  ;;
11041  *)
11042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11043for as_dir in $PATH
11044do
11045  IFS=$as_save_IFS
11046  test -z "$as_dir" && as_dir=.
11047    for ac_exec_ext in '' $ac_executable_extensions; do
11048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11049    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11051    break 2
11052  fi
11053done
11054  done
11055IFS=$as_save_IFS
11056
11057  ;;
11058esac
11059fi
11060WHICH=$ac_cv_path_WHICH
11061if test -n "$WHICH"; then
11062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11063$as_echo "$WHICH" >&6; }
11064else
11065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11066$as_echo "no" >&6; }
11067fi
11068
11069
11070  test -n "$WHICH" && break
11071done
11072
11073  else
11074    # The variable is set, but is it from the command line or the environment?
11075
11076    # Try to remove the string !WHICH! from our list.
11077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11079      # If it failed, the variable was not from the command line. Ignore it,
11080      # but warn the user (except for BASH, which is always set by the calling BASH).
11081      if test "xWHICH" != xBASH; then
11082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11083$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11084      fi
11085      # Try to locate tool using the code snippet
11086      for ac_prog in which
11087do
11088  # Extract the first word of "$ac_prog", so it can be a program name with args.
11089set dummy $ac_prog; ac_word=$2
11090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11091$as_echo_n "checking for $ac_word... " >&6; }
11092if ${ac_cv_path_WHICH+:} false; then :
11093  $as_echo_n "(cached) " >&6
11094else
11095  case $WHICH in
11096  [\\/]* | ?:[\\/]*)
11097  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11098  ;;
11099  *)
11100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11101for as_dir in $PATH
11102do
11103  IFS=$as_save_IFS
11104  test -z "$as_dir" && as_dir=.
11105    for ac_exec_ext in '' $ac_executable_extensions; do
11106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11107    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11109    break 2
11110  fi
11111done
11112  done
11113IFS=$as_save_IFS
11114
11115  ;;
11116esac
11117fi
11118WHICH=$ac_cv_path_WHICH
11119if test -n "$WHICH"; then
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11121$as_echo "$WHICH" >&6; }
11122else
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
11125fi
11126
11127
11128  test -n "$WHICH" && break
11129done
11130
11131    else
11132      # If it succeeded, then it was overridden by the user. We will use it
11133      # for the tool.
11134
11135      # First remove it from the list of overridden variables, so we can test
11136      # for unknown variables in the end.
11137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11138
11139      # Check if the provided tool contains a complete path.
11140      tool_specified="$WHICH"
11141      tool_basename="${tool_specified##*/}"
11142      if test "x$tool_basename" = "x$tool_specified"; then
11143        # A command without a complete path is provided, search $PATH.
11144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11145$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11146        # Extract the first word of "$tool_basename", so it can be a program name with args.
11147set dummy $tool_basename; ac_word=$2
11148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11149$as_echo_n "checking for $ac_word... " >&6; }
11150if ${ac_cv_path_WHICH+:} false; then :
11151  $as_echo_n "(cached) " >&6
11152else
11153  case $WHICH in
11154  [\\/]* | ?:[\\/]*)
11155  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11156  ;;
11157  *)
11158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11159for as_dir in $PATH
11160do
11161  IFS=$as_save_IFS
11162  test -z "$as_dir" && as_dir=.
11163    for ac_exec_ext in '' $ac_executable_extensions; do
11164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11165    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11167    break 2
11168  fi
11169done
11170  done
11171IFS=$as_save_IFS
11172
11173  ;;
11174esac
11175fi
11176WHICH=$ac_cv_path_WHICH
11177if test -n "$WHICH"; then
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11179$as_echo "$WHICH" >&6; }
11180else
11181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
11183fi
11184
11185
11186        if test "x$WHICH" = x; then
11187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11188        fi
11189      else
11190        # Otherwise we believe it is a complete path. Use it as it is.
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11192$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11194$as_echo_n "checking for WHICH... " >&6; }
11195        if test ! -x "$tool_specified"; then
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11197$as_echo "not found" >&6; }
11198          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11199        fi
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11201$as_echo "$tool_specified" >&6; }
11202      fi
11203    fi
11204  fi
11205
11206
11207
11208  if test "x$WHICH" = x; then
11209    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11210  fi
11211
11212
11213
11214
11215
11216  # Publish this variable in the help.
11217
11218
11219  if test "x$XARGS" = x; then
11220    # The variable is not set by user, try to locate tool using the code snippet
11221    for ac_prog in xargs
11222do
11223  # Extract the first word of "$ac_prog", so it can be a program name with args.
11224set dummy $ac_prog; ac_word=$2
11225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11226$as_echo_n "checking for $ac_word... " >&6; }
11227if ${ac_cv_path_XARGS+:} false; then :
11228  $as_echo_n "(cached) " >&6
11229else
11230  case $XARGS in
11231  [\\/]* | ?:[\\/]*)
11232  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11233  ;;
11234  *)
11235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11236for as_dir in $PATH
11237do
11238  IFS=$as_save_IFS
11239  test -z "$as_dir" && as_dir=.
11240    for ac_exec_ext in '' $ac_executable_extensions; do
11241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11242    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11244    break 2
11245  fi
11246done
11247  done
11248IFS=$as_save_IFS
11249
11250  ;;
11251esac
11252fi
11253XARGS=$ac_cv_path_XARGS
11254if test -n "$XARGS"; then
11255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11256$as_echo "$XARGS" >&6; }
11257else
11258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259$as_echo "no" >&6; }
11260fi
11261
11262
11263  test -n "$XARGS" && break
11264done
11265
11266  else
11267    # The variable is set, but is it from the command line or the environment?
11268
11269    # Try to remove the string !XARGS! from our list.
11270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11272      # If it failed, the variable was not from the command line. Ignore it,
11273      # but warn the user (except for BASH, which is always set by the calling BASH).
11274      if test "xXARGS" != xBASH; then
11275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11276$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11277      fi
11278      # Try to locate tool using the code snippet
11279      for ac_prog in xargs
11280do
11281  # Extract the first word of "$ac_prog", so it can be a program name with args.
11282set dummy $ac_prog; ac_word=$2
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11284$as_echo_n "checking for $ac_word... " >&6; }
11285if ${ac_cv_path_XARGS+:} false; then :
11286  $as_echo_n "(cached) " >&6
11287else
11288  case $XARGS in
11289  [\\/]* | ?:[\\/]*)
11290  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11291  ;;
11292  *)
11293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11294for as_dir in $PATH
11295do
11296  IFS=$as_save_IFS
11297  test -z "$as_dir" && as_dir=.
11298    for ac_exec_ext in '' $ac_executable_extensions; do
11299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11300    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11302    break 2
11303  fi
11304done
11305  done
11306IFS=$as_save_IFS
11307
11308  ;;
11309esac
11310fi
11311XARGS=$ac_cv_path_XARGS
11312if test -n "$XARGS"; then
11313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11314$as_echo "$XARGS" >&6; }
11315else
11316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
11318fi
11319
11320
11321  test -n "$XARGS" && break
11322done
11323
11324    else
11325      # If it succeeded, then it was overridden by the user. We will use it
11326      # for the tool.
11327
11328      # First remove it from the list of overridden variables, so we can test
11329      # for unknown variables in the end.
11330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11331
11332      # Check if the provided tool contains a complete path.
11333      tool_specified="$XARGS"
11334      tool_basename="${tool_specified##*/}"
11335      if test "x$tool_basename" = "x$tool_specified"; then
11336        # A command without a complete path is provided, search $PATH.
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11338$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11339        # Extract the first word of "$tool_basename", so it can be a program name with args.
11340set dummy $tool_basename; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_path_XARGS+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  case $XARGS in
11347  [\\/]* | ?:[\\/]*)
11348  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11349  ;;
11350  *)
11351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354  IFS=$as_save_IFS
11355  test -z "$as_dir" && as_dir=.
11356    for ac_exec_ext in '' $ac_executable_extensions; do
11357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11358    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11360    break 2
11361  fi
11362done
11363  done
11364IFS=$as_save_IFS
11365
11366  ;;
11367esac
11368fi
11369XARGS=$ac_cv_path_XARGS
11370if test -n "$XARGS"; then
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11372$as_echo "$XARGS" >&6; }
11373else
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
11376fi
11377
11378
11379        if test "x$XARGS" = x; then
11380          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11381        fi
11382      else
11383        # Otherwise we believe it is a complete path. Use it as it is.
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11385$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11387$as_echo_n "checking for XARGS... " >&6; }
11388        if test ! -x "$tool_specified"; then
11389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11390$as_echo "not found" >&6; }
11391          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11392        fi
11393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11394$as_echo "$tool_specified" >&6; }
11395      fi
11396    fi
11397  fi
11398
11399
11400
11401  if test "x$XARGS" = x; then
11402    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11403  fi
11404
11405
11406
11407  # Then required tools that require some special treatment.
11408
11409
11410  # Publish this variable in the help.
11411
11412
11413  if test "x$AWK" = x; then
11414    # The variable is not set by user, try to locate tool using the code snippet
11415    for ac_prog in gawk mawk nawk awk
11416do
11417  # Extract the first word of "$ac_prog", so it can be a program name with args.
11418set dummy $ac_prog; ac_word=$2
11419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11420$as_echo_n "checking for $ac_word... " >&6; }
11421if ${ac_cv_prog_AWK+:} false; then :
11422  $as_echo_n "(cached) " >&6
11423else
11424  if test -n "$AWK"; then
11425  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11426else
11427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11428for as_dir in $PATH
11429do
11430  IFS=$as_save_IFS
11431  test -z "$as_dir" && as_dir=.
11432    for ac_exec_ext in '' $ac_executable_extensions; do
11433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11434    ac_cv_prog_AWK="$ac_prog"
11435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11436    break 2
11437  fi
11438done
11439  done
11440IFS=$as_save_IFS
11441
11442fi
11443fi
11444AWK=$ac_cv_prog_AWK
11445if test -n "$AWK"; then
11446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11447$as_echo "$AWK" >&6; }
11448else
11449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11450$as_echo "no" >&6; }
11451fi
11452
11453
11454  test -n "$AWK" && break
11455done
11456
11457  else
11458    # The variable is set, but is it from the command line or the environment?
11459
11460    # Try to remove the string !AWK! from our list.
11461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11463      # If it failed, the variable was not from the command line. Ignore it,
11464      # but warn the user (except for BASH, which is always set by the calling BASH).
11465      if test "xAWK" != xBASH; then
11466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11467$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11468      fi
11469      # Try to locate tool using the code snippet
11470      for ac_prog in gawk mawk nawk awk
11471do
11472  # Extract the first word of "$ac_prog", so it can be a program name with args.
11473set dummy $ac_prog; ac_word=$2
11474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11475$as_echo_n "checking for $ac_word... " >&6; }
11476if ${ac_cv_prog_AWK+:} false; then :
11477  $as_echo_n "(cached) " >&6
11478else
11479  if test -n "$AWK"; then
11480  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11481else
11482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11483for as_dir in $PATH
11484do
11485  IFS=$as_save_IFS
11486  test -z "$as_dir" && as_dir=.
11487    for ac_exec_ext in '' $ac_executable_extensions; do
11488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11489    ac_cv_prog_AWK="$ac_prog"
11490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11491    break 2
11492  fi
11493done
11494  done
11495IFS=$as_save_IFS
11496
11497fi
11498fi
11499AWK=$ac_cv_prog_AWK
11500if test -n "$AWK"; then
11501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11502$as_echo "$AWK" >&6; }
11503else
11504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
11506fi
11507
11508
11509  test -n "$AWK" && break
11510done
11511
11512    else
11513      # If it succeeded, then it was overridden by the user. We will use it
11514      # for the tool.
11515
11516      # First remove it from the list of overridden variables, so we can test
11517      # for unknown variables in the end.
11518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11519
11520      # Check if the provided tool contains a complete path.
11521      tool_specified="$AWK"
11522      tool_basename="${tool_specified##*/}"
11523      if test "x$tool_basename" = "x$tool_specified"; then
11524        # A command without a complete path is provided, search $PATH.
11525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11526$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11527        # Extract the first word of "$tool_basename", so it can be a program name with args.
11528set dummy $tool_basename; ac_word=$2
11529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11530$as_echo_n "checking for $ac_word... " >&6; }
11531if ${ac_cv_path_AWK+:} false; then :
11532  $as_echo_n "(cached) " >&6
11533else
11534  case $AWK in
11535  [\\/]* | ?:[\\/]*)
11536  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11537  ;;
11538  *)
11539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11540for as_dir in $PATH
11541do
11542  IFS=$as_save_IFS
11543  test -z "$as_dir" && as_dir=.
11544    for ac_exec_ext in '' $ac_executable_extensions; do
11545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11546    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11548    break 2
11549  fi
11550done
11551  done
11552IFS=$as_save_IFS
11553
11554  ;;
11555esac
11556fi
11557AWK=$ac_cv_path_AWK
11558if test -n "$AWK"; then
11559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11560$as_echo "$AWK" >&6; }
11561else
11562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
11564fi
11565
11566
11567        if test "x$AWK" = x; then
11568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11569        fi
11570      else
11571        # Otherwise we believe it is a complete path. Use it as it is.
11572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11573$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11575$as_echo_n "checking for AWK... " >&6; }
11576        if test ! -x "$tool_specified"; then
11577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11578$as_echo "not found" >&6; }
11579          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11580        fi
11581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11582$as_echo "$tool_specified" >&6; }
11583      fi
11584    fi
11585  fi
11586
11587
11588  if test "x$AWK" = x; then
11589    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11590  fi
11591
11592
11593
11594
11595  # Publish this variable in the help.
11596
11597
11598  if test "x$GREP" = x; then
11599    # The variable is not set by user, try to locate tool using the code snippet
11600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11601$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11602if ${ac_cv_path_GREP+:} false; then :
11603  $as_echo_n "(cached) " >&6
11604else
11605  if test -z "$GREP"; then
11606  ac_path_GREP_found=false
11607  # Loop through the user's path and test for each of PROGNAME-LIST
11608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11610do
11611  IFS=$as_save_IFS
11612  test -z "$as_dir" && as_dir=.
11613    for ac_prog in grep ggrep; do
11614    for ac_exec_ext in '' $ac_executable_extensions; do
11615      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11616      as_fn_executable_p "$ac_path_GREP" || continue
11617# Check for GNU ac_path_GREP and select it if it is found.
11618  # Check for GNU $ac_path_GREP
11619case `"$ac_path_GREP" --version 2>&1` in
11620*GNU*)
11621  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11622*)
11623  ac_count=0
11624  $as_echo_n 0123456789 >"conftest.in"
11625  while :
11626  do
11627    cat "conftest.in" "conftest.in" >"conftest.tmp"
11628    mv "conftest.tmp" "conftest.in"
11629    cp "conftest.in" "conftest.nl"
11630    $as_echo 'GREP' >> "conftest.nl"
11631    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11632    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11633    as_fn_arith $ac_count + 1 && ac_count=$as_val
11634    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11635      # Best one so far, save it but keep looking for a better one
11636      ac_cv_path_GREP="$ac_path_GREP"
11637      ac_path_GREP_max=$ac_count
11638    fi
11639    # 10*(2^10) chars as input seems more than enough
11640    test $ac_count -gt 10 && break
11641  done
11642  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11643esac
11644
11645      $ac_path_GREP_found && break 3
11646    done
11647  done
11648  done
11649IFS=$as_save_IFS
11650  if test -z "$ac_cv_path_GREP"; then
11651    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11652  fi
11653else
11654  ac_cv_path_GREP=$GREP
11655fi
11656
11657fi
11658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11659$as_echo "$ac_cv_path_GREP" >&6; }
11660 GREP="$ac_cv_path_GREP"
11661
11662
11663  else
11664    # The variable is set, but is it from the command line or the environment?
11665
11666    # Try to remove the string !GREP! from our list.
11667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11669      # If it failed, the variable was not from the command line. Ignore it,
11670      # but warn the user (except for BASH, which is always set by the calling BASH).
11671      if test "xGREP" != xBASH; then
11672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11673$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11674      fi
11675      # Try to locate tool using the code snippet
11676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11677$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11678if ${ac_cv_path_GREP+:} false; then :
11679  $as_echo_n "(cached) " >&6
11680else
11681  if test -z "$GREP"; then
11682  ac_path_GREP_found=false
11683  # Loop through the user's path and test for each of PROGNAME-LIST
11684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11685for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11686do
11687  IFS=$as_save_IFS
11688  test -z "$as_dir" && as_dir=.
11689    for ac_prog in grep ggrep; do
11690    for ac_exec_ext in '' $ac_executable_extensions; do
11691      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11692      as_fn_executable_p "$ac_path_GREP" || continue
11693# Check for GNU ac_path_GREP and select it if it is found.
11694  # Check for GNU $ac_path_GREP
11695case `"$ac_path_GREP" --version 2>&1` in
11696*GNU*)
11697  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11698*)
11699  ac_count=0
11700  $as_echo_n 0123456789 >"conftest.in"
11701  while :
11702  do
11703    cat "conftest.in" "conftest.in" >"conftest.tmp"
11704    mv "conftest.tmp" "conftest.in"
11705    cp "conftest.in" "conftest.nl"
11706    $as_echo 'GREP' >> "conftest.nl"
11707    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11708    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11709    as_fn_arith $ac_count + 1 && ac_count=$as_val
11710    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11711      # Best one so far, save it but keep looking for a better one
11712      ac_cv_path_GREP="$ac_path_GREP"
11713      ac_path_GREP_max=$ac_count
11714    fi
11715    # 10*(2^10) chars as input seems more than enough
11716    test $ac_count -gt 10 && break
11717  done
11718  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11719esac
11720
11721      $ac_path_GREP_found && break 3
11722    done
11723  done
11724  done
11725IFS=$as_save_IFS
11726  if test -z "$ac_cv_path_GREP"; then
11727    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11728  fi
11729else
11730  ac_cv_path_GREP=$GREP
11731fi
11732
11733fi
11734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11735$as_echo "$ac_cv_path_GREP" >&6; }
11736 GREP="$ac_cv_path_GREP"
11737
11738
11739    else
11740      # If it succeeded, then it was overridden by the user. We will use it
11741      # for the tool.
11742
11743      # First remove it from the list of overridden variables, so we can test
11744      # for unknown variables in the end.
11745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11746
11747      # Check if the provided tool contains a complete path.
11748      tool_specified="$GREP"
11749      tool_basename="${tool_specified##*/}"
11750      if test "x$tool_basename" = "x$tool_specified"; then
11751        # A command without a complete path is provided, search $PATH.
11752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11753$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11754        # Extract the first word of "$tool_basename", so it can be a program name with args.
11755set dummy $tool_basename; ac_word=$2
11756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11757$as_echo_n "checking for $ac_word... " >&6; }
11758if ${ac_cv_path_GREP+:} false; then :
11759  $as_echo_n "(cached) " >&6
11760else
11761  case $GREP in
11762  [\\/]* | ?:[\\/]*)
11763  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11764  ;;
11765  *)
11766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11767for as_dir in $PATH
11768do
11769  IFS=$as_save_IFS
11770  test -z "$as_dir" && as_dir=.
11771    for ac_exec_ext in '' $ac_executable_extensions; do
11772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11773    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11775    break 2
11776  fi
11777done
11778  done
11779IFS=$as_save_IFS
11780
11781  ;;
11782esac
11783fi
11784GREP=$ac_cv_path_GREP
11785if test -n "$GREP"; then
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11787$as_echo "$GREP" >&6; }
11788else
11789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
11791fi
11792
11793
11794        if test "x$GREP" = x; then
11795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11796        fi
11797      else
11798        # Otherwise we believe it is a complete path. Use it as it is.
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11800$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11802$as_echo_n "checking for GREP... " >&6; }
11803        if test ! -x "$tool_specified"; then
11804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11805$as_echo "not found" >&6; }
11806          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11807        fi
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11809$as_echo "$tool_specified" >&6; }
11810      fi
11811    fi
11812  fi
11813
11814
11815  if test "x$GREP" = x; then
11816    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11817  fi
11818
11819
11820
11821
11822  # Publish this variable in the help.
11823
11824
11825  if test "x$EGREP" = x; then
11826    # The variable is not set by user, try to locate tool using the code snippet
11827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11828$as_echo_n "checking for egrep... " >&6; }
11829if ${ac_cv_path_EGREP+:} false; then :
11830  $as_echo_n "(cached) " >&6
11831else
11832  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11833   then ac_cv_path_EGREP="$GREP -E"
11834   else
11835     if test -z "$EGREP"; then
11836  ac_path_EGREP_found=false
11837  # Loop through the user's path and test for each of PROGNAME-LIST
11838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11839for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11840do
11841  IFS=$as_save_IFS
11842  test -z "$as_dir" && as_dir=.
11843    for ac_prog in egrep; do
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11846      as_fn_executable_p "$ac_path_EGREP" || continue
11847# Check for GNU ac_path_EGREP and select it if it is found.
11848  # Check for GNU $ac_path_EGREP
11849case `"$ac_path_EGREP" --version 2>&1` in
11850*GNU*)
11851  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11852*)
11853  ac_count=0
11854  $as_echo_n 0123456789 >"conftest.in"
11855  while :
11856  do
11857    cat "conftest.in" "conftest.in" >"conftest.tmp"
11858    mv "conftest.tmp" "conftest.in"
11859    cp "conftest.in" "conftest.nl"
11860    $as_echo 'EGREP' >> "conftest.nl"
11861    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11862    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11863    as_fn_arith $ac_count + 1 && ac_count=$as_val
11864    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11865      # Best one so far, save it but keep looking for a better one
11866      ac_cv_path_EGREP="$ac_path_EGREP"
11867      ac_path_EGREP_max=$ac_count
11868    fi
11869    # 10*(2^10) chars as input seems more than enough
11870    test $ac_count -gt 10 && break
11871  done
11872  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11873esac
11874
11875      $ac_path_EGREP_found && break 3
11876    done
11877  done
11878  done
11879IFS=$as_save_IFS
11880  if test -z "$ac_cv_path_EGREP"; then
11881    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11882  fi
11883else
11884  ac_cv_path_EGREP=$EGREP
11885fi
11886
11887   fi
11888fi
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11890$as_echo "$ac_cv_path_EGREP" >&6; }
11891 EGREP="$ac_cv_path_EGREP"
11892
11893
11894  else
11895    # The variable is set, but is it from the command line or the environment?
11896
11897    # Try to remove the string !EGREP! from our list.
11898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11900      # If it failed, the variable was not from the command line. Ignore it,
11901      # but warn the user (except for BASH, which is always set by the calling BASH).
11902      if test "xEGREP" != xBASH; then
11903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11904$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11905      fi
11906      # Try to locate tool using the code snippet
11907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11908$as_echo_n "checking for egrep... " >&6; }
11909if ${ac_cv_path_EGREP+:} false; then :
11910  $as_echo_n "(cached) " >&6
11911else
11912  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11913   then ac_cv_path_EGREP="$GREP -E"
11914   else
11915     if test -z "$EGREP"; then
11916  ac_path_EGREP_found=false
11917  # Loop through the user's path and test for each of PROGNAME-LIST
11918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11919for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11920do
11921  IFS=$as_save_IFS
11922  test -z "$as_dir" && as_dir=.
11923    for ac_prog in egrep; do
11924    for ac_exec_ext in '' $ac_executable_extensions; do
11925      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11926      as_fn_executable_p "$ac_path_EGREP" || continue
11927# Check for GNU ac_path_EGREP and select it if it is found.
11928  # Check for GNU $ac_path_EGREP
11929case `"$ac_path_EGREP" --version 2>&1` in
11930*GNU*)
11931  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11932*)
11933  ac_count=0
11934  $as_echo_n 0123456789 >"conftest.in"
11935  while :
11936  do
11937    cat "conftest.in" "conftest.in" >"conftest.tmp"
11938    mv "conftest.tmp" "conftest.in"
11939    cp "conftest.in" "conftest.nl"
11940    $as_echo 'EGREP' >> "conftest.nl"
11941    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11942    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11943    as_fn_arith $ac_count + 1 && ac_count=$as_val
11944    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11945      # Best one so far, save it but keep looking for a better one
11946      ac_cv_path_EGREP="$ac_path_EGREP"
11947      ac_path_EGREP_max=$ac_count
11948    fi
11949    # 10*(2^10) chars as input seems more than enough
11950    test $ac_count -gt 10 && break
11951  done
11952  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11953esac
11954
11955      $ac_path_EGREP_found && break 3
11956    done
11957  done
11958  done
11959IFS=$as_save_IFS
11960  if test -z "$ac_cv_path_EGREP"; then
11961    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11962  fi
11963else
11964  ac_cv_path_EGREP=$EGREP
11965fi
11966
11967   fi
11968fi
11969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11970$as_echo "$ac_cv_path_EGREP" >&6; }
11971 EGREP="$ac_cv_path_EGREP"
11972
11973
11974    else
11975      # If it succeeded, then it was overridden by the user. We will use it
11976      # for the tool.
11977
11978      # First remove it from the list of overridden variables, so we can test
11979      # for unknown variables in the end.
11980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11981
11982      # Check if the provided tool contains a complete path.
11983      tool_specified="$EGREP"
11984      tool_basename="${tool_specified##*/}"
11985      if test "x$tool_basename" = "x$tool_specified"; then
11986        # A command without a complete path is provided, search $PATH.
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11988$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11989        # Extract the first word of "$tool_basename", so it can be a program name with args.
11990set dummy $tool_basename; ac_word=$2
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11992$as_echo_n "checking for $ac_word... " >&6; }
11993if ${ac_cv_path_EGREP+:} false; then :
11994  $as_echo_n "(cached) " >&6
11995else
11996  case $EGREP in
11997  [\\/]* | ?:[\\/]*)
11998  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11999  ;;
12000  *)
12001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH
12003do
12004  IFS=$as_save_IFS
12005  test -z "$as_dir" && as_dir=.
12006    for ac_exec_ext in '' $ac_executable_extensions; do
12007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12008    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12010    break 2
12011  fi
12012done
12013  done
12014IFS=$as_save_IFS
12015
12016  ;;
12017esac
12018fi
12019EGREP=$ac_cv_path_EGREP
12020if test -n "$EGREP"; then
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12022$as_echo "$EGREP" >&6; }
12023else
12024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
12026fi
12027
12028
12029        if test "x$EGREP" = x; then
12030          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12031        fi
12032      else
12033        # Otherwise we believe it is a complete path. Use it as it is.
12034        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12035$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12037$as_echo_n "checking for EGREP... " >&6; }
12038        if test ! -x "$tool_specified"; then
12039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12040$as_echo "not found" >&6; }
12041          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12042        fi
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12044$as_echo "$tool_specified" >&6; }
12045      fi
12046    fi
12047  fi
12048
12049
12050  if test "x$EGREP" = x; then
12051    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12052  fi
12053
12054
12055
12056
12057  # Publish this variable in the help.
12058
12059
12060  if test "x$FGREP" = x; then
12061    # The variable is not set by user, try to locate tool using the code snippet
12062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12063$as_echo_n "checking for fgrep... " >&6; }
12064if ${ac_cv_path_FGREP+:} false; then :
12065  $as_echo_n "(cached) " >&6
12066else
12067  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12068   then ac_cv_path_FGREP="$GREP -F"
12069   else
12070     if test -z "$FGREP"; then
12071  ac_path_FGREP_found=false
12072  # Loop through the user's path and test for each of PROGNAME-LIST
12073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12074for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12075do
12076  IFS=$as_save_IFS
12077  test -z "$as_dir" && as_dir=.
12078    for ac_prog in fgrep; do
12079    for ac_exec_ext in '' $ac_executable_extensions; do
12080      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12081      as_fn_executable_p "$ac_path_FGREP" || continue
12082# Check for GNU ac_path_FGREP and select it if it is found.
12083  # Check for GNU $ac_path_FGREP
12084case `"$ac_path_FGREP" --version 2>&1` in
12085*GNU*)
12086  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12087*)
12088  ac_count=0
12089  $as_echo_n 0123456789 >"conftest.in"
12090  while :
12091  do
12092    cat "conftest.in" "conftest.in" >"conftest.tmp"
12093    mv "conftest.tmp" "conftest.in"
12094    cp "conftest.in" "conftest.nl"
12095    $as_echo 'FGREP' >> "conftest.nl"
12096    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12097    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12098    as_fn_arith $ac_count + 1 && ac_count=$as_val
12099    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12100      # Best one so far, save it but keep looking for a better one
12101      ac_cv_path_FGREP="$ac_path_FGREP"
12102      ac_path_FGREP_max=$ac_count
12103    fi
12104    # 10*(2^10) chars as input seems more than enough
12105    test $ac_count -gt 10 && break
12106  done
12107  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12108esac
12109
12110      $ac_path_FGREP_found && break 3
12111    done
12112  done
12113  done
12114IFS=$as_save_IFS
12115  if test -z "$ac_cv_path_FGREP"; then
12116    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12117  fi
12118else
12119  ac_cv_path_FGREP=$FGREP
12120fi
12121
12122   fi
12123fi
12124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12125$as_echo "$ac_cv_path_FGREP" >&6; }
12126 FGREP="$ac_cv_path_FGREP"
12127
12128
12129  else
12130    # The variable is set, but is it from the command line or the environment?
12131
12132    # Try to remove the string !FGREP! from our list.
12133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12135      # If it failed, the variable was not from the command line. Ignore it,
12136      # but warn the user (except for BASH, which is always set by the calling BASH).
12137      if test "xFGREP" != xBASH; then
12138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12139$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12140      fi
12141      # Try to locate tool using the code snippet
12142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12143$as_echo_n "checking for fgrep... " >&6; }
12144if ${ac_cv_path_FGREP+:} false; then :
12145  $as_echo_n "(cached) " >&6
12146else
12147  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12148   then ac_cv_path_FGREP="$GREP -F"
12149   else
12150     if test -z "$FGREP"; then
12151  ac_path_FGREP_found=false
12152  # Loop through the user's path and test for each of PROGNAME-LIST
12153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12154for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12155do
12156  IFS=$as_save_IFS
12157  test -z "$as_dir" && as_dir=.
12158    for ac_prog in fgrep; do
12159    for ac_exec_ext in '' $ac_executable_extensions; do
12160      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12161      as_fn_executable_p "$ac_path_FGREP" || continue
12162# Check for GNU ac_path_FGREP and select it if it is found.
12163  # Check for GNU $ac_path_FGREP
12164case `"$ac_path_FGREP" --version 2>&1` in
12165*GNU*)
12166  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12167*)
12168  ac_count=0
12169  $as_echo_n 0123456789 >"conftest.in"
12170  while :
12171  do
12172    cat "conftest.in" "conftest.in" >"conftest.tmp"
12173    mv "conftest.tmp" "conftest.in"
12174    cp "conftest.in" "conftest.nl"
12175    $as_echo 'FGREP' >> "conftest.nl"
12176    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12177    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12178    as_fn_arith $ac_count + 1 && ac_count=$as_val
12179    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12180      # Best one so far, save it but keep looking for a better one
12181      ac_cv_path_FGREP="$ac_path_FGREP"
12182      ac_path_FGREP_max=$ac_count
12183    fi
12184    # 10*(2^10) chars as input seems more than enough
12185    test $ac_count -gt 10 && break
12186  done
12187  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12188esac
12189
12190      $ac_path_FGREP_found && break 3
12191    done
12192  done
12193  done
12194IFS=$as_save_IFS
12195  if test -z "$ac_cv_path_FGREP"; then
12196    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12197  fi
12198else
12199  ac_cv_path_FGREP=$FGREP
12200fi
12201
12202   fi
12203fi
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12205$as_echo "$ac_cv_path_FGREP" >&6; }
12206 FGREP="$ac_cv_path_FGREP"
12207
12208
12209    else
12210      # If it succeeded, then it was overridden by the user. We will use it
12211      # for the tool.
12212
12213      # First remove it from the list of overridden variables, so we can test
12214      # for unknown variables in the end.
12215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12216
12217      # Check if the provided tool contains a complete path.
12218      tool_specified="$FGREP"
12219      tool_basename="${tool_specified##*/}"
12220      if test "x$tool_basename" = "x$tool_specified"; then
12221        # A command without a complete path is provided, search $PATH.
12222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12223$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12224        # Extract the first word of "$tool_basename", so it can be a program name with args.
12225set dummy $tool_basename; ac_word=$2
12226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12227$as_echo_n "checking for $ac_word... " >&6; }
12228if ${ac_cv_path_FGREP+:} false; then :
12229  $as_echo_n "(cached) " >&6
12230else
12231  case $FGREP in
12232  [\\/]* | ?:[\\/]*)
12233  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12234  ;;
12235  *)
12236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12237for as_dir in $PATH
12238do
12239  IFS=$as_save_IFS
12240  test -z "$as_dir" && as_dir=.
12241    for ac_exec_ext in '' $ac_executable_extensions; do
12242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12243    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12245    break 2
12246  fi
12247done
12248  done
12249IFS=$as_save_IFS
12250
12251  ;;
12252esac
12253fi
12254FGREP=$ac_cv_path_FGREP
12255if test -n "$FGREP"; then
12256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12257$as_echo "$FGREP" >&6; }
12258else
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12260$as_echo "no" >&6; }
12261fi
12262
12263
12264        if test "x$FGREP" = x; then
12265          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12266        fi
12267      else
12268        # Otherwise we believe it is a complete path. Use it as it is.
12269        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12270$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12272$as_echo_n "checking for FGREP... " >&6; }
12273        if test ! -x "$tool_specified"; then
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12275$as_echo "not found" >&6; }
12276          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12277        fi
12278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12279$as_echo "$tool_specified" >&6; }
12280      fi
12281    fi
12282  fi
12283
12284
12285  if test "x$FGREP" = x; then
12286    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12287  fi
12288
12289
12290
12291
12292  # Publish this variable in the help.
12293
12294
12295  if test "x$SED" = x; then
12296    # The variable is not set by user, try to locate tool using the code snippet
12297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12298$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12299if ${ac_cv_path_SED+:} false; then :
12300  $as_echo_n "(cached) " >&6
12301else
12302            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12303     for ac_i in 1 2 3 4 5 6 7; do
12304       ac_script="$ac_script$as_nl$ac_script"
12305     done
12306     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12307     { ac_script=; unset ac_script;}
12308     if test -z "$SED"; then
12309  ac_path_SED_found=false
12310  # Loop through the user's path and test for each of PROGNAME-LIST
12311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12312for as_dir in $PATH
12313do
12314  IFS=$as_save_IFS
12315  test -z "$as_dir" && as_dir=.
12316    for ac_prog in sed gsed; do
12317    for ac_exec_ext in '' $ac_executable_extensions; do
12318      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12319      as_fn_executable_p "$ac_path_SED" || continue
12320# Check for GNU ac_path_SED and select it if it is found.
12321  # Check for GNU $ac_path_SED
12322case `"$ac_path_SED" --version 2>&1` in
12323*GNU*)
12324  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12325*)
12326  ac_count=0
12327  $as_echo_n 0123456789 >"conftest.in"
12328  while :
12329  do
12330    cat "conftest.in" "conftest.in" >"conftest.tmp"
12331    mv "conftest.tmp" "conftest.in"
12332    cp "conftest.in" "conftest.nl"
12333    $as_echo '' >> "conftest.nl"
12334    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12335    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12336    as_fn_arith $ac_count + 1 && ac_count=$as_val
12337    if test $ac_count -gt ${ac_path_SED_max-0}; then
12338      # Best one so far, save it but keep looking for a better one
12339      ac_cv_path_SED="$ac_path_SED"
12340      ac_path_SED_max=$ac_count
12341    fi
12342    # 10*(2^10) chars as input seems more than enough
12343    test $ac_count -gt 10 && break
12344  done
12345  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12346esac
12347
12348      $ac_path_SED_found && break 3
12349    done
12350  done
12351  done
12352IFS=$as_save_IFS
12353  if test -z "$ac_cv_path_SED"; then
12354    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12355  fi
12356else
12357  ac_cv_path_SED=$SED
12358fi
12359
12360fi
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12362$as_echo "$ac_cv_path_SED" >&6; }
12363 SED="$ac_cv_path_SED"
12364  rm -f conftest.sed
12365
12366  else
12367    # The variable is set, but is it from the command line or the environment?
12368
12369    # Try to remove the string !SED! from our list.
12370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12372      # If it failed, the variable was not from the command line. Ignore it,
12373      # but warn the user (except for BASH, which is always set by the calling BASH).
12374      if test "xSED" != xBASH; then
12375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12376$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12377      fi
12378      # Try to locate tool using the code snippet
12379      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12380$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12381if ${ac_cv_path_SED+:} false; then :
12382  $as_echo_n "(cached) " >&6
12383else
12384            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12385     for ac_i in 1 2 3 4 5 6 7; do
12386       ac_script="$ac_script$as_nl$ac_script"
12387     done
12388     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12389     { ac_script=; unset ac_script;}
12390     if test -z "$SED"; then
12391  ac_path_SED_found=false
12392  # Loop through the user's path and test for each of PROGNAME-LIST
12393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394for as_dir in $PATH
12395do
12396  IFS=$as_save_IFS
12397  test -z "$as_dir" && as_dir=.
12398    for ac_prog in sed gsed; do
12399    for ac_exec_ext in '' $ac_executable_extensions; do
12400      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12401      as_fn_executable_p "$ac_path_SED" || continue
12402# Check for GNU ac_path_SED and select it if it is found.
12403  # Check for GNU $ac_path_SED
12404case `"$ac_path_SED" --version 2>&1` in
12405*GNU*)
12406  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12407*)
12408  ac_count=0
12409  $as_echo_n 0123456789 >"conftest.in"
12410  while :
12411  do
12412    cat "conftest.in" "conftest.in" >"conftest.tmp"
12413    mv "conftest.tmp" "conftest.in"
12414    cp "conftest.in" "conftest.nl"
12415    $as_echo '' >> "conftest.nl"
12416    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12417    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12418    as_fn_arith $ac_count + 1 && ac_count=$as_val
12419    if test $ac_count -gt ${ac_path_SED_max-0}; then
12420      # Best one so far, save it but keep looking for a better one
12421      ac_cv_path_SED="$ac_path_SED"
12422      ac_path_SED_max=$ac_count
12423    fi
12424    # 10*(2^10) chars as input seems more than enough
12425    test $ac_count -gt 10 && break
12426  done
12427  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12428esac
12429
12430      $ac_path_SED_found && break 3
12431    done
12432  done
12433  done
12434IFS=$as_save_IFS
12435  if test -z "$ac_cv_path_SED"; then
12436    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12437  fi
12438else
12439  ac_cv_path_SED=$SED
12440fi
12441
12442fi
12443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12444$as_echo "$ac_cv_path_SED" >&6; }
12445 SED="$ac_cv_path_SED"
12446  rm -f conftest.sed
12447
12448    else
12449      # If it succeeded, then it was overridden by the user. We will use it
12450      # for the tool.
12451
12452      # First remove it from the list of overridden variables, so we can test
12453      # for unknown variables in the end.
12454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12455
12456      # Check if the provided tool contains a complete path.
12457      tool_specified="$SED"
12458      tool_basename="${tool_specified##*/}"
12459      if test "x$tool_basename" = "x$tool_specified"; then
12460        # A command without a complete path is provided, search $PATH.
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12462$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12463        # Extract the first word of "$tool_basename", so it can be a program name with args.
12464set dummy $tool_basename; ac_word=$2
12465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12466$as_echo_n "checking for $ac_word... " >&6; }
12467if ${ac_cv_path_SED+:} false; then :
12468  $as_echo_n "(cached) " >&6
12469else
12470  case $SED in
12471  [\\/]* | ?:[\\/]*)
12472  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12473  ;;
12474  *)
12475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12476for as_dir in $PATH
12477do
12478  IFS=$as_save_IFS
12479  test -z "$as_dir" && as_dir=.
12480    for ac_exec_ext in '' $ac_executable_extensions; do
12481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12482    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12484    break 2
12485  fi
12486done
12487  done
12488IFS=$as_save_IFS
12489
12490  ;;
12491esac
12492fi
12493SED=$ac_cv_path_SED
12494if test -n "$SED"; then
12495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12496$as_echo "$SED" >&6; }
12497else
12498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12499$as_echo "no" >&6; }
12500fi
12501
12502
12503        if test "x$SED" = x; then
12504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12505        fi
12506      else
12507        # Otherwise we believe it is a complete path. Use it as it is.
12508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12509$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12511$as_echo_n "checking for SED... " >&6; }
12512        if test ! -x "$tool_specified"; then
12513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12514$as_echo "not found" >&6; }
12515          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12516        fi
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12518$as_echo "$tool_specified" >&6; }
12519      fi
12520    fi
12521  fi
12522
12523
12524  if test "x$SED" = x; then
12525    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12526  fi
12527
12528
12529
12530  # Always force rm.
12531  RM="$RM -f"
12532
12533  # pwd behaves differently on various platforms and some don't support the -L flag.
12534  # Always use the bash builtin pwd to get uniform behavior.
12535  THEPWDCMD=pwd
12536
12537  # These are not required on all platforms
12538
12539
12540  # Publish this variable in the help.
12541
12542
12543  if test "x$CYGPATH" = x; then
12544    # The variable is not set by user, try to locate tool using the code snippet
12545    for ac_prog in cygpath
12546do
12547  # Extract the first word of "$ac_prog", so it can be a program name with args.
12548set dummy $ac_prog; ac_word=$2
12549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12550$as_echo_n "checking for $ac_word... " >&6; }
12551if ${ac_cv_path_CYGPATH+:} false; then :
12552  $as_echo_n "(cached) " >&6
12553else
12554  case $CYGPATH in
12555  [\\/]* | ?:[\\/]*)
12556  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12557  ;;
12558  *)
12559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12560for as_dir in $PATH
12561do
12562  IFS=$as_save_IFS
12563  test -z "$as_dir" && as_dir=.
12564    for ac_exec_ext in '' $ac_executable_extensions; do
12565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12566    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12568    break 2
12569  fi
12570done
12571  done
12572IFS=$as_save_IFS
12573
12574  ;;
12575esac
12576fi
12577CYGPATH=$ac_cv_path_CYGPATH
12578if test -n "$CYGPATH"; then
12579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12580$as_echo "$CYGPATH" >&6; }
12581else
12582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12583$as_echo "no" >&6; }
12584fi
12585
12586
12587  test -n "$CYGPATH" && break
12588done
12589
12590  else
12591    # The variable is set, but is it from the command line or the environment?
12592
12593    # Try to remove the string !CYGPATH! from our list.
12594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12596      # If it failed, the variable was not from the command line. Ignore it,
12597      # but warn the user (except for BASH, which is always set by the calling BASH).
12598      if test "xCYGPATH" != xBASH; then
12599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12600$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12601      fi
12602      # Try to locate tool using the code snippet
12603      for ac_prog in cygpath
12604do
12605  # Extract the first word of "$ac_prog", so it can be a program name with args.
12606set dummy $ac_prog; ac_word=$2
12607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12608$as_echo_n "checking for $ac_word... " >&6; }
12609if ${ac_cv_path_CYGPATH+:} false; then :
12610  $as_echo_n "(cached) " >&6
12611else
12612  case $CYGPATH in
12613  [\\/]* | ?:[\\/]*)
12614  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12615  ;;
12616  *)
12617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12618for as_dir in $PATH
12619do
12620  IFS=$as_save_IFS
12621  test -z "$as_dir" && as_dir=.
12622    for ac_exec_ext in '' $ac_executable_extensions; do
12623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12624    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12626    break 2
12627  fi
12628done
12629  done
12630IFS=$as_save_IFS
12631
12632  ;;
12633esac
12634fi
12635CYGPATH=$ac_cv_path_CYGPATH
12636if test -n "$CYGPATH"; then
12637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12638$as_echo "$CYGPATH" >&6; }
12639else
12640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641$as_echo "no" >&6; }
12642fi
12643
12644
12645  test -n "$CYGPATH" && break
12646done
12647
12648    else
12649      # If it succeeded, then it was overridden by the user. We will use it
12650      # for the tool.
12651
12652      # First remove it from the list of overridden variables, so we can test
12653      # for unknown variables in the end.
12654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12655
12656      # Check if the provided tool contains a complete path.
12657      tool_specified="$CYGPATH"
12658      tool_basename="${tool_specified##*/}"
12659      if test "x$tool_basename" = "x$tool_specified"; then
12660        # A command without a complete path is provided, search $PATH.
12661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12662$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12663        # Extract the first word of "$tool_basename", so it can be a program name with args.
12664set dummy $tool_basename; ac_word=$2
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12666$as_echo_n "checking for $ac_word... " >&6; }
12667if ${ac_cv_path_CYGPATH+:} false; then :
12668  $as_echo_n "(cached) " >&6
12669else
12670  case $CYGPATH in
12671  [\\/]* | ?:[\\/]*)
12672  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12673  ;;
12674  *)
12675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12676for as_dir in $PATH
12677do
12678  IFS=$as_save_IFS
12679  test -z "$as_dir" && as_dir=.
12680    for ac_exec_ext in '' $ac_executable_extensions; do
12681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12682    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12684    break 2
12685  fi
12686done
12687  done
12688IFS=$as_save_IFS
12689
12690  ;;
12691esac
12692fi
12693CYGPATH=$ac_cv_path_CYGPATH
12694if test -n "$CYGPATH"; then
12695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12696$as_echo "$CYGPATH" >&6; }
12697else
12698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12699$as_echo "no" >&6; }
12700fi
12701
12702
12703        if test "x$CYGPATH" = x; then
12704          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12705        fi
12706      else
12707        # Otherwise we believe it is a complete path. Use it as it is.
12708        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12709$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12711$as_echo_n "checking for CYGPATH... " >&6; }
12712        if test ! -x "$tool_specified"; then
12713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12714$as_echo "not found" >&6; }
12715          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12716        fi
12717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12718$as_echo "$tool_specified" >&6; }
12719      fi
12720    fi
12721  fi
12722
12723
12724
12725
12726  # Publish this variable in the help.
12727
12728
12729  if test "x$READLINK" = x; then
12730    # The variable is not set by user, try to locate tool using the code snippet
12731    for ac_prog in greadlink readlink
12732do
12733  # Extract the first word of "$ac_prog", so it can be a program name with args.
12734set dummy $ac_prog; ac_word=$2
12735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12736$as_echo_n "checking for $ac_word... " >&6; }
12737if ${ac_cv_path_READLINK+:} false; then :
12738  $as_echo_n "(cached) " >&6
12739else
12740  case $READLINK in
12741  [\\/]* | ?:[\\/]*)
12742  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12743  ;;
12744  *)
12745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12746for as_dir in $PATH
12747do
12748  IFS=$as_save_IFS
12749  test -z "$as_dir" && as_dir=.
12750    for ac_exec_ext in '' $ac_executable_extensions; do
12751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12752    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12754    break 2
12755  fi
12756done
12757  done
12758IFS=$as_save_IFS
12759
12760  ;;
12761esac
12762fi
12763READLINK=$ac_cv_path_READLINK
12764if test -n "$READLINK"; then
12765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12766$as_echo "$READLINK" >&6; }
12767else
12768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12769$as_echo "no" >&6; }
12770fi
12771
12772
12773  test -n "$READLINK" && break
12774done
12775
12776  else
12777    # The variable is set, but is it from the command line or the environment?
12778
12779    # Try to remove the string !READLINK! from our list.
12780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12782      # If it failed, the variable was not from the command line. Ignore it,
12783      # but warn the user (except for BASH, which is always set by the calling BASH).
12784      if test "xREADLINK" != xBASH; then
12785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12786$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12787      fi
12788      # Try to locate tool using the code snippet
12789      for ac_prog in greadlink readlink
12790do
12791  # Extract the first word of "$ac_prog", so it can be a program name with args.
12792set dummy $ac_prog; ac_word=$2
12793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12794$as_echo_n "checking for $ac_word... " >&6; }
12795if ${ac_cv_path_READLINK+:} false; then :
12796  $as_echo_n "(cached) " >&6
12797else
12798  case $READLINK in
12799  [\\/]* | ?:[\\/]*)
12800  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12801  ;;
12802  *)
12803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12804for as_dir in $PATH
12805do
12806  IFS=$as_save_IFS
12807  test -z "$as_dir" && as_dir=.
12808    for ac_exec_ext in '' $ac_executable_extensions; do
12809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12810    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12812    break 2
12813  fi
12814done
12815  done
12816IFS=$as_save_IFS
12817
12818  ;;
12819esac
12820fi
12821READLINK=$ac_cv_path_READLINK
12822if test -n "$READLINK"; then
12823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12824$as_echo "$READLINK" >&6; }
12825else
12826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12827$as_echo "no" >&6; }
12828fi
12829
12830
12831  test -n "$READLINK" && break
12832done
12833
12834    else
12835      # If it succeeded, then it was overridden by the user. We will use it
12836      # for the tool.
12837
12838      # First remove it from the list of overridden variables, so we can test
12839      # for unknown variables in the end.
12840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12841
12842      # Check if the provided tool contains a complete path.
12843      tool_specified="$READLINK"
12844      tool_basename="${tool_specified##*/}"
12845      if test "x$tool_basename" = "x$tool_specified"; then
12846        # A command without a complete path is provided, search $PATH.
12847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12848$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12849        # Extract the first word of "$tool_basename", so it can be a program name with args.
12850set dummy $tool_basename; ac_word=$2
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12852$as_echo_n "checking for $ac_word... " >&6; }
12853if ${ac_cv_path_READLINK+:} false; then :
12854  $as_echo_n "(cached) " >&6
12855else
12856  case $READLINK in
12857  [\\/]* | ?:[\\/]*)
12858  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12859  ;;
12860  *)
12861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12862for as_dir in $PATH
12863do
12864  IFS=$as_save_IFS
12865  test -z "$as_dir" && as_dir=.
12866    for ac_exec_ext in '' $ac_executable_extensions; do
12867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12868    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12870    break 2
12871  fi
12872done
12873  done
12874IFS=$as_save_IFS
12875
12876  ;;
12877esac
12878fi
12879READLINK=$ac_cv_path_READLINK
12880if test -n "$READLINK"; then
12881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12882$as_echo "$READLINK" >&6; }
12883else
12884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12885$as_echo "no" >&6; }
12886fi
12887
12888
12889        if test "x$READLINK" = x; then
12890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12891        fi
12892      else
12893        # Otherwise we believe it is a complete path. Use it as it is.
12894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12895$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12897$as_echo_n "checking for READLINK... " >&6; }
12898        if test ! -x "$tool_specified"; then
12899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12900$as_echo "not found" >&6; }
12901          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12902        fi
12903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12904$as_echo "$tool_specified" >&6; }
12905      fi
12906    fi
12907  fi
12908
12909
12910
12911
12912  # Publish this variable in the help.
12913
12914
12915  if test "x$DF" = x; then
12916    # The variable is not set by user, try to locate tool using the code snippet
12917    for ac_prog in df
12918do
12919  # Extract the first word of "$ac_prog", so it can be a program name with args.
12920set dummy $ac_prog; ac_word=$2
12921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12922$as_echo_n "checking for $ac_word... " >&6; }
12923if ${ac_cv_path_DF+:} false; then :
12924  $as_echo_n "(cached) " >&6
12925else
12926  case $DF in
12927  [\\/]* | ?:[\\/]*)
12928  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12929  ;;
12930  *)
12931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12932for as_dir in $PATH
12933do
12934  IFS=$as_save_IFS
12935  test -z "$as_dir" && as_dir=.
12936    for ac_exec_ext in '' $ac_executable_extensions; do
12937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12938    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12940    break 2
12941  fi
12942done
12943  done
12944IFS=$as_save_IFS
12945
12946  ;;
12947esac
12948fi
12949DF=$ac_cv_path_DF
12950if test -n "$DF"; then
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12952$as_echo "$DF" >&6; }
12953else
12954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12955$as_echo "no" >&6; }
12956fi
12957
12958
12959  test -n "$DF" && break
12960done
12961
12962  else
12963    # The variable is set, but is it from the command line or the environment?
12964
12965    # Try to remove the string !DF! from our list.
12966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12968      # If it failed, the variable was not from the command line. Ignore it,
12969      # but warn the user (except for BASH, which is always set by the calling BASH).
12970      if test "xDF" != xBASH; then
12971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12972$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12973      fi
12974      # Try to locate tool using the code snippet
12975      for ac_prog in df
12976do
12977  # Extract the first word of "$ac_prog", so it can be a program name with args.
12978set dummy $ac_prog; ac_word=$2
12979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12980$as_echo_n "checking for $ac_word... " >&6; }
12981if ${ac_cv_path_DF+:} false; then :
12982  $as_echo_n "(cached) " >&6
12983else
12984  case $DF in
12985  [\\/]* | ?:[\\/]*)
12986  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12987  ;;
12988  *)
12989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12990for as_dir in $PATH
12991do
12992  IFS=$as_save_IFS
12993  test -z "$as_dir" && as_dir=.
12994    for ac_exec_ext in '' $ac_executable_extensions; do
12995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12996    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12998    break 2
12999  fi
13000done
13001  done
13002IFS=$as_save_IFS
13003
13004  ;;
13005esac
13006fi
13007DF=$ac_cv_path_DF
13008if test -n "$DF"; then
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13010$as_echo "$DF" >&6; }
13011else
13012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13013$as_echo "no" >&6; }
13014fi
13015
13016
13017  test -n "$DF" && break
13018done
13019
13020    else
13021      # If it succeeded, then it was overridden by the user. We will use it
13022      # for the tool.
13023
13024      # First remove it from the list of overridden variables, so we can test
13025      # for unknown variables in the end.
13026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13027
13028      # Check if the provided tool contains a complete path.
13029      tool_specified="$DF"
13030      tool_basename="${tool_specified##*/}"
13031      if test "x$tool_basename" = "x$tool_specified"; then
13032        # A command without a complete path is provided, search $PATH.
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13034$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13035        # Extract the first word of "$tool_basename", so it can be a program name with args.
13036set dummy $tool_basename; ac_word=$2
13037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13038$as_echo_n "checking for $ac_word... " >&6; }
13039if ${ac_cv_path_DF+:} false; then :
13040  $as_echo_n "(cached) " >&6
13041else
13042  case $DF in
13043  [\\/]* | ?:[\\/]*)
13044  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13045  ;;
13046  *)
13047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13048for as_dir in $PATH
13049do
13050  IFS=$as_save_IFS
13051  test -z "$as_dir" && as_dir=.
13052    for ac_exec_ext in '' $ac_executable_extensions; do
13053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13054    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13056    break 2
13057  fi
13058done
13059  done
13060IFS=$as_save_IFS
13061
13062  ;;
13063esac
13064fi
13065DF=$ac_cv_path_DF
13066if test -n "$DF"; then
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13068$as_echo "$DF" >&6; }
13069else
13070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071$as_echo "no" >&6; }
13072fi
13073
13074
13075        if test "x$DF" = x; then
13076          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13077        fi
13078      else
13079        # Otherwise we believe it is a complete path. Use it as it is.
13080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13081$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13083$as_echo_n "checking for DF... " >&6; }
13084        if test ! -x "$tool_specified"; then
13085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13086$as_echo "not found" >&6; }
13087          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13088        fi
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13090$as_echo "$tool_specified" >&6; }
13091      fi
13092    fi
13093  fi
13094
13095
13096
13097
13098  # Publish this variable in the help.
13099
13100
13101  if test "x$SETFILE" = x; then
13102    # The variable is not set by user, try to locate tool using the code snippet
13103    for ac_prog in SetFile
13104do
13105  # Extract the first word of "$ac_prog", so it can be a program name with args.
13106set dummy $ac_prog; ac_word=$2
13107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13108$as_echo_n "checking for $ac_word... " >&6; }
13109if ${ac_cv_path_SETFILE+:} false; then :
13110  $as_echo_n "(cached) " >&6
13111else
13112  case $SETFILE in
13113  [\\/]* | ?:[\\/]*)
13114  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13115  ;;
13116  *)
13117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13118for as_dir in $PATH
13119do
13120  IFS=$as_save_IFS
13121  test -z "$as_dir" && as_dir=.
13122    for ac_exec_ext in '' $ac_executable_extensions; do
13123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13124    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13126    break 2
13127  fi
13128done
13129  done
13130IFS=$as_save_IFS
13131
13132  ;;
13133esac
13134fi
13135SETFILE=$ac_cv_path_SETFILE
13136if test -n "$SETFILE"; then
13137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13138$as_echo "$SETFILE" >&6; }
13139else
13140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13141$as_echo "no" >&6; }
13142fi
13143
13144
13145  test -n "$SETFILE" && break
13146done
13147
13148  else
13149    # The variable is set, but is it from the command line or the environment?
13150
13151    # Try to remove the string !SETFILE! from our list.
13152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13154      # If it failed, the variable was not from the command line. Ignore it,
13155      # but warn the user (except for BASH, which is always set by the calling BASH).
13156      if test "xSETFILE" != xBASH; then
13157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13158$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13159      fi
13160      # Try to locate tool using the code snippet
13161      for ac_prog in SetFile
13162do
13163  # Extract the first word of "$ac_prog", so it can be a program name with args.
13164set dummy $ac_prog; ac_word=$2
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13166$as_echo_n "checking for $ac_word... " >&6; }
13167if ${ac_cv_path_SETFILE+:} false; then :
13168  $as_echo_n "(cached) " >&6
13169else
13170  case $SETFILE in
13171  [\\/]* | ?:[\\/]*)
13172  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13173  ;;
13174  *)
13175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13176for as_dir in $PATH
13177do
13178  IFS=$as_save_IFS
13179  test -z "$as_dir" && as_dir=.
13180    for ac_exec_ext in '' $ac_executable_extensions; do
13181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13182    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13184    break 2
13185  fi
13186done
13187  done
13188IFS=$as_save_IFS
13189
13190  ;;
13191esac
13192fi
13193SETFILE=$ac_cv_path_SETFILE
13194if test -n "$SETFILE"; then
13195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13196$as_echo "$SETFILE" >&6; }
13197else
13198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13199$as_echo "no" >&6; }
13200fi
13201
13202
13203  test -n "$SETFILE" && break
13204done
13205
13206    else
13207      # If it succeeded, then it was overridden by the user. We will use it
13208      # for the tool.
13209
13210      # First remove it from the list of overridden variables, so we can test
13211      # for unknown variables in the end.
13212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13213
13214      # Check if the provided tool contains a complete path.
13215      tool_specified="$SETFILE"
13216      tool_basename="${tool_specified##*/}"
13217      if test "x$tool_basename" = "x$tool_specified"; then
13218        # A command without a complete path is provided, search $PATH.
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13220$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13221        # Extract the first word of "$tool_basename", so it can be a program name with args.
13222set dummy $tool_basename; ac_word=$2
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13224$as_echo_n "checking for $ac_word... " >&6; }
13225if ${ac_cv_path_SETFILE+:} false; then :
13226  $as_echo_n "(cached) " >&6
13227else
13228  case $SETFILE in
13229  [\\/]* | ?:[\\/]*)
13230  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13231  ;;
13232  *)
13233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13234for as_dir in $PATH
13235do
13236  IFS=$as_save_IFS
13237  test -z "$as_dir" && as_dir=.
13238    for ac_exec_ext in '' $ac_executable_extensions; do
13239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13240    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13242    break 2
13243  fi
13244done
13245  done
13246IFS=$as_save_IFS
13247
13248  ;;
13249esac
13250fi
13251SETFILE=$ac_cv_path_SETFILE
13252if test -n "$SETFILE"; then
13253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13254$as_echo "$SETFILE" >&6; }
13255else
13256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13257$as_echo "no" >&6; }
13258fi
13259
13260
13261        if test "x$SETFILE" = x; then
13262          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13263        fi
13264      else
13265        # Otherwise we believe it is a complete path. Use it as it is.
13266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13267$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13269$as_echo_n "checking for SETFILE... " >&6; }
13270        if test ! -x "$tool_specified"; then
13271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13272$as_echo "not found" >&6; }
13273          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13274        fi
13275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13276$as_echo "$tool_specified" >&6; }
13277      fi
13278    fi
13279  fi
13280
13281
13282
13283
13284# Now we can determine OpenJDK build and target platforms. This is required to
13285# have early on.
13286# Make sure we can run config.sub.
13287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13288  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13289
13290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13291$as_echo_n "checking build system type... " >&6; }
13292if ${ac_cv_build+:} false; then :
13293  $as_echo_n "(cached) " >&6
13294else
13295  ac_build_alias=$build_alias
13296test "x$ac_build_alias" = x &&
13297  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13298test "x$ac_build_alias" = x &&
13299  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13301  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13302
13303fi
13304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13305$as_echo "$ac_cv_build" >&6; }
13306case $ac_cv_build in
13307*-*-*) ;;
13308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13309esac
13310build=$ac_cv_build
13311ac_save_IFS=$IFS; IFS='-'
13312set x $ac_cv_build
13313shift
13314build_cpu=$1
13315build_vendor=$2
13316shift; shift
13317# Remember, the first character of IFS is used to create $*,
13318# except with old shells:
13319build_os=$*
13320IFS=$ac_save_IFS
13321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13322
13323
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13325$as_echo_n "checking host system type... " >&6; }
13326if ${ac_cv_host+:} false; then :
13327  $as_echo_n "(cached) " >&6
13328else
13329  if test "x$host_alias" = x; then
13330  ac_cv_host=$ac_cv_build
13331else
13332  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13333    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13334fi
13335
13336fi
13337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13338$as_echo "$ac_cv_host" >&6; }
13339case $ac_cv_host in
13340*-*-*) ;;
13341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13342esac
13343host=$ac_cv_host
13344ac_save_IFS=$IFS; IFS='-'
13345set x $ac_cv_host
13346shift
13347host_cpu=$1
13348host_vendor=$2
13349shift; shift
13350# Remember, the first character of IFS is used to create $*,
13351# except with old shells:
13352host_os=$*
13353IFS=$ac_save_IFS
13354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13355
13356
13357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13358$as_echo_n "checking target system type... " >&6; }
13359if ${ac_cv_target+:} false; then :
13360  $as_echo_n "(cached) " >&6
13361else
13362  if test "x$target_alias" = x; then
13363  ac_cv_target=$ac_cv_host
13364else
13365  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13366    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13367fi
13368
13369fi
13370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13371$as_echo "$ac_cv_target" >&6; }
13372case $ac_cv_target in
13373*-*-*) ;;
13374*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13375esac
13376target=$ac_cv_target
13377ac_save_IFS=$IFS; IFS='-'
13378set x $ac_cv_target
13379shift
13380target_cpu=$1
13381target_vendor=$2
13382shift; shift
13383# Remember, the first character of IFS is used to create $*,
13384# except with old shells:
13385target_os=$*
13386IFS=$ac_save_IFS
13387case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13388
13389
13390# The aliases save the names the user supplied, while $host etc.
13391# will get canonicalized.
13392test -n "$target_alias" &&
13393  test "$program_prefix$program_suffix$program_transform_name" = \
13394    NONENONEs,x,x, &&
13395  program_prefix=${target_alias}-
13396
13397  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13398  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13399  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13400  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13401  # to use the configure naming style.
13402
13403
13404
13405
13406
13407  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13408  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13409  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13410  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13411  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13412  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13413
13414
13415
13416  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13417
13418  case "$build_os" in
13419    *linux*)
13420      VAR_OS=linux
13421      VAR_OS_API=posix
13422      VAR_OS_ENV=linux
13423      ;;
13424    *solaris*)
13425      VAR_OS=solaris
13426      VAR_OS_API=posix
13427      VAR_OS_ENV=solaris
13428      ;;
13429    *darwin*)
13430      VAR_OS=macosx
13431      VAR_OS_API=posix
13432      VAR_OS_ENV=macosx
13433      ;;
13434    *bsd*)
13435      VAR_OS=bsd
13436      VAR_OS_API=posix
13437      VAR_OS_ENV=bsd
13438      ;;
13439    *cygwin*)
13440      VAR_OS=windows
13441      VAR_OS_API=winapi
13442      VAR_OS_ENV=windows.cygwin
13443      ;;
13444    *mingw*)
13445      VAR_OS=windows
13446      VAR_OS_API=winapi
13447      VAR_OS_ENV=windows.msys
13448      ;;
13449    *aix*)
13450      VAR_OS=aix
13451      VAR_OS_API=posix
13452      VAR_OS_ENV=aix
13453      ;;
13454    *)
13455      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13456      ;;
13457  esac
13458
13459
13460  # First argument is the cpu name from the trip/quad
13461  case "$build_cpu" in
13462    x86_64)
13463      VAR_CPU=x86_64
13464      VAR_CPU_ARCH=x86
13465      VAR_CPU_BITS=64
13466      VAR_CPU_ENDIAN=little
13467      ;;
13468    i?86)
13469      VAR_CPU=x86
13470      VAR_CPU_ARCH=x86
13471      VAR_CPU_BITS=32
13472      VAR_CPU_ENDIAN=little
13473      ;;
13474    arm*)
13475      VAR_CPU=arm
13476      VAR_CPU_ARCH=arm
13477      VAR_CPU_BITS=32
13478      VAR_CPU_ENDIAN=little
13479      ;;
13480    powerpc)
13481      VAR_CPU=ppc
13482      VAR_CPU_ARCH=ppc
13483      VAR_CPU_BITS=32
13484      VAR_CPU_ENDIAN=big
13485      ;;
13486    powerpc64)
13487      VAR_CPU=ppc64
13488      VAR_CPU_ARCH=ppc
13489      VAR_CPU_BITS=64
13490      VAR_CPU_ENDIAN=big
13491      ;;
13492    s390)
13493      VAR_CPU=s390
13494      VAR_CPU_ARCH=s390
13495      VAR_CPU_BITS=32
13496      VAR_CPU_ENDIAN=big
13497      ;;
13498    s390x)
13499      VAR_CPU=s390x
13500      VAR_CPU_ARCH=s390
13501      VAR_CPU_BITS=64
13502      VAR_CPU_ENDIAN=big
13503      ;;
13504    sparc)
13505      VAR_CPU=sparc
13506      VAR_CPU_ARCH=sparc
13507      VAR_CPU_BITS=32
13508      VAR_CPU_ENDIAN=big
13509      ;;
13510    sparcv9)
13511      VAR_CPU=sparcv9
13512      VAR_CPU_ARCH=sparc
13513      VAR_CPU_BITS=64
13514      VAR_CPU_ENDIAN=big
13515      ;;
13516    *)
13517      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13518      ;;
13519  esac
13520
13521  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13522  OPENJDK_BUILD_OS="$VAR_OS"
13523  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13524  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13525  OPENJDK_BUILD_CPU="$VAR_CPU"
13526  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13527  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13528  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13529
13530
13531
13532
13533
13534
13535
13536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13537$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13539$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13540
13541  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13542
13543  case "$host_os" in
13544    *linux*)
13545      VAR_OS=linux
13546      VAR_OS_API=posix
13547      VAR_OS_ENV=linux
13548      ;;
13549    *solaris*)
13550      VAR_OS=solaris
13551      VAR_OS_API=posix
13552      VAR_OS_ENV=solaris
13553      ;;
13554    *darwin*)
13555      VAR_OS=macosx
13556      VAR_OS_API=posix
13557      VAR_OS_ENV=macosx
13558      ;;
13559    *bsd*)
13560      VAR_OS=bsd
13561      VAR_OS_API=posix
13562      VAR_OS_ENV=bsd
13563      ;;
13564    *cygwin*)
13565      VAR_OS=windows
13566      VAR_OS_API=winapi
13567      VAR_OS_ENV=windows.cygwin
13568      ;;
13569    *mingw*)
13570      VAR_OS=windows
13571      VAR_OS_API=winapi
13572      VAR_OS_ENV=windows.msys
13573      ;;
13574    *aix*)
13575      VAR_OS=aix
13576      VAR_OS_API=posix
13577      VAR_OS_ENV=aix
13578      ;;
13579    *)
13580      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13581      ;;
13582  esac
13583
13584
13585  # First argument is the cpu name from the trip/quad
13586  case "$host_cpu" in
13587    x86_64)
13588      VAR_CPU=x86_64
13589      VAR_CPU_ARCH=x86
13590      VAR_CPU_BITS=64
13591      VAR_CPU_ENDIAN=little
13592      ;;
13593    i?86)
13594      VAR_CPU=x86
13595      VAR_CPU_ARCH=x86
13596      VAR_CPU_BITS=32
13597      VAR_CPU_ENDIAN=little
13598      ;;
13599    arm*)
13600      VAR_CPU=arm
13601      VAR_CPU_ARCH=arm
13602      VAR_CPU_BITS=32
13603      VAR_CPU_ENDIAN=little
13604      ;;
13605    powerpc)
13606      VAR_CPU=ppc
13607      VAR_CPU_ARCH=ppc
13608      VAR_CPU_BITS=32
13609      VAR_CPU_ENDIAN=big
13610      ;;
13611    powerpc64)
13612      VAR_CPU=ppc64
13613      VAR_CPU_ARCH=ppc
13614      VAR_CPU_BITS=64
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    s390)
13618      VAR_CPU=s390
13619      VAR_CPU_ARCH=s390
13620      VAR_CPU_BITS=32
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    s390x)
13624      VAR_CPU=s390x
13625      VAR_CPU_ARCH=s390
13626      VAR_CPU_BITS=64
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    sparc)
13630      VAR_CPU=sparc
13631      VAR_CPU_ARCH=sparc
13632      VAR_CPU_BITS=32
13633      VAR_CPU_ENDIAN=big
13634      ;;
13635    sparcv9)
13636      VAR_CPU=sparcv9
13637      VAR_CPU_ARCH=sparc
13638      VAR_CPU_BITS=64
13639      VAR_CPU_ENDIAN=big
13640      ;;
13641    *)
13642      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13643      ;;
13644  esac
13645
13646  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13647  OPENJDK_TARGET_OS="$VAR_OS"
13648  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13649  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13650  OPENJDK_TARGET_CPU="$VAR_CPU"
13651  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13652  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13653  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13654
13655
13656
13657
13658
13659
13660
13661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13662$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13664$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13665
13666
13667
13668# Check whether --with-target-bits was given.
13669if test "${with_target_bits+set}" = set; then :
13670  withval=$with_target_bits;
13671fi
13672
13673
13674  # We have three types of compiles:
13675  # native  == normal compilation, target system == build system
13676  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13677  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13678  #
13679  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13680    # We're doing a proper cross-compilation
13681    COMPILE_TYPE="cross"
13682  else
13683    COMPILE_TYPE="native"
13684  fi
13685
13686  if test "x$with_target_bits" != x; then
13687    if test "x$COMPILE_TYPE" = "xcross"; then
13688      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13689    fi
13690
13691    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13692      # A reduced build is requested
13693      COMPILE_TYPE="reduced"
13694      OPENJDK_TARGET_CPU_BITS=32
13695      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13696        OPENJDK_TARGET_CPU=x86
13697      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13698        OPENJDK_TARGET_CPU=sparc
13699      else
13700        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13701      fi
13702    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13703      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
13704    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13705      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13706$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13707    else
13708      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13709    fi
13710  fi
13711
13712
13713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13714$as_echo_n "checking compilation type... " >&6; }
13715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13716$as_echo "$COMPILE_TYPE" >&6; }
13717
13718
13719  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13720    REQUIRED_OS_NAME=SunOS
13721    REQUIRED_OS_VERSION=5.10
13722  fi
13723  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13724    REQUIRED_OS_NAME=Linux
13725    REQUIRED_OS_VERSION=2.6
13726  fi
13727  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13728    REQUIRED_OS_NAME=Windows
13729    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13730      REQUIRED_OS_VERSION=5.2
13731    else
13732      REQUIRED_OS_VERSION=5.1
13733    fi
13734  fi
13735  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13736    REQUIRED_OS_NAME=Darwin
13737    REQUIRED_OS_VERSION=11.2
13738  fi
13739
13740
13741
13742
13743
13744  # Also store the legacy naming of the cpu.
13745  # Ie i586 and amd64 instead of x86 and x86_64
13746  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13747  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13748    OPENJDK_TARGET_CPU_LEGACY="i586"
13749  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13750    # On all platforms except MacOSX replace x86_64 with amd64.
13751    OPENJDK_TARGET_CPU_LEGACY="amd64"
13752  fi
13753
13754
13755  # And the second legacy naming of the cpu.
13756  # Ie i386 and amd64 instead of x86 and x86_64.
13757  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13758  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13759    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13760  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13761    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13762  fi
13763
13764
13765  # This is the name of the cpu (but using i386 and amd64 instead of
13766  # x86 and x86_64, respectively), preceeded by a /, to be used when
13767  # locating libraries. On macosx, it's empty, though.
13768  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13769  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13770    OPENJDK_TARGET_CPU_LIBDIR=""
13771  fi
13772
13773
13774  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13775  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13776  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13777  OPENJDK_TARGET_CPU_ISADIR=""
13778  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13779    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13780      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13781    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13782      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13783    fi
13784  fi
13785
13786
13787  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13788  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13789  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13790    # On linux only, we replace x86 with i386.
13791    OPENJDK_TARGET_CPU_OSARCH="i386"
13792  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13793    # On all platforms except macosx, we replace x86_64 with amd64.
13794    OPENJDK_TARGET_CPU_OSARCH="amd64"
13795  fi
13796
13797
13798  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13799  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13800    OPENJDK_TARGET_CPU_JLI="i386"
13801  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13802    # On all platforms except macosx, we replace x86_64 with amd64.
13803    OPENJDK_TARGET_CPU_JLI="amd64"
13804  fi
13805  # Now setup the -D flags for building libjli.
13806  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13807  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13808    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13809      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13810    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13811      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13812    fi
13813  fi
13814
13815
13816  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13817  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13818    OPENJDK_TARGET_OS_API_DIR="solaris"
13819  fi
13820  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13821    OPENJDK_TARGET_OS_API_DIR="windows"
13822  fi
13823
13824
13825  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13826      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13827  else
13828      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13829  fi
13830
13831
13832  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13833    A_LP64="LP64:="
13834    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13835    # unpack200.exe
13836    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13837      ADD_LP64="-D_LP64=1"
13838    fi
13839  fi
13840  LP64=$A_LP64
13841
13842
13843  if test "x$COMPILE_TYPE" = "xcross"; then
13844    # FIXME: ... or should this include reduced builds..?
13845    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13846  else
13847    DEFINE_CROSS_COMPILE_ARCH=""
13848  fi
13849
13850
13851  # ZERO_ARCHDEF is used to enable architecture-specific code
13852  case "${OPENJDK_TARGET_CPU}" in
13853    ppc*)    ZERO_ARCHDEF=PPC   ;;
13854    s390*)   ZERO_ARCHDEF=S390  ;;
13855    sparc*)  ZERO_ARCHDEF=SPARC ;;
13856    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13857    x86)     ZERO_ARCHDEF=IA32  ;;
13858    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13859  esac
13860
13861
13862
13863
13864# Continue setting up basic stuff. Most remaining code require fundamental tools.
13865
13866  # Locate the directory of this script.
13867  SCRIPT="$0"
13868  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13869
13870  # Where is the source? It is located two levels above the configure script.
13871  CURDIR="$PWD"
13872  cd "$AUTOCONF_DIR/../.."
13873  SRC_ROOT="`$THEPWDCMD -L`"
13874
13875  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13876    PATH_SEP=";"
13877
13878  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13879  if test $SRC_ROOT_LENGTH -gt 100; then
13880    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13881  fi
13882
13883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13885$as_echo_n "checking cygwin release... " >&6; }
13886    CYGWIN_VERSION=`$UNAME -r`
13887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13888$as_echo "$CYGWIN_VERSION" >&6; }
13889    WINDOWS_ENV_VENDOR='cygwin'
13890    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13891
13892    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13893    if test "x$CYGWIN_VERSION_OK" = x; then
13894      { $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
13895$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;}
13896      as_fn_error $? "Cannot continue" "$LINENO" 5
13897    fi
13898    if test "x$CYGPATH" = x; then
13899      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13900    fi
13901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13902$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13903    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13904    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13905    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13906    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13908$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13909    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13910    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13911    if test "x$test_cygdrive_prefix" = x; then
13912      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13913    fi
13914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13916$as_echo_n "checking msys release... " >&6; }
13917    MSYS_VERSION=`$UNAME -r`
13918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13919$as_echo "$MSYS_VERSION" >&6; }
13920
13921    WINDOWS_ENV_VENDOR='msys'
13922    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13923
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13925$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13926    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13927    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13928
13929  windows_path="$MSYS_ROOT_PATH"
13930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13931    unix_path=`$CYGPATH -u "$windows_path"`
13932    MSYS_ROOT_PATH="$unix_path"
13933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13935    MSYS_ROOT_PATH="$unix_path"
13936  fi
13937
13938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13939$as_echo "$MSYS_ROOT_PATH" >&6; }
13940    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13941  else
13942    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13943  fi
13944
13945  # Test if windows or unix (cygwin/msys) find is first in path.
13946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13947$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13948  FIND_BINARY_OUTPUT=`find --version 2>&1`
13949  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13951$as_echo "unix style" >&6; }
13952  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13954$as_echo "Windows" >&6; }
13955    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13956$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13957    { $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
13958$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13959    as_fn_error $? "Cannot continue" "$LINENO" 5
13960  else
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13962$as_echo "unknown" >&6; }
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13964$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13965  fi
13966
13967  else
13968    PATH_SEP=":"
13969  fi
13970
13971
13972
13973  cd "$CURDIR"
13974
13975
13976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13977
13978  # Input might be given as Windows format, start by converting to
13979  # unix format.
13980  path="$SRC_ROOT"
13981  new_path=`$CYGPATH -u "$path"`
13982
13983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13986  # "foo.exe" is OK but "foo" is an error.
13987  #
13988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13989  # It is also a way to make sure we got the proper file name for the real test later on.
13990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13991  if test "x$test_shortpath" = x; then
13992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13993$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13994    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13995  fi
13996
13997  # Call helper function which possibly converts this using DOS-style short mode.
13998  # If so, the updated path is stored in $new_path.
13999
14000  input_path="$new_path"
14001  # Check if we need to convert this using DOS-style short mode. If the path
14002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14003  # take no chances and rewrite it.
14004  # Note: m4 eats our [], so we need to use [ and ] instead.
14005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14006  if test "x$has_forbidden_chars" != x; then
14007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14011      # Going to short mode and back again did indeed matter. Since short mode is
14012      # case insensitive, let's make it lowercase to improve readability.
14013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14014      # Now convert it back to Unix-stile (cygpath)
14015      input_path=`$CYGPATH -u "$shortmode_path"`
14016      new_path="$input_path"
14017    fi
14018  fi
14019
14020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14021  if test "x$test_cygdrive_prefix" = x; then
14022    # As a simple fix, exclude /usr/bin since it's not a real path.
14023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14025      # a path prefixed by /cygdrive for fixpath to work.
14026      new_path="$CYGWIN_ROOT_PATH$input_path"
14027    fi
14028  fi
14029
14030
14031  if test "x$path" != "x$new_path"; then
14032    SRC_ROOT="$new_path"
14033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
14034$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
14035  fi
14036
14037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14038
14039  path="$SRC_ROOT"
14040  has_colon=`$ECHO $path | $GREP ^.:`
14041  new_path="$path"
14042  if test "x$has_colon" = x; then
14043    # Not in mixed or Windows style, start by that.
14044    new_path=`cmd //c echo $path`
14045  fi
14046
14047
14048  input_path="$new_path"
14049  # Check if we need to convert this using DOS-style short mode. If the path
14050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14051  # take no chances and rewrite it.
14052  # Note: m4 eats our [], so we need to use [ and ] instead.
14053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14054  if test "x$has_forbidden_chars" != x; then
14055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14057  fi
14058
14059
14060  windows_path="$new_path"
14061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14062    unix_path=`$CYGPATH -u "$windows_path"`
14063    new_path="$unix_path"
14064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14066    new_path="$unix_path"
14067  fi
14068
14069  if test "x$path" != "x$new_path"; then
14070    SRC_ROOT="$new_path"
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
14072$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
14073  fi
14074
14075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14077
14078  else
14079    # We're on a posix platform. Hooray! :)
14080    path="$SRC_ROOT"
14081    has_space=`$ECHO "$path" | $GREP " "`
14082    if test "x$has_space" != x; then
14083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
14084$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
14085      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14086    fi
14087
14088    # Use eval to expand a potential ~
14089    eval path="$path"
14090    if test ! -f "$path" && test ! -d "$path"; then
14091      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14092    fi
14093
14094    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
14095  fi
14096
14097
14098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14099
14100  # Input might be given as Windows format, start by converting to
14101  # unix format.
14102  path="$CURDIR"
14103  new_path=`$CYGPATH -u "$path"`
14104
14105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14108  # "foo.exe" is OK but "foo" is an error.
14109  #
14110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14111  # It is also a way to make sure we got the proper file name for the real test later on.
14112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14113  if test "x$test_shortpath" = x; then
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14115$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14116    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14117  fi
14118
14119  # Call helper function which possibly converts this using DOS-style short mode.
14120  # If so, the updated path is stored in $new_path.
14121
14122  input_path="$new_path"
14123  # Check if we need to convert this using DOS-style short mode. If the path
14124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14125  # take no chances and rewrite it.
14126  # Note: m4 eats our [], so we need to use [ and ] instead.
14127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14128  if test "x$has_forbidden_chars" != x; then
14129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14133      # Going to short mode and back again did indeed matter. Since short mode is
14134      # case insensitive, let's make it lowercase to improve readability.
14135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14136      # Now convert it back to Unix-stile (cygpath)
14137      input_path=`$CYGPATH -u "$shortmode_path"`
14138      new_path="$input_path"
14139    fi
14140  fi
14141
14142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14143  if test "x$test_cygdrive_prefix" = x; then
14144    # As a simple fix, exclude /usr/bin since it's not a real path.
14145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14147      # a path prefixed by /cygdrive for fixpath to work.
14148      new_path="$CYGWIN_ROOT_PATH$input_path"
14149    fi
14150  fi
14151
14152
14153  if test "x$path" != "x$new_path"; then
14154    CURDIR="$new_path"
14155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14156$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14157  fi
14158
14159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14160
14161  path="$CURDIR"
14162  has_colon=`$ECHO $path | $GREP ^.:`
14163  new_path="$path"
14164  if test "x$has_colon" = x; then
14165    # Not in mixed or Windows style, start by that.
14166    new_path=`cmd //c echo $path`
14167  fi
14168
14169
14170  input_path="$new_path"
14171  # Check if we need to convert this using DOS-style short mode. If the path
14172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14173  # take no chances and rewrite it.
14174  # Note: m4 eats our [], so we need to use [ and ] instead.
14175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14176  if test "x$has_forbidden_chars" != x; then
14177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14179  fi
14180
14181
14182  windows_path="$new_path"
14183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14184    unix_path=`$CYGPATH -u "$windows_path"`
14185    new_path="$unix_path"
14186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14188    new_path="$unix_path"
14189  fi
14190
14191  if test "x$path" != "x$new_path"; then
14192    CURDIR="$new_path"
14193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14194$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14195  fi
14196
14197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14199
14200  else
14201    # We're on a posix platform. Hooray! :)
14202    path="$CURDIR"
14203    has_space=`$ECHO "$path" | $GREP " "`
14204    if test "x$has_space" != x; then
14205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14206$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14207      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14208    fi
14209
14210    # Use eval to expand a potential ~
14211    eval path="$path"
14212    if test ! -f "$path" && test ! -d "$path"; then
14213      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14214    fi
14215
14216    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14217  fi
14218
14219
14220  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14221    # Add extra search paths on solaris for utilities like ar and as etc...
14222    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14223  fi
14224
14225  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14226  # is not correct.
14227
14228# Check whether --with-sys-root was given.
14229if test "${with_sys_root+set}" = set; then :
14230  withval=$with_sys_root;
14231fi
14232
14233
14234  if test "x$with_sys_root" != x; then
14235    SYS_ROOT=$with_sys_root
14236  else
14237    SYS_ROOT=/
14238  fi
14239
14240
14241
14242# Check whether --with-tools-dir was given.
14243if test "${with_tools_dir+set}" = set; then :
14244  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14245
14246fi
14247
14248
14249
14250# Check whether --with-devkit was given.
14251if test "${with_devkit+set}" = set; then :
14252  withval=$with_devkit;
14253        if test "x$with_sys_root" != x; then
14254          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14255        fi
14256
14257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14258
14259  # Input might be given as Windows format, start by converting to
14260  # unix format.
14261  path="$with_devkit"
14262  new_path=`$CYGPATH -u "$path"`
14263
14264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14267  # "foo.exe" is OK but "foo" is an error.
14268  #
14269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14270  # It is also a way to make sure we got the proper file name for the real test later on.
14271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14272  if test "x$test_shortpath" = x; then
14273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14274$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14275    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14276  fi
14277
14278  # Call helper function which possibly converts this using DOS-style short mode.
14279  # If so, the updated path is stored in $new_path.
14280
14281  input_path="$new_path"
14282  # Check if we need to convert this using DOS-style short mode. If the path
14283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14284  # take no chances and rewrite it.
14285  # Note: m4 eats our [], so we need to use [ and ] instead.
14286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14287  if test "x$has_forbidden_chars" != x; then
14288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14292      # Going to short mode and back again did indeed matter. Since short mode is
14293      # case insensitive, let's make it lowercase to improve readability.
14294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14295      # Now convert it back to Unix-stile (cygpath)
14296      input_path=`$CYGPATH -u "$shortmode_path"`
14297      new_path="$input_path"
14298    fi
14299  fi
14300
14301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14302  if test "x$test_cygdrive_prefix" = x; then
14303    # As a simple fix, exclude /usr/bin since it's not a real path.
14304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14306      # a path prefixed by /cygdrive for fixpath to work.
14307      new_path="$CYGWIN_ROOT_PATH$input_path"
14308    fi
14309  fi
14310
14311
14312  if test "x$path" != "x$new_path"; then
14313    with_devkit="$new_path"
14314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14315$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14316  fi
14317
14318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14319
14320  path="$with_devkit"
14321  has_colon=`$ECHO $path | $GREP ^.:`
14322  new_path="$path"
14323  if test "x$has_colon" = x; then
14324    # Not in mixed or Windows style, start by that.
14325    new_path=`cmd //c echo $path`
14326  fi
14327
14328
14329  input_path="$new_path"
14330  # Check if we need to convert this using DOS-style short mode. If the path
14331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14332  # take no chances and rewrite it.
14333  # Note: m4 eats our [], so we need to use [ and ] instead.
14334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14335  if test "x$has_forbidden_chars" != x; then
14336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14338  fi
14339
14340
14341  windows_path="$new_path"
14342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14343    unix_path=`$CYGPATH -u "$windows_path"`
14344    new_path="$unix_path"
14345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14347    new_path="$unix_path"
14348  fi
14349
14350  if test "x$path" != "x$new_path"; then
14351    with_devkit="$new_path"
14352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14353$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14354  fi
14355
14356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14358
14359  else
14360    # We're on a posix platform. Hooray! :)
14361    path="$with_devkit"
14362    has_space=`$ECHO "$path" | $GREP " "`
14363    if test "x$has_space" != x; then
14364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14365$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14367    fi
14368
14369    # Use eval to expand a potential ~
14370    eval path="$path"
14371    if test ! -f "$path" && test ! -d "$path"; then
14372      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14373    fi
14374
14375    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14376  fi
14377
14378
14379  if test "x$TOOLS_DIR" = x; then
14380    TOOLS_DIR="$with_devkit/bin"
14381  else
14382    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14383  fi
14384
14385        if test -d "$with_devkit/$host_alias/libc"; then
14386          SYS_ROOT=$with_devkit/$host_alias/libc
14387        elif test -d "$with_devkit/$host/sys-root"; then
14388          SYS_ROOT=$with_devkit/$host/sys-root
14389        fi
14390
14391fi
14392
14393
14394
14395  # Setup default logging of stdout and stderr to build.log in the output root.
14396  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14397  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14398  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14399
14400
14401
14402
14403
14404# Check if it's a pure open build or if custom sources are to be used.
14405
14406  # Check whether --enable-openjdk-only was given.
14407if test "${enable_openjdk_only+set}" = set; then :
14408  enableval=$enable_openjdk_only;
14409else
14410  enable_openjdk_only="no"
14411fi
14412
14413
14414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14415$as_echo_n "checking for presence of closed sources... " >&6; }
14416  if test -d "$SRC_ROOT/jdk/src/closed"; then
14417    CLOSED_SOURCE_PRESENT=yes
14418  else
14419    CLOSED_SOURCE_PRESENT=no
14420  fi
14421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14422$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14423
14424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14425$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14426  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14428$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14429
14430  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14431    OPENJDK=true
14432    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14434$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14435    fi
14436  else
14437    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14438      OPENJDK=true
14439    else
14440      OPENJDK=false
14441    fi
14442  fi
14443
14444  if test "x$OPENJDK" = "xtrue"; then
14445    SET_OPENJDK="OPENJDK=true"
14446  fi
14447
14448
14449
14450  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14451  # the IncludeCustomExtension macro.
14452
14453
14454# Check whether --with-custom-make-dir was given.
14455if test "${with_custom_make_dir+set}" = set; then :
14456  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
14457$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14458fi
14459
14460
14461
14462
14463# These are needed to be able to create a configuration name (and thus the output directory)
14464
14465  ###############################################################################
14466  #
14467  # Check which variant of the JDK that we want to build.
14468  # Currently we have:
14469  #    normal:   standard edition
14470  # but the custom make system may add other variants
14471  #
14472  # Effectively the JDK variant gives a name to a specific set of
14473  # modules to compile into the JDK. In the future, these modules
14474  # might even be Jigsaw modules.
14475  #
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14477$as_echo_n "checking which variant of the JDK to build... " >&6; }
14478
14479# Check whether --with-jdk-variant was given.
14480if test "${with_jdk_variant+set}" = set; then :
14481  withval=$with_jdk_variant;
14482fi
14483
14484
14485  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14486    JDK_VARIANT="normal"
14487  else
14488    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14489  fi
14490
14491
14492
14493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14494$as_echo "$JDK_VARIANT" >&6; }
14495
14496
14497###############################################################################
14498#
14499# Check which interpreter of the JVM we want to build.
14500# Currently we have:
14501#    template: Template interpreter (the default)
14502#    cpp     : C++ interpreter
14503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14504$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14505
14506# Check whether --with-jvm-interpreter was given.
14507if test "${with_jvm_interpreter+set}" = set; then :
14508  withval=$with_jvm_interpreter;
14509fi
14510
14511
14512if test "x$with_jvm_interpreter" = x; then
14513     with_jvm_interpreter="template"
14514fi
14515
14516JVM_INTERPRETER="$with_jvm_interpreter"
14517
14518if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14519   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14520fi
14521
14522
14523
14524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14525$as_echo "$with_jvm_interpreter" >&6; }
14526
14527
14528
14529  ###############################################################################
14530  #
14531  # Check which variants of the JVM that we want to build.
14532  # Currently we have:
14533  #    server: normal interpreter and a tiered C1/C2 compiler
14534  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14535  #    minimal1: reduced form of client with optional VM services and features stripped out
14536  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14537  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14538  #    zero: no machine code interpreter, no compiler
14539  #    zeroshark: zero interpreter and shark/llvm compiler backend
14540#    core: interpreter only, no compiler (only works on some platforms)
14541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14542$as_echo_n "checking which variants of the JVM to build... " >&6; }
14543
14544# Check whether --with-jvm-variants was given.
14545if test "${with_jvm_variants+set}" = set; then :
14546  withval=$with_jvm_variants;
14547fi
14548
14549
14550  if test "x$with_jvm_variants" = x; then
14551    with_jvm_variants="server"
14552  fi
14553
14554  JVM_VARIANTS=",$with_jvm_variants,"
14555  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,//'`
14556
14557  if test "x$TEST_VARIANTS" != "x,"; then
14558     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14559  fi
14560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14561$as_echo "$with_jvm_variants" >&6; }
14562
14563  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14564  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14565  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14566  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14567  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14568  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14569  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14570
14571  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14572    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14573      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14574    fi
14575  fi
14576  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14577    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14578      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14579    fi
14580  fi
14581  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14582    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14583      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14584    fi
14585  fi
14586
14587  # Replace the commas with AND for use in the build directory name.
14588  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14589  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/'`
14590  if test "x$COUNT_VARIANTS" != "x,1"; then
14591    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14592  else
14593    BUILDING_MULTIPLE_JVM_VARIANTS=no
14594  fi
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605  INCLUDE_SA=true
14606  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14607    INCLUDE_SA=false
14608  fi
14609  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14610    INCLUDE_SA=false
14611  fi
14612  if test "x$VAR_CPU" = xppc64 ; then
14613    INCLUDE_SA=false
14614  fi
14615
14616
14617  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14618    MACOSX_UNIVERSAL="true"
14619  fi
14620
14621
14622
14623
14624  ###############################################################################
14625  #
14626  # Set the debug level
14627  #    release: no debug information, all optimizations, no asserts.
14628  #    fastdebug: debug information (-g), all optimizations, all asserts
14629  #    slowdebug: debug information (-g), no optimizations, all asserts
14630  #
14631  DEBUG_LEVEL="release"
14632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14633$as_echo_n "checking which debug level to use... " >&6; }
14634  # Check whether --enable-debug was given.
14635if test "${enable_debug+set}" = set; then :
14636  enableval=$enable_debug;
14637        ENABLE_DEBUG="${enableval}"
14638        DEBUG_LEVEL="fastdebug"
14639
14640else
14641  ENABLE_DEBUG="no"
14642fi
14643
14644
14645
14646# Check whether --with-debug-level was given.
14647if test "${with_debug_level+set}" = set; then :
14648  withval=$with_debug_level;
14649        DEBUG_LEVEL="${withval}"
14650        if test "x$ENABLE_DEBUG" = xyes; then
14651          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14652        fi
14653
14654fi
14655
14656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14657$as_echo "$DEBUG_LEVEL" >&6; }
14658
14659  if test "x$DEBUG_LEVEL" != xrelease && \
14660      test "x$DEBUG_LEVEL" != xfastdebug && \
14661      test "x$DEBUG_LEVEL" != xslowdebug; then
14662    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14663  fi
14664
14665
14666  ###############################################################################
14667  #
14668  # Setup legacy vars/targets and new vars to deal with different debug levels.
14669  #
14670
14671  case $DEBUG_LEVEL in
14672    release )
14673      VARIANT="OPT"
14674      FASTDEBUG="false"
14675      DEBUG_CLASSFILES="false"
14676      BUILD_VARIANT_RELEASE=""
14677      HOTSPOT_DEBUG_LEVEL="product"
14678      HOTSPOT_EXPORT="product"
14679      ;;
14680    fastdebug )
14681      VARIANT="DBG"
14682      FASTDEBUG="true"
14683      DEBUG_CLASSFILES="true"
14684      BUILD_VARIANT_RELEASE="-fastdebug"
14685      HOTSPOT_DEBUG_LEVEL="fastdebug"
14686      HOTSPOT_EXPORT="fastdebug"
14687      ;;
14688    slowdebug )
14689      VARIANT="DBG"
14690      FASTDEBUG="false"
14691      DEBUG_CLASSFILES="true"
14692      BUILD_VARIANT_RELEASE="-debug"
14693      HOTSPOT_DEBUG_LEVEL="jvmg"
14694      HOTSPOT_EXPORT="debug"
14695      ;;
14696  esac
14697
14698  #####
14699  # Generate the legacy makefile targets for hotspot.
14700  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14701  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14702  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14703  # But until then ...
14704  HOTSPOT_TARGET=""
14705
14706  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14707    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14708  fi
14709
14710  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14711    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14712  fi
14713
14714  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14715    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14716  fi
14717
14718  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14719    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14720  fi
14721
14722  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14723    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14724  fi
14725
14726  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14727    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14728  fi
14729
14730  if test "x$JVM_VARIANT_CORE" = xtrue; then
14731    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14732  fi
14733
14734  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14735
14736  # On Macosx universal binaries are produced, but they only contain
14737  # 64 bit intel. This invalidates control of which jvms are built
14738  # from configure, but only server is valid anyway. Fix this
14739  # when hotspot makefiles are rewritten.
14740  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14741    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14742  fi
14743
14744  #####
14745
14746
14747
14748
14749
14750
14751
14752
14753# With basic setup done, call the custom early hook.
14754
14755
14756# To properly create a configuration name, we need to have the OpenJDK target
14757# and options (variants and debug level) parsed.
14758
14759
14760
14761# Check whether --with-conf-name was given.
14762if test "${with_conf_name+set}" = set; then :
14763  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14764fi
14765
14766
14767  # Test from where we are running configure, in or outside of src root.
14768  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14769      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14770      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14771    # We are running configure from the src root.
14772    # Create a default ./build/target-variant-debuglevel output root.
14773    if test "x${CONF_NAME}" = x; then
14774      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14775    fi
14776    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14777    $MKDIR -p "$OUTPUT_ROOT"
14778    if test ! -d "$OUTPUT_ROOT"; then
14779      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14780    fi
14781  else
14782    # We are running configure from outside of the src dir.
14783    # Then use the current directory as output dir!
14784    # If configuration is situated in normal build directory, just use the build
14785    # directory name as configuration name, otherwise use the complete path.
14786    if test "x${CONF_NAME}" = x; then
14787      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14788    fi
14789    OUTPUT_ROOT="$CURDIR"
14790
14791    # WARNING: This might be a bad thing to do. You need to be sure you want to
14792    # have a configuration in this directory. Do some sanity checks!
14793
14794    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14795      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14796      # other files
14797      files_present=`$LS $OUTPUT_ROOT`
14798      # Configure has already touched config.log and confdefs.h in the current dir when this check
14799      # is performed.
14800      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14801      | $TR -d '\n'`
14802      if test "x$filtered_files" != x; then
14803        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14804$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14805        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14806$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14807        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14808$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14809        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14810$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14812$as_echo "$as_me: seriously mess up just about everything." >&6;}
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14814$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14816$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14817        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14818      fi
14819    fi
14820  fi
14821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14822$as_echo_n "checking what configuration name to use... " >&6; }
14823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14824$as_echo "$CONF_NAME" >&6; }
14825
14826
14827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828
14829  # Input might be given as Windows format, start by converting to
14830  # unix format.
14831  path="$OUTPUT_ROOT"
14832  new_path=`$CYGPATH -u "$path"`
14833
14834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14837  # "foo.exe" is OK but "foo" is an error.
14838  #
14839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14840  # It is also a way to make sure we got the proper file name for the real test later on.
14841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14842  if test "x$test_shortpath" = x; then
14843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14844$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14845    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14846  fi
14847
14848  # Call helper function which possibly converts this using DOS-style short mode.
14849  # If so, the updated path is stored in $new_path.
14850
14851  input_path="$new_path"
14852  # Check if we need to convert this using DOS-style short mode. If the path
14853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14854  # take no chances and rewrite it.
14855  # Note: m4 eats our [], so we need to use [ and ] instead.
14856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14857  if test "x$has_forbidden_chars" != x; then
14858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14862      # Going to short mode and back again did indeed matter. Since short mode is
14863      # case insensitive, let's make it lowercase to improve readability.
14864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14865      # Now convert it back to Unix-stile (cygpath)
14866      input_path=`$CYGPATH -u "$shortmode_path"`
14867      new_path="$input_path"
14868    fi
14869  fi
14870
14871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14872  if test "x$test_cygdrive_prefix" = x; then
14873    # As a simple fix, exclude /usr/bin since it's not a real path.
14874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14876      # a path prefixed by /cygdrive for fixpath to work.
14877      new_path="$CYGWIN_ROOT_PATH$input_path"
14878    fi
14879  fi
14880
14881
14882  if test "x$path" != "x$new_path"; then
14883    OUTPUT_ROOT="$new_path"
14884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14885$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14886  fi
14887
14888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889
14890  path="$OUTPUT_ROOT"
14891  has_colon=`$ECHO $path | $GREP ^.:`
14892  new_path="$path"
14893  if test "x$has_colon" = x; then
14894    # Not in mixed or Windows style, start by that.
14895    new_path=`cmd //c echo $path`
14896  fi
14897
14898
14899  input_path="$new_path"
14900  # Check if we need to convert this using DOS-style short mode. If the path
14901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14902  # take no chances and rewrite it.
14903  # Note: m4 eats our [], so we need to use [ and ] instead.
14904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14905  if test "x$has_forbidden_chars" != x; then
14906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14908  fi
14909
14910
14911  windows_path="$new_path"
14912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14913    unix_path=`$CYGPATH -u "$windows_path"`
14914    new_path="$unix_path"
14915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14917    new_path="$unix_path"
14918  fi
14919
14920  if test "x$path" != "x$new_path"; then
14921    OUTPUT_ROOT="$new_path"
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14923$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14924  fi
14925
14926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14928
14929  else
14930    # We're on a posix platform. Hooray! :)
14931    path="$OUTPUT_ROOT"
14932    has_space=`$ECHO "$path" | $GREP " "`
14933    if test "x$has_space" != x; then
14934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14935$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14937    fi
14938
14939    # Use eval to expand a potential ~
14940    eval path="$path"
14941    if test ! -f "$path" && test ! -d "$path"; then
14942      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14943    fi
14944
14945    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14946  fi
14947
14948
14949  SPEC=$OUTPUT_ROOT/spec.gmk
14950
14951  CONF_NAME=$CONF_NAME
14952
14953  OUTPUT_ROOT=$OUTPUT_ROOT
14954
14955
14956  # Most of the probed defines are put into config.h
14957  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14958
14959  # The spec.gmk file contains all variables for the make system.
14960  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14961
14962  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14963  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14964
14965  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14966  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14967
14968  # The compare.sh is used to compare the build output to other builds.
14969  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14970
14971  # Spec.sh is currently used by compare-objects.sh
14972  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14973
14974  # The generated Makefile knows where the spec.gmk is and where the source is.
14975  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14976  # which will look for generated configurations
14977  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14978
14979
14980
14981# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14982
14983  for ac_prog in apt-get yum port pkgutil pkgadd
14984do
14985  # Extract the first word of "$ac_prog", so it can be a program name with args.
14986set dummy $ac_prog; ac_word=$2
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14988$as_echo_n "checking for $ac_word... " >&6; }
14989if ${ac_cv_prog_PKGHANDLER+:} false; then :
14990  $as_echo_n "(cached) " >&6
14991else
14992  if test -n "$PKGHANDLER"; then
14993  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14994else
14995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14996for as_dir in $PATH
14997do
14998  IFS=$as_save_IFS
14999  test -z "$as_dir" && as_dir=.
15000    for ac_exec_ext in '' $ac_executable_extensions; do
15001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15002    ac_cv_prog_PKGHANDLER="$ac_prog"
15003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15004    break 2
15005  fi
15006done
15007  done
15008IFS=$as_save_IFS
15009
15010fi
15011fi
15012PKGHANDLER=$ac_cv_prog_PKGHANDLER
15013if test -n "$PKGHANDLER"; then
15014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15015$as_echo "$PKGHANDLER" >&6; }
15016else
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15018$as_echo "no" >&6; }
15019fi
15020
15021
15022  test -n "$PKGHANDLER" && break
15023done
15024
15025
15026
15027# Setup tools that requires more complex handling, or that is not needed by the configure script.
15028
15029
15030  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15031  if test "x$MAKE" != x; then
15032    # User has supplied a make, test it.
15033    if test ! -f "$MAKE"; then
15034      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15035    fi
15036
15037  MAKE_CANDIDATE=""$MAKE""
15038  DESCRIPTION="user supplied MAKE=$MAKE"
15039  if test "x$MAKE_CANDIDATE" != x; then
15040    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15041$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15042    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15043    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15044    if test "x$IS_GNU_MAKE" = x; then
15045      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15046$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15047    else
15048      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15049      if test "x$IS_MODERN_MAKE" = x; then
15050        { $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
15051$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;}
15052      else
15053        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15054          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15055            MAKE_EXPECTED_ENV='cygwin'
15056          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15057            MAKE_EXPECTED_ENV='msys'
15058          else
15059            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15060          fi
15061          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15062          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15063        else
15064          # Not relevant for non-Windows
15065          IS_MAKE_CORRECT_ENV=true
15066        fi
15067        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15068          { $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
15069$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;}
15070        else
15071          FOUND_MAKE=$MAKE_CANDIDATE
15072
15073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15074
15075  # First separate the path from the arguments. This will split at the first
15076  # space.
15077  complete="$FOUND_MAKE"
15078  path="${complete%% *}"
15079  tmp="$complete EOL"
15080  arguments="${tmp#* }"
15081
15082  # Input might be given as Windows format, start by converting to
15083  # unix format.
15084  new_path=`$CYGPATH -u "$path"`
15085
15086  # Now try to locate executable using which
15087  new_path=`$WHICH "$new_path" 2> /dev/null`
15088  # bat and cmd files are not always considered executable in cygwin causing which
15089  # to not find them
15090  if test "x$new_path" = x \
15091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15093    new_path=`$CYGPATH -u "$path"`
15094  fi
15095  if test "x$new_path" = x; then
15096    # Oops. Which didn't find the executable.
15097    # The splitting of arguments from the executable at a space might have been incorrect,
15098    # since paths with space are more likely in Windows. Give it another try with the whole
15099    # argument.
15100    path="$complete"
15101    arguments="EOL"
15102    new_path=`$CYGPATH -u "$path"`
15103    new_path=`$WHICH "$new_path" 2> /dev/null`
15104    # bat and cmd files are not always considered executable in cygwin causing which
15105    # to not find them
15106    if test "x$new_path" = x \
15107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15109      new_path=`$CYGPATH -u "$path"`
15110    fi
15111    if test "x$new_path" = x; then
15112      # It's still not found. Now this is an unrecoverable error.
15113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15115      has_space=`$ECHO "$complete" | $GREP " "`
15116      if test "x$has_space" != x; then
15117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15119      fi
15120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15121    fi
15122  fi
15123
15124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15127  # "foo.exe" is OK but "foo" is an error.
15128  #
15129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15130  # It is also a way to make sure we got the proper file name for the real test later on.
15131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15132  if test "x$test_shortpath" = x; then
15133    # Short path failed, file does not exist as specified.
15134    # Try adding .exe or .cmd
15135    if test -f "${new_path}.exe"; then
15136      input_to_shortpath="${new_path}.exe"
15137    elif test -f "${new_path}.cmd"; then
15138      input_to_shortpath="${new_path}.cmd"
15139    else
15140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15141$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15145    fi
15146  else
15147    input_to_shortpath="$new_path"
15148  fi
15149
15150  # Call helper function which possibly converts this using DOS-style short mode.
15151  # If so, the updated path is stored in $new_path.
15152  new_path="$input_to_shortpath"
15153
15154  input_path="$input_to_shortpath"
15155  # Check if we need to convert this using DOS-style short mode. If the path
15156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15157  # take no chances and rewrite it.
15158  # Note: m4 eats our [], so we need to use [ and ] instead.
15159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15160  if test "x$has_forbidden_chars" != x; then
15161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15165      # Going to short mode and back again did indeed matter. Since short mode is
15166      # case insensitive, let's make it lowercase to improve readability.
15167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15168      # Now convert it back to Unix-stile (cygpath)
15169      input_path=`$CYGPATH -u "$shortmode_path"`
15170      new_path="$input_path"
15171    fi
15172  fi
15173
15174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15175  if test "x$test_cygdrive_prefix" = x; then
15176    # As a simple fix, exclude /usr/bin since it's not a real path.
15177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15179      # a path prefixed by /cygdrive for fixpath to work.
15180      new_path="$CYGWIN_ROOT_PATH$input_path"
15181    fi
15182  fi
15183
15184  # remove trailing .exe if any
15185  new_path="${new_path/%.exe/}"
15186
15187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15188
15189  # First separate the path from the arguments. This will split at the first
15190  # space.
15191  complete="$FOUND_MAKE"
15192  path="${complete%% *}"
15193  tmp="$complete EOL"
15194  arguments="${tmp#* }"
15195
15196  # Input might be given as Windows format, start by converting to
15197  # unix format.
15198  new_path="$path"
15199
15200  windows_path="$new_path"
15201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15202    unix_path=`$CYGPATH -u "$windows_path"`
15203    new_path="$unix_path"
15204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15206    new_path="$unix_path"
15207  fi
15208
15209
15210  # Now try to locate executable using which
15211  new_path=`$WHICH "$new_path" 2> /dev/null`
15212
15213  if test "x$new_path" = x; then
15214    # Oops. Which didn't find the executable.
15215    # The splitting of arguments from the executable at a space might have been incorrect,
15216    # since paths with space are more likely in Windows. Give it another try with the whole
15217    # argument.
15218    path="$complete"
15219    arguments="EOL"
15220    new_path="$path"
15221
15222  windows_path="$new_path"
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224    unix_path=`$CYGPATH -u "$windows_path"`
15225    new_path="$unix_path"
15226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15228    new_path="$unix_path"
15229  fi
15230
15231
15232    new_path=`$WHICH "$new_path" 2> /dev/null`
15233
15234    if test "x$new_path" = x; then
15235      # It's still not found. Now this is an unrecoverable error.
15236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15238      has_space=`$ECHO "$complete" | $GREP " "`
15239      if test "x$has_space" != x; then
15240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15242      fi
15243      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15244    fi
15245  fi
15246
15247  # Now new_path has a complete unix path to the binary
15248  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15249    # Keep paths in /bin as-is, but remove trailing .exe if any
15250    new_path="${new_path/%.exe/}"
15251    # Do not save /bin paths to all_fixpath_prefixes!
15252  else
15253    # Not in mixed or Windows style, start by that.
15254    new_path=`cmd //c echo $new_path`
15255
15256  input_path="$new_path"
15257  # Check if we need to convert this using DOS-style short mode. If the path
15258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15259  # take no chances and rewrite it.
15260  # Note: m4 eats our [], so we need to use [ and ] instead.
15261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15262  if test "x$has_forbidden_chars" != x; then
15263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15265  fi
15266
15267    # Output is in $new_path
15268
15269  windows_path="$new_path"
15270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15271    unix_path=`$CYGPATH -u "$windows_path"`
15272    new_path="$unix_path"
15273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15275    new_path="$unix_path"
15276  fi
15277
15278    # remove trailing .exe if any
15279    new_path="${new_path/%.exe/}"
15280
15281    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15282    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15283  fi
15284
15285  else
15286    # We're on a posix platform. Hooray! :)
15287    # First separate the path from the arguments. This will split at the first
15288    # space.
15289    complete="$FOUND_MAKE"
15290    path="${complete%% *}"
15291    tmp="$complete EOL"
15292    arguments="${tmp#* }"
15293
15294    # Cannot rely on the command "which" here since it doesn't always work.
15295    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15296    if test -z "$is_absolute_path"; then
15297      # Path to executable is not absolute. Find it.
15298      IFS_save="$IFS"
15299      IFS=:
15300      for p in $PATH; do
15301        if test -f "$p/$path" && test -x "$p/$path"; then
15302          new_path="$p/$path"
15303          break
15304        fi
15305      done
15306      IFS="$IFS_save"
15307    else
15308      # This is an absolute path, we can use it without further modifications.
15309      new_path="$path"
15310    fi
15311
15312    if test "x$new_path" = x; then
15313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15315      has_space=`$ECHO "$complete" | $GREP " "`
15316      if test "x$has_space" != x; then
15317        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15318$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15319      fi
15320      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15321    fi
15322  fi
15323
15324  # Now join together the path and the arguments once again
15325  if test "x$arguments" != xEOL; then
15326    new_complete="$new_path ${arguments% *}"
15327  else
15328    new_complete="$new_path"
15329  fi
15330
15331  if test "x$complete" != "x$new_complete"; then
15332    FOUND_MAKE="$new_complete"
15333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15334$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15335  fi
15336
15337        fi
15338      fi
15339    fi
15340  fi
15341
15342    if test "x$FOUND_MAKE" = x; then
15343      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15344    fi
15345  else
15346    # Try our hardest to locate a correct version of GNU make
15347    for ac_prog in gmake
15348do
15349  # Extract the first word of "$ac_prog", so it can be a program name with args.
15350set dummy $ac_prog; ac_word=$2
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15352$as_echo_n "checking for $ac_word... " >&6; }
15353if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15354  $as_echo_n "(cached) " >&6
15355else
15356  case $CHECK_GMAKE in
15357  [\\/]* | ?:[\\/]*)
15358  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15359  ;;
15360  *)
15361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15362for as_dir in $PATH
15363do
15364  IFS=$as_save_IFS
15365  test -z "$as_dir" && as_dir=.
15366    for ac_exec_ext in '' $ac_executable_extensions; do
15367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15368    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15370    break 2
15371  fi
15372done
15373  done
15374IFS=$as_save_IFS
15375
15376  ;;
15377esac
15378fi
15379CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15380if test -n "$CHECK_GMAKE"; then
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15382$as_echo "$CHECK_GMAKE" >&6; }
15383else
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15385$as_echo "no" >&6; }
15386fi
15387
15388
15389  test -n "$CHECK_GMAKE" && break
15390done
15391
15392
15393  MAKE_CANDIDATE=""$CHECK_GMAKE""
15394  DESCRIPTION="gmake in PATH"
15395  if test "x$MAKE_CANDIDATE" != x; then
15396    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15397$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15398    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15399    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15400    if test "x$IS_GNU_MAKE" = x; then
15401      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15402$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15403    else
15404      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15405      if test "x$IS_MODERN_MAKE" = x; then
15406        { $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
15407$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;}
15408      else
15409        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15410          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15411            MAKE_EXPECTED_ENV='cygwin'
15412          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15413            MAKE_EXPECTED_ENV='msys'
15414          else
15415            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15416          fi
15417          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15418          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15419        else
15420          # Not relevant for non-Windows
15421          IS_MAKE_CORRECT_ENV=true
15422        fi
15423        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15424          { $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
15425$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;}
15426        else
15427          FOUND_MAKE=$MAKE_CANDIDATE
15428
15429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15430
15431  # First separate the path from the arguments. This will split at the first
15432  # space.
15433  complete="$FOUND_MAKE"
15434  path="${complete%% *}"
15435  tmp="$complete EOL"
15436  arguments="${tmp#* }"
15437
15438  # Input might be given as Windows format, start by converting to
15439  # unix format.
15440  new_path=`$CYGPATH -u "$path"`
15441
15442  # Now try to locate executable using which
15443  new_path=`$WHICH "$new_path" 2> /dev/null`
15444  # bat and cmd files are not always considered executable in cygwin causing which
15445  # to not find them
15446  if test "x$new_path" = x \
15447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15449    new_path=`$CYGPATH -u "$path"`
15450  fi
15451  if test "x$new_path" = x; then
15452    # Oops. Which didn't find the executable.
15453    # The splitting of arguments from the executable at a space might have been incorrect,
15454    # since paths with space are more likely in Windows. Give it another try with the whole
15455    # argument.
15456    path="$complete"
15457    arguments="EOL"
15458    new_path=`$CYGPATH -u "$path"`
15459    new_path=`$WHICH "$new_path" 2> /dev/null`
15460    # bat and cmd files are not always considered executable in cygwin causing which
15461    # to not find them
15462    if test "x$new_path" = x \
15463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15465      new_path=`$CYGPATH -u "$path"`
15466    fi
15467    if test "x$new_path" = x; then
15468      # It's still not found. Now this is an unrecoverable error.
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15471      has_space=`$ECHO "$complete" | $GREP " "`
15472      if test "x$has_space" != x; then
15473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15475      fi
15476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15477    fi
15478  fi
15479
15480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15483  # "foo.exe" is OK but "foo" is an error.
15484  #
15485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15486  # It is also a way to make sure we got the proper file name for the real test later on.
15487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15488  if test "x$test_shortpath" = x; then
15489    # Short path failed, file does not exist as specified.
15490    # Try adding .exe or .cmd
15491    if test -f "${new_path}.exe"; then
15492      input_to_shortpath="${new_path}.exe"
15493    elif test -f "${new_path}.cmd"; then
15494      input_to_shortpath="${new_path}.cmd"
15495    else
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15500      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15501    fi
15502  else
15503    input_to_shortpath="$new_path"
15504  fi
15505
15506  # Call helper function which possibly converts this using DOS-style short mode.
15507  # If so, the updated path is stored in $new_path.
15508  new_path="$input_to_shortpath"
15509
15510  input_path="$input_to_shortpath"
15511  # Check if we need to convert this using DOS-style short mode. If the path
15512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15513  # take no chances and rewrite it.
15514  # Note: m4 eats our [], so we need to use [ and ] instead.
15515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15516  if test "x$has_forbidden_chars" != x; then
15517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15521      # Going to short mode and back again did indeed matter. Since short mode is
15522      # case insensitive, let's make it lowercase to improve readability.
15523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15524      # Now convert it back to Unix-stile (cygpath)
15525      input_path=`$CYGPATH -u "$shortmode_path"`
15526      new_path="$input_path"
15527    fi
15528  fi
15529
15530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15531  if test "x$test_cygdrive_prefix" = x; then
15532    # As a simple fix, exclude /usr/bin since it's not a real path.
15533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15535      # a path prefixed by /cygdrive for fixpath to work.
15536      new_path="$CYGWIN_ROOT_PATH$input_path"
15537    fi
15538  fi
15539
15540  # remove trailing .exe if any
15541  new_path="${new_path/%.exe/}"
15542
15543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15544
15545  # First separate the path from the arguments. This will split at the first
15546  # space.
15547  complete="$FOUND_MAKE"
15548  path="${complete%% *}"
15549  tmp="$complete EOL"
15550  arguments="${tmp#* }"
15551
15552  # Input might be given as Windows format, start by converting to
15553  # unix format.
15554  new_path="$path"
15555
15556  windows_path="$new_path"
15557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15558    unix_path=`$CYGPATH -u "$windows_path"`
15559    new_path="$unix_path"
15560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15562    new_path="$unix_path"
15563  fi
15564
15565
15566  # Now try to locate executable using which
15567  new_path=`$WHICH "$new_path" 2> /dev/null`
15568
15569  if test "x$new_path" = x; then
15570    # Oops. Which didn't find the executable.
15571    # The splitting of arguments from the executable at a space might have been incorrect,
15572    # since paths with space are more likely in Windows. Give it another try with the whole
15573    # argument.
15574    path="$complete"
15575    arguments="EOL"
15576    new_path="$path"
15577
15578  windows_path="$new_path"
15579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15580    unix_path=`$CYGPATH -u "$windows_path"`
15581    new_path="$unix_path"
15582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15584    new_path="$unix_path"
15585  fi
15586
15587
15588    new_path=`$WHICH "$new_path" 2> /dev/null`
15589
15590    if test "x$new_path" = x; then
15591      # It's still not found. Now this is an unrecoverable error.
15592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15594      has_space=`$ECHO "$complete" | $GREP " "`
15595      if test "x$has_space" != x; then
15596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15598      fi
15599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15600    fi
15601  fi
15602
15603  # Now new_path has a complete unix path to the binary
15604  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15605    # Keep paths in /bin as-is, but remove trailing .exe if any
15606    new_path="${new_path/%.exe/}"
15607    # Do not save /bin paths to all_fixpath_prefixes!
15608  else
15609    # Not in mixed or Windows style, start by that.
15610    new_path=`cmd //c echo $new_path`
15611
15612  input_path="$new_path"
15613  # Check if we need to convert this using DOS-style short mode. If the path
15614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15615  # take no chances and rewrite it.
15616  # Note: m4 eats our [], so we need to use [ and ] instead.
15617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15618  if test "x$has_forbidden_chars" != x; then
15619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15621  fi
15622
15623    # Output is in $new_path
15624
15625  windows_path="$new_path"
15626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15627    unix_path=`$CYGPATH -u "$windows_path"`
15628    new_path="$unix_path"
15629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15631    new_path="$unix_path"
15632  fi
15633
15634    # remove trailing .exe if any
15635    new_path="${new_path/%.exe/}"
15636
15637    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15638    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15639  fi
15640
15641  else
15642    # We're on a posix platform. Hooray! :)
15643    # First separate the path from the arguments. This will split at the first
15644    # space.
15645    complete="$FOUND_MAKE"
15646    path="${complete%% *}"
15647    tmp="$complete EOL"
15648    arguments="${tmp#* }"
15649
15650    # Cannot rely on the command "which" here since it doesn't always work.
15651    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15652    if test -z "$is_absolute_path"; then
15653      # Path to executable is not absolute. Find it.
15654      IFS_save="$IFS"
15655      IFS=:
15656      for p in $PATH; do
15657        if test -f "$p/$path" && test -x "$p/$path"; then
15658          new_path="$p/$path"
15659          break
15660        fi
15661      done
15662      IFS="$IFS_save"
15663    else
15664      # This is an absolute path, we can use it without further modifications.
15665      new_path="$path"
15666    fi
15667
15668    if test "x$new_path" = x; then
15669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15670$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15671      has_space=`$ECHO "$complete" | $GREP " "`
15672      if test "x$has_space" != x; then
15673        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15674$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15675      fi
15676      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15677    fi
15678  fi
15679
15680  # Now join together the path and the arguments once again
15681  if test "x$arguments" != xEOL; then
15682    new_complete="$new_path ${arguments% *}"
15683  else
15684    new_complete="$new_path"
15685  fi
15686
15687  if test "x$complete" != "x$new_complete"; then
15688    FOUND_MAKE="$new_complete"
15689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15690$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15691  fi
15692
15693        fi
15694      fi
15695    fi
15696  fi
15697
15698
15699    if test "x$FOUND_MAKE" = x; then
15700      for ac_prog in make
15701do
15702  # Extract the first word of "$ac_prog", so it can be a program name with args.
15703set dummy $ac_prog; ac_word=$2
15704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15705$as_echo_n "checking for $ac_word... " >&6; }
15706if ${ac_cv_path_CHECK_MAKE+:} false; then :
15707  $as_echo_n "(cached) " >&6
15708else
15709  case $CHECK_MAKE in
15710  [\\/]* | ?:[\\/]*)
15711  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15712  ;;
15713  *)
15714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15715for as_dir in $PATH
15716do
15717  IFS=$as_save_IFS
15718  test -z "$as_dir" && as_dir=.
15719    for ac_exec_ext in '' $ac_executable_extensions; do
15720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15721    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15723    break 2
15724  fi
15725done
15726  done
15727IFS=$as_save_IFS
15728
15729  ;;
15730esac
15731fi
15732CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15733if test -n "$CHECK_MAKE"; then
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15735$as_echo "$CHECK_MAKE" >&6; }
15736else
15737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15738$as_echo "no" >&6; }
15739fi
15740
15741
15742  test -n "$CHECK_MAKE" && break
15743done
15744
15745
15746  MAKE_CANDIDATE=""$CHECK_MAKE""
15747  DESCRIPTION="make in PATH"
15748  if test "x$MAKE_CANDIDATE" != x; then
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15750$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15751    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15752    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15753    if test "x$IS_GNU_MAKE" = x; then
15754      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15755$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15756    else
15757      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15758      if test "x$IS_MODERN_MAKE" = x; then
15759        { $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
15760$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;}
15761      else
15762        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15763          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15764            MAKE_EXPECTED_ENV='cygwin'
15765          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15766            MAKE_EXPECTED_ENV='msys'
15767          else
15768            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15769          fi
15770          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15771          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15772        else
15773          # Not relevant for non-Windows
15774          IS_MAKE_CORRECT_ENV=true
15775        fi
15776        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15777          { $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
15778$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;}
15779        else
15780          FOUND_MAKE=$MAKE_CANDIDATE
15781
15782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783
15784  # First separate the path from the arguments. This will split at the first
15785  # space.
15786  complete="$FOUND_MAKE"
15787  path="${complete%% *}"
15788  tmp="$complete EOL"
15789  arguments="${tmp#* }"
15790
15791  # Input might be given as Windows format, start by converting to
15792  # unix format.
15793  new_path=`$CYGPATH -u "$path"`
15794
15795  # Now try to locate executable using which
15796  new_path=`$WHICH "$new_path" 2> /dev/null`
15797  # bat and cmd files are not always considered executable in cygwin causing which
15798  # to not find them
15799  if test "x$new_path" = x \
15800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15802    new_path=`$CYGPATH -u "$path"`
15803  fi
15804  if test "x$new_path" = x; then
15805    # Oops. Which didn't find the executable.
15806    # The splitting of arguments from the executable at a space might have been incorrect,
15807    # since paths with space are more likely in Windows. Give it another try with the whole
15808    # argument.
15809    path="$complete"
15810    arguments="EOL"
15811    new_path=`$CYGPATH -u "$path"`
15812    new_path=`$WHICH "$new_path" 2> /dev/null`
15813    # bat and cmd files are not always considered executable in cygwin causing which
15814    # to not find them
15815    if test "x$new_path" = x \
15816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15818      new_path=`$CYGPATH -u "$path"`
15819    fi
15820    if test "x$new_path" = x; then
15821      # It's still not found. Now this is an unrecoverable error.
15822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15824      has_space=`$ECHO "$complete" | $GREP " "`
15825      if test "x$has_space" != x; then
15826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15828      fi
15829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15830    fi
15831  fi
15832
15833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15836  # "foo.exe" is OK but "foo" is an error.
15837  #
15838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15839  # It is also a way to make sure we got the proper file name for the real test later on.
15840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15841  if test "x$test_shortpath" = x; then
15842    # Short path failed, file does not exist as specified.
15843    # Try adding .exe or .cmd
15844    if test -f "${new_path}.exe"; then
15845      input_to_shortpath="${new_path}.exe"
15846    elif test -f "${new_path}.cmd"; then
15847      input_to_shortpath="${new_path}.cmd"
15848    else
15849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15854    fi
15855  else
15856    input_to_shortpath="$new_path"
15857  fi
15858
15859  # Call helper function which possibly converts this using DOS-style short mode.
15860  # If so, the updated path is stored in $new_path.
15861  new_path="$input_to_shortpath"
15862
15863  input_path="$input_to_shortpath"
15864  # Check if we need to convert this using DOS-style short mode. If the path
15865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15866  # take no chances and rewrite it.
15867  # Note: m4 eats our [], so we need to use [ and ] instead.
15868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15869  if test "x$has_forbidden_chars" != x; then
15870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15874      # Going to short mode and back again did indeed matter. Since short mode is
15875      # case insensitive, let's make it lowercase to improve readability.
15876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15877      # Now convert it back to Unix-stile (cygpath)
15878      input_path=`$CYGPATH -u "$shortmode_path"`
15879      new_path="$input_path"
15880    fi
15881  fi
15882
15883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15884  if test "x$test_cygdrive_prefix" = x; then
15885    # As a simple fix, exclude /usr/bin since it's not a real path.
15886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15888      # a path prefixed by /cygdrive for fixpath to work.
15889      new_path="$CYGWIN_ROOT_PATH$input_path"
15890    fi
15891  fi
15892
15893  # remove trailing .exe if any
15894  new_path="${new_path/%.exe/}"
15895
15896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15897
15898  # First separate the path from the arguments. This will split at the first
15899  # space.
15900  complete="$FOUND_MAKE"
15901  path="${complete%% *}"
15902  tmp="$complete EOL"
15903  arguments="${tmp#* }"
15904
15905  # Input might be given as Windows format, start by converting to
15906  # unix format.
15907  new_path="$path"
15908
15909  windows_path="$new_path"
15910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15911    unix_path=`$CYGPATH -u "$windows_path"`
15912    new_path="$unix_path"
15913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15915    new_path="$unix_path"
15916  fi
15917
15918
15919  # Now try to locate executable using which
15920  new_path=`$WHICH "$new_path" 2> /dev/null`
15921
15922  if test "x$new_path" = x; then
15923    # Oops. Which didn't find the executable.
15924    # The splitting of arguments from the executable at a space might have been incorrect,
15925    # since paths with space are more likely in Windows. Give it another try with the whole
15926    # argument.
15927    path="$complete"
15928    arguments="EOL"
15929    new_path="$path"
15930
15931  windows_path="$new_path"
15932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15933    unix_path=`$CYGPATH -u "$windows_path"`
15934    new_path="$unix_path"
15935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15937    new_path="$unix_path"
15938  fi
15939
15940
15941    new_path=`$WHICH "$new_path" 2> /dev/null`
15942
15943    if test "x$new_path" = x; then
15944      # It's still not found. Now this is an unrecoverable error.
15945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15946$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15947      has_space=`$ECHO "$complete" | $GREP " "`
15948      if test "x$has_space" != x; then
15949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15951      fi
15952      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15953    fi
15954  fi
15955
15956  # Now new_path has a complete unix path to the binary
15957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15958    # Keep paths in /bin as-is, but remove trailing .exe if any
15959    new_path="${new_path/%.exe/}"
15960    # Do not save /bin paths to all_fixpath_prefixes!
15961  else
15962    # Not in mixed or Windows style, start by that.
15963    new_path=`cmd //c echo $new_path`
15964
15965  input_path="$new_path"
15966  # Check if we need to convert this using DOS-style short mode. If the path
15967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15968  # take no chances and rewrite it.
15969  # Note: m4 eats our [], so we need to use [ and ] instead.
15970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15971  if test "x$has_forbidden_chars" != x; then
15972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15974  fi
15975
15976    # Output is in $new_path
15977
15978  windows_path="$new_path"
15979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15980    unix_path=`$CYGPATH -u "$windows_path"`
15981    new_path="$unix_path"
15982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15984    new_path="$unix_path"
15985  fi
15986
15987    # remove trailing .exe if any
15988    new_path="${new_path/%.exe/}"
15989
15990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15992  fi
15993
15994  else
15995    # We're on a posix platform. Hooray! :)
15996    # First separate the path from the arguments. This will split at the first
15997    # space.
15998    complete="$FOUND_MAKE"
15999    path="${complete%% *}"
16000    tmp="$complete EOL"
16001    arguments="${tmp#* }"
16002
16003    # Cannot rely on the command "which" here since it doesn't always work.
16004    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16005    if test -z "$is_absolute_path"; then
16006      # Path to executable is not absolute. Find it.
16007      IFS_save="$IFS"
16008      IFS=:
16009      for p in $PATH; do
16010        if test -f "$p/$path" && test -x "$p/$path"; then
16011          new_path="$p/$path"
16012          break
16013        fi
16014      done
16015      IFS="$IFS_save"
16016    else
16017      # This is an absolute path, we can use it without further modifications.
16018      new_path="$path"
16019    fi
16020
16021    if test "x$new_path" = x; then
16022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16023$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16024      has_space=`$ECHO "$complete" | $GREP " "`
16025      if test "x$has_space" != x; then
16026        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16028      fi
16029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16030    fi
16031  fi
16032
16033  # Now join together the path and the arguments once again
16034  if test "x$arguments" != xEOL; then
16035    new_complete="$new_path ${arguments% *}"
16036  else
16037    new_complete="$new_path"
16038  fi
16039
16040  if test "x$complete" != "x$new_complete"; then
16041    FOUND_MAKE="$new_complete"
16042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16043$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16044  fi
16045
16046        fi
16047      fi
16048    fi
16049  fi
16050
16051    fi
16052
16053    if test "x$FOUND_MAKE" = x; then
16054      if test "x$TOOLS_DIR" != x; then
16055        # We have a tools-dir, check that as well before giving up.
16056        OLD_PATH=$PATH
16057        PATH=$TOOLS_DIR:$PATH
16058        for ac_prog in gmake
16059do
16060  # Extract the first word of "$ac_prog", so it can be a program name with args.
16061set dummy $ac_prog; ac_word=$2
16062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16063$as_echo_n "checking for $ac_word... " >&6; }
16064if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16065  $as_echo_n "(cached) " >&6
16066else
16067  case $CHECK_TOOLSDIR_GMAKE in
16068  [\\/]* | ?:[\\/]*)
16069  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16070  ;;
16071  *)
16072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16073for as_dir in $PATH
16074do
16075  IFS=$as_save_IFS
16076  test -z "$as_dir" && as_dir=.
16077    for ac_exec_ext in '' $ac_executable_extensions; do
16078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16079    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16081    break 2
16082  fi
16083done
16084  done
16085IFS=$as_save_IFS
16086
16087  ;;
16088esac
16089fi
16090CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16091if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16093$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16094else
16095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16096$as_echo "no" >&6; }
16097fi
16098
16099
16100  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16101done
16102
16103
16104  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16105  DESCRIPTION="gmake in tools-dir"
16106  if test "x$MAKE_CANDIDATE" != x; then
16107    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16108$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16109    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16110    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16111    if test "x$IS_GNU_MAKE" = x; then
16112      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16113$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16114    else
16115      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16116      if test "x$IS_MODERN_MAKE" = x; then
16117        { $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
16118$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;}
16119      else
16120        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16121          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16122            MAKE_EXPECTED_ENV='cygwin'
16123          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16124            MAKE_EXPECTED_ENV='msys'
16125          else
16126            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16127          fi
16128          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16129          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16130        else
16131          # Not relevant for non-Windows
16132          IS_MAKE_CORRECT_ENV=true
16133        fi
16134        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16135          { $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
16136$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;}
16137        else
16138          FOUND_MAKE=$MAKE_CANDIDATE
16139
16140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16141
16142  # First separate the path from the arguments. This will split at the first
16143  # space.
16144  complete="$FOUND_MAKE"
16145  path="${complete%% *}"
16146  tmp="$complete EOL"
16147  arguments="${tmp#* }"
16148
16149  # Input might be given as Windows format, start by converting to
16150  # unix format.
16151  new_path=`$CYGPATH -u "$path"`
16152
16153  # Now try to locate executable using which
16154  new_path=`$WHICH "$new_path" 2> /dev/null`
16155  # bat and cmd files are not always considered executable in cygwin causing which
16156  # to not find them
16157  if test "x$new_path" = x \
16158      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16159      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16160    new_path=`$CYGPATH -u "$path"`
16161  fi
16162  if test "x$new_path" = x; then
16163    # Oops. Which didn't find the executable.
16164    # The splitting of arguments from the executable at a space might have been incorrect,
16165    # since paths with space are more likely in Windows. Give it another try with the whole
16166    # argument.
16167    path="$complete"
16168    arguments="EOL"
16169    new_path=`$CYGPATH -u "$path"`
16170    new_path=`$WHICH "$new_path" 2> /dev/null`
16171    # bat and cmd files are not always considered executable in cygwin causing which
16172    # to not find them
16173    if test "x$new_path" = x \
16174        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16175        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16176      new_path=`$CYGPATH -u "$path"`
16177    fi
16178    if test "x$new_path" = x; then
16179      # It's still not found. Now this is an unrecoverable error.
16180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16181$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16182      has_space=`$ECHO "$complete" | $GREP " "`
16183      if test "x$has_space" != x; then
16184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16186      fi
16187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16188    fi
16189  fi
16190
16191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16194  # "foo.exe" is OK but "foo" is an error.
16195  #
16196  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16197  # It is also a way to make sure we got the proper file name for the real test later on.
16198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16199  if test "x$test_shortpath" = x; then
16200    # Short path failed, file does not exist as specified.
16201    # Try adding .exe or .cmd
16202    if test -f "${new_path}.exe"; then
16203      input_to_shortpath="${new_path}.exe"
16204    elif test -f "${new_path}.cmd"; then
16205      input_to_shortpath="${new_path}.cmd"
16206    else
16207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16209      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16210$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16211      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16212    fi
16213  else
16214    input_to_shortpath="$new_path"
16215  fi
16216
16217  # Call helper function which possibly converts this using DOS-style short mode.
16218  # If so, the updated path is stored in $new_path.
16219  new_path="$input_to_shortpath"
16220
16221  input_path="$input_to_shortpath"
16222  # Check if we need to convert this using DOS-style short mode. If the path
16223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16224  # take no chances and rewrite it.
16225  # Note: m4 eats our [], so we need to use [ and ] instead.
16226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16227  if test "x$has_forbidden_chars" != x; then
16228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16232      # Going to short mode and back again did indeed matter. Since short mode is
16233      # case insensitive, let's make it lowercase to improve readability.
16234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16235      # Now convert it back to Unix-stile (cygpath)
16236      input_path=`$CYGPATH -u "$shortmode_path"`
16237      new_path="$input_path"
16238    fi
16239  fi
16240
16241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16242  if test "x$test_cygdrive_prefix" = x; then
16243    # As a simple fix, exclude /usr/bin since it's not a real path.
16244    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16246      # a path prefixed by /cygdrive for fixpath to work.
16247      new_path="$CYGWIN_ROOT_PATH$input_path"
16248    fi
16249  fi
16250
16251  # remove trailing .exe if any
16252  new_path="${new_path/%.exe/}"
16253
16254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16255
16256  # First separate the path from the arguments. This will split at the first
16257  # space.
16258  complete="$FOUND_MAKE"
16259  path="${complete%% *}"
16260  tmp="$complete EOL"
16261  arguments="${tmp#* }"
16262
16263  # Input might be given as Windows format, start by converting to
16264  # unix format.
16265  new_path="$path"
16266
16267  windows_path="$new_path"
16268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16269    unix_path=`$CYGPATH -u "$windows_path"`
16270    new_path="$unix_path"
16271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16273    new_path="$unix_path"
16274  fi
16275
16276
16277  # Now try to locate executable using which
16278  new_path=`$WHICH "$new_path" 2> /dev/null`
16279
16280  if test "x$new_path" = x; then
16281    # Oops. Which didn't find the executable.
16282    # The splitting of arguments from the executable at a space might have been incorrect,
16283    # since paths with space are more likely in Windows. Give it another try with the whole
16284    # argument.
16285    path="$complete"
16286    arguments="EOL"
16287    new_path="$path"
16288
16289  windows_path="$new_path"
16290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16291    unix_path=`$CYGPATH -u "$windows_path"`
16292    new_path="$unix_path"
16293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16295    new_path="$unix_path"
16296  fi
16297
16298
16299    new_path=`$WHICH "$new_path" 2> /dev/null`
16300
16301    if test "x$new_path" = x; then
16302      # It's still not found. Now this is an unrecoverable error.
16303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16305      has_space=`$ECHO "$complete" | $GREP " "`
16306      if test "x$has_space" != x; then
16307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16309      fi
16310      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16311    fi
16312  fi
16313
16314  # Now new_path has a complete unix path to the binary
16315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16316    # Keep paths in /bin as-is, but remove trailing .exe if any
16317    new_path="${new_path/%.exe/}"
16318    # Do not save /bin paths to all_fixpath_prefixes!
16319  else
16320    # Not in mixed or Windows style, start by that.
16321    new_path=`cmd //c echo $new_path`
16322
16323  input_path="$new_path"
16324  # Check if we need to convert this using DOS-style short mode. If the path
16325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16326  # take no chances and rewrite it.
16327  # Note: m4 eats our [], so we need to use [ and ] instead.
16328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16329  if test "x$has_forbidden_chars" != x; then
16330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16332  fi
16333
16334    # Output is in $new_path
16335
16336  windows_path="$new_path"
16337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338    unix_path=`$CYGPATH -u "$windows_path"`
16339    new_path="$unix_path"
16340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342    new_path="$unix_path"
16343  fi
16344
16345    # remove trailing .exe if any
16346    new_path="${new_path/%.exe/}"
16347
16348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16350  fi
16351
16352  else
16353    # We're on a posix platform. Hooray! :)
16354    # First separate the path from the arguments. This will split at the first
16355    # space.
16356    complete="$FOUND_MAKE"
16357    path="${complete%% *}"
16358    tmp="$complete EOL"
16359    arguments="${tmp#* }"
16360
16361    # Cannot rely on the command "which" here since it doesn't always work.
16362    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16363    if test -z "$is_absolute_path"; then
16364      # Path to executable is not absolute. Find it.
16365      IFS_save="$IFS"
16366      IFS=:
16367      for p in $PATH; do
16368        if test -f "$p/$path" && test -x "$p/$path"; then
16369          new_path="$p/$path"
16370          break
16371        fi
16372      done
16373      IFS="$IFS_save"
16374    else
16375      # This is an absolute path, we can use it without further modifications.
16376      new_path="$path"
16377    fi
16378
16379    if test "x$new_path" = x; then
16380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16381$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16382      has_space=`$ECHO "$complete" | $GREP " "`
16383      if test "x$has_space" != x; then
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16386      fi
16387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16388    fi
16389  fi
16390
16391  # Now join together the path and the arguments once again
16392  if test "x$arguments" != xEOL; then
16393    new_complete="$new_path ${arguments% *}"
16394  else
16395    new_complete="$new_path"
16396  fi
16397
16398  if test "x$complete" != "x$new_complete"; then
16399    FOUND_MAKE="$new_complete"
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16401$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16402  fi
16403
16404        fi
16405      fi
16406    fi
16407  fi
16408
16409        if test "x$FOUND_MAKE" = x; then
16410          for ac_prog in make
16411do
16412  # Extract the first word of "$ac_prog", so it can be a program name with args.
16413set dummy $ac_prog; ac_word=$2
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16415$as_echo_n "checking for $ac_word... " >&6; }
16416if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16417  $as_echo_n "(cached) " >&6
16418else
16419  case $CHECK_TOOLSDIR_MAKE in
16420  [\\/]* | ?:[\\/]*)
16421  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16422  ;;
16423  *)
16424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16425for as_dir in $PATH
16426do
16427  IFS=$as_save_IFS
16428  test -z "$as_dir" && as_dir=.
16429    for ac_exec_ext in '' $ac_executable_extensions; do
16430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16431    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16433    break 2
16434  fi
16435done
16436  done
16437IFS=$as_save_IFS
16438
16439  ;;
16440esac
16441fi
16442CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16443if test -n "$CHECK_TOOLSDIR_MAKE"; then
16444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16445$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16446else
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16448$as_echo "no" >&6; }
16449fi
16450
16451
16452  test -n "$CHECK_TOOLSDIR_MAKE" && break
16453done
16454
16455
16456  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16457  DESCRIPTION="make in tools-dir"
16458  if test "x$MAKE_CANDIDATE" != x; then
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16460$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16461    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16462    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16463    if test "x$IS_GNU_MAKE" = x; then
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16465$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16466    else
16467      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16468      if test "x$IS_MODERN_MAKE" = x; then
16469        { $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
16470$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;}
16471      else
16472        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16473          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16474            MAKE_EXPECTED_ENV='cygwin'
16475          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16476            MAKE_EXPECTED_ENV='msys'
16477          else
16478            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16479          fi
16480          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16481          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16482        else
16483          # Not relevant for non-Windows
16484          IS_MAKE_CORRECT_ENV=true
16485        fi
16486        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16487          { $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
16488$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;}
16489        else
16490          FOUND_MAKE=$MAKE_CANDIDATE
16491
16492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16493
16494  # First separate the path from the arguments. This will split at the first
16495  # space.
16496  complete="$FOUND_MAKE"
16497  path="${complete%% *}"
16498  tmp="$complete EOL"
16499  arguments="${tmp#* }"
16500
16501  # Input might be given as Windows format, start by converting to
16502  # unix format.
16503  new_path=`$CYGPATH -u "$path"`
16504
16505  # Now try to locate executable using which
16506  new_path=`$WHICH "$new_path" 2> /dev/null`
16507  # bat and cmd files are not always considered executable in cygwin causing which
16508  # to not find them
16509  if test "x$new_path" = x \
16510      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16511      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16512    new_path=`$CYGPATH -u "$path"`
16513  fi
16514  if test "x$new_path" = x; then
16515    # Oops. Which didn't find the executable.
16516    # The splitting of arguments from the executable at a space might have been incorrect,
16517    # since paths with space are more likely in Windows. Give it another try with the whole
16518    # argument.
16519    path="$complete"
16520    arguments="EOL"
16521    new_path=`$CYGPATH -u "$path"`
16522    new_path=`$WHICH "$new_path" 2> /dev/null`
16523    # bat and cmd files are not always considered executable in cygwin causing which
16524    # to not find them
16525    if test "x$new_path" = x \
16526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16528      new_path=`$CYGPATH -u "$path"`
16529    fi
16530    if test "x$new_path" = x; then
16531      # It's still not found. Now this is an unrecoverable error.
16532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16534      has_space=`$ECHO "$complete" | $GREP " "`
16535      if test "x$has_space" != x; then
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16538      fi
16539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16540    fi
16541  fi
16542
16543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16546  # "foo.exe" is OK but "foo" is an error.
16547  #
16548  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16549  # It is also a way to make sure we got the proper file name for the real test later on.
16550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16551  if test "x$test_shortpath" = x; then
16552    # Short path failed, file does not exist as specified.
16553    # Try adding .exe or .cmd
16554    if test -f "${new_path}.exe"; then
16555      input_to_shortpath="${new_path}.exe"
16556    elif test -f "${new_path}.cmd"; then
16557      input_to_shortpath="${new_path}.cmd"
16558    else
16559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16560$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16562$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16563      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16564    fi
16565  else
16566    input_to_shortpath="$new_path"
16567  fi
16568
16569  # Call helper function which possibly converts this using DOS-style short mode.
16570  # If so, the updated path is stored in $new_path.
16571  new_path="$input_to_shortpath"
16572
16573  input_path="$input_to_shortpath"
16574  # Check if we need to convert this using DOS-style short mode. If the path
16575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16576  # take no chances and rewrite it.
16577  # Note: m4 eats our [], so we need to use [ and ] instead.
16578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16579  if test "x$has_forbidden_chars" != x; then
16580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16584      # Going to short mode and back again did indeed matter. Since short mode is
16585      # case insensitive, let's make it lowercase to improve readability.
16586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16587      # Now convert it back to Unix-stile (cygpath)
16588      input_path=`$CYGPATH -u "$shortmode_path"`
16589      new_path="$input_path"
16590    fi
16591  fi
16592
16593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16594  if test "x$test_cygdrive_prefix" = x; then
16595    # As a simple fix, exclude /usr/bin since it's not a real path.
16596    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16598      # a path prefixed by /cygdrive for fixpath to work.
16599      new_path="$CYGWIN_ROOT_PATH$input_path"
16600    fi
16601  fi
16602
16603  # remove trailing .exe if any
16604  new_path="${new_path/%.exe/}"
16605
16606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16607
16608  # First separate the path from the arguments. This will split at the first
16609  # space.
16610  complete="$FOUND_MAKE"
16611  path="${complete%% *}"
16612  tmp="$complete EOL"
16613  arguments="${tmp#* }"
16614
16615  # Input might be given as Windows format, start by converting to
16616  # unix format.
16617  new_path="$path"
16618
16619  windows_path="$new_path"
16620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16621    unix_path=`$CYGPATH -u "$windows_path"`
16622    new_path="$unix_path"
16623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16625    new_path="$unix_path"
16626  fi
16627
16628
16629  # Now try to locate executable using which
16630  new_path=`$WHICH "$new_path" 2> /dev/null`
16631
16632  if test "x$new_path" = x; then
16633    # Oops. Which didn't find the executable.
16634    # The splitting of arguments from the executable at a space might have been incorrect,
16635    # since paths with space are more likely in Windows. Give it another try with the whole
16636    # argument.
16637    path="$complete"
16638    arguments="EOL"
16639    new_path="$path"
16640
16641  windows_path="$new_path"
16642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16643    unix_path=`$CYGPATH -u "$windows_path"`
16644    new_path="$unix_path"
16645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16647    new_path="$unix_path"
16648  fi
16649
16650
16651    new_path=`$WHICH "$new_path" 2> /dev/null`
16652
16653    if test "x$new_path" = x; then
16654      # It's still not found. Now this is an unrecoverable error.
16655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16657      has_space=`$ECHO "$complete" | $GREP " "`
16658      if test "x$has_space" != x; then
16659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16661      fi
16662      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16663    fi
16664  fi
16665
16666  # Now new_path has a complete unix path to the binary
16667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16668    # Keep paths in /bin as-is, but remove trailing .exe if any
16669    new_path="${new_path/%.exe/}"
16670    # Do not save /bin paths to all_fixpath_prefixes!
16671  else
16672    # Not in mixed or Windows style, start by that.
16673    new_path=`cmd //c echo $new_path`
16674
16675  input_path="$new_path"
16676  # Check if we need to convert this using DOS-style short mode. If the path
16677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16678  # take no chances and rewrite it.
16679  # Note: m4 eats our [], so we need to use [ and ] instead.
16680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16681  if test "x$has_forbidden_chars" != x; then
16682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16684  fi
16685
16686    # Output is in $new_path
16687
16688  windows_path="$new_path"
16689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16690    unix_path=`$CYGPATH -u "$windows_path"`
16691    new_path="$unix_path"
16692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16694    new_path="$unix_path"
16695  fi
16696
16697    # remove trailing .exe if any
16698    new_path="${new_path/%.exe/}"
16699
16700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16702  fi
16703
16704  else
16705    # We're on a posix platform. Hooray! :)
16706    # First separate the path from the arguments. This will split at the first
16707    # space.
16708    complete="$FOUND_MAKE"
16709    path="${complete%% *}"
16710    tmp="$complete EOL"
16711    arguments="${tmp#* }"
16712
16713    # Cannot rely on the command "which" here since it doesn't always work.
16714    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16715    if test -z "$is_absolute_path"; then
16716      # Path to executable is not absolute. Find it.
16717      IFS_save="$IFS"
16718      IFS=:
16719      for p in $PATH; do
16720        if test -f "$p/$path" && test -x "$p/$path"; then
16721          new_path="$p/$path"
16722          break
16723        fi
16724      done
16725      IFS="$IFS_save"
16726    else
16727      # This is an absolute path, we can use it without further modifications.
16728      new_path="$path"
16729    fi
16730
16731    if test "x$new_path" = x; then
16732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16733$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16734      has_space=`$ECHO "$complete" | $GREP " "`
16735      if test "x$has_space" != x; then
16736        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16738      fi
16739      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16740    fi
16741  fi
16742
16743  # Now join together the path and the arguments once again
16744  if test "x$arguments" != xEOL; then
16745    new_complete="$new_path ${arguments% *}"
16746  else
16747    new_complete="$new_path"
16748  fi
16749
16750  if test "x$complete" != "x$new_complete"; then
16751    FOUND_MAKE="$new_complete"
16752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16753$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16754  fi
16755
16756        fi
16757      fi
16758    fi
16759  fi
16760
16761        fi
16762        PATH=$OLD_PATH
16763      fi
16764    fi
16765
16766    if test "x$FOUND_MAKE" = x; then
16767      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
16768    fi
16769  fi
16770
16771  MAKE=$FOUND_MAKE
16772
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16774$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16775
16776
16777
16778  # Test if find supports -delete
16779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16780$as_echo_n "checking if find supports -delete... " >&6; }
16781  FIND_DELETE="-delete"
16782
16783  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16784
16785  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16786
16787  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16788  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16789    # No, it does not.
16790    rm $DELETEDIR/TestIfFindSupportsDelete
16791    FIND_DELETE="-exec rm \{\} \+"
16792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16793$as_echo "no" >&6; }
16794  else
16795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16796$as_echo "yes" >&6; }
16797  fi
16798  rmdir $DELETEDIR
16799
16800
16801
16802  # These tools might not be installed by default,
16803  # need hint on how to install them.
16804
16805
16806
16807  # Publish this variable in the help.
16808
16809
16810  if test "x$UNZIP" = x; then
16811    # The variable is not set by user, try to locate tool using the code snippet
16812    for ac_prog in unzip
16813do
16814  # Extract the first word of "$ac_prog", so it can be a program name with args.
16815set dummy $ac_prog; ac_word=$2
16816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16817$as_echo_n "checking for $ac_word... " >&6; }
16818if ${ac_cv_path_UNZIP+:} false; then :
16819  $as_echo_n "(cached) " >&6
16820else
16821  case $UNZIP in
16822  [\\/]* | ?:[\\/]*)
16823  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16824  ;;
16825  *)
16826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16827for as_dir in $PATH
16828do
16829  IFS=$as_save_IFS
16830  test -z "$as_dir" && as_dir=.
16831    for ac_exec_ext in '' $ac_executable_extensions; do
16832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16833    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16835    break 2
16836  fi
16837done
16838  done
16839IFS=$as_save_IFS
16840
16841  ;;
16842esac
16843fi
16844UNZIP=$ac_cv_path_UNZIP
16845if test -n "$UNZIP"; then
16846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16847$as_echo "$UNZIP" >&6; }
16848else
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16850$as_echo "no" >&6; }
16851fi
16852
16853
16854  test -n "$UNZIP" && break
16855done
16856
16857  else
16858    # The variable is set, but is it from the command line or the environment?
16859
16860    # Try to remove the string !UNZIP! from our list.
16861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16863      # If it failed, the variable was not from the command line. Ignore it,
16864      # but warn the user (except for BASH, which is always set by the calling BASH).
16865      if test "xUNZIP" != xBASH; then
16866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16867$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16868      fi
16869      # Try to locate tool using the code snippet
16870      for ac_prog in unzip
16871do
16872  # Extract the first word of "$ac_prog", so it can be a program name with args.
16873set dummy $ac_prog; ac_word=$2
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16875$as_echo_n "checking for $ac_word... " >&6; }
16876if ${ac_cv_path_UNZIP+:} false; then :
16877  $as_echo_n "(cached) " >&6
16878else
16879  case $UNZIP in
16880  [\\/]* | ?:[\\/]*)
16881  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16882  ;;
16883  *)
16884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16885for as_dir in $PATH
16886do
16887  IFS=$as_save_IFS
16888  test -z "$as_dir" && as_dir=.
16889    for ac_exec_ext in '' $ac_executable_extensions; do
16890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16891    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16893    break 2
16894  fi
16895done
16896  done
16897IFS=$as_save_IFS
16898
16899  ;;
16900esac
16901fi
16902UNZIP=$ac_cv_path_UNZIP
16903if test -n "$UNZIP"; then
16904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16905$as_echo "$UNZIP" >&6; }
16906else
16907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16908$as_echo "no" >&6; }
16909fi
16910
16911
16912  test -n "$UNZIP" && break
16913done
16914
16915    else
16916      # If it succeeded, then it was overridden by the user. We will use it
16917      # for the tool.
16918
16919      # First remove it from the list of overridden variables, so we can test
16920      # for unknown variables in the end.
16921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16922
16923      # Check if the provided tool contains a complete path.
16924      tool_specified="$UNZIP"
16925      tool_basename="${tool_specified##*/}"
16926      if test "x$tool_basename" = "x$tool_specified"; then
16927        # A command without a complete path is provided, search $PATH.
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16929$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16930        # Extract the first word of "$tool_basename", so it can be a program name with args.
16931set dummy $tool_basename; ac_word=$2
16932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16933$as_echo_n "checking for $ac_word... " >&6; }
16934if ${ac_cv_path_UNZIP+:} false; then :
16935  $as_echo_n "(cached) " >&6
16936else
16937  case $UNZIP in
16938  [\\/]* | ?:[\\/]*)
16939  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16940  ;;
16941  *)
16942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16943for as_dir in $PATH
16944do
16945  IFS=$as_save_IFS
16946  test -z "$as_dir" && as_dir=.
16947    for ac_exec_ext in '' $ac_executable_extensions; do
16948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16949    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16951    break 2
16952  fi
16953done
16954  done
16955IFS=$as_save_IFS
16956
16957  ;;
16958esac
16959fi
16960UNZIP=$ac_cv_path_UNZIP
16961if test -n "$UNZIP"; then
16962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16963$as_echo "$UNZIP" >&6; }
16964else
16965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16966$as_echo "no" >&6; }
16967fi
16968
16969
16970        if test "x$UNZIP" = x; then
16971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16972        fi
16973      else
16974        # Otherwise we believe it is a complete path. Use it as it is.
16975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16976$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16978$as_echo_n "checking for UNZIP... " >&6; }
16979        if test ! -x "$tool_specified"; then
16980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16981$as_echo "not found" >&6; }
16982          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16983        fi
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16985$as_echo "$tool_specified" >&6; }
16986      fi
16987    fi
16988  fi
16989
16990
16991
16992  if test "x$UNZIP" = x; then
16993    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16994  fi
16995
16996
16997
16998
16999
17000  # Publish this variable in the help.
17001
17002
17003  if test "x$ZIP" = x; then
17004    # The variable is not set by user, try to locate tool using the code snippet
17005    for ac_prog in zip
17006do
17007  # Extract the first word of "$ac_prog", so it can be a program name with args.
17008set dummy $ac_prog; ac_word=$2
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17010$as_echo_n "checking for $ac_word... " >&6; }
17011if ${ac_cv_path_ZIP+:} false; then :
17012  $as_echo_n "(cached) " >&6
17013else
17014  case $ZIP in
17015  [\\/]* | ?:[\\/]*)
17016  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17017  ;;
17018  *)
17019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17020for as_dir in $PATH
17021do
17022  IFS=$as_save_IFS
17023  test -z "$as_dir" && as_dir=.
17024    for ac_exec_ext in '' $ac_executable_extensions; do
17025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17026    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17028    break 2
17029  fi
17030done
17031  done
17032IFS=$as_save_IFS
17033
17034  ;;
17035esac
17036fi
17037ZIP=$ac_cv_path_ZIP
17038if test -n "$ZIP"; then
17039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17040$as_echo "$ZIP" >&6; }
17041else
17042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17043$as_echo "no" >&6; }
17044fi
17045
17046
17047  test -n "$ZIP" && break
17048done
17049
17050  else
17051    # The variable is set, but is it from the command line or the environment?
17052
17053    # Try to remove the string !ZIP! from our list.
17054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17056      # If it failed, the variable was not from the command line. Ignore it,
17057      # but warn the user (except for BASH, which is always set by the calling BASH).
17058      if test "xZIP" != xBASH; then
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17060$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17061      fi
17062      # Try to locate tool using the code snippet
17063      for ac_prog in zip
17064do
17065  # Extract the first word of "$ac_prog", so it can be a program name with args.
17066set dummy $ac_prog; ac_word=$2
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17068$as_echo_n "checking for $ac_word... " >&6; }
17069if ${ac_cv_path_ZIP+:} false; then :
17070  $as_echo_n "(cached) " >&6
17071else
17072  case $ZIP in
17073  [\\/]* | ?:[\\/]*)
17074  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17075  ;;
17076  *)
17077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17078for as_dir in $PATH
17079do
17080  IFS=$as_save_IFS
17081  test -z "$as_dir" && as_dir=.
17082    for ac_exec_ext in '' $ac_executable_extensions; do
17083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17084    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17086    break 2
17087  fi
17088done
17089  done
17090IFS=$as_save_IFS
17091
17092  ;;
17093esac
17094fi
17095ZIP=$ac_cv_path_ZIP
17096if test -n "$ZIP"; then
17097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17098$as_echo "$ZIP" >&6; }
17099else
17100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17101$as_echo "no" >&6; }
17102fi
17103
17104
17105  test -n "$ZIP" && break
17106done
17107
17108    else
17109      # If it succeeded, then it was overridden by the user. We will use it
17110      # for the tool.
17111
17112      # First remove it from the list of overridden variables, so we can test
17113      # for unknown variables in the end.
17114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17115
17116      # Check if the provided tool contains a complete path.
17117      tool_specified="$ZIP"
17118      tool_basename="${tool_specified##*/}"
17119      if test "x$tool_basename" = "x$tool_specified"; then
17120        # A command without a complete path is provided, search $PATH.
17121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17122$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17123        # Extract the first word of "$tool_basename", so it can be a program name with args.
17124set dummy $tool_basename; ac_word=$2
17125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17126$as_echo_n "checking for $ac_word... " >&6; }
17127if ${ac_cv_path_ZIP+:} false; then :
17128  $as_echo_n "(cached) " >&6
17129else
17130  case $ZIP in
17131  [\\/]* | ?:[\\/]*)
17132  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17133  ;;
17134  *)
17135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17136for as_dir in $PATH
17137do
17138  IFS=$as_save_IFS
17139  test -z "$as_dir" && as_dir=.
17140    for ac_exec_ext in '' $ac_executable_extensions; do
17141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17142    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17144    break 2
17145  fi
17146done
17147  done
17148IFS=$as_save_IFS
17149
17150  ;;
17151esac
17152fi
17153ZIP=$ac_cv_path_ZIP
17154if test -n "$ZIP"; then
17155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17156$as_echo "$ZIP" >&6; }
17157else
17158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17159$as_echo "no" >&6; }
17160fi
17161
17162
17163        if test "x$ZIP" = x; then
17164          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17165        fi
17166      else
17167        # Otherwise we believe it is a complete path. Use it as it is.
17168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17169$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17171$as_echo_n "checking for ZIP... " >&6; }
17172        if test ! -x "$tool_specified"; then
17173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17174$as_echo "not found" >&6; }
17175          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17176        fi
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17178$as_echo "$tool_specified" >&6; }
17179      fi
17180    fi
17181  fi
17182
17183
17184
17185  if test "x$ZIP" = x; then
17186    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17187  fi
17188
17189
17190
17191  # Non-required basic tools
17192
17193
17194
17195  # Publish this variable in the help.
17196
17197
17198  if test "x$LDD" = x; then
17199    # The variable is not set by user, try to locate tool using the code snippet
17200    for ac_prog in ldd
17201do
17202  # Extract the first word of "$ac_prog", so it can be a program name with args.
17203set dummy $ac_prog; ac_word=$2
17204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17205$as_echo_n "checking for $ac_word... " >&6; }
17206if ${ac_cv_path_LDD+:} false; then :
17207  $as_echo_n "(cached) " >&6
17208else
17209  case $LDD in
17210  [\\/]* | ?:[\\/]*)
17211  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17212  ;;
17213  *)
17214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17215for as_dir in $PATH
17216do
17217  IFS=$as_save_IFS
17218  test -z "$as_dir" && as_dir=.
17219    for ac_exec_ext in '' $ac_executable_extensions; do
17220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17221    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17223    break 2
17224  fi
17225done
17226  done
17227IFS=$as_save_IFS
17228
17229  ;;
17230esac
17231fi
17232LDD=$ac_cv_path_LDD
17233if test -n "$LDD"; then
17234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17235$as_echo "$LDD" >&6; }
17236else
17237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17238$as_echo "no" >&6; }
17239fi
17240
17241
17242  test -n "$LDD" && break
17243done
17244
17245  else
17246    # The variable is set, but is it from the command line or the environment?
17247
17248    # Try to remove the string !LDD! from our list.
17249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17251      # If it failed, the variable was not from the command line. Ignore it,
17252      # but warn the user (except for BASH, which is always set by the calling BASH).
17253      if test "xLDD" != xBASH; then
17254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17255$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17256      fi
17257      # Try to locate tool using the code snippet
17258      for ac_prog in ldd
17259do
17260  # Extract the first word of "$ac_prog", so it can be a program name with args.
17261set dummy $ac_prog; ac_word=$2
17262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17263$as_echo_n "checking for $ac_word... " >&6; }
17264if ${ac_cv_path_LDD+:} false; then :
17265  $as_echo_n "(cached) " >&6
17266else
17267  case $LDD in
17268  [\\/]* | ?:[\\/]*)
17269  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17270  ;;
17271  *)
17272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17273for as_dir in $PATH
17274do
17275  IFS=$as_save_IFS
17276  test -z "$as_dir" && as_dir=.
17277    for ac_exec_ext in '' $ac_executable_extensions; do
17278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17279    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17281    break 2
17282  fi
17283done
17284  done
17285IFS=$as_save_IFS
17286
17287  ;;
17288esac
17289fi
17290LDD=$ac_cv_path_LDD
17291if test -n "$LDD"; then
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17293$as_echo "$LDD" >&6; }
17294else
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17296$as_echo "no" >&6; }
17297fi
17298
17299
17300  test -n "$LDD" && break
17301done
17302
17303    else
17304      # If it succeeded, then it was overridden by the user. We will use it
17305      # for the tool.
17306
17307      # First remove it from the list of overridden variables, so we can test
17308      # for unknown variables in the end.
17309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17310
17311      # Check if the provided tool contains a complete path.
17312      tool_specified="$LDD"
17313      tool_basename="${tool_specified##*/}"
17314      if test "x$tool_basename" = "x$tool_specified"; then
17315        # A command without a complete path is provided, search $PATH.
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17317$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17318        # Extract the first word of "$tool_basename", so it can be a program name with args.
17319set dummy $tool_basename; ac_word=$2
17320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17321$as_echo_n "checking for $ac_word... " >&6; }
17322if ${ac_cv_path_LDD+:} false; then :
17323  $as_echo_n "(cached) " >&6
17324else
17325  case $LDD in
17326  [\\/]* | ?:[\\/]*)
17327  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17328  ;;
17329  *)
17330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17331for as_dir in $PATH
17332do
17333  IFS=$as_save_IFS
17334  test -z "$as_dir" && as_dir=.
17335    for ac_exec_ext in '' $ac_executable_extensions; do
17336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17337    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17339    break 2
17340  fi
17341done
17342  done
17343IFS=$as_save_IFS
17344
17345  ;;
17346esac
17347fi
17348LDD=$ac_cv_path_LDD
17349if test -n "$LDD"; then
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17351$as_echo "$LDD" >&6; }
17352else
17353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17354$as_echo "no" >&6; }
17355fi
17356
17357
17358        if test "x$LDD" = x; then
17359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17360        fi
17361      else
17362        # Otherwise we believe it is a complete path. Use it as it is.
17363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17364$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17366$as_echo_n "checking for LDD... " >&6; }
17367        if test ! -x "$tool_specified"; then
17368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17369$as_echo "not found" >&6; }
17370          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17371        fi
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17373$as_echo "$tool_specified" >&6; }
17374      fi
17375    fi
17376  fi
17377
17378
17379  if test "x$LDD" = "x"; then
17380    # List shared lib dependencies is used for
17381    # debug output and checking for forbidden dependencies.
17382    # We can build without it.
17383    LDD="true"
17384  fi
17385
17386
17387  # Publish this variable in the help.
17388
17389
17390  if test "x$OTOOL" = x; then
17391    # The variable is not set by user, try to locate tool using the code snippet
17392    for ac_prog in otool
17393do
17394  # Extract the first word of "$ac_prog", so it can be a program name with args.
17395set dummy $ac_prog; ac_word=$2
17396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17397$as_echo_n "checking for $ac_word... " >&6; }
17398if ${ac_cv_path_OTOOL+:} false; then :
17399  $as_echo_n "(cached) " >&6
17400else
17401  case $OTOOL in
17402  [\\/]* | ?:[\\/]*)
17403  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17404  ;;
17405  *)
17406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17407for as_dir in $PATH
17408do
17409  IFS=$as_save_IFS
17410  test -z "$as_dir" && as_dir=.
17411    for ac_exec_ext in '' $ac_executable_extensions; do
17412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17413    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17415    break 2
17416  fi
17417done
17418  done
17419IFS=$as_save_IFS
17420
17421  ;;
17422esac
17423fi
17424OTOOL=$ac_cv_path_OTOOL
17425if test -n "$OTOOL"; then
17426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17427$as_echo "$OTOOL" >&6; }
17428else
17429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17430$as_echo "no" >&6; }
17431fi
17432
17433
17434  test -n "$OTOOL" && break
17435done
17436
17437  else
17438    # The variable is set, but is it from the command line or the environment?
17439
17440    # Try to remove the string !OTOOL! from our list.
17441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17443      # If it failed, the variable was not from the command line. Ignore it,
17444      # but warn the user (except for BASH, which is always set by the calling BASH).
17445      if test "xOTOOL" != xBASH; then
17446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17447$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17448      fi
17449      # Try to locate tool using the code snippet
17450      for ac_prog in otool
17451do
17452  # Extract the first word of "$ac_prog", so it can be a program name with args.
17453set dummy $ac_prog; ac_word=$2
17454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17455$as_echo_n "checking for $ac_word... " >&6; }
17456if ${ac_cv_path_OTOOL+:} false; then :
17457  $as_echo_n "(cached) " >&6
17458else
17459  case $OTOOL in
17460  [\\/]* | ?:[\\/]*)
17461  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17462  ;;
17463  *)
17464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17465for as_dir in $PATH
17466do
17467  IFS=$as_save_IFS
17468  test -z "$as_dir" && as_dir=.
17469    for ac_exec_ext in '' $ac_executable_extensions; do
17470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17471    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17473    break 2
17474  fi
17475done
17476  done
17477IFS=$as_save_IFS
17478
17479  ;;
17480esac
17481fi
17482OTOOL=$ac_cv_path_OTOOL
17483if test -n "$OTOOL"; then
17484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17485$as_echo "$OTOOL" >&6; }
17486else
17487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17488$as_echo "no" >&6; }
17489fi
17490
17491
17492  test -n "$OTOOL" && break
17493done
17494
17495    else
17496      # If it succeeded, then it was overridden by the user. We will use it
17497      # for the tool.
17498
17499      # First remove it from the list of overridden variables, so we can test
17500      # for unknown variables in the end.
17501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17502
17503      # Check if the provided tool contains a complete path.
17504      tool_specified="$OTOOL"
17505      tool_basename="${tool_specified##*/}"
17506      if test "x$tool_basename" = "x$tool_specified"; then
17507        # A command without a complete path is provided, search $PATH.
17508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17509$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17510        # Extract the first word of "$tool_basename", so it can be a program name with args.
17511set dummy $tool_basename; ac_word=$2
17512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17513$as_echo_n "checking for $ac_word... " >&6; }
17514if ${ac_cv_path_OTOOL+:} false; then :
17515  $as_echo_n "(cached) " >&6
17516else
17517  case $OTOOL in
17518  [\\/]* | ?:[\\/]*)
17519  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17520  ;;
17521  *)
17522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17523for as_dir in $PATH
17524do
17525  IFS=$as_save_IFS
17526  test -z "$as_dir" && as_dir=.
17527    for ac_exec_ext in '' $ac_executable_extensions; do
17528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17529    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17531    break 2
17532  fi
17533done
17534  done
17535IFS=$as_save_IFS
17536
17537  ;;
17538esac
17539fi
17540OTOOL=$ac_cv_path_OTOOL
17541if test -n "$OTOOL"; then
17542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17543$as_echo "$OTOOL" >&6; }
17544else
17545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17546$as_echo "no" >&6; }
17547fi
17548
17549
17550        if test "x$OTOOL" = x; then
17551          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17552        fi
17553      else
17554        # Otherwise we believe it is a complete path. Use it as it is.
17555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17556$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17558$as_echo_n "checking for OTOOL... " >&6; }
17559        if test ! -x "$tool_specified"; then
17560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17561$as_echo "not found" >&6; }
17562          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17563        fi
17564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17565$as_echo "$tool_specified" >&6; }
17566      fi
17567    fi
17568  fi
17569
17570
17571  if test "x$OTOOL" = "x"; then
17572    OTOOL="true"
17573  fi
17574
17575
17576  # Publish this variable in the help.
17577
17578
17579  if test "x$READELF" = x; then
17580    # The variable is not set by user, try to locate tool using the code snippet
17581    for ac_prog in greadelf readelf
17582do
17583  # Extract the first word of "$ac_prog", so it can be a program name with args.
17584set dummy $ac_prog; ac_word=$2
17585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17586$as_echo_n "checking for $ac_word... " >&6; }
17587if ${ac_cv_path_READELF+:} false; then :
17588  $as_echo_n "(cached) " >&6
17589else
17590  case $READELF in
17591  [\\/]* | ?:[\\/]*)
17592  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17593  ;;
17594  *)
17595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17596for as_dir in $PATH
17597do
17598  IFS=$as_save_IFS
17599  test -z "$as_dir" && as_dir=.
17600    for ac_exec_ext in '' $ac_executable_extensions; do
17601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17602    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17604    break 2
17605  fi
17606done
17607  done
17608IFS=$as_save_IFS
17609
17610  ;;
17611esac
17612fi
17613READELF=$ac_cv_path_READELF
17614if test -n "$READELF"; then
17615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17616$as_echo "$READELF" >&6; }
17617else
17618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17619$as_echo "no" >&6; }
17620fi
17621
17622
17623  test -n "$READELF" && break
17624done
17625
17626  else
17627    # The variable is set, but is it from the command line or the environment?
17628
17629    # Try to remove the string !READELF! from our list.
17630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17632      # If it failed, the variable was not from the command line. Ignore it,
17633      # but warn the user (except for BASH, which is always set by the calling BASH).
17634      if test "xREADELF" != xBASH; then
17635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17636$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17637      fi
17638      # Try to locate tool using the code snippet
17639      for ac_prog in greadelf readelf
17640do
17641  # Extract the first word of "$ac_prog", so it can be a program name with args.
17642set dummy $ac_prog; ac_word=$2
17643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17644$as_echo_n "checking for $ac_word... " >&6; }
17645if ${ac_cv_path_READELF+:} false; then :
17646  $as_echo_n "(cached) " >&6
17647else
17648  case $READELF in
17649  [\\/]* | ?:[\\/]*)
17650  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17651  ;;
17652  *)
17653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17654for as_dir in $PATH
17655do
17656  IFS=$as_save_IFS
17657  test -z "$as_dir" && as_dir=.
17658    for ac_exec_ext in '' $ac_executable_extensions; do
17659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17660    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17662    break 2
17663  fi
17664done
17665  done
17666IFS=$as_save_IFS
17667
17668  ;;
17669esac
17670fi
17671READELF=$ac_cv_path_READELF
17672if test -n "$READELF"; then
17673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17674$as_echo "$READELF" >&6; }
17675else
17676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17677$as_echo "no" >&6; }
17678fi
17679
17680
17681  test -n "$READELF" && break
17682done
17683
17684    else
17685      # If it succeeded, then it was overridden by the user. We will use it
17686      # for the tool.
17687
17688      # First remove it from the list of overridden variables, so we can test
17689      # for unknown variables in the end.
17690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17691
17692      # Check if the provided tool contains a complete path.
17693      tool_specified="$READELF"
17694      tool_basename="${tool_specified##*/}"
17695      if test "x$tool_basename" = "x$tool_specified"; then
17696        # A command without a complete path is provided, search $PATH.
17697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17698$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17699        # Extract the first word of "$tool_basename", so it can be a program name with args.
17700set dummy $tool_basename; ac_word=$2
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702$as_echo_n "checking for $ac_word... " >&6; }
17703if ${ac_cv_path_READELF+:} false; then :
17704  $as_echo_n "(cached) " >&6
17705else
17706  case $READELF in
17707  [\\/]* | ?:[\\/]*)
17708  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17709  ;;
17710  *)
17711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712for as_dir in $PATH
17713do
17714  IFS=$as_save_IFS
17715  test -z "$as_dir" && as_dir=.
17716    for ac_exec_ext in '' $ac_executable_extensions; do
17717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720    break 2
17721  fi
17722done
17723  done
17724IFS=$as_save_IFS
17725
17726  ;;
17727esac
17728fi
17729READELF=$ac_cv_path_READELF
17730if test -n "$READELF"; then
17731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17732$as_echo "$READELF" >&6; }
17733else
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735$as_echo "no" >&6; }
17736fi
17737
17738
17739        if test "x$READELF" = x; then
17740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17741        fi
17742      else
17743        # Otherwise we believe it is a complete path. Use it as it is.
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17745$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17747$as_echo_n "checking for READELF... " >&6; }
17748        if test ! -x "$tool_specified"; then
17749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17750$as_echo "not found" >&6; }
17751          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17752        fi
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17754$as_echo "$tool_specified" >&6; }
17755      fi
17756    fi
17757  fi
17758
17759
17760
17761
17762  # Publish this variable in the help.
17763
17764
17765  if test "x$HG" = x; then
17766    # The variable is not set by user, try to locate tool using the code snippet
17767    for ac_prog in hg
17768do
17769  # Extract the first word of "$ac_prog", so it can be a program name with args.
17770set dummy $ac_prog; ac_word=$2
17771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17772$as_echo_n "checking for $ac_word... " >&6; }
17773if ${ac_cv_path_HG+:} false; then :
17774  $as_echo_n "(cached) " >&6
17775else
17776  case $HG in
17777  [\\/]* | ?:[\\/]*)
17778  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17779  ;;
17780  *)
17781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17782for as_dir in $PATH
17783do
17784  IFS=$as_save_IFS
17785  test -z "$as_dir" && as_dir=.
17786    for ac_exec_ext in '' $ac_executable_extensions; do
17787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17788    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17790    break 2
17791  fi
17792done
17793  done
17794IFS=$as_save_IFS
17795
17796  ;;
17797esac
17798fi
17799HG=$ac_cv_path_HG
17800if test -n "$HG"; then
17801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17802$as_echo "$HG" >&6; }
17803else
17804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17805$as_echo "no" >&6; }
17806fi
17807
17808
17809  test -n "$HG" && break
17810done
17811
17812  else
17813    # The variable is set, but is it from the command line or the environment?
17814
17815    # Try to remove the string !HG! from our list.
17816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17818      # If it failed, the variable was not from the command line. Ignore it,
17819      # but warn the user (except for BASH, which is always set by the calling BASH).
17820      if test "xHG" != xBASH; then
17821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17822$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17823      fi
17824      # Try to locate tool using the code snippet
17825      for ac_prog in hg
17826do
17827  # Extract the first word of "$ac_prog", so it can be a program name with args.
17828set dummy $ac_prog; ac_word=$2
17829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17830$as_echo_n "checking for $ac_word... " >&6; }
17831if ${ac_cv_path_HG+:} false; then :
17832  $as_echo_n "(cached) " >&6
17833else
17834  case $HG in
17835  [\\/]* | ?:[\\/]*)
17836  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17837  ;;
17838  *)
17839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17840for as_dir in $PATH
17841do
17842  IFS=$as_save_IFS
17843  test -z "$as_dir" && as_dir=.
17844    for ac_exec_ext in '' $ac_executable_extensions; do
17845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17846    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17848    break 2
17849  fi
17850done
17851  done
17852IFS=$as_save_IFS
17853
17854  ;;
17855esac
17856fi
17857HG=$ac_cv_path_HG
17858if test -n "$HG"; then
17859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17860$as_echo "$HG" >&6; }
17861else
17862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17863$as_echo "no" >&6; }
17864fi
17865
17866
17867  test -n "$HG" && break
17868done
17869
17870    else
17871      # If it succeeded, then it was overridden by the user. We will use it
17872      # for the tool.
17873
17874      # First remove it from the list of overridden variables, so we can test
17875      # for unknown variables in the end.
17876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17877
17878      # Check if the provided tool contains a complete path.
17879      tool_specified="$HG"
17880      tool_basename="${tool_specified##*/}"
17881      if test "x$tool_basename" = "x$tool_specified"; then
17882        # A command without a complete path is provided, search $PATH.
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17884$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17885        # Extract the first word of "$tool_basename", so it can be a program name with args.
17886set dummy $tool_basename; ac_word=$2
17887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17888$as_echo_n "checking for $ac_word... " >&6; }
17889if ${ac_cv_path_HG+:} false; then :
17890  $as_echo_n "(cached) " >&6
17891else
17892  case $HG in
17893  [\\/]* | ?:[\\/]*)
17894  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17895  ;;
17896  *)
17897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17898for as_dir in $PATH
17899do
17900  IFS=$as_save_IFS
17901  test -z "$as_dir" && as_dir=.
17902    for ac_exec_ext in '' $ac_executable_extensions; do
17903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17904    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17906    break 2
17907  fi
17908done
17909  done
17910IFS=$as_save_IFS
17911
17912  ;;
17913esac
17914fi
17915HG=$ac_cv_path_HG
17916if test -n "$HG"; then
17917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17918$as_echo "$HG" >&6; }
17919else
17920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17921$as_echo "no" >&6; }
17922fi
17923
17924
17925        if test "x$HG" = x; then
17926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17927        fi
17928      else
17929        # Otherwise we believe it is a complete path. Use it as it is.
17930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17931$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17933$as_echo_n "checking for HG... " >&6; }
17934        if test ! -x "$tool_specified"; then
17935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17936$as_echo "not found" >&6; }
17937          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17938        fi
17939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17940$as_echo "$tool_specified" >&6; }
17941      fi
17942    fi
17943  fi
17944
17945
17946
17947
17948  # Publish this variable in the help.
17949
17950
17951  if test "x$STAT" = x; then
17952    # The variable is not set by user, try to locate tool using the code snippet
17953    for ac_prog in stat
17954do
17955  # Extract the first word of "$ac_prog", so it can be a program name with args.
17956set dummy $ac_prog; ac_word=$2
17957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17958$as_echo_n "checking for $ac_word... " >&6; }
17959if ${ac_cv_path_STAT+:} false; then :
17960  $as_echo_n "(cached) " >&6
17961else
17962  case $STAT in
17963  [\\/]* | ?:[\\/]*)
17964  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17965  ;;
17966  *)
17967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17968for as_dir in $PATH
17969do
17970  IFS=$as_save_IFS
17971  test -z "$as_dir" && as_dir=.
17972    for ac_exec_ext in '' $ac_executable_extensions; do
17973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17974    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17976    break 2
17977  fi
17978done
17979  done
17980IFS=$as_save_IFS
17981
17982  ;;
17983esac
17984fi
17985STAT=$ac_cv_path_STAT
17986if test -n "$STAT"; then
17987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17988$as_echo "$STAT" >&6; }
17989else
17990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17991$as_echo "no" >&6; }
17992fi
17993
17994
17995  test -n "$STAT" && break
17996done
17997
17998  else
17999    # The variable is set, but is it from the command line or the environment?
18000
18001    # Try to remove the string !STAT! from our list.
18002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18004      # If it failed, the variable was not from the command line. Ignore it,
18005      # but warn the user (except for BASH, which is always set by the calling BASH).
18006      if test "xSTAT" != xBASH; then
18007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18008$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18009      fi
18010      # Try to locate tool using the code snippet
18011      for ac_prog in stat
18012do
18013  # Extract the first word of "$ac_prog", so it can be a program name with args.
18014set dummy $ac_prog; ac_word=$2
18015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18016$as_echo_n "checking for $ac_word... " >&6; }
18017if ${ac_cv_path_STAT+:} false; then :
18018  $as_echo_n "(cached) " >&6
18019else
18020  case $STAT in
18021  [\\/]* | ?:[\\/]*)
18022  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18023  ;;
18024  *)
18025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18026for as_dir in $PATH
18027do
18028  IFS=$as_save_IFS
18029  test -z "$as_dir" && as_dir=.
18030    for ac_exec_ext in '' $ac_executable_extensions; do
18031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18032    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18034    break 2
18035  fi
18036done
18037  done
18038IFS=$as_save_IFS
18039
18040  ;;
18041esac
18042fi
18043STAT=$ac_cv_path_STAT
18044if test -n "$STAT"; then
18045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18046$as_echo "$STAT" >&6; }
18047else
18048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18049$as_echo "no" >&6; }
18050fi
18051
18052
18053  test -n "$STAT" && break
18054done
18055
18056    else
18057      # If it succeeded, then it was overridden by the user. We will use it
18058      # for the tool.
18059
18060      # First remove it from the list of overridden variables, so we can test
18061      # for unknown variables in the end.
18062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18063
18064      # Check if the provided tool contains a complete path.
18065      tool_specified="$STAT"
18066      tool_basename="${tool_specified##*/}"
18067      if test "x$tool_basename" = "x$tool_specified"; then
18068        # A command without a complete path is provided, search $PATH.
18069        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18070$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18071        # Extract the first word of "$tool_basename", so it can be a program name with args.
18072set dummy $tool_basename; ac_word=$2
18073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18074$as_echo_n "checking for $ac_word... " >&6; }
18075if ${ac_cv_path_STAT+:} false; then :
18076  $as_echo_n "(cached) " >&6
18077else
18078  case $STAT in
18079  [\\/]* | ?:[\\/]*)
18080  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18081  ;;
18082  *)
18083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18084for as_dir in $PATH
18085do
18086  IFS=$as_save_IFS
18087  test -z "$as_dir" && as_dir=.
18088    for ac_exec_ext in '' $ac_executable_extensions; do
18089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18090    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18092    break 2
18093  fi
18094done
18095  done
18096IFS=$as_save_IFS
18097
18098  ;;
18099esac
18100fi
18101STAT=$ac_cv_path_STAT
18102if test -n "$STAT"; then
18103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18104$as_echo "$STAT" >&6; }
18105else
18106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18107$as_echo "no" >&6; }
18108fi
18109
18110
18111        if test "x$STAT" = x; then
18112          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18113        fi
18114      else
18115        # Otherwise we believe it is a complete path. Use it as it is.
18116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18117$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18119$as_echo_n "checking for STAT... " >&6; }
18120        if test ! -x "$tool_specified"; then
18121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18122$as_echo "not found" >&6; }
18123          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18124        fi
18125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18126$as_echo "$tool_specified" >&6; }
18127      fi
18128    fi
18129  fi
18130
18131
18132
18133
18134  # Publish this variable in the help.
18135
18136
18137  if test "x$TIME" = x; then
18138    # The variable is not set by user, try to locate tool using the code snippet
18139    for ac_prog in time
18140do
18141  # Extract the first word of "$ac_prog", so it can be a program name with args.
18142set dummy $ac_prog; ac_word=$2
18143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18144$as_echo_n "checking for $ac_word... " >&6; }
18145if ${ac_cv_path_TIME+:} false; then :
18146  $as_echo_n "(cached) " >&6
18147else
18148  case $TIME in
18149  [\\/]* | ?:[\\/]*)
18150  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18151  ;;
18152  *)
18153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18154for as_dir in $PATH
18155do
18156  IFS=$as_save_IFS
18157  test -z "$as_dir" && as_dir=.
18158    for ac_exec_ext in '' $ac_executable_extensions; do
18159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18160    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18162    break 2
18163  fi
18164done
18165  done
18166IFS=$as_save_IFS
18167
18168  ;;
18169esac
18170fi
18171TIME=$ac_cv_path_TIME
18172if test -n "$TIME"; then
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18174$as_echo "$TIME" >&6; }
18175else
18176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18177$as_echo "no" >&6; }
18178fi
18179
18180
18181  test -n "$TIME" && break
18182done
18183
18184  else
18185    # The variable is set, but is it from the command line or the environment?
18186
18187    # Try to remove the string !TIME! from our list.
18188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18190      # If it failed, the variable was not from the command line. Ignore it,
18191      # but warn the user (except for BASH, which is always set by the calling BASH).
18192      if test "xTIME" != xBASH; then
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18194$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18195      fi
18196      # Try to locate tool using the code snippet
18197      for ac_prog in time
18198do
18199  # Extract the first word of "$ac_prog", so it can be a program name with args.
18200set dummy $ac_prog; ac_word=$2
18201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18202$as_echo_n "checking for $ac_word... " >&6; }
18203if ${ac_cv_path_TIME+:} false; then :
18204  $as_echo_n "(cached) " >&6
18205else
18206  case $TIME in
18207  [\\/]* | ?:[\\/]*)
18208  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18209  ;;
18210  *)
18211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18212for as_dir in $PATH
18213do
18214  IFS=$as_save_IFS
18215  test -z "$as_dir" && as_dir=.
18216    for ac_exec_ext in '' $ac_executable_extensions; do
18217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18218    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18220    break 2
18221  fi
18222done
18223  done
18224IFS=$as_save_IFS
18225
18226  ;;
18227esac
18228fi
18229TIME=$ac_cv_path_TIME
18230if test -n "$TIME"; then
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18232$as_echo "$TIME" >&6; }
18233else
18234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18235$as_echo "no" >&6; }
18236fi
18237
18238
18239  test -n "$TIME" && break
18240done
18241
18242    else
18243      # If it succeeded, then it was overridden by the user. We will use it
18244      # for the tool.
18245
18246      # First remove it from the list of overridden variables, so we can test
18247      # for unknown variables in the end.
18248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18249
18250      # Check if the provided tool contains a complete path.
18251      tool_specified="$TIME"
18252      tool_basename="${tool_specified##*/}"
18253      if test "x$tool_basename" = "x$tool_specified"; then
18254        # A command without a complete path is provided, search $PATH.
18255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18256$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18257        # Extract the first word of "$tool_basename", so it can be a program name with args.
18258set dummy $tool_basename; ac_word=$2
18259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18260$as_echo_n "checking for $ac_word... " >&6; }
18261if ${ac_cv_path_TIME+:} false; then :
18262  $as_echo_n "(cached) " >&6
18263else
18264  case $TIME in
18265  [\\/]* | ?:[\\/]*)
18266  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18267  ;;
18268  *)
18269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18270for as_dir in $PATH
18271do
18272  IFS=$as_save_IFS
18273  test -z "$as_dir" && as_dir=.
18274    for ac_exec_ext in '' $ac_executable_extensions; do
18275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18276    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18278    break 2
18279  fi
18280done
18281  done
18282IFS=$as_save_IFS
18283
18284  ;;
18285esac
18286fi
18287TIME=$ac_cv_path_TIME
18288if test -n "$TIME"; then
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18290$as_echo "$TIME" >&6; }
18291else
18292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18293$as_echo "no" >&6; }
18294fi
18295
18296
18297        if test "x$TIME" = x; then
18298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18299        fi
18300      else
18301        # Otherwise we believe it is a complete path. Use it as it is.
18302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18303$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18305$as_echo_n "checking for TIME... " >&6; }
18306        if test ! -x "$tool_specified"; then
18307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18308$as_echo "not found" >&6; }
18309          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18310        fi
18311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18312$as_echo "$tool_specified" >&6; }
18313      fi
18314    fi
18315  fi
18316
18317
18318  # Check if it's GNU time
18319  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18320  if test "x$IS_GNU_TIME" != x; then
18321    IS_GNU_TIME=yes
18322  else
18323    IS_GNU_TIME=no
18324  fi
18325
18326
18327  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18328
18329
18330
18331  # Publish this variable in the help.
18332
18333
18334  if test "x$COMM" = x; then
18335    # The variable is not set by user, try to locate tool using the code snippet
18336    for ac_prog in comm
18337do
18338  # Extract the first word of "$ac_prog", so it can be a program name with args.
18339set dummy $ac_prog; ac_word=$2
18340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18341$as_echo_n "checking for $ac_word... " >&6; }
18342if ${ac_cv_path_COMM+:} false; then :
18343  $as_echo_n "(cached) " >&6
18344else
18345  case $COMM in
18346  [\\/]* | ?:[\\/]*)
18347  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18348  ;;
18349  *)
18350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18351for as_dir in $PATH
18352do
18353  IFS=$as_save_IFS
18354  test -z "$as_dir" && as_dir=.
18355    for ac_exec_ext in '' $ac_executable_extensions; do
18356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18357    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18359    break 2
18360  fi
18361done
18362  done
18363IFS=$as_save_IFS
18364
18365  ;;
18366esac
18367fi
18368COMM=$ac_cv_path_COMM
18369if test -n "$COMM"; then
18370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18371$as_echo "$COMM" >&6; }
18372else
18373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18374$as_echo "no" >&6; }
18375fi
18376
18377
18378  test -n "$COMM" && break
18379done
18380
18381  else
18382    # The variable is set, but is it from the command line or the environment?
18383
18384    # Try to remove the string !COMM! from our list.
18385    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18386    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18387      # If it failed, the variable was not from the command line. Ignore it,
18388      # but warn the user (except for BASH, which is always set by the calling BASH).
18389      if test "xCOMM" != xBASH; then
18390        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18391$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18392      fi
18393      # Try to locate tool using the code snippet
18394      for ac_prog in comm
18395do
18396  # Extract the first word of "$ac_prog", so it can be a program name with args.
18397set dummy $ac_prog; ac_word=$2
18398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18399$as_echo_n "checking for $ac_word... " >&6; }
18400if ${ac_cv_path_COMM+:} false; then :
18401  $as_echo_n "(cached) " >&6
18402else
18403  case $COMM in
18404  [\\/]* | ?:[\\/]*)
18405  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18406  ;;
18407  *)
18408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18409for as_dir in $PATH
18410do
18411  IFS=$as_save_IFS
18412  test -z "$as_dir" && as_dir=.
18413    for ac_exec_ext in '' $ac_executable_extensions; do
18414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18415    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18417    break 2
18418  fi
18419done
18420  done
18421IFS=$as_save_IFS
18422
18423  ;;
18424esac
18425fi
18426COMM=$ac_cv_path_COMM
18427if test -n "$COMM"; then
18428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18429$as_echo "$COMM" >&6; }
18430else
18431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18432$as_echo "no" >&6; }
18433fi
18434
18435
18436  test -n "$COMM" && break
18437done
18438
18439    else
18440      # If it succeeded, then it was overridden by the user. We will use it
18441      # for the tool.
18442
18443      # First remove it from the list of overridden variables, so we can test
18444      # for unknown variables in the end.
18445      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18446
18447      # Check if the provided tool contains a complete path.
18448      tool_specified="$COMM"
18449      tool_basename="${tool_specified##*/}"
18450      if test "x$tool_basename" = "x$tool_specified"; then
18451        # A command without a complete path is provided, search $PATH.
18452        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18453$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18454        # Extract the first word of "$tool_basename", so it can be a program name with args.
18455set dummy $tool_basename; ac_word=$2
18456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18457$as_echo_n "checking for $ac_word... " >&6; }
18458if ${ac_cv_path_COMM+:} false; then :
18459  $as_echo_n "(cached) " >&6
18460else
18461  case $COMM in
18462  [\\/]* | ?:[\\/]*)
18463  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18464  ;;
18465  *)
18466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467for as_dir in $PATH
18468do
18469  IFS=$as_save_IFS
18470  test -z "$as_dir" && as_dir=.
18471    for ac_exec_ext in '' $ac_executable_extensions; do
18472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18473    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18475    break 2
18476  fi
18477done
18478  done
18479IFS=$as_save_IFS
18480
18481  ;;
18482esac
18483fi
18484COMM=$ac_cv_path_COMM
18485if test -n "$COMM"; then
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18487$as_echo "$COMM" >&6; }
18488else
18489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18490$as_echo "no" >&6; }
18491fi
18492
18493
18494        if test "x$COMM" = x; then
18495          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18496        fi
18497      else
18498        # Otherwise we believe it is a complete path. Use it as it is.
18499        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18500$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18502$as_echo_n "checking for COMM... " >&6; }
18503        if test ! -x "$tool_specified"; then
18504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18505$as_echo "not found" >&6; }
18506          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18507        fi
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18509$as_echo "$tool_specified" >&6; }
18510      fi
18511    fi
18512  fi
18513
18514
18515
18516  if test "x$COMM" = x; then
18517    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18518  fi
18519
18520
18521  fi
18522
18523  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18524
18525
18526
18527  # Publish this variable in the help.
18528
18529
18530  if test "x$DSYMUTIL" = x; then
18531    # The variable is not set by user, try to locate tool using the code snippet
18532    for ac_prog in dsymutil
18533do
18534  # Extract the first word of "$ac_prog", so it can be a program name with args.
18535set dummy $ac_prog; ac_word=$2
18536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18537$as_echo_n "checking for $ac_word... " >&6; }
18538if ${ac_cv_path_DSYMUTIL+:} false; then :
18539  $as_echo_n "(cached) " >&6
18540else
18541  case $DSYMUTIL in
18542  [\\/]* | ?:[\\/]*)
18543  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18544  ;;
18545  *)
18546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18547for as_dir in $PATH
18548do
18549  IFS=$as_save_IFS
18550  test -z "$as_dir" && as_dir=.
18551    for ac_exec_ext in '' $ac_executable_extensions; do
18552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18553    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18555    break 2
18556  fi
18557done
18558  done
18559IFS=$as_save_IFS
18560
18561  ;;
18562esac
18563fi
18564DSYMUTIL=$ac_cv_path_DSYMUTIL
18565if test -n "$DSYMUTIL"; then
18566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18567$as_echo "$DSYMUTIL" >&6; }
18568else
18569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18570$as_echo "no" >&6; }
18571fi
18572
18573
18574  test -n "$DSYMUTIL" && break
18575done
18576
18577  else
18578    # The variable is set, but is it from the command line or the environment?
18579
18580    # Try to remove the string !DSYMUTIL! from our list.
18581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18583      # If it failed, the variable was not from the command line. Ignore it,
18584      # but warn the user (except for BASH, which is always set by the calling BASH).
18585      if test "xDSYMUTIL" != xBASH; then
18586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18587$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18588      fi
18589      # Try to locate tool using the code snippet
18590      for ac_prog in dsymutil
18591do
18592  # Extract the first word of "$ac_prog", so it can be a program name with args.
18593set dummy $ac_prog; ac_word=$2
18594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18595$as_echo_n "checking for $ac_word... " >&6; }
18596if ${ac_cv_path_DSYMUTIL+:} false; then :
18597  $as_echo_n "(cached) " >&6
18598else
18599  case $DSYMUTIL in
18600  [\\/]* | ?:[\\/]*)
18601  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18602  ;;
18603  *)
18604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18605for as_dir in $PATH
18606do
18607  IFS=$as_save_IFS
18608  test -z "$as_dir" && as_dir=.
18609    for ac_exec_ext in '' $ac_executable_extensions; do
18610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18611    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18613    break 2
18614  fi
18615done
18616  done
18617IFS=$as_save_IFS
18618
18619  ;;
18620esac
18621fi
18622DSYMUTIL=$ac_cv_path_DSYMUTIL
18623if test -n "$DSYMUTIL"; then
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18625$as_echo "$DSYMUTIL" >&6; }
18626else
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18628$as_echo "no" >&6; }
18629fi
18630
18631
18632  test -n "$DSYMUTIL" && break
18633done
18634
18635    else
18636      # If it succeeded, then it was overridden by the user. We will use it
18637      # for the tool.
18638
18639      # First remove it from the list of overridden variables, so we can test
18640      # for unknown variables in the end.
18641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18642
18643      # Check if the provided tool contains a complete path.
18644      tool_specified="$DSYMUTIL"
18645      tool_basename="${tool_specified##*/}"
18646      if test "x$tool_basename" = "x$tool_specified"; then
18647        # A command without a complete path is provided, search $PATH.
18648        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18649$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18650        # Extract the first word of "$tool_basename", so it can be a program name with args.
18651set dummy $tool_basename; ac_word=$2
18652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18653$as_echo_n "checking for $ac_word... " >&6; }
18654if ${ac_cv_path_DSYMUTIL+:} false; then :
18655  $as_echo_n "(cached) " >&6
18656else
18657  case $DSYMUTIL in
18658  [\\/]* | ?:[\\/]*)
18659  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18660  ;;
18661  *)
18662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18663for as_dir in $PATH
18664do
18665  IFS=$as_save_IFS
18666  test -z "$as_dir" && as_dir=.
18667    for ac_exec_ext in '' $ac_executable_extensions; do
18668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18669    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18671    break 2
18672  fi
18673done
18674  done
18675IFS=$as_save_IFS
18676
18677  ;;
18678esac
18679fi
18680DSYMUTIL=$ac_cv_path_DSYMUTIL
18681if test -n "$DSYMUTIL"; then
18682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18683$as_echo "$DSYMUTIL" >&6; }
18684else
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18686$as_echo "no" >&6; }
18687fi
18688
18689
18690        if test "x$DSYMUTIL" = x; then
18691          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18692        fi
18693      else
18694        # Otherwise we believe it is a complete path. Use it as it is.
18695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18696$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18698$as_echo_n "checking for DSYMUTIL... " >&6; }
18699        if test ! -x "$tool_specified"; then
18700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18701$as_echo "not found" >&6; }
18702          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18703        fi
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18705$as_echo "$tool_specified" >&6; }
18706      fi
18707    fi
18708  fi
18709
18710
18711
18712  if test "x$DSYMUTIL" = x; then
18713    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18714  fi
18715
18716
18717
18718
18719
18720  # Publish this variable in the help.
18721
18722
18723  if test "x$XATTR" = x; then
18724    # The variable is not set by user, try to locate tool using the code snippet
18725    for ac_prog in xattr
18726do
18727  # Extract the first word of "$ac_prog", so it can be a program name with args.
18728set dummy $ac_prog; ac_word=$2
18729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18730$as_echo_n "checking for $ac_word... " >&6; }
18731if ${ac_cv_path_XATTR+:} false; then :
18732  $as_echo_n "(cached) " >&6
18733else
18734  case $XATTR in
18735  [\\/]* | ?:[\\/]*)
18736  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18737  ;;
18738  *)
18739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18740for as_dir in $PATH
18741do
18742  IFS=$as_save_IFS
18743  test -z "$as_dir" && as_dir=.
18744    for ac_exec_ext in '' $ac_executable_extensions; do
18745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18746    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18748    break 2
18749  fi
18750done
18751  done
18752IFS=$as_save_IFS
18753
18754  ;;
18755esac
18756fi
18757XATTR=$ac_cv_path_XATTR
18758if test -n "$XATTR"; then
18759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18760$as_echo "$XATTR" >&6; }
18761else
18762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18763$as_echo "no" >&6; }
18764fi
18765
18766
18767  test -n "$XATTR" && break
18768done
18769
18770  else
18771    # The variable is set, but is it from the command line or the environment?
18772
18773    # Try to remove the string !XATTR! from our list.
18774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18776      # If it failed, the variable was not from the command line. Ignore it,
18777      # but warn the user (except for BASH, which is always set by the calling BASH).
18778      if test "xXATTR" != xBASH; then
18779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18780$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18781      fi
18782      # Try to locate tool using the code snippet
18783      for ac_prog in xattr
18784do
18785  # Extract the first word of "$ac_prog", so it can be a program name with args.
18786set dummy $ac_prog; ac_word=$2
18787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18788$as_echo_n "checking for $ac_word... " >&6; }
18789if ${ac_cv_path_XATTR+:} false; then :
18790  $as_echo_n "(cached) " >&6
18791else
18792  case $XATTR in
18793  [\\/]* | ?:[\\/]*)
18794  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18795  ;;
18796  *)
18797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18798for as_dir in $PATH
18799do
18800  IFS=$as_save_IFS
18801  test -z "$as_dir" && as_dir=.
18802    for ac_exec_ext in '' $ac_executable_extensions; do
18803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18804    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18806    break 2
18807  fi
18808done
18809  done
18810IFS=$as_save_IFS
18811
18812  ;;
18813esac
18814fi
18815XATTR=$ac_cv_path_XATTR
18816if test -n "$XATTR"; then
18817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18818$as_echo "$XATTR" >&6; }
18819else
18820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18821$as_echo "no" >&6; }
18822fi
18823
18824
18825  test -n "$XATTR" && break
18826done
18827
18828    else
18829      # If it succeeded, then it was overridden by the user. We will use it
18830      # for the tool.
18831
18832      # First remove it from the list of overridden variables, so we can test
18833      # for unknown variables in the end.
18834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18835
18836      # Check if the provided tool contains a complete path.
18837      tool_specified="$XATTR"
18838      tool_basename="${tool_specified##*/}"
18839      if test "x$tool_basename" = "x$tool_specified"; then
18840        # A command without a complete path is provided, search $PATH.
18841        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18842$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18843        # Extract the first word of "$tool_basename", so it can be a program name with args.
18844set dummy $tool_basename; ac_word=$2
18845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18846$as_echo_n "checking for $ac_word... " >&6; }
18847if ${ac_cv_path_XATTR+:} false; then :
18848  $as_echo_n "(cached) " >&6
18849else
18850  case $XATTR in
18851  [\\/]* | ?:[\\/]*)
18852  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18853  ;;
18854  *)
18855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18856for as_dir in $PATH
18857do
18858  IFS=$as_save_IFS
18859  test -z "$as_dir" && as_dir=.
18860    for ac_exec_ext in '' $ac_executable_extensions; do
18861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18862    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18864    break 2
18865  fi
18866done
18867  done
18868IFS=$as_save_IFS
18869
18870  ;;
18871esac
18872fi
18873XATTR=$ac_cv_path_XATTR
18874if test -n "$XATTR"; then
18875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18876$as_echo "$XATTR" >&6; }
18877else
18878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18879$as_echo "no" >&6; }
18880fi
18881
18882
18883        if test "x$XATTR" = x; then
18884          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18885        fi
18886      else
18887        # Otherwise we believe it is a complete path. Use it as it is.
18888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18889$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18891$as_echo_n "checking for XATTR... " >&6; }
18892        if test ! -x "$tool_specified"; then
18893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18894$as_echo "not found" >&6; }
18895          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18896        fi
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18898$as_echo "$tool_specified" >&6; }
18899      fi
18900    fi
18901  fi
18902
18903
18904
18905  if test "x$XATTR" = x; then
18906    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18907  fi
18908
18909
18910
18911
18912  # Publish this variable in the help.
18913
18914
18915  if test "x$CODESIGN" = x; then
18916    # The variable is not set by user, try to locate tool using the code snippet
18917    for ac_prog in codesign
18918do
18919  # Extract the first word of "$ac_prog", so it can be a program name with args.
18920set dummy $ac_prog; ac_word=$2
18921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18922$as_echo_n "checking for $ac_word... " >&6; }
18923if ${ac_cv_path_CODESIGN+:} false; then :
18924  $as_echo_n "(cached) " >&6
18925else
18926  case $CODESIGN in
18927  [\\/]* | ?:[\\/]*)
18928  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18929  ;;
18930  *)
18931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18932for as_dir in $PATH
18933do
18934  IFS=$as_save_IFS
18935  test -z "$as_dir" && as_dir=.
18936    for ac_exec_ext in '' $ac_executable_extensions; do
18937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18938    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18940    break 2
18941  fi
18942done
18943  done
18944IFS=$as_save_IFS
18945
18946  ;;
18947esac
18948fi
18949CODESIGN=$ac_cv_path_CODESIGN
18950if test -n "$CODESIGN"; then
18951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18952$as_echo "$CODESIGN" >&6; }
18953else
18954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18955$as_echo "no" >&6; }
18956fi
18957
18958
18959  test -n "$CODESIGN" && break
18960done
18961
18962  else
18963    # The variable is set, but is it from the command line or the environment?
18964
18965    # Try to remove the string !CODESIGN! from our list.
18966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18968      # If it failed, the variable was not from the command line. Ignore it,
18969      # but warn the user (except for BASH, which is always set by the calling BASH).
18970      if test "xCODESIGN" != xBASH; then
18971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18972$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18973      fi
18974      # Try to locate tool using the code snippet
18975      for ac_prog in codesign
18976do
18977  # Extract the first word of "$ac_prog", so it can be a program name with args.
18978set dummy $ac_prog; ac_word=$2
18979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18980$as_echo_n "checking for $ac_word... " >&6; }
18981if ${ac_cv_path_CODESIGN+:} false; then :
18982  $as_echo_n "(cached) " >&6
18983else
18984  case $CODESIGN in
18985  [\\/]* | ?:[\\/]*)
18986  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18987  ;;
18988  *)
18989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18990for as_dir in $PATH
18991do
18992  IFS=$as_save_IFS
18993  test -z "$as_dir" && as_dir=.
18994    for ac_exec_ext in '' $ac_executable_extensions; do
18995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18996    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18998    break 2
18999  fi
19000done
19001  done
19002IFS=$as_save_IFS
19003
19004  ;;
19005esac
19006fi
19007CODESIGN=$ac_cv_path_CODESIGN
19008if test -n "$CODESIGN"; then
19009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19010$as_echo "$CODESIGN" >&6; }
19011else
19012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19013$as_echo "no" >&6; }
19014fi
19015
19016
19017  test -n "$CODESIGN" && break
19018done
19019
19020    else
19021      # If it succeeded, then it was overridden by the user. We will use it
19022      # for the tool.
19023
19024      # First remove it from the list of overridden variables, so we can test
19025      # for unknown variables in the end.
19026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19027
19028      # Check if the provided tool contains a complete path.
19029      tool_specified="$CODESIGN"
19030      tool_basename="${tool_specified##*/}"
19031      if test "x$tool_basename" = "x$tool_specified"; then
19032        # A command without a complete path is provided, search $PATH.
19033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19034$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19035        # Extract the first word of "$tool_basename", so it can be a program name with args.
19036set dummy $tool_basename; ac_word=$2
19037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19038$as_echo_n "checking for $ac_word... " >&6; }
19039if ${ac_cv_path_CODESIGN+:} false; then :
19040  $as_echo_n "(cached) " >&6
19041else
19042  case $CODESIGN in
19043  [\\/]* | ?:[\\/]*)
19044  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19045  ;;
19046  *)
19047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19048for as_dir in $PATH
19049do
19050  IFS=$as_save_IFS
19051  test -z "$as_dir" && as_dir=.
19052    for ac_exec_ext in '' $ac_executable_extensions; do
19053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19054    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19056    break 2
19057  fi
19058done
19059  done
19060IFS=$as_save_IFS
19061
19062  ;;
19063esac
19064fi
19065CODESIGN=$ac_cv_path_CODESIGN
19066if test -n "$CODESIGN"; then
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19068$as_echo "$CODESIGN" >&6; }
19069else
19070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19071$as_echo "no" >&6; }
19072fi
19073
19074
19075        if test "x$CODESIGN" = x; then
19076          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19077        fi
19078      else
19079        # Otherwise we believe it is a complete path. Use it as it is.
19080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19081$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19083$as_echo_n "checking for CODESIGN... " >&6; }
19084        if test ! -x "$tool_specified"; then
19085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19086$as_echo "not found" >&6; }
19087          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19088        fi
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19090$as_echo "$tool_specified" >&6; }
19091      fi
19092    fi
19093  fi
19094
19095
19096    if test "x$CODESIGN" != "x"; then
19097      # Verify that the openjdk_codesign certificate is present
19098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19099$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19100      rm -f codesign-testfile
19101      touch codesign-testfile
19102      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19103      rm -f codesign-testfile
19104      if test "x$CODESIGN" = x; then
19105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19106$as_echo "no" >&6; }
19107      else
19108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19109$as_echo "yes" >&6; }
19110      fi
19111    fi
19112  fi
19113
19114
19115# Check if pkg-config is available.
19116
19117
19118if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19119	if test -n "$ac_tool_prefix"; then
19120  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19121set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19123$as_echo_n "checking for $ac_word... " >&6; }
19124if ${ac_cv_path_PKG_CONFIG+:} false; then :
19125  $as_echo_n "(cached) " >&6
19126else
19127  case $PKG_CONFIG in
19128  [\\/]* | ?:[\\/]*)
19129  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19130  ;;
19131  *)
19132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19133for as_dir in $PATH
19134do
19135  IFS=$as_save_IFS
19136  test -z "$as_dir" && as_dir=.
19137    for ac_exec_ext in '' $ac_executable_extensions; do
19138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19139    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19141    break 2
19142  fi
19143done
19144  done
19145IFS=$as_save_IFS
19146
19147  ;;
19148esac
19149fi
19150PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19151if test -n "$PKG_CONFIG"; then
19152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19153$as_echo "$PKG_CONFIG" >&6; }
19154else
19155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19156$as_echo "no" >&6; }
19157fi
19158
19159
19160fi
19161if test -z "$ac_cv_path_PKG_CONFIG"; then
19162  ac_pt_PKG_CONFIG=$PKG_CONFIG
19163  # Extract the first word of "pkg-config", so it can be a program name with args.
19164set dummy pkg-config; ac_word=$2
19165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19166$as_echo_n "checking for $ac_word... " >&6; }
19167if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19168  $as_echo_n "(cached) " >&6
19169else
19170  case $ac_pt_PKG_CONFIG in
19171  [\\/]* | ?:[\\/]*)
19172  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19173  ;;
19174  *)
19175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19176for as_dir in $PATH
19177do
19178  IFS=$as_save_IFS
19179  test -z "$as_dir" && as_dir=.
19180    for ac_exec_ext in '' $ac_executable_extensions; do
19181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19182    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19184    break 2
19185  fi
19186done
19187  done
19188IFS=$as_save_IFS
19189
19190  ;;
19191esac
19192fi
19193ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19194if test -n "$ac_pt_PKG_CONFIG"; then
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19196$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19197else
19198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19199$as_echo "no" >&6; }
19200fi
19201
19202  if test "x$ac_pt_PKG_CONFIG" = x; then
19203    PKG_CONFIG=""
19204  else
19205    case $cross_compiling:$ac_tool_warned in
19206yes:)
19207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19209ac_tool_warned=yes ;;
19210esac
19211    PKG_CONFIG=$ac_pt_PKG_CONFIG
19212  fi
19213else
19214  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19215fi
19216
19217fi
19218if test -n "$PKG_CONFIG"; then
19219	_pkg_min_version=0.9.0
19220	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19221$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19222	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19223		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19224$as_echo "yes" >&6; }
19225	else
19226		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19227$as_echo "no" >&6; }
19228		PKG_CONFIG=""
19229	fi
19230
19231fi
19232
19233# After basic tools have been setup, we can check build os specific details.
19234
19235  ###############################################################################
19236
19237  # Note that this is the build platform OS version!
19238
19239  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19240  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19241  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19242  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19243
19244
19245
19246
19247
19248# Setup builddeps, for automatic downloading of tools we need.
19249# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19250# boot-jdk setup, but we need to have basic tools setup first.
19251
19252
19253# Check whether --with-builddeps-conf was given.
19254if test "${with_builddeps_conf+set}" = set; then :
19255  withval=$with_builddeps_conf;
19256fi
19257
19258
19259
19260# Check whether --with-builddeps-server was given.
19261if test "${with_builddeps_server+set}" = set; then :
19262  withval=$with_builddeps_server;
19263fi
19264
19265
19266
19267# Check whether --with-builddeps-dir was given.
19268if test "${with_builddeps_dir+set}" = set; then :
19269  withval=$with_builddeps_dir;
19270else
19271  with_builddeps_dir=/localhome/builddeps
19272fi
19273
19274
19275
19276# Check whether --with-builddeps-group was given.
19277if test "${with_builddeps_group+set}" = set; then :
19278  withval=$with_builddeps_group;
19279fi
19280
19281
19282
19283
19284  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19285    if test "x$with_builddeps_conf" != x; then
19286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19287$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19288      builddepsfile=$with_builddeps_conf
19289      if test -s $builddepsfile; then
19290        . $builddepsfile
19291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19292$as_echo "loaded!" >&6; }
19293      else
19294        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19295      fi
19296    else
19297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19298$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19299      builddepsfile=`mktemp`
19300      touch $builddepsfile
19301      # Put all found confs into a single file.
19302      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19303      # Source the file to acquire the variables
19304      if test -s $builddepsfile; then
19305        . $builddepsfile
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19307$as_echo "found at least one!" >&6; }
19308      else
19309        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19310      fi
19311    fi
19312    # Create build and target names that use _ instead of "-" and ".".
19313    # This is necessary to use them in variable names.
19314    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19315    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19316    # Extract rewrite information for build and target
19317    eval rewritten_build=\${REWRITE_${build_var}}
19318    if test "x$rewritten_build" = x; then
19319      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19320      echo Build stays the same $rewritten_build
19321    else
19322      echo Rewriting build for builddeps into $rewritten_build
19323    fi
19324    eval rewritten_target=\${REWRITE_${target_var}}
19325    if test "x$rewritten_target" = x; then
19326      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19327      echo Target stays the same $rewritten_target
19328    else
19329      echo Rewriting target for builddeps into $rewritten_target
19330    fi
19331    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19332    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19333  fi
19334  for ac_prog in 7z unzip
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  if test -n "$BDEPS_UNZIP"; then
19344  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19345else
19346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19347for as_dir in $PATH
19348do
19349  IFS=$as_save_IFS
19350  test -z "$as_dir" && as_dir=.
19351    for ac_exec_ext in '' $ac_executable_extensions; do
19352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19353    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19355    break 2
19356  fi
19357done
19358  done
19359IFS=$as_save_IFS
19360
19361fi
19362fi
19363BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19364if test -n "$BDEPS_UNZIP"; then
19365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19366$as_echo "$BDEPS_UNZIP" >&6; }
19367else
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369$as_echo "no" >&6; }
19370fi
19371
19372
19373  test -n "$BDEPS_UNZIP" && break
19374done
19375
19376  if test "x$BDEPS_UNZIP" = x7z; then
19377    BDEPS_UNZIP="7z x"
19378  fi
19379
19380  for ac_prog in wget lftp ftp
19381do
19382  # Extract the first word of "$ac_prog", so it can be a program name with args.
19383set dummy $ac_prog; ac_word=$2
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19385$as_echo_n "checking for $ac_word... " >&6; }
19386if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19387  $as_echo_n "(cached) " >&6
19388else
19389  if test -n "$BDEPS_FTP"; then
19390  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19391else
19392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19393for as_dir in $PATH
19394do
19395  IFS=$as_save_IFS
19396  test -z "$as_dir" && as_dir=.
19397    for ac_exec_ext in '' $ac_executable_extensions; do
19398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19399    ac_cv_prog_BDEPS_FTP="$ac_prog"
19400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19401    break 2
19402  fi
19403done
19404  done
19405IFS=$as_save_IFS
19406
19407fi
19408fi
19409BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19410if test -n "$BDEPS_FTP"; then
19411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19412$as_echo "$BDEPS_FTP" >&6; }
19413else
19414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19415$as_echo "no" >&6; }
19416fi
19417
19418
19419  test -n "$BDEPS_FTP" && break
19420done
19421
19422
19423
19424###############################################################################
19425#
19426# Determine OpenJDK variants, options and version numbers.
19427#
19428###############################################################################
19429
19430# We need build & target for this.
19431
19432
19433  ###############################################################################
19434  #
19435  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19436  # We always build headless support.
19437  #
19438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19439$as_echo_n "checking headful support... " >&6; }
19440  # Check whether --enable-headful was given.
19441if test "${enable_headful+set}" = set; then :
19442  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19443else
19444  SUPPORT_HEADFUL=yes
19445fi
19446
19447
19448  SUPPORT_HEADLESS=yes
19449  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19450
19451  if test "x$SUPPORT_HEADFUL" = xyes; then
19452    # We are building both headful and headless.
19453    headful_msg="include support for both headful and headless"
19454  fi
19455
19456  if test "x$SUPPORT_HEADFUL" = xno; then
19457    # Thus we are building headless only.
19458    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19459    headful_msg="headless only"
19460  fi
19461
19462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19463$as_echo "$headful_msg" >&6; }
19464
19465
19466
19467
19468
19469  # Control wether Hotspot runs Queens test after build.
19470  # Check whether --enable-hotspot-test-in-build was given.
19471if test "${enable_hotspot_test_in_build+set}" = set; then :
19472  enableval=$enable_hotspot_test_in_build;
19473else
19474  enable_hotspot_test_in_build=no
19475fi
19476
19477  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19478    TEST_IN_BUILD=true
19479  else
19480    TEST_IN_BUILD=false
19481  fi
19482
19483
19484  ###############################################################################
19485  #
19486  # Choose cacerts source file
19487  #
19488
19489# Check whether --with-cacerts-file was given.
19490if test "${with_cacerts_file+set}" = set; then :
19491  withval=$with_cacerts_file;
19492fi
19493
19494  if test "x$with_cacerts_file" != x; then
19495    CACERTS_FILE=$with_cacerts_file
19496  else
19497    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19498  fi
19499
19500
19501  ###############################################################################
19502  #
19503  # Enable or disable unlimited crypto
19504  #
19505  # Check whether --enable-unlimited-crypto was given.
19506if test "${enable_unlimited_crypto+set}" = set; then :
19507  enableval=$enable_unlimited_crypto;
19508else
19509  enable_unlimited_crypto=no
19510fi
19511
19512  if test "x$enable_unlimited_crypto" = "xyes"; then
19513    UNLIMITED_CRYPTO=true
19514  else
19515    UNLIMITED_CRYPTO=false
19516  fi
19517
19518
19519  ###############################################################################
19520  #
19521  # Enable or disable the elliptic curve crypto implementation
19522  #
19523
19524
19525  ###############################################################################
19526  #
19527  # --enable-rmiconnector-iiop
19528  #
19529  # Check whether --enable-rmiconnector-iiop was given.
19530if test "${enable_rmiconnector_iiop+set}" = set; then :
19531  enableval=$enable_rmiconnector_iiop;
19532fi
19533
19534  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19535    RMICONNECTOR_IIOP=true
19536  else
19537    RMICONNECTOR_IIOP=false
19538  fi
19539
19540
19541  ###############################################################################
19542  #
19543  # Compress jars
19544  #
19545  COMPRESS_JARS=false
19546
19547
19548
19549
19550  # Source the version numbers
19551  . $AUTOCONF_DIR/version-numbers
19552
19553  # Get the settings from parameters
19554
19555# Check whether --with-milestone was given.
19556if test "${with_milestone+set}" = set; then :
19557  withval=$with_milestone;
19558fi
19559
19560  if test "x$with_milestone" = xyes; then
19561    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19562  elif test "x$with_milestone" != x; then
19563    MILESTONE="$with_milestone"
19564  fi
19565  if test "x$MILESTONE" = x; then
19566    MILESTONE=internal
19567  fi
19568
19569
19570# Check whether --with-update-version was given.
19571if test "${with_update_version+set}" = set; then :
19572  withval=$with_update_version;
19573fi
19574
19575  if test "x$with_update_version" = xyes; then
19576    as_fn_error $? "Update version must have a value" "$LINENO" 5
19577  elif test "x$with_update_version" != x; then
19578    JDK_UPDATE_VERSION="$with_update_version"
19579    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19580    # to a bug in expr (which reduces it to just X). To work around this, we
19581    # always add a 0 to one digit update versions.
19582    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19583      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19584    fi
19585  fi
19586
19587
19588# Check whether --with-user-release-suffix was given.
19589if test "${with_user_release_suffix+set}" = set; then :
19590  withval=$with_user_release_suffix;
19591fi
19592
19593  if test "x$with_user_release_suffix" = xyes; then
19594    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19595  elif test "x$with_user_release_suffix" != x; then
19596    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19597  fi
19598
19599
19600# Check whether --with-build-number was given.
19601if test "${with_build_number+set}" = set; then :
19602  withval=$with_build_number;
19603fi
19604
19605  if test "x$with_build_number" = xyes; then
19606    as_fn_error $? "Build number must have a value" "$LINENO" 5
19607  elif test "x$with_build_number" != x; then
19608    JDK_BUILD_NUMBER="$with_build_number"
19609  fi
19610  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19611  if test "x$JDK_BUILD_NUMBER" = x; then
19612    JDK_BUILD_NUMBER=b00
19613    if test "x$USER_RELEASE_SUFFIX" = x; then
19614      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19615      # Avoid [:alnum:] since it depends on the locale.
19616      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19617      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19618    fi
19619  fi
19620
19621  # Now set the JDK version, milestone, build number etc.
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637  COPYRIGHT_YEAR=`date +'%Y'`
19638
19639
19640  if test "x$JDK_UPDATE_VERSION" != x; then
19641    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19642  else
19643    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19644  fi
19645
19646
19647  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19648
19649
19650
19651###############################################################################
19652#
19653# Setup BootJDK, used to bootstrap the build.
19654#
19655###############################################################################
19656
19657
19658  BOOT_JDK_FOUND=no
19659
19660# Check whether --with-boot-jdk was given.
19661if test "${with_boot_jdk+set}" = set; then :
19662  withval=$with_boot_jdk;
19663fi
19664
19665
19666  # We look for the Boot JDK through various means, going from more certain to
19667  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19668  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19669  # must check if this is indeed valid; otherwise we'll continue looking.
19670
19671  # Test: Is bootjdk explicitely set by command line arguments?
19672
19673  if test "x$BOOT_JDK_FOUND" = xno; then
19674    # Now execute the test
19675
19676  if test "x$with_boot_jdk" != x; then
19677    BOOT_JDK=$with_boot_jdk
19678    BOOT_JDK_FOUND=maybe
19679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19680$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19681  fi
19682
19683
19684    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19685    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19686      # Do we have a bin/java?
19687      if test ! -x "$BOOT_JDK/bin/java"; then
19688        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19690        BOOT_JDK_FOUND=no
19691      else
19692        # Do we have a bin/javac?
19693        if test ! -x "$BOOT_JDK/bin/javac"; then
19694          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19696          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19697$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19698          BOOT_JDK_FOUND=no
19699        else
19700          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19701          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19702            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19704            BOOT_JDK_FOUND=no
19705          else
19706            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19707            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19708
19709            # Extra M4 quote needed to protect [] in grep expression.
19710            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19711            if test "x$FOUND_CORRECT_VERSION" = x; then
19712              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19714              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19715$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19716              BOOT_JDK_FOUND=no
19717            else
19718              # We're done! :-)
19719              BOOT_JDK_FOUND=yes
19720
19721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19722
19723  # Input might be given as Windows format, start by converting to
19724  # unix format.
19725  path="$BOOT_JDK"
19726  new_path=`$CYGPATH -u "$path"`
19727
19728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19731  # "foo.exe" is OK but "foo" is an error.
19732  #
19733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19734  # It is also a way to make sure we got the proper file name for the real test later on.
19735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19736  if test "x$test_shortpath" = x; then
19737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19740  fi
19741
19742  # Call helper function which possibly converts this using DOS-style short mode.
19743  # If so, the updated path is stored in $new_path.
19744
19745  input_path="$new_path"
19746  # Check if we need to convert this using DOS-style short mode. If the path
19747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19748  # take no chances and rewrite it.
19749  # Note: m4 eats our [], so we need to use [ and ] instead.
19750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19751  if test "x$has_forbidden_chars" != x; then
19752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19756      # Going to short mode and back again did indeed matter. Since short mode is
19757      # case insensitive, let's make it lowercase to improve readability.
19758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19759      # Now convert it back to Unix-stile (cygpath)
19760      input_path=`$CYGPATH -u "$shortmode_path"`
19761      new_path="$input_path"
19762    fi
19763  fi
19764
19765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19766  if test "x$test_cygdrive_prefix" = x; then
19767    # As a simple fix, exclude /usr/bin since it's not a real path.
19768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19770      # a path prefixed by /cygdrive for fixpath to work.
19771      new_path="$CYGWIN_ROOT_PATH$input_path"
19772    fi
19773  fi
19774
19775
19776  if test "x$path" != "x$new_path"; then
19777    BOOT_JDK="$new_path"
19778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19780  fi
19781
19782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19783
19784  path="$BOOT_JDK"
19785  has_colon=`$ECHO $path | $GREP ^.:`
19786  new_path="$path"
19787  if test "x$has_colon" = x; then
19788    # Not in mixed or Windows style, start by that.
19789    new_path=`cmd //c echo $path`
19790  fi
19791
19792
19793  input_path="$new_path"
19794  # Check if we need to convert this using DOS-style short mode. If the path
19795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19796  # take no chances and rewrite it.
19797  # Note: m4 eats our [], so we need to use [ and ] instead.
19798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19799  if test "x$has_forbidden_chars" != x; then
19800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19802  fi
19803
19804
19805  windows_path="$new_path"
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    unix_path=`$CYGPATH -u "$windows_path"`
19808    new_path="$unix_path"
19809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19811    new_path="$unix_path"
19812  fi
19813
19814  if test "x$path" != "x$new_path"; then
19815    BOOT_JDK="$new_path"
19816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19818  fi
19819
19820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19822
19823  else
19824    # We're on a posix platform. Hooray! :)
19825    path="$BOOT_JDK"
19826    has_space=`$ECHO "$path" | $GREP " "`
19827    if test "x$has_space" != x; then
19828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19830      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19831    fi
19832
19833    # Use eval to expand a potential ~
19834    eval path="$path"
19835    if test ! -f "$path" && test ! -d "$path"; then
19836      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19837    fi
19838
19839    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19840  fi
19841
19842              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19843$as_echo_n "checking for Boot JDK... " >&6; }
19844              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19845$as_echo "$BOOT_JDK" >&6; }
19846              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19847$as_echo_n "checking Boot JDK version... " >&6; }
19848              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19849              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19850$as_echo "$BOOT_JDK_VERSION" >&6; }
19851            fi # end check jdk version
19852          fi # end check rt.jar
19853        fi # end check javac
19854      fi # end check java
19855    fi # end check boot jdk found
19856  fi
19857
19858  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19859    # Having specified an argument which is incorrect will produce an instant failure;
19860    # we should not go on looking
19861    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19862  fi
19863
19864  # Test: Is bootjdk available from builddeps?
19865
19866  if test "x$BOOT_JDK_FOUND" = xno; then
19867    # Now execute the test
19868
19869
19870
19871  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19872    # Source the builddeps file again, to make sure it uses the latest variables!
19873    . $builddepsfile
19874    # Look for a target and build machine specific resource!
19875    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19876    if test "x$resource" = x; then
19877      # Ok, lets instead look for a target specific resource
19878      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19879    fi
19880    if test "x$resource" = x; then
19881      # Ok, lets instead look for a build specific resource
19882      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19883    fi
19884    if test "x$resource" = x; then
19885      # Ok, lets instead look for a generic resource
19886      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19887      resource=${builddep_bootjdk}
19888    fi
19889    if test "x$resource" != x; then
19890      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19891$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19892      # If the resource in the builddeps.conf file is an existing directory,
19893      # for example /java/linux/cups
19894      if test -d ${resource}; then
19895        depdir=${resource}
19896      else
19897
19898  # bootjdk is for example mymodule
19899  # $resource is for example libs/general/libmymod_1_2_3.zip
19900  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19901  # $with_builddeps_dir is for example /localhome/builddeps
19902  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19903  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19904  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19905  filename=`basename $resource`
19906  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19907  filebase=${filename%%.*}
19908  extension=${filename#*.}
19909  installdir=$with_builddeps_dir/$filebase
19910  if test ! -f $installdir/$filename.unpacked; then
19911    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19912$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19913    if test ! -d $installdir; then
19914      mkdir -p $installdir
19915    fi
19916    if test ! -d $installdir; then
19917      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19918    fi
19919    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19920    touch $tmpfile
19921    if test ! -f $tmpfile; then
19922      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19923    fi
19924
19925  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19926  # $tmpfile is the local file name for the downloaded file.
19927  VALID_TOOL=no
19928  if test "x$BDEPS_FTP" = xwget; then
19929    VALID_TOOL=yes
19930    wget -O $tmpfile $with_builddeps_server/$resource
19931  fi
19932  if test "x$BDEPS_FTP" = xlftp; then
19933    VALID_TOOL=yes
19934    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19935  fi
19936  if test "x$BDEPS_FTP" = xftp; then
19937    VALID_TOOL=yes
19938    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19939    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19940    FTPUSERPWD=${FTPSERVER%%@*}
19941    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19942      FTPUSER=${userpwd%%:*}
19943      FTPPWD=${userpwd#*@}
19944      FTPSERVER=${FTPSERVER#*@}
19945    else
19946      FTPUSER=ftp
19947      FTPPWD=ftp
19948    fi
19949    # the "pass" command does not work on some
19950    # ftp clients (read ftp.exe) but if it works,
19951    # passive mode is better!
19952    ( \
19953        echo "user $FTPUSER $FTPPWD"        ; \
19954        echo "pass"                         ; \
19955        echo "bin"                          ; \
19956        echo "get $FTPPATH $tmpfile"              ; \
19957    ) | ftp -in $FTPSERVER
19958  fi
19959  if test "x$VALID_TOOL" != xyes; then
19960    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19961  fi
19962
19963    mv $tmpfile $installdir/$filename
19964    if test ! -s $installdir/$filename; then
19965      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19966    fi
19967    case "$extension" in
19968      zip)  echo "Unzipping $installdir/$filename..."
19969        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19970        ;;
19971      tar.gz) echo "Untaring $installdir/$filename..."
19972        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19973        ;;
19974      tgz) echo "Untaring $installdir/$filename..."
19975        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19976        ;;
19977      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19978        ;;
19979    esac
19980  fi
19981  if test -f $installdir/$filename.unpacked; then
19982    depdir=$installdir
19983  fi
19984
19985      fi
19986      # Source the builddeps file again, because in the previous command, the depdir
19987      # was updated to point at the current build dependency install directory.
19988      . $builddepsfile
19989      # Now extract variables from the builddeps.conf files.
19990      theroot=${builddep_bootjdk_ROOT}
19991      thecflags=${builddep_bootjdk_CFLAGS}
19992      thelibs=${builddep_bootjdk_LIBS}
19993      if test "x$depdir" = x; then
19994        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19995      fi
19996      BOOT_JDK=$depdir
19997      if test "x$theroot" != x; then
19998        BOOT_JDK="$theroot"
19999      fi
20000      if test "x$thecflags" != x; then
20001        BOOT_JDK_CFLAGS="$thecflags"
20002      fi
20003      if test "x$thelibs" != x; then
20004        BOOT_JDK_LIBS="$thelibs"
20005      fi
20006      BOOT_JDK_FOUND=maybe
20007      else BOOT_JDK_FOUND=no
20008
20009    fi
20010    else BOOT_JDK_FOUND=no
20011
20012  fi
20013
20014
20015
20016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20018      # Do we have a bin/java?
20019      if test ! -x "$BOOT_JDK/bin/java"; then
20020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20022        BOOT_JDK_FOUND=no
20023      else
20024        # Do we have a bin/javac?
20025        if test ! -x "$BOOT_JDK/bin/javac"; then
20026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20030          BOOT_JDK_FOUND=no
20031        else
20032          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20033          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20036            BOOT_JDK_FOUND=no
20037          else
20038            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20040
20041            # Extra M4 quote needed to protect [] in grep expression.
20042            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20043            if test "x$FOUND_CORRECT_VERSION" = x; then
20044              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20046              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20047$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20048              BOOT_JDK_FOUND=no
20049            else
20050              # We're done! :-)
20051              BOOT_JDK_FOUND=yes
20052
20053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20054
20055  # Input might be given as Windows format, start by converting to
20056  # unix format.
20057  path="$BOOT_JDK"
20058  new_path=`$CYGPATH -u "$path"`
20059
20060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20063  # "foo.exe" is OK but "foo" is an error.
20064  #
20065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20066  # It is also a way to make sure we got the proper file name for the real test later on.
20067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20068  if test "x$test_shortpath" = x; then
20069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20072  fi
20073
20074  # Call helper function which possibly converts this using DOS-style short mode.
20075  # If so, the updated path is stored in $new_path.
20076
20077  input_path="$new_path"
20078  # Check if we need to convert this using DOS-style short mode. If the path
20079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20080  # take no chances and rewrite it.
20081  # Note: m4 eats our [], so we need to use [ and ] instead.
20082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20083  if test "x$has_forbidden_chars" != x; then
20084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20088      # Going to short mode and back again did indeed matter. Since short mode is
20089      # case insensitive, let's make it lowercase to improve readability.
20090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20091      # Now convert it back to Unix-stile (cygpath)
20092      input_path=`$CYGPATH -u "$shortmode_path"`
20093      new_path="$input_path"
20094    fi
20095  fi
20096
20097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20098  if test "x$test_cygdrive_prefix" = x; then
20099    # As a simple fix, exclude /usr/bin since it's not a real path.
20100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20102      # a path prefixed by /cygdrive for fixpath to work.
20103      new_path="$CYGWIN_ROOT_PATH$input_path"
20104    fi
20105  fi
20106
20107
20108  if test "x$path" != "x$new_path"; then
20109    BOOT_JDK="$new_path"
20110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20112  fi
20113
20114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115
20116  path="$BOOT_JDK"
20117  has_colon=`$ECHO $path | $GREP ^.:`
20118  new_path="$path"
20119  if test "x$has_colon" = x; then
20120    # Not in mixed or Windows style, start by that.
20121    new_path=`cmd //c echo $path`
20122  fi
20123
20124
20125  input_path="$new_path"
20126  # Check if we need to convert this using DOS-style short mode. If the path
20127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20128  # take no chances and rewrite it.
20129  # Note: m4 eats our [], so we need to use [ and ] instead.
20130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20131  if test "x$has_forbidden_chars" != x; then
20132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20134  fi
20135
20136
20137  windows_path="$new_path"
20138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20139    unix_path=`$CYGPATH -u "$windows_path"`
20140    new_path="$unix_path"
20141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20143    new_path="$unix_path"
20144  fi
20145
20146  if test "x$path" != "x$new_path"; then
20147    BOOT_JDK="$new_path"
20148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20150  fi
20151
20152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20154
20155  else
20156    # We're on a posix platform. Hooray! :)
20157    path="$BOOT_JDK"
20158    has_space=`$ECHO "$path" | $GREP " "`
20159    if test "x$has_space" != x; then
20160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20162      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20163    fi
20164
20165    # Use eval to expand a potential ~
20166    eval path="$path"
20167    if test ! -f "$path" && test ! -d "$path"; then
20168      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20169    fi
20170
20171    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20172  fi
20173
20174              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20175$as_echo_n "checking for Boot JDK... " >&6; }
20176              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20177$as_echo "$BOOT_JDK" >&6; }
20178              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20179$as_echo_n "checking Boot JDK version... " >&6; }
20180              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20181              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20182$as_echo "$BOOT_JDK_VERSION" >&6; }
20183            fi # end check jdk version
20184          fi # end check rt.jar
20185        fi # end check javac
20186      fi # end check java
20187    fi # end check boot jdk found
20188  fi
20189
20190
20191  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20192
20193  if test "x$BOOT_JDK_FOUND" = xno; then
20194    # Now execute the test
20195
20196  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20197    # First check at user selected default
20198
20199  if test "x$BOOT_JDK_FOUND" = xno; then
20200    # Now execute the test
20201
20202  if test -x /usr/libexec/java_home; then
20203    BOOT_JDK=`/usr/libexec/java_home `
20204    BOOT_JDK_FOUND=maybe
20205    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20206$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20207  fi
20208
20209
20210    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20211    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20212      # Do we have a bin/java?
20213      if test ! -x "$BOOT_JDK/bin/java"; then
20214        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20216        BOOT_JDK_FOUND=no
20217      else
20218        # Do we have a bin/javac?
20219        if test ! -x "$BOOT_JDK/bin/javac"; then
20220          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20223$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20224          BOOT_JDK_FOUND=no
20225        else
20226          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20227          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20230            BOOT_JDK_FOUND=no
20231          else
20232            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20233            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20234
20235            # Extra M4 quote needed to protect [] in grep expression.
20236            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20237            if test "x$FOUND_CORRECT_VERSION" = x; then
20238              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20240              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20241$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20242              BOOT_JDK_FOUND=no
20243            else
20244              # We're done! :-)
20245              BOOT_JDK_FOUND=yes
20246
20247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20248
20249  # Input might be given as Windows format, start by converting to
20250  # unix format.
20251  path="$BOOT_JDK"
20252  new_path=`$CYGPATH -u "$path"`
20253
20254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20257  # "foo.exe" is OK but "foo" is an error.
20258  #
20259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20260  # It is also a way to make sure we got the proper file name for the real test later on.
20261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20262  if test "x$test_shortpath" = x; then
20263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20265    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20266  fi
20267
20268  # Call helper function which possibly converts this using DOS-style short mode.
20269  # If so, the updated path is stored in $new_path.
20270
20271  input_path="$new_path"
20272  # Check if we need to convert this using DOS-style short mode. If the path
20273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20274  # take no chances and rewrite it.
20275  # Note: m4 eats our [], so we need to use [ and ] instead.
20276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20277  if test "x$has_forbidden_chars" != x; then
20278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20282      # Going to short mode and back again did indeed matter. Since short mode is
20283      # case insensitive, let's make it lowercase to improve readability.
20284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20285      # Now convert it back to Unix-stile (cygpath)
20286      input_path=`$CYGPATH -u "$shortmode_path"`
20287      new_path="$input_path"
20288    fi
20289  fi
20290
20291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20292  if test "x$test_cygdrive_prefix" = x; then
20293    # As a simple fix, exclude /usr/bin since it's not a real path.
20294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20296      # a path prefixed by /cygdrive for fixpath to work.
20297      new_path="$CYGWIN_ROOT_PATH$input_path"
20298    fi
20299  fi
20300
20301
20302  if test "x$path" != "x$new_path"; then
20303    BOOT_JDK="$new_path"
20304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20306  fi
20307
20308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20309
20310  path="$BOOT_JDK"
20311  has_colon=`$ECHO $path | $GREP ^.:`
20312  new_path="$path"
20313  if test "x$has_colon" = x; then
20314    # Not in mixed or Windows style, start by that.
20315    new_path=`cmd //c echo $path`
20316  fi
20317
20318
20319  input_path="$new_path"
20320  # Check if we need to convert this using DOS-style short mode. If the path
20321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20322  # take no chances and rewrite it.
20323  # Note: m4 eats our [], so we need to use [ and ] instead.
20324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20325  if test "x$has_forbidden_chars" != x; then
20326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20328  fi
20329
20330
20331  windows_path="$new_path"
20332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20333    unix_path=`$CYGPATH -u "$windows_path"`
20334    new_path="$unix_path"
20335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20337    new_path="$unix_path"
20338  fi
20339
20340  if test "x$path" != "x$new_path"; then
20341    BOOT_JDK="$new_path"
20342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20344  fi
20345
20346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20348
20349  else
20350    # We're on a posix platform. Hooray! :)
20351    path="$BOOT_JDK"
20352    has_space=`$ECHO "$path" | $GREP " "`
20353    if test "x$has_space" != x; then
20354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20356      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20357    fi
20358
20359    # Use eval to expand a potential ~
20360    eval path="$path"
20361    if test ! -f "$path" && test ! -d "$path"; then
20362      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20363    fi
20364
20365    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20366  fi
20367
20368              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20369$as_echo_n "checking for Boot JDK... " >&6; }
20370              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20371$as_echo "$BOOT_JDK" >&6; }
20372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20373$as_echo_n "checking Boot JDK version... " >&6; }
20374              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20376$as_echo "$BOOT_JDK_VERSION" >&6; }
20377            fi # end check jdk version
20378          fi # end check rt.jar
20379        fi # end check javac
20380      fi # end check java
20381    fi # end check boot jdk found
20382  fi
20383
20384    # If that did not work out (e.g. too old), try explicit versions instead
20385
20386  if test "x$BOOT_JDK_FOUND" = xno; then
20387    # Now execute the test
20388
20389  if test -x /usr/libexec/java_home; then
20390    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20391    BOOT_JDK_FOUND=maybe
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20393$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20394  fi
20395
20396
20397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20399      # Do we have a bin/java?
20400      if test ! -x "$BOOT_JDK/bin/java"; then
20401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20403        BOOT_JDK_FOUND=no
20404      else
20405        # Do we have a bin/javac?
20406        if test ! -x "$BOOT_JDK/bin/javac"; then
20407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20411          BOOT_JDK_FOUND=no
20412        else
20413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20417            BOOT_JDK_FOUND=no
20418          else
20419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20421
20422            # Extra M4 quote needed to protect [] in grep expression.
20423            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20424            if test "x$FOUND_CORRECT_VERSION" = x; then
20425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20428$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20429              BOOT_JDK_FOUND=no
20430            else
20431              # We're done! :-)
20432              BOOT_JDK_FOUND=yes
20433
20434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20435
20436  # Input might be given as Windows format, start by converting to
20437  # unix format.
20438  path="$BOOT_JDK"
20439  new_path=`$CYGPATH -u "$path"`
20440
20441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20444  # "foo.exe" is OK but "foo" is an error.
20445  #
20446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20447  # It is also a way to make sure we got the proper file name for the real test later on.
20448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20449  if test "x$test_shortpath" = x; then
20450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20453  fi
20454
20455  # Call helper function which possibly converts this using DOS-style short mode.
20456  # If so, the updated path is stored in $new_path.
20457
20458  input_path="$new_path"
20459  # Check if we need to convert this using DOS-style short mode. If the path
20460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20461  # take no chances and rewrite it.
20462  # Note: m4 eats our [], so we need to use [ and ] instead.
20463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20464  if test "x$has_forbidden_chars" != x; then
20465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20469      # Going to short mode and back again did indeed matter. Since short mode is
20470      # case insensitive, let's make it lowercase to improve readability.
20471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20472      # Now convert it back to Unix-stile (cygpath)
20473      input_path=`$CYGPATH -u "$shortmode_path"`
20474      new_path="$input_path"
20475    fi
20476  fi
20477
20478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20479  if test "x$test_cygdrive_prefix" = x; then
20480    # As a simple fix, exclude /usr/bin since it's not a real path.
20481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20483      # a path prefixed by /cygdrive for fixpath to work.
20484      new_path="$CYGWIN_ROOT_PATH$input_path"
20485    fi
20486  fi
20487
20488
20489  if test "x$path" != "x$new_path"; then
20490    BOOT_JDK="$new_path"
20491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20493  fi
20494
20495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20496
20497  path="$BOOT_JDK"
20498  has_colon=`$ECHO $path | $GREP ^.:`
20499  new_path="$path"
20500  if test "x$has_colon" = x; then
20501    # Not in mixed or Windows style, start by that.
20502    new_path=`cmd //c echo $path`
20503  fi
20504
20505
20506  input_path="$new_path"
20507  # Check if we need to convert this using DOS-style short mode. If the path
20508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20509  # take no chances and rewrite it.
20510  # Note: m4 eats our [], so we need to use [ and ] instead.
20511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20512  if test "x$has_forbidden_chars" != x; then
20513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20515  fi
20516
20517
20518  windows_path="$new_path"
20519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20520    unix_path=`$CYGPATH -u "$windows_path"`
20521    new_path="$unix_path"
20522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20524    new_path="$unix_path"
20525  fi
20526
20527  if test "x$path" != "x$new_path"; then
20528    BOOT_JDK="$new_path"
20529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20531  fi
20532
20533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20535
20536  else
20537    # We're on a posix platform. Hooray! :)
20538    path="$BOOT_JDK"
20539    has_space=`$ECHO "$path" | $GREP " "`
20540    if test "x$has_space" != x; then
20541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20544    fi
20545
20546    # Use eval to expand a potential ~
20547    eval path="$path"
20548    if test ! -f "$path" && test ! -d "$path"; then
20549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20550    fi
20551
20552    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20553  fi
20554
20555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20556$as_echo_n "checking for Boot JDK... " >&6; }
20557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20558$as_echo "$BOOT_JDK" >&6; }
20559              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20560$as_echo_n "checking Boot JDK version... " >&6; }
20561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20563$as_echo "$BOOT_JDK_VERSION" >&6; }
20564            fi # end check jdk version
20565          fi # end check rt.jar
20566        fi # end check javac
20567      fi # end check java
20568    fi # end check boot jdk found
20569  fi
20570
20571
20572  if test "x$BOOT_JDK_FOUND" = xno; then
20573    # Now execute the test
20574
20575  if test -x /usr/libexec/java_home; then
20576    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20577    BOOT_JDK_FOUND=maybe
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20579$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20580  fi
20581
20582
20583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20585      # Do we have a bin/java?
20586      if test ! -x "$BOOT_JDK/bin/java"; then
20587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20589        BOOT_JDK_FOUND=no
20590      else
20591        # Do we have a bin/javac?
20592        if test ! -x "$BOOT_JDK/bin/javac"; then
20593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20597          BOOT_JDK_FOUND=no
20598        else
20599          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20600          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20603            BOOT_JDK_FOUND=no
20604          else
20605            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20607
20608            # Extra M4 quote needed to protect [] in grep expression.
20609            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20610            if test "x$FOUND_CORRECT_VERSION" = x; then
20611              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20613              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20614$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20615              BOOT_JDK_FOUND=no
20616            else
20617              # We're done! :-)
20618              BOOT_JDK_FOUND=yes
20619
20620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20621
20622  # Input might be given as Windows format, start by converting to
20623  # unix format.
20624  path="$BOOT_JDK"
20625  new_path=`$CYGPATH -u "$path"`
20626
20627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20630  # "foo.exe" is OK but "foo" is an error.
20631  #
20632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20633  # It is also a way to make sure we got the proper file name for the real test later on.
20634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20635  if test "x$test_shortpath" = x; then
20636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20639  fi
20640
20641  # Call helper function which possibly converts this using DOS-style short mode.
20642  # If so, the updated path is stored in $new_path.
20643
20644  input_path="$new_path"
20645  # Check if we need to convert this using DOS-style short mode. If the path
20646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20647  # take no chances and rewrite it.
20648  # Note: m4 eats our [], so we need to use [ and ] instead.
20649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20650  if test "x$has_forbidden_chars" != x; then
20651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20655      # Going to short mode and back again did indeed matter. Since short mode is
20656      # case insensitive, let's make it lowercase to improve readability.
20657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20658      # Now convert it back to Unix-stile (cygpath)
20659      input_path=`$CYGPATH -u "$shortmode_path"`
20660      new_path="$input_path"
20661    fi
20662  fi
20663
20664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20665  if test "x$test_cygdrive_prefix" = x; then
20666    # As a simple fix, exclude /usr/bin since it's not a real path.
20667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20669      # a path prefixed by /cygdrive for fixpath to work.
20670      new_path="$CYGWIN_ROOT_PATH$input_path"
20671    fi
20672  fi
20673
20674
20675  if test "x$path" != "x$new_path"; then
20676    BOOT_JDK="$new_path"
20677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20679  fi
20680
20681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20682
20683  path="$BOOT_JDK"
20684  has_colon=`$ECHO $path | $GREP ^.:`
20685  new_path="$path"
20686  if test "x$has_colon" = x; then
20687    # Not in mixed or Windows style, start by that.
20688    new_path=`cmd //c echo $path`
20689  fi
20690
20691
20692  input_path="$new_path"
20693  # Check if we need to convert this using DOS-style short mode. If the path
20694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20695  # take no chances and rewrite it.
20696  # Note: m4 eats our [], so we need to use [ and ] instead.
20697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20698  if test "x$has_forbidden_chars" != x; then
20699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20701  fi
20702
20703
20704  windows_path="$new_path"
20705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20706    unix_path=`$CYGPATH -u "$windows_path"`
20707    new_path="$unix_path"
20708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20710    new_path="$unix_path"
20711  fi
20712
20713  if test "x$path" != "x$new_path"; then
20714    BOOT_JDK="$new_path"
20715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20717  fi
20718
20719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20721
20722  else
20723    # We're on a posix platform. Hooray! :)
20724    path="$BOOT_JDK"
20725    has_space=`$ECHO "$path" | $GREP " "`
20726    if test "x$has_space" != x; then
20727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20730    fi
20731
20732    # Use eval to expand a potential ~
20733    eval path="$path"
20734    if test ! -f "$path" && test ! -d "$path"; then
20735      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20736    fi
20737
20738    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20739  fi
20740
20741              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20742$as_echo_n "checking for Boot JDK... " >&6; }
20743              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20744$as_echo "$BOOT_JDK" >&6; }
20745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20746$as_echo_n "checking Boot JDK version... " >&6; }
20747              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20749$as_echo "$BOOT_JDK_VERSION" >&6; }
20750            fi # end check jdk version
20751          fi # end check rt.jar
20752        fi # end check javac
20753      fi # end check java
20754    fi # end check boot jdk found
20755  fi
20756
20757
20758  if test "x$BOOT_JDK_FOUND" = xno; then
20759    # Now execute the test
20760
20761  if test -x /usr/libexec/java_home; then
20762    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20763    BOOT_JDK_FOUND=maybe
20764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20765$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20766  fi
20767
20768
20769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20771      # Do we have a bin/java?
20772      if test ! -x "$BOOT_JDK/bin/java"; then
20773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20775        BOOT_JDK_FOUND=no
20776      else
20777        # Do we have a bin/javac?
20778        if test ! -x "$BOOT_JDK/bin/javac"; then
20779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20783          BOOT_JDK_FOUND=no
20784        else
20785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20789            BOOT_JDK_FOUND=no
20790          else
20791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20793
20794            # Extra M4 quote needed to protect [] in grep expression.
20795            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20796            if test "x$FOUND_CORRECT_VERSION" = x; then
20797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20800$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20801              BOOT_JDK_FOUND=no
20802            else
20803              # We're done! :-)
20804              BOOT_JDK_FOUND=yes
20805
20806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20807
20808  # Input might be given as Windows format, start by converting to
20809  # unix format.
20810  path="$BOOT_JDK"
20811  new_path=`$CYGPATH -u "$path"`
20812
20813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20816  # "foo.exe" is OK but "foo" is an error.
20817  #
20818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20819  # It is also a way to make sure we got the proper file name for the real test later on.
20820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20821  if test "x$test_shortpath" = x; then
20822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20825  fi
20826
20827  # Call helper function which possibly converts this using DOS-style short mode.
20828  # If so, the updated path is stored in $new_path.
20829
20830  input_path="$new_path"
20831  # Check if we need to convert this using DOS-style short mode. If the path
20832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20833  # take no chances and rewrite it.
20834  # Note: m4 eats our [], so we need to use [ and ] instead.
20835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20836  if test "x$has_forbidden_chars" != x; then
20837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20841      # Going to short mode and back again did indeed matter. Since short mode is
20842      # case insensitive, let's make it lowercase to improve readability.
20843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20844      # Now convert it back to Unix-stile (cygpath)
20845      input_path=`$CYGPATH -u "$shortmode_path"`
20846      new_path="$input_path"
20847    fi
20848  fi
20849
20850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20851  if test "x$test_cygdrive_prefix" = x; then
20852    # As a simple fix, exclude /usr/bin since it's not a real path.
20853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20855      # a path prefixed by /cygdrive for fixpath to work.
20856      new_path="$CYGWIN_ROOT_PATH$input_path"
20857    fi
20858  fi
20859
20860
20861  if test "x$path" != "x$new_path"; then
20862    BOOT_JDK="$new_path"
20863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20865  fi
20866
20867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20868
20869  path="$BOOT_JDK"
20870  has_colon=`$ECHO $path | $GREP ^.:`
20871  new_path="$path"
20872  if test "x$has_colon" = x; then
20873    # Not in mixed or Windows style, start by that.
20874    new_path=`cmd //c echo $path`
20875  fi
20876
20877
20878  input_path="$new_path"
20879  # Check if we need to convert this using DOS-style short mode. If the path
20880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20881  # take no chances and rewrite it.
20882  # Note: m4 eats our [], so we need to use [ and ] instead.
20883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20884  if test "x$has_forbidden_chars" != x; then
20885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20887  fi
20888
20889
20890  windows_path="$new_path"
20891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20892    unix_path=`$CYGPATH -u "$windows_path"`
20893    new_path="$unix_path"
20894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20896    new_path="$unix_path"
20897  fi
20898
20899  if test "x$path" != "x$new_path"; then
20900    BOOT_JDK="$new_path"
20901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20903  fi
20904
20905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20907
20908  else
20909    # We're on a posix platform. Hooray! :)
20910    path="$BOOT_JDK"
20911    has_space=`$ECHO "$path" | $GREP " "`
20912    if test "x$has_space" != x; then
20913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20916    fi
20917
20918    # Use eval to expand a potential ~
20919    eval path="$path"
20920    if test ! -f "$path" && test ! -d "$path"; then
20921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20922    fi
20923
20924    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20925  fi
20926
20927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20928$as_echo_n "checking for Boot JDK... " >&6; }
20929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20930$as_echo "$BOOT_JDK" >&6; }
20931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20932$as_echo_n "checking Boot JDK version... " >&6; }
20933              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20935$as_echo "$BOOT_JDK_VERSION" >&6; }
20936            fi # end check jdk version
20937          fi # end check rt.jar
20938        fi # end check javac
20939      fi # end check java
20940    fi # end check boot jdk found
20941  fi
20942
20943  fi
20944
20945
20946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20948      # Do we have a bin/java?
20949      if test ! -x "$BOOT_JDK/bin/java"; then
20950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20952        BOOT_JDK_FOUND=no
20953      else
20954        # Do we have a bin/javac?
20955        if test ! -x "$BOOT_JDK/bin/javac"; then
20956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20960          BOOT_JDK_FOUND=no
20961        else
20962          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20963          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20964            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20966            BOOT_JDK_FOUND=no
20967          else
20968            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20970
20971            # Extra M4 quote needed to protect [] in grep expression.
20972            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20973            if test "x$FOUND_CORRECT_VERSION" = x; then
20974              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20976              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20977$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20978              BOOT_JDK_FOUND=no
20979            else
20980              # We're done! :-)
20981              BOOT_JDK_FOUND=yes
20982
20983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20984
20985  # Input might be given as Windows format, start by converting to
20986  # unix format.
20987  path="$BOOT_JDK"
20988  new_path=`$CYGPATH -u "$path"`
20989
20990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20993  # "foo.exe" is OK but "foo" is an error.
20994  #
20995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20996  # It is also a way to make sure we got the proper file name for the real test later on.
20997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20998  if test "x$test_shortpath" = x; then
20999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21002  fi
21003
21004  # Call helper function which possibly converts this using DOS-style short mode.
21005  # If so, the updated path is stored in $new_path.
21006
21007  input_path="$new_path"
21008  # Check if we need to convert this using DOS-style short mode. If the path
21009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21010  # take no chances and rewrite it.
21011  # Note: m4 eats our [], so we need to use [ and ] instead.
21012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21013  if test "x$has_forbidden_chars" != x; then
21014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21018      # Going to short mode and back again did indeed matter. Since short mode is
21019      # case insensitive, let's make it lowercase to improve readability.
21020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21021      # Now convert it back to Unix-stile (cygpath)
21022      input_path=`$CYGPATH -u "$shortmode_path"`
21023      new_path="$input_path"
21024    fi
21025  fi
21026
21027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21028  if test "x$test_cygdrive_prefix" = x; then
21029    # As a simple fix, exclude /usr/bin since it's not a real path.
21030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21032      # a path prefixed by /cygdrive for fixpath to work.
21033      new_path="$CYGWIN_ROOT_PATH$input_path"
21034    fi
21035  fi
21036
21037
21038  if test "x$path" != "x$new_path"; then
21039    BOOT_JDK="$new_path"
21040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21042  fi
21043
21044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21045
21046  path="$BOOT_JDK"
21047  has_colon=`$ECHO $path | $GREP ^.:`
21048  new_path="$path"
21049  if test "x$has_colon" = x; then
21050    # Not in mixed or Windows style, start by that.
21051    new_path=`cmd //c echo $path`
21052  fi
21053
21054
21055  input_path="$new_path"
21056  # Check if we need to convert this using DOS-style short mode. If the path
21057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21058  # take no chances and rewrite it.
21059  # Note: m4 eats our [], so we need to use [ and ] instead.
21060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21061  if test "x$has_forbidden_chars" != x; then
21062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21064  fi
21065
21066
21067  windows_path="$new_path"
21068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21069    unix_path=`$CYGPATH -u "$windows_path"`
21070    new_path="$unix_path"
21071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21073    new_path="$unix_path"
21074  fi
21075
21076  if test "x$path" != "x$new_path"; then
21077    BOOT_JDK="$new_path"
21078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21080  fi
21081
21082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21084
21085  else
21086    # We're on a posix platform. Hooray! :)
21087    path="$BOOT_JDK"
21088    has_space=`$ECHO "$path" | $GREP " "`
21089    if test "x$has_space" != x; then
21090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21093    fi
21094
21095    # Use eval to expand a potential ~
21096    eval path="$path"
21097    if test ! -f "$path" && test ! -d "$path"; then
21098      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21099    fi
21100
21101    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21102  fi
21103
21104              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21105$as_echo_n "checking for Boot JDK... " >&6; }
21106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21107$as_echo "$BOOT_JDK" >&6; }
21108              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21109$as_echo_n "checking Boot JDK version... " >&6; }
21110              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21111              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21112$as_echo "$BOOT_JDK_VERSION" >&6; }
21113            fi # end check jdk version
21114          fi # end check rt.jar
21115        fi # end check javac
21116      fi # end check java
21117    fi # end check boot jdk found
21118  fi
21119
21120
21121  # Test: Is $JAVA_HOME set?
21122
21123  if test "x$BOOT_JDK_FOUND" = xno; then
21124    # Now execute the test
21125
21126  if test "x$JAVA_HOME" != x; then
21127    JAVA_HOME_PROCESSED="$JAVA_HOME"
21128
21129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21130
21131  # Input might be given as Windows format, start by converting to
21132  # unix format.
21133  path="$JAVA_HOME_PROCESSED"
21134  new_path=`$CYGPATH -u "$path"`
21135
21136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21139  # "foo.exe" is OK but "foo" is an error.
21140  #
21141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21142  # It is also a way to make sure we got the proper file name for the real test later on.
21143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21144  if test "x$test_shortpath" = x; then
21145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21146$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21147    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21148  fi
21149
21150  # Call helper function which possibly converts this using DOS-style short mode.
21151  # If so, the updated path is stored in $new_path.
21152
21153  input_path="$new_path"
21154  # Check if we need to convert this using DOS-style short mode. If the path
21155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21156  # take no chances and rewrite it.
21157  # Note: m4 eats our [], so we need to use [ and ] instead.
21158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21159  if test "x$has_forbidden_chars" != x; then
21160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21164      # Going to short mode and back again did indeed matter. Since short mode is
21165      # case insensitive, let's make it lowercase to improve readability.
21166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21167      # Now convert it back to Unix-stile (cygpath)
21168      input_path=`$CYGPATH -u "$shortmode_path"`
21169      new_path="$input_path"
21170    fi
21171  fi
21172
21173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21174  if test "x$test_cygdrive_prefix" = x; then
21175    # As a simple fix, exclude /usr/bin since it's not a real path.
21176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21178      # a path prefixed by /cygdrive for fixpath to work.
21179      new_path="$CYGWIN_ROOT_PATH$input_path"
21180    fi
21181  fi
21182
21183
21184  if test "x$path" != "x$new_path"; then
21185    JAVA_HOME_PROCESSED="$new_path"
21186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21187$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21188  fi
21189
21190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21191
21192  path="$JAVA_HOME_PROCESSED"
21193  has_colon=`$ECHO $path | $GREP ^.:`
21194  new_path="$path"
21195  if test "x$has_colon" = x; then
21196    # Not in mixed or Windows style, start by that.
21197    new_path=`cmd //c echo $path`
21198  fi
21199
21200
21201  input_path="$new_path"
21202  # Check if we need to convert this using DOS-style short mode. If the path
21203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21204  # take no chances and rewrite it.
21205  # Note: m4 eats our [], so we need to use [ and ] instead.
21206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21207  if test "x$has_forbidden_chars" != x; then
21208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210  fi
21211
21212
21213  windows_path="$new_path"
21214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21215    unix_path=`$CYGPATH -u "$windows_path"`
21216    new_path="$unix_path"
21217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21219    new_path="$unix_path"
21220  fi
21221
21222  if test "x$path" != "x$new_path"; then
21223    JAVA_HOME_PROCESSED="$new_path"
21224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21225$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21226  fi
21227
21228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21230
21231  else
21232    # We're on a posix platform. Hooray! :)
21233    path="$JAVA_HOME_PROCESSED"
21234    has_space=`$ECHO "$path" | $GREP " "`
21235    if test "x$has_space" != x; then
21236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21237$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21238      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21239    fi
21240
21241    # Use eval to expand a potential ~
21242    eval path="$path"
21243    if test ! -f "$path" && test ! -d "$path"; then
21244      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21245    fi
21246
21247    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21248  fi
21249
21250    if test ! -d "$JAVA_HOME_PROCESSED"; then
21251      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21252$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21253    else
21254      # Aha, the user has set a JAVA_HOME
21255      # let us use that as the Boot JDK.
21256      BOOT_JDK="$JAVA_HOME_PROCESSED"
21257      BOOT_JDK_FOUND=maybe
21258      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21259$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21260    fi
21261  fi
21262
21263
21264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21266      # Do we have a bin/java?
21267      if test ! -x "$BOOT_JDK/bin/java"; then
21268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21270        BOOT_JDK_FOUND=no
21271      else
21272        # Do we have a bin/javac?
21273        if test ! -x "$BOOT_JDK/bin/javac"; then
21274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21278          BOOT_JDK_FOUND=no
21279        else
21280          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21281          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21284            BOOT_JDK_FOUND=no
21285          else
21286            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21287            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21288
21289            # Extra M4 quote needed to protect [] in grep expression.
21290            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21291            if test "x$FOUND_CORRECT_VERSION" = x; then
21292              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21294              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21295$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21296              BOOT_JDK_FOUND=no
21297            else
21298              # We're done! :-)
21299              BOOT_JDK_FOUND=yes
21300
21301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21302
21303  # Input might be given as Windows format, start by converting to
21304  # unix format.
21305  path="$BOOT_JDK"
21306  new_path=`$CYGPATH -u "$path"`
21307
21308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21311  # "foo.exe" is OK but "foo" is an error.
21312  #
21313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21314  # It is also a way to make sure we got the proper file name for the real test later on.
21315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21316  if test "x$test_shortpath" = x; then
21317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21320  fi
21321
21322  # Call helper function which possibly converts this using DOS-style short mode.
21323  # If so, the updated path is stored in $new_path.
21324
21325  input_path="$new_path"
21326  # Check if we need to convert this using DOS-style short mode. If the path
21327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21328  # take no chances and rewrite it.
21329  # Note: m4 eats our [], so we need to use [ and ] instead.
21330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21331  if test "x$has_forbidden_chars" != x; then
21332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21336      # Going to short mode and back again did indeed matter. Since short mode is
21337      # case insensitive, let's make it lowercase to improve readability.
21338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21339      # Now convert it back to Unix-stile (cygpath)
21340      input_path=`$CYGPATH -u "$shortmode_path"`
21341      new_path="$input_path"
21342    fi
21343  fi
21344
21345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21346  if test "x$test_cygdrive_prefix" = x; then
21347    # As a simple fix, exclude /usr/bin since it's not a real path.
21348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21350      # a path prefixed by /cygdrive for fixpath to work.
21351      new_path="$CYGWIN_ROOT_PATH$input_path"
21352    fi
21353  fi
21354
21355
21356  if test "x$path" != "x$new_path"; then
21357    BOOT_JDK="$new_path"
21358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21360  fi
21361
21362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363
21364  path="$BOOT_JDK"
21365  has_colon=`$ECHO $path | $GREP ^.:`
21366  new_path="$path"
21367  if test "x$has_colon" = x; then
21368    # Not in mixed or Windows style, start by that.
21369    new_path=`cmd //c echo $path`
21370  fi
21371
21372
21373  input_path="$new_path"
21374  # Check if we need to convert this using DOS-style short mode. If the path
21375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21376  # take no chances and rewrite it.
21377  # Note: m4 eats our [], so we need to use [ and ] instead.
21378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21379  if test "x$has_forbidden_chars" != x; then
21380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21382  fi
21383
21384
21385  windows_path="$new_path"
21386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21387    unix_path=`$CYGPATH -u "$windows_path"`
21388    new_path="$unix_path"
21389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21391    new_path="$unix_path"
21392  fi
21393
21394  if test "x$path" != "x$new_path"; then
21395    BOOT_JDK="$new_path"
21396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21398  fi
21399
21400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21402
21403  else
21404    # We're on a posix platform. Hooray! :)
21405    path="$BOOT_JDK"
21406    has_space=`$ECHO "$path" | $GREP " "`
21407    if test "x$has_space" != x; then
21408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21411    fi
21412
21413    # Use eval to expand a potential ~
21414    eval path="$path"
21415    if test ! -f "$path" && test ! -d "$path"; then
21416      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21417    fi
21418
21419    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21420  fi
21421
21422              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21423$as_echo_n "checking for Boot JDK... " >&6; }
21424              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21425$as_echo "$BOOT_JDK" >&6; }
21426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21427$as_echo_n "checking Boot JDK version... " >&6; }
21428              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21430$as_echo "$BOOT_JDK_VERSION" >&6; }
21431            fi # end check jdk version
21432          fi # end check rt.jar
21433        fi # end check javac
21434      fi # end check java
21435    fi # end check boot jdk found
21436  fi
21437
21438
21439  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21440
21441  if test "x$BOOT_JDK_FOUND" = xno; then
21442    # Now execute the test
21443
21444  # Extract the first word of "javac", so it can be a program name with args.
21445set dummy javac; ac_word=$2
21446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21447$as_echo_n "checking for $ac_word... " >&6; }
21448if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21449  $as_echo_n "(cached) " >&6
21450else
21451  case $JAVAC_CHECK in
21452  [\\/]* | ?:[\\/]*)
21453  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21454  ;;
21455  *)
21456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21457for as_dir in $PATH
21458do
21459  IFS=$as_save_IFS
21460  test -z "$as_dir" && as_dir=.
21461    for ac_exec_ext in '' $ac_executable_extensions; do
21462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21463    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21465    break 2
21466  fi
21467done
21468  done
21469IFS=$as_save_IFS
21470
21471  ;;
21472esac
21473fi
21474JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21475if test -n "$JAVAC_CHECK"; then
21476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21477$as_echo "$JAVAC_CHECK" >&6; }
21478else
21479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21480$as_echo "no" >&6; }
21481fi
21482
21483
21484  # Extract the first word of "java", so it can be a program name with args.
21485set dummy java; ac_word=$2
21486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21487$as_echo_n "checking for $ac_word... " >&6; }
21488if ${ac_cv_path_JAVA_CHECK+:} false; then :
21489  $as_echo_n "(cached) " >&6
21490else
21491  case $JAVA_CHECK in
21492  [\\/]* | ?:[\\/]*)
21493  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21494  ;;
21495  *)
21496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21497for as_dir in $PATH
21498do
21499  IFS=$as_save_IFS
21500  test -z "$as_dir" && as_dir=.
21501    for ac_exec_ext in '' $ac_executable_extensions; do
21502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21503    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21505    break 2
21506  fi
21507done
21508  done
21509IFS=$as_save_IFS
21510
21511  ;;
21512esac
21513fi
21514JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21515if test -n "$JAVA_CHECK"; then
21516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21517$as_echo "$JAVA_CHECK" >&6; }
21518else
21519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21520$as_echo "no" >&6; }
21521fi
21522
21523
21524  BINARY="$JAVAC_CHECK"
21525  if test "x$JAVAC_CHECK" = x; then
21526    BINARY="$JAVA_CHECK"
21527  fi
21528  if test "x$BINARY" != x; then
21529    # So there is a java(c) binary, it might be part of a JDK.
21530    # Lets find the JDK/JRE directory by following symbolic links.
21531    # Linux/GNU systems often have links from /usr/bin/java to
21532    # /etc/alternatives/java to the real JDK binary.
21533
21534  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21535    # Follow a chain of symbolic links. Use readlink
21536    # where it exists, else fall back to horribly
21537    # complicated shell code.
21538    if test "x$READLINK_TESTED" != yes; then
21539      # On MacOSX there is a readlink tool with a different
21540      # purpose than the GNU readlink tool. Check the found readlink.
21541      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21542      if test "x$ISGNU" = x; then
21543        # A readlink that we do not know how to use.
21544        # Are there other non-GNU readlinks out there?
21545        READLINK_TESTED=yes
21546        READLINK=
21547      fi
21548    fi
21549
21550    if test "x$READLINK" != x; then
21551      BINARY=`$READLINK -f $BINARY`
21552    else
21553      # Save the current directory for restoring afterwards
21554      STARTDIR=$PWD
21555      COUNTER=0
21556      sym_link_dir=`$DIRNAME $BINARY`
21557      sym_link_file=`$BASENAME $BINARY`
21558      cd $sym_link_dir
21559      # Use -P flag to resolve symlinks in directories.
21560      cd `$THEPWDCMD -P`
21561      sym_link_dir=`$THEPWDCMD -P`
21562      # Resolve file symlinks
21563      while test $COUNTER -lt 20; do
21564        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21565        if test "x$ISLINK" == x; then
21566          # This is not a symbolic link! We are done!
21567          break
21568        fi
21569        # Again resolve directory symlinks since the target of the just found
21570        # link could be in a different directory
21571        cd `$DIRNAME $ISLINK`
21572        sym_link_dir=`$THEPWDCMD -P`
21573        sym_link_file=`$BASENAME $ISLINK`
21574        let COUNTER=COUNTER+1
21575      done
21576      cd $STARTDIR
21577      BINARY=$sym_link_dir/$sym_link_file
21578    fi
21579  fi
21580
21581    BOOT_JDK=`dirname "$BINARY"`
21582    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21583    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21584      # Looks like we found ourselves an JDK
21585      BOOT_JDK_FOUND=maybe
21586      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21587$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21588    fi
21589  fi
21590
21591
21592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21594      # Do we have a bin/java?
21595      if test ! -x "$BOOT_JDK/bin/java"; then
21596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21598        BOOT_JDK_FOUND=no
21599      else
21600        # Do we have a bin/javac?
21601        if test ! -x "$BOOT_JDK/bin/javac"; then
21602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21606          BOOT_JDK_FOUND=no
21607        else
21608          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21609          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21612            BOOT_JDK_FOUND=no
21613          else
21614            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21616
21617            # Extra M4 quote needed to protect [] in grep expression.
21618            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21619            if test "x$FOUND_CORRECT_VERSION" = x; then
21620              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21622              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21623$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21624              BOOT_JDK_FOUND=no
21625            else
21626              # We're done! :-)
21627              BOOT_JDK_FOUND=yes
21628
21629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21630
21631  # Input might be given as Windows format, start by converting to
21632  # unix format.
21633  path="$BOOT_JDK"
21634  new_path=`$CYGPATH -u "$path"`
21635
21636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21639  # "foo.exe" is OK but "foo" is an error.
21640  #
21641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21642  # It is also a way to make sure we got the proper file name for the real test later on.
21643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21644  if test "x$test_shortpath" = x; then
21645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21648  fi
21649
21650  # Call helper function which possibly converts this using DOS-style short mode.
21651  # If so, the updated path is stored in $new_path.
21652
21653  input_path="$new_path"
21654  # Check if we need to convert this using DOS-style short mode. If the path
21655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21656  # take no chances and rewrite it.
21657  # Note: m4 eats our [], so we need to use [ and ] instead.
21658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21659  if test "x$has_forbidden_chars" != x; then
21660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21664      # Going to short mode and back again did indeed matter. Since short mode is
21665      # case insensitive, let's make it lowercase to improve readability.
21666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21667      # Now convert it back to Unix-stile (cygpath)
21668      input_path=`$CYGPATH -u "$shortmode_path"`
21669      new_path="$input_path"
21670    fi
21671  fi
21672
21673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21674  if test "x$test_cygdrive_prefix" = x; then
21675    # As a simple fix, exclude /usr/bin since it's not a real path.
21676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21678      # a path prefixed by /cygdrive for fixpath to work.
21679      new_path="$CYGWIN_ROOT_PATH$input_path"
21680    fi
21681  fi
21682
21683
21684  if test "x$path" != "x$new_path"; then
21685    BOOT_JDK="$new_path"
21686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21688  fi
21689
21690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21691
21692  path="$BOOT_JDK"
21693  has_colon=`$ECHO $path | $GREP ^.:`
21694  new_path="$path"
21695  if test "x$has_colon" = x; then
21696    # Not in mixed or Windows style, start by that.
21697    new_path=`cmd //c echo $path`
21698  fi
21699
21700
21701  input_path="$new_path"
21702  # Check if we need to convert this using DOS-style short mode. If the path
21703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21704  # take no chances and rewrite it.
21705  # Note: m4 eats our [], so we need to use [ and ] instead.
21706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21707  if test "x$has_forbidden_chars" != x; then
21708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21710  fi
21711
21712
21713  windows_path="$new_path"
21714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21715    unix_path=`$CYGPATH -u "$windows_path"`
21716    new_path="$unix_path"
21717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21719    new_path="$unix_path"
21720  fi
21721
21722  if test "x$path" != "x$new_path"; then
21723    BOOT_JDK="$new_path"
21724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21726  fi
21727
21728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21730
21731  else
21732    # We're on a posix platform. Hooray! :)
21733    path="$BOOT_JDK"
21734    has_space=`$ECHO "$path" | $GREP " "`
21735    if test "x$has_space" != x; then
21736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21739    fi
21740
21741    # Use eval to expand a potential ~
21742    eval path="$path"
21743    if test ! -f "$path" && test ! -d "$path"; then
21744      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21745    fi
21746
21747    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21748  fi
21749
21750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21751$as_echo_n "checking for Boot JDK... " >&6; }
21752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21753$as_echo "$BOOT_JDK" >&6; }
21754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21755$as_echo_n "checking Boot JDK version... " >&6; }
21756              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21758$as_echo "$BOOT_JDK_VERSION" >&6; }
21759            fi # end check jdk version
21760          fi # end check rt.jar
21761        fi # end check javac
21762      fi # end check java
21763    fi # end check boot jdk found
21764  fi
21765
21766
21767  # Test: Is there a JDK installed in default, well-known locations?
21768
21769  if test "x$BOOT_JDK_FOUND" = xno; then
21770    # Now execute the test
21771
21772  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21773
21774  if test "x$BOOT_JDK_FOUND" = xno; then
21775    # Now execute the test
21776
21777  if test "x$ProgramW6432" != x; then
21778    VIRTUAL_DIR="$ProgramW6432/Java"
21779
21780  windows_path="$VIRTUAL_DIR"
21781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21782    unix_path=`$CYGPATH -u "$windows_path"`
21783    VIRTUAL_DIR="$unix_path"
21784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21786    VIRTUAL_DIR="$unix_path"
21787  fi
21788
21789
21790  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21791  BOOT_JDK_SUFFIX=""
21792  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21793  if test "x$ALL_JDKS_FOUND" != x; then
21794    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21795
21796  if test "x$BOOT_JDK_FOUND" = xno; then
21797    # Now execute the test
21798
21799        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21800        if test -d "$BOOT_JDK"; then
21801          BOOT_JDK_FOUND=maybe
21802          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21803$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21804        fi
21805
21806
21807    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21808    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21809      # Do we have a bin/java?
21810      if test ! -x "$BOOT_JDK/bin/java"; then
21811        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21813        BOOT_JDK_FOUND=no
21814      else
21815        # Do we have a bin/javac?
21816        if test ! -x "$BOOT_JDK/bin/javac"; then
21817          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21819          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21820$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21821          BOOT_JDK_FOUND=no
21822        else
21823          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21824          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21825            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21827            BOOT_JDK_FOUND=no
21828          else
21829            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21830            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21831
21832            # Extra M4 quote needed to protect [] in grep expression.
21833            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21834            if test "x$FOUND_CORRECT_VERSION" = x; then
21835              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21837              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21838$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21839              BOOT_JDK_FOUND=no
21840            else
21841              # We're done! :-)
21842              BOOT_JDK_FOUND=yes
21843
21844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21845
21846  # Input might be given as Windows format, start by converting to
21847  # unix format.
21848  path="$BOOT_JDK"
21849  new_path=`$CYGPATH -u "$path"`
21850
21851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21854  # "foo.exe" is OK but "foo" is an error.
21855  #
21856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21857  # It is also a way to make sure we got the proper file name for the real test later on.
21858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21859  if test "x$test_shortpath" = x; then
21860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21862    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21863  fi
21864
21865  # Call helper function which possibly converts this using DOS-style short mode.
21866  # If so, the updated path is stored in $new_path.
21867
21868  input_path="$new_path"
21869  # Check if we need to convert this using DOS-style short mode. If the path
21870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21871  # take no chances and rewrite it.
21872  # Note: m4 eats our [], so we need to use [ and ] instead.
21873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21874  if test "x$has_forbidden_chars" != x; then
21875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21879      # Going to short mode and back again did indeed matter. Since short mode is
21880      # case insensitive, let's make it lowercase to improve readability.
21881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21882      # Now convert it back to Unix-stile (cygpath)
21883      input_path=`$CYGPATH -u "$shortmode_path"`
21884      new_path="$input_path"
21885    fi
21886  fi
21887
21888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21889  if test "x$test_cygdrive_prefix" = x; then
21890    # As a simple fix, exclude /usr/bin since it's not a real path.
21891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21893      # a path prefixed by /cygdrive for fixpath to work.
21894      new_path="$CYGWIN_ROOT_PATH$input_path"
21895    fi
21896  fi
21897
21898
21899  if test "x$path" != "x$new_path"; then
21900    BOOT_JDK="$new_path"
21901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21903  fi
21904
21905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21906
21907  path="$BOOT_JDK"
21908  has_colon=`$ECHO $path | $GREP ^.:`
21909  new_path="$path"
21910  if test "x$has_colon" = x; then
21911    # Not in mixed or Windows style, start by that.
21912    new_path=`cmd //c echo $path`
21913  fi
21914
21915
21916  input_path="$new_path"
21917  # Check if we need to convert this using DOS-style short mode. If the path
21918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21919  # take no chances and rewrite it.
21920  # Note: m4 eats our [], so we need to use [ and ] instead.
21921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21922  if test "x$has_forbidden_chars" != x; then
21923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21925  fi
21926
21927
21928  windows_path="$new_path"
21929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21930    unix_path=`$CYGPATH -u "$windows_path"`
21931    new_path="$unix_path"
21932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21934    new_path="$unix_path"
21935  fi
21936
21937  if test "x$path" != "x$new_path"; then
21938    BOOT_JDK="$new_path"
21939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21941  fi
21942
21943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21945
21946  else
21947    # We're on a posix platform. Hooray! :)
21948    path="$BOOT_JDK"
21949    has_space=`$ECHO "$path" | $GREP " "`
21950    if test "x$has_space" != x; then
21951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21954    fi
21955
21956    # Use eval to expand a potential ~
21957    eval path="$path"
21958    if test ! -f "$path" && test ! -d "$path"; then
21959      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21960    fi
21961
21962    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21963  fi
21964
21965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21966$as_echo_n "checking for Boot JDK... " >&6; }
21967              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21968$as_echo "$BOOT_JDK" >&6; }
21969              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21970$as_echo_n "checking Boot JDK version... " >&6; }
21971              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21973$as_echo "$BOOT_JDK_VERSION" >&6; }
21974            fi # end check jdk version
21975          fi # end check rt.jar
21976        fi # end check javac
21977      fi # end check java
21978    fi # end check boot jdk found
21979  fi
21980
21981    done
21982  fi
21983
21984  fi
21985
21986
21987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21989      # Do we have a bin/java?
21990      if test ! -x "$BOOT_JDK/bin/java"; then
21991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21993        BOOT_JDK_FOUND=no
21994      else
21995        # Do we have a bin/javac?
21996        if test ! -x "$BOOT_JDK/bin/javac"; then
21997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22001          BOOT_JDK_FOUND=no
22002        else
22003          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22004          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22007            BOOT_JDK_FOUND=no
22008          else
22009            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22010            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22011
22012            # Extra M4 quote needed to protect [] in grep expression.
22013            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22014            if test "x$FOUND_CORRECT_VERSION" = x; then
22015              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22017              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22018$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22019              BOOT_JDK_FOUND=no
22020            else
22021              # We're done! :-)
22022              BOOT_JDK_FOUND=yes
22023
22024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22025
22026  # Input might be given as Windows format, start by converting to
22027  # unix format.
22028  path="$BOOT_JDK"
22029  new_path=`$CYGPATH -u "$path"`
22030
22031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22034  # "foo.exe" is OK but "foo" is an error.
22035  #
22036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22037  # It is also a way to make sure we got the proper file name for the real test later on.
22038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22039  if test "x$test_shortpath" = x; then
22040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22043  fi
22044
22045  # Call helper function which possibly converts this using DOS-style short mode.
22046  # If so, the updated path is stored in $new_path.
22047
22048  input_path="$new_path"
22049  # Check if we need to convert this using DOS-style short mode. If the path
22050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22051  # take no chances and rewrite it.
22052  # Note: m4 eats our [], so we need to use [ and ] instead.
22053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22054  if test "x$has_forbidden_chars" != x; then
22055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22059      # Going to short mode and back again did indeed matter. Since short mode is
22060      # case insensitive, let's make it lowercase to improve readability.
22061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22062      # Now convert it back to Unix-stile (cygpath)
22063      input_path=`$CYGPATH -u "$shortmode_path"`
22064      new_path="$input_path"
22065    fi
22066  fi
22067
22068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22069  if test "x$test_cygdrive_prefix" = x; then
22070    # As a simple fix, exclude /usr/bin since it's not a real path.
22071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22073      # a path prefixed by /cygdrive for fixpath to work.
22074      new_path="$CYGWIN_ROOT_PATH$input_path"
22075    fi
22076  fi
22077
22078
22079  if test "x$path" != "x$new_path"; then
22080    BOOT_JDK="$new_path"
22081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22083  fi
22084
22085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22086
22087  path="$BOOT_JDK"
22088  has_colon=`$ECHO $path | $GREP ^.:`
22089  new_path="$path"
22090  if test "x$has_colon" = x; then
22091    # Not in mixed or Windows style, start by that.
22092    new_path=`cmd //c echo $path`
22093  fi
22094
22095
22096  input_path="$new_path"
22097  # Check if we need to convert this using DOS-style short mode. If the path
22098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22099  # take no chances and rewrite it.
22100  # Note: m4 eats our [], so we need to use [ and ] instead.
22101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22102  if test "x$has_forbidden_chars" != x; then
22103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22105  fi
22106
22107
22108  windows_path="$new_path"
22109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22110    unix_path=`$CYGPATH -u "$windows_path"`
22111    new_path="$unix_path"
22112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22114    new_path="$unix_path"
22115  fi
22116
22117  if test "x$path" != "x$new_path"; then
22118    BOOT_JDK="$new_path"
22119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22121  fi
22122
22123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22125
22126  else
22127    # We're on a posix platform. Hooray! :)
22128    path="$BOOT_JDK"
22129    has_space=`$ECHO "$path" | $GREP " "`
22130    if test "x$has_space" != x; then
22131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22133      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22134    fi
22135
22136    # Use eval to expand a potential ~
22137    eval path="$path"
22138    if test ! -f "$path" && test ! -d "$path"; then
22139      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22140    fi
22141
22142    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22143  fi
22144
22145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22146$as_echo_n "checking for Boot JDK... " >&6; }
22147              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22148$as_echo "$BOOT_JDK" >&6; }
22149              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22150$as_echo_n "checking Boot JDK version... " >&6; }
22151              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22152              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22153$as_echo "$BOOT_JDK_VERSION" >&6; }
22154            fi # end check jdk version
22155          fi # end check rt.jar
22156        fi # end check javac
22157      fi # end check java
22158    fi # end check boot jdk found
22159  fi
22160
22161
22162  if test "x$BOOT_JDK_FOUND" = xno; then
22163    # Now execute the test
22164
22165  if test "x$PROGRAMW6432" != x; then
22166    VIRTUAL_DIR="$PROGRAMW6432/Java"
22167
22168  windows_path="$VIRTUAL_DIR"
22169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22170    unix_path=`$CYGPATH -u "$windows_path"`
22171    VIRTUAL_DIR="$unix_path"
22172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22174    VIRTUAL_DIR="$unix_path"
22175  fi
22176
22177
22178  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22179  BOOT_JDK_SUFFIX=""
22180  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22181  if test "x$ALL_JDKS_FOUND" != x; then
22182    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22183
22184  if test "x$BOOT_JDK_FOUND" = xno; then
22185    # Now execute the test
22186
22187        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22188        if test -d "$BOOT_JDK"; then
22189          BOOT_JDK_FOUND=maybe
22190          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22191$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22192        fi
22193
22194
22195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22197      # Do we have a bin/java?
22198      if test ! -x "$BOOT_JDK/bin/java"; then
22199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22201        BOOT_JDK_FOUND=no
22202      else
22203        # Do we have a bin/javac?
22204        if test ! -x "$BOOT_JDK/bin/javac"; then
22205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22209          BOOT_JDK_FOUND=no
22210        else
22211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22215            BOOT_JDK_FOUND=no
22216          else
22217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22219
22220            # Extra M4 quote needed to protect [] in grep expression.
22221            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22222            if test "x$FOUND_CORRECT_VERSION" = x; then
22223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22226$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22227              BOOT_JDK_FOUND=no
22228            else
22229              # We're done! :-)
22230              BOOT_JDK_FOUND=yes
22231
22232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22233
22234  # Input might be given as Windows format, start by converting to
22235  # unix format.
22236  path="$BOOT_JDK"
22237  new_path=`$CYGPATH -u "$path"`
22238
22239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22242  # "foo.exe" is OK but "foo" is an error.
22243  #
22244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22245  # It is also a way to make sure we got the proper file name for the real test later on.
22246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22247  if test "x$test_shortpath" = x; then
22248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22251  fi
22252
22253  # Call helper function which possibly converts this using DOS-style short mode.
22254  # If so, the updated path is stored in $new_path.
22255
22256  input_path="$new_path"
22257  # Check if we need to convert this using DOS-style short mode. If the path
22258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22259  # take no chances and rewrite it.
22260  # Note: m4 eats our [], so we need to use [ and ] instead.
22261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22262  if test "x$has_forbidden_chars" != x; then
22263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22267      # Going to short mode and back again did indeed matter. Since short mode is
22268      # case insensitive, let's make it lowercase to improve readability.
22269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22270      # Now convert it back to Unix-stile (cygpath)
22271      input_path=`$CYGPATH -u "$shortmode_path"`
22272      new_path="$input_path"
22273    fi
22274  fi
22275
22276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22277  if test "x$test_cygdrive_prefix" = x; then
22278    # As a simple fix, exclude /usr/bin since it's not a real path.
22279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22281      # a path prefixed by /cygdrive for fixpath to work.
22282      new_path="$CYGWIN_ROOT_PATH$input_path"
22283    fi
22284  fi
22285
22286
22287  if test "x$path" != "x$new_path"; then
22288    BOOT_JDK="$new_path"
22289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22291  fi
22292
22293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22294
22295  path="$BOOT_JDK"
22296  has_colon=`$ECHO $path | $GREP ^.:`
22297  new_path="$path"
22298  if test "x$has_colon" = x; then
22299    # Not in mixed or Windows style, start by that.
22300    new_path=`cmd //c echo $path`
22301  fi
22302
22303
22304  input_path="$new_path"
22305  # Check if we need to convert this using DOS-style short mode. If the path
22306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22307  # take no chances and rewrite it.
22308  # Note: m4 eats our [], so we need to use [ and ] instead.
22309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22310  if test "x$has_forbidden_chars" != x; then
22311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22313  fi
22314
22315
22316  windows_path="$new_path"
22317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22318    unix_path=`$CYGPATH -u "$windows_path"`
22319    new_path="$unix_path"
22320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22322    new_path="$unix_path"
22323  fi
22324
22325  if test "x$path" != "x$new_path"; then
22326    BOOT_JDK="$new_path"
22327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22329  fi
22330
22331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22333
22334  else
22335    # We're on a posix platform. Hooray! :)
22336    path="$BOOT_JDK"
22337    has_space=`$ECHO "$path" | $GREP " "`
22338    if test "x$has_space" != x; then
22339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22340$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22341      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22342    fi
22343
22344    # Use eval to expand a potential ~
22345    eval path="$path"
22346    if test ! -f "$path" && test ! -d "$path"; then
22347      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22348    fi
22349
22350    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22351  fi
22352
22353              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22354$as_echo_n "checking for Boot JDK... " >&6; }
22355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22356$as_echo "$BOOT_JDK" >&6; }
22357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22358$as_echo_n "checking Boot JDK version... " >&6; }
22359              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22360              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22361$as_echo "$BOOT_JDK_VERSION" >&6; }
22362            fi # end check jdk version
22363          fi # end check rt.jar
22364        fi # end check javac
22365      fi # end check java
22366    fi # end check boot jdk found
22367  fi
22368
22369    done
22370  fi
22371
22372  fi
22373
22374
22375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22377      # Do we have a bin/java?
22378      if test ! -x "$BOOT_JDK/bin/java"; then
22379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22381        BOOT_JDK_FOUND=no
22382      else
22383        # Do we have a bin/javac?
22384        if test ! -x "$BOOT_JDK/bin/javac"; then
22385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22389          BOOT_JDK_FOUND=no
22390        else
22391          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22392          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22393            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22395            BOOT_JDK_FOUND=no
22396          else
22397            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22398            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22399
22400            # Extra M4 quote needed to protect [] in grep expression.
22401            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22402            if test "x$FOUND_CORRECT_VERSION" = x; then
22403              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22405              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22406$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22407              BOOT_JDK_FOUND=no
22408            else
22409              # We're done! :-)
22410              BOOT_JDK_FOUND=yes
22411
22412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22413
22414  # Input might be given as Windows format, start by converting to
22415  # unix format.
22416  path="$BOOT_JDK"
22417  new_path=`$CYGPATH -u "$path"`
22418
22419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22422  # "foo.exe" is OK but "foo" is an error.
22423  #
22424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22425  # It is also a way to make sure we got the proper file name for the real test later on.
22426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22427  if test "x$test_shortpath" = x; then
22428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22430    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22431  fi
22432
22433  # Call helper function which possibly converts this using DOS-style short mode.
22434  # If so, the updated path is stored in $new_path.
22435
22436  input_path="$new_path"
22437  # Check if we need to convert this using DOS-style short mode. If the path
22438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22439  # take no chances and rewrite it.
22440  # Note: m4 eats our [], so we need to use [ and ] instead.
22441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22442  if test "x$has_forbidden_chars" != x; then
22443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22447      # Going to short mode and back again did indeed matter. Since short mode is
22448      # case insensitive, let's make it lowercase to improve readability.
22449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22450      # Now convert it back to Unix-stile (cygpath)
22451      input_path=`$CYGPATH -u "$shortmode_path"`
22452      new_path="$input_path"
22453    fi
22454  fi
22455
22456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22457  if test "x$test_cygdrive_prefix" = x; then
22458    # As a simple fix, exclude /usr/bin since it's not a real path.
22459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22461      # a path prefixed by /cygdrive for fixpath to work.
22462      new_path="$CYGWIN_ROOT_PATH$input_path"
22463    fi
22464  fi
22465
22466
22467  if test "x$path" != "x$new_path"; then
22468    BOOT_JDK="$new_path"
22469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22471  fi
22472
22473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22474
22475  path="$BOOT_JDK"
22476  has_colon=`$ECHO $path | $GREP ^.:`
22477  new_path="$path"
22478  if test "x$has_colon" = x; then
22479    # Not in mixed or Windows style, start by that.
22480    new_path=`cmd //c echo $path`
22481  fi
22482
22483
22484  input_path="$new_path"
22485  # Check if we need to convert this using DOS-style short mode. If the path
22486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22487  # take no chances and rewrite it.
22488  # Note: m4 eats our [], so we need to use [ and ] instead.
22489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22490  if test "x$has_forbidden_chars" != x; then
22491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22493  fi
22494
22495
22496  windows_path="$new_path"
22497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22498    unix_path=`$CYGPATH -u "$windows_path"`
22499    new_path="$unix_path"
22500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22502    new_path="$unix_path"
22503  fi
22504
22505  if test "x$path" != "x$new_path"; then
22506    BOOT_JDK="$new_path"
22507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22509  fi
22510
22511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22513
22514  else
22515    # We're on a posix platform. Hooray! :)
22516    path="$BOOT_JDK"
22517    has_space=`$ECHO "$path" | $GREP " "`
22518    if test "x$has_space" != x; then
22519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22521      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22522    fi
22523
22524    # Use eval to expand a potential ~
22525    eval path="$path"
22526    if test ! -f "$path" && test ! -d "$path"; then
22527      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22528    fi
22529
22530    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22531  fi
22532
22533              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22534$as_echo_n "checking for Boot JDK... " >&6; }
22535              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22536$as_echo "$BOOT_JDK" >&6; }
22537              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22538$as_echo_n "checking Boot JDK version... " >&6; }
22539              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22540              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22541$as_echo "$BOOT_JDK_VERSION" >&6; }
22542            fi # end check jdk version
22543          fi # end check rt.jar
22544        fi # end check javac
22545      fi # end check java
22546    fi # end check boot jdk found
22547  fi
22548
22549
22550  if test "x$BOOT_JDK_FOUND" = xno; then
22551    # Now execute the test
22552
22553  if test "x$PROGRAMFILES" != x; then
22554    VIRTUAL_DIR="$PROGRAMFILES/Java"
22555
22556  windows_path="$VIRTUAL_DIR"
22557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22558    unix_path=`$CYGPATH -u "$windows_path"`
22559    VIRTUAL_DIR="$unix_path"
22560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22562    VIRTUAL_DIR="$unix_path"
22563  fi
22564
22565
22566  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22567  BOOT_JDK_SUFFIX=""
22568  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22569  if test "x$ALL_JDKS_FOUND" != x; then
22570    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22571
22572  if test "x$BOOT_JDK_FOUND" = xno; then
22573    # Now execute the test
22574
22575        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22576        if test -d "$BOOT_JDK"; then
22577          BOOT_JDK_FOUND=maybe
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22579$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22580        fi
22581
22582
22583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22585      # Do we have a bin/java?
22586      if test ! -x "$BOOT_JDK/bin/java"; then
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22589        BOOT_JDK_FOUND=no
22590      else
22591        # Do we have a bin/javac?
22592        if test ! -x "$BOOT_JDK/bin/javac"; then
22593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22597          BOOT_JDK_FOUND=no
22598        else
22599          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22600          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22603            BOOT_JDK_FOUND=no
22604          else
22605            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22607
22608            # Extra M4 quote needed to protect [] in grep expression.
22609            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22610            if test "x$FOUND_CORRECT_VERSION" = x; then
22611              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22613              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22614$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22615              BOOT_JDK_FOUND=no
22616            else
22617              # We're done! :-)
22618              BOOT_JDK_FOUND=yes
22619
22620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22621
22622  # Input might be given as Windows format, start by converting to
22623  # unix format.
22624  path="$BOOT_JDK"
22625  new_path=`$CYGPATH -u "$path"`
22626
22627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22630  # "foo.exe" is OK but "foo" is an error.
22631  #
22632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22633  # It is also a way to make sure we got the proper file name for the real test later on.
22634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22635  if test "x$test_shortpath" = x; then
22636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22639  fi
22640
22641  # Call helper function which possibly converts this using DOS-style short mode.
22642  # If so, the updated path is stored in $new_path.
22643
22644  input_path="$new_path"
22645  # Check if we need to convert this using DOS-style short mode. If the path
22646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22647  # take no chances and rewrite it.
22648  # Note: m4 eats our [], so we need to use [ and ] instead.
22649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22650  if test "x$has_forbidden_chars" != x; then
22651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22655      # Going to short mode and back again did indeed matter. Since short mode is
22656      # case insensitive, let's make it lowercase to improve readability.
22657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22658      # Now convert it back to Unix-stile (cygpath)
22659      input_path=`$CYGPATH -u "$shortmode_path"`
22660      new_path="$input_path"
22661    fi
22662  fi
22663
22664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22665  if test "x$test_cygdrive_prefix" = x; then
22666    # As a simple fix, exclude /usr/bin since it's not a real path.
22667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22669      # a path prefixed by /cygdrive for fixpath to work.
22670      new_path="$CYGWIN_ROOT_PATH$input_path"
22671    fi
22672  fi
22673
22674
22675  if test "x$path" != "x$new_path"; then
22676    BOOT_JDK="$new_path"
22677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22679  fi
22680
22681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22682
22683  path="$BOOT_JDK"
22684  has_colon=`$ECHO $path | $GREP ^.:`
22685  new_path="$path"
22686  if test "x$has_colon" = x; then
22687    # Not in mixed or Windows style, start by that.
22688    new_path=`cmd //c echo $path`
22689  fi
22690
22691
22692  input_path="$new_path"
22693  # Check if we need to convert this using DOS-style short mode. If the path
22694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22695  # take no chances and rewrite it.
22696  # Note: m4 eats our [], so we need to use [ and ] instead.
22697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22698  if test "x$has_forbidden_chars" != x; then
22699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22701  fi
22702
22703
22704  windows_path="$new_path"
22705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22706    unix_path=`$CYGPATH -u "$windows_path"`
22707    new_path="$unix_path"
22708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22710    new_path="$unix_path"
22711  fi
22712
22713  if test "x$path" != "x$new_path"; then
22714    BOOT_JDK="$new_path"
22715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22717  fi
22718
22719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22721
22722  else
22723    # We're on a posix platform. Hooray! :)
22724    path="$BOOT_JDK"
22725    has_space=`$ECHO "$path" | $GREP " "`
22726    if test "x$has_space" != x; then
22727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22730    fi
22731
22732    # Use eval to expand a potential ~
22733    eval path="$path"
22734    if test ! -f "$path" && test ! -d "$path"; then
22735      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22736    fi
22737
22738    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22739  fi
22740
22741              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22742$as_echo_n "checking for Boot JDK... " >&6; }
22743              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22744$as_echo "$BOOT_JDK" >&6; }
22745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22746$as_echo_n "checking Boot JDK version... " >&6; }
22747              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22749$as_echo "$BOOT_JDK_VERSION" >&6; }
22750            fi # end check jdk version
22751          fi # end check rt.jar
22752        fi # end check javac
22753      fi # end check java
22754    fi # end check boot jdk found
22755  fi
22756
22757    done
22758  fi
22759
22760  fi
22761
22762
22763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22765      # Do we have a bin/java?
22766      if test ! -x "$BOOT_JDK/bin/java"; then
22767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22769        BOOT_JDK_FOUND=no
22770      else
22771        # Do we have a bin/javac?
22772        if test ! -x "$BOOT_JDK/bin/javac"; then
22773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22777          BOOT_JDK_FOUND=no
22778        else
22779          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22780          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22783            BOOT_JDK_FOUND=no
22784          else
22785            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22787
22788            # Extra M4 quote needed to protect [] in grep expression.
22789            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22790            if test "x$FOUND_CORRECT_VERSION" = x; then
22791              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22793              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22794$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22795              BOOT_JDK_FOUND=no
22796            else
22797              # We're done! :-)
22798              BOOT_JDK_FOUND=yes
22799
22800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22801
22802  # Input might be given as Windows format, start by converting to
22803  # unix format.
22804  path="$BOOT_JDK"
22805  new_path=`$CYGPATH -u "$path"`
22806
22807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22810  # "foo.exe" is OK but "foo" is an error.
22811  #
22812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22813  # It is also a way to make sure we got the proper file name for the real test later on.
22814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22815  if test "x$test_shortpath" = x; then
22816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22819  fi
22820
22821  # Call helper function which possibly converts this using DOS-style short mode.
22822  # If so, the updated path is stored in $new_path.
22823
22824  input_path="$new_path"
22825  # Check if we need to convert this using DOS-style short mode. If the path
22826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22827  # take no chances and rewrite it.
22828  # Note: m4 eats our [], so we need to use [ and ] instead.
22829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22830  if test "x$has_forbidden_chars" != x; then
22831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22835      # Going to short mode and back again did indeed matter. Since short mode is
22836      # case insensitive, let's make it lowercase to improve readability.
22837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22838      # Now convert it back to Unix-stile (cygpath)
22839      input_path=`$CYGPATH -u "$shortmode_path"`
22840      new_path="$input_path"
22841    fi
22842  fi
22843
22844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22845  if test "x$test_cygdrive_prefix" = x; then
22846    # As a simple fix, exclude /usr/bin since it's not a real path.
22847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22849      # a path prefixed by /cygdrive for fixpath to work.
22850      new_path="$CYGWIN_ROOT_PATH$input_path"
22851    fi
22852  fi
22853
22854
22855  if test "x$path" != "x$new_path"; then
22856    BOOT_JDK="$new_path"
22857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22859  fi
22860
22861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22862
22863  path="$BOOT_JDK"
22864  has_colon=`$ECHO $path | $GREP ^.:`
22865  new_path="$path"
22866  if test "x$has_colon" = x; then
22867    # Not in mixed or Windows style, start by that.
22868    new_path=`cmd //c echo $path`
22869  fi
22870
22871
22872  input_path="$new_path"
22873  # Check if we need to convert this using DOS-style short mode. If the path
22874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22875  # take no chances and rewrite it.
22876  # Note: m4 eats our [], so we need to use [ and ] instead.
22877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22878  if test "x$has_forbidden_chars" != x; then
22879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22881  fi
22882
22883
22884  windows_path="$new_path"
22885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22886    unix_path=`$CYGPATH -u "$windows_path"`
22887    new_path="$unix_path"
22888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22890    new_path="$unix_path"
22891  fi
22892
22893  if test "x$path" != "x$new_path"; then
22894    BOOT_JDK="$new_path"
22895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22897  fi
22898
22899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22901
22902  else
22903    # We're on a posix platform. Hooray! :)
22904    path="$BOOT_JDK"
22905    has_space=`$ECHO "$path" | $GREP " "`
22906    if test "x$has_space" != x; then
22907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22910    fi
22911
22912    # Use eval to expand a potential ~
22913    eval path="$path"
22914    if test ! -f "$path" && test ! -d "$path"; then
22915      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22916    fi
22917
22918    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22919  fi
22920
22921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22922$as_echo_n "checking for Boot JDK... " >&6; }
22923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22924$as_echo "$BOOT_JDK" >&6; }
22925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22926$as_echo_n "checking Boot JDK version... " >&6; }
22927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22929$as_echo "$BOOT_JDK_VERSION" >&6; }
22930            fi # end check jdk version
22931          fi # end check rt.jar
22932        fi # end check javac
22933      fi # end check java
22934    fi # end check boot jdk found
22935  fi
22936
22937
22938  if test "x$BOOT_JDK_FOUND" = xno; then
22939    # Now execute the test
22940
22941  if test "x$ProgramFiles" != x; then
22942    VIRTUAL_DIR="$ProgramFiles/Java"
22943
22944  windows_path="$VIRTUAL_DIR"
22945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22946    unix_path=`$CYGPATH -u "$windows_path"`
22947    VIRTUAL_DIR="$unix_path"
22948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22950    VIRTUAL_DIR="$unix_path"
22951  fi
22952
22953
22954  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22955  BOOT_JDK_SUFFIX=""
22956  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22957  if test "x$ALL_JDKS_FOUND" != x; then
22958    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22959
22960  if test "x$BOOT_JDK_FOUND" = xno; then
22961    # Now execute the test
22962
22963        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22964        if test -d "$BOOT_JDK"; then
22965          BOOT_JDK_FOUND=maybe
22966          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22967$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22968        fi
22969
22970
22971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22973      # Do we have a bin/java?
22974      if test ! -x "$BOOT_JDK/bin/java"; then
22975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22977        BOOT_JDK_FOUND=no
22978      else
22979        # Do we have a bin/javac?
22980        if test ! -x "$BOOT_JDK/bin/javac"; then
22981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22985          BOOT_JDK_FOUND=no
22986        else
22987          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22988          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22991            BOOT_JDK_FOUND=no
22992          else
22993            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22995
22996            # Extra M4 quote needed to protect [] in grep expression.
22997            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22998            if test "x$FOUND_CORRECT_VERSION" = x; then
22999              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23001              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23002$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23003              BOOT_JDK_FOUND=no
23004            else
23005              # We're done! :-)
23006              BOOT_JDK_FOUND=yes
23007
23008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009
23010  # Input might be given as Windows format, start by converting to
23011  # unix format.
23012  path="$BOOT_JDK"
23013  new_path=`$CYGPATH -u "$path"`
23014
23015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23018  # "foo.exe" is OK but "foo" is an error.
23019  #
23020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23021  # It is also a way to make sure we got the proper file name for the real test later on.
23022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23023  if test "x$test_shortpath" = x; then
23024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23027  fi
23028
23029  # Call helper function which possibly converts this using DOS-style short mode.
23030  # If so, the updated path is stored in $new_path.
23031
23032  input_path="$new_path"
23033  # Check if we need to convert this using DOS-style short mode. If the path
23034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23035  # take no chances and rewrite it.
23036  # Note: m4 eats our [], so we need to use [ and ] instead.
23037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23038  if test "x$has_forbidden_chars" != x; then
23039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23043      # Going to short mode and back again did indeed matter. Since short mode is
23044      # case insensitive, let's make it lowercase to improve readability.
23045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23046      # Now convert it back to Unix-stile (cygpath)
23047      input_path=`$CYGPATH -u "$shortmode_path"`
23048      new_path="$input_path"
23049    fi
23050  fi
23051
23052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23053  if test "x$test_cygdrive_prefix" = x; then
23054    # As a simple fix, exclude /usr/bin since it's not a real path.
23055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23057      # a path prefixed by /cygdrive for fixpath to work.
23058      new_path="$CYGWIN_ROOT_PATH$input_path"
23059    fi
23060  fi
23061
23062
23063  if test "x$path" != "x$new_path"; then
23064    BOOT_JDK="$new_path"
23065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23067  fi
23068
23069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23070
23071  path="$BOOT_JDK"
23072  has_colon=`$ECHO $path | $GREP ^.:`
23073  new_path="$path"
23074  if test "x$has_colon" = x; then
23075    # Not in mixed or Windows style, start by that.
23076    new_path=`cmd //c echo $path`
23077  fi
23078
23079
23080  input_path="$new_path"
23081  # Check if we need to convert this using DOS-style short mode. If the path
23082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23083  # take no chances and rewrite it.
23084  # Note: m4 eats our [], so we need to use [ and ] instead.
23085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23086  if test "x$has_forbidden_chars" != x; then
23087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23089  fi
23090
23091
23092  windows_path="$new_path"
23093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23094    unix_path=`$CYGPATH -u "$windows_path"`
23095    new_path="$unix_path"
23096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23098    new_path="$unix_path"
23099  fi
23100
23101  if test "x$path" != "x$new_path"; then
23102    BOOT_JDK="$new_path"
23103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23105  fi
23106
23107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23109
23110  else
23111    # We're on a posix platform. Hooray! :)
23112    path="$BOOT_JDK"
23113    has_space=`$ECHO "$path" | $GREP " "`
23114    if test "x$has_space" != x; then
23115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23117      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23118    fi
23119
23120    # Use eval to expand a potential ~
23121    eval path="$path"
23122    if test ! -f "$path" && test ! -d "$path"; then
23123      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23124    fi
23125
23126    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23127  fi
23128
23129              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23130$as_echo_n "checking for Boot JDK... " >&6; }
23131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23132$as_echo "$BOOT_JDK" >&6; }
23133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23134$as_echo_n "checking Boot JDK version... " >&6; }
23135              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23137$as_echo "$BOOT_JDK_VERSION" >&6; }
23138            fi # end check jdk version
23139          fi # end check rt.jar
23140        fi # end check javac
23141      fi # end check java
23142    fi # end check boot jdk found
23143  fi
23144
23145    done
23146  fi
23147
23148  fi
23149
23150
23151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23153      # Do we have a bin/java?
23154      if test ! -x "$BOOT_JDK/bin/java"; then
23155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23157        BOOT_JDK_FOUND=no
23158      else
23159        # Do we have a bin/javac?
23160        if test ! -x "$BOOT_JDK/bin/javac"; then
23161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23165          BOOT_JDK_FOUND=no
23166        else
23167          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23168          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23171            BOOT_JDK_FOUND=no
23172          else
23173            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23175
23176            # Extra M4 quote needed to protect [] in grep expression.
23177            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23178            if test "x$FOUND_CORRECT_VERSION" = x; then
23179              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23181              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23182$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23183              BOOT_JDK_FOUND=no
23184            else
23185              # We're done! :-)
23186              BOOT_JDK_FOUND=yes
23187
23188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23189
23190  # Input might be given as Windows format, start by converting to
23191  # unix format.
23192  path="$BOOT_JDK"
23193  new_path=`$CYGPATH -u "$path"`
23194
23195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23198  # "foo.exe" is OK but "foo" is an error.
23199  #
23200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23201  # It is also a way to make sure we got the proper file name for the real test later on.
23202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23203  if test "x$test_shortpath" = x; then
23204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23207  fi
23208
23209  # Call helper function which possibly converts this using DOS-style short mode.
23210  # If so, the updated path is stored in $new_path.
23211
23212  input_path="$new_path"
23213  # Check if we need to convert this using DOS-style short mode. If the path
23214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23215  # take no chances and rewrite it.
23216  # Note: m4 eats our [], so we need to use [ and ] instead.
23217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23218  if test "x$has_forbidden_chars" != x; then
23219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23223      # Going to short mode and back again did indeed matter. Since short mode is
23224      # case insensitive, let's make it lowercase to improve readability.
23225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23226      # Now convert it back to Unix-stile (cygpath)
23227      input_path=`$CYGPATH -u "$shortmode_path"`
23228      new_path="$input_path"
23229    fi
23230  fi
23231
23232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23233  if test "x$test_cygdrive_prefix" = x; then
23234    # As a simple fix, exclude /usr/bin since it's not a real path.
23235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23237      # a path prefixed by /cygdrive for fixpath to work.
23238      new_path="$CYGWIN_ROOT_PATH$input_path"
23239    fi
23240  fi
23241
23242
23243  if test "x$path" != "x$new_path"; then
23244    BOOT_JDK="$new_path"
23245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23247  fi
23248
23249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23250
23251  path="$BOOT_JDK"
23252  has_colon=`$ECHO $path | $GREP ^.:`
23253  new_path="$path"
23254  if test "x$has_colon" = x; then
23255    # Not in mixed or Windows style, start by that.
23256    new_path=`cmd //c echo $path`
23257  fi
23258
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23269  fi
23270
23271
23272  windows_path="$new_path"
23273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23274    unix_path=`$CYGPATH -u "$windows_path"`
23275    new_path="$unix_path"
23276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23278    new_path="$unix_path"
23279  fi
23280
23281  if test "x$path" != "x$new_path"; then
23282    BOOT_JDK="$new_path"
23283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23285  fi
23286
23287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23289
23290  else
23291    # We're on a posix platform. Hooray! :)
23292    path="$BOOT_JDK"
23293    has_space=`$ECHO "$path" | $GREP " "`
23294    if test "x$has_space" != x; then
23295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23298    fi
23299
23300    # Use eval to expand a potential ~
23301    eval path="$path"
23302    if test ! -f "$path" && test ! -d "$path"; then
23303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23304    fi
23305
23306    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23307  fi
23308
23309              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23310$as_echo_n "checking for Boot JDK... " >&6; }
23311              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23312$as_echo "$BOOT_JDK" >&6; }
23313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23314$as_echo_n "checking Boot JDK version... " >&6; }
23315              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23317$as_echo "$BOOT_JDK_VERSION" >&6; }
23318            fi # end check jdk version
23319          fi # end check rt.jar
23320        fi # end check javac
23321      fi # end check java
23322    fi # end check boot jdk found
23323  fi
23324
23325
23326  if test "x$BOOT_JDK_FOUND" = xno; then
23327    # Now execute the test
23328
23329  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23330  BOOT_JDK_SUFFIX=""
23331  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23332  if test "x$ALL_JDKS_FOUND" != x; then
23333    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23334
23335  if test "x$BOOT_JDK_FOUND" = xno; then
23336    # Now execute the test
23337
23338        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23339        if test -d "$BOOT_JDK"; then
23340          BOOT_JDK_FOUND=maybe
23341          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23342$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23343        fi
23344
23345
23346    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23347    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23348      # Do we have a bin/java?
23349      if test ! -x "$BOOT_JDK/bin/java"; then
23350        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23352        BOOT_JDK_FOUND=no
23353      else
23354        # Do we have a bin/javac?
23355        if test ! -x "$BOOT_JDK/bin/javac"; then
23356          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23358          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23359$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23360          BOOT_JDK_FOUND=no
23361        else
23362          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23363          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23364            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23366            BOOT_JDK_FOUND=no
23367          else
23368            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23370
23371            # Extra M4 quote needed to protect [] in grep expression.
23372            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23373            if test "x$FOUND_CORRECT_VERSION" = x; then
23374              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23376              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23377$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23378              BOOT_JDK_FOUND=no
23379            else
23380              # We're done! :-)
23381              BOOT_JDK_FOUND=yes
23382
23383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23384
23385  # Input might be given as Windows format, start by converting to
23386  # unix format.
23387  path="$BOOT_JDK"
23388  new_path=`$CYGPATH -u "$path"`
23389
23390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23393  # "foo.exe" is OK but "foo" is an error.
23394  #
23395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23396  # It is also a way to make sure we got the proper file name for the real test later on.
23397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23398  if test "x$test_shortpath" = x; then
23399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23401    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23402  fi
23403
23404  # Call helper function which possibly converts this using DOS-style short mode.
23405  # If so, the updated path is stored in $new_path.
23406
23407  input_path="$new_path"
23408  # Check if we need to convert this using DOS-style short mode. If the path
23409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23410  # take no chances and rewrite it.
23411  # Note: m4 eats our [], so we need to use [ and ] instead.
23412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23413  if test "x$has_forbidden_chars" != x; then
23414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23418      # Going to short mode and back again did indeed matter. Since short mode is
23419      # case insensitive, let's make it lowercase to improve readability.
23420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23421      # Now convert it back to Unix-stile (cygpath)
23422      input_path=`$CYGPATH -u "$shortmode_path"`
23423      new_path="$input_path"
23424    fi
23425  fi
23426
23427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23428  if test "x$test_cygdrive_prefix" = x; then
23429    # As a simple fix, exclude /usr/bin since it's not a real path.
23430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23432      # a path prefixed by /cygdrive for fixpath to work.
23433      new_path="$CYGWIN_ROOT_PATH$input_path"
23434    fi
23435  fi
23436
23437
23438  if test "x$path" != "x$new_path"; then
23439    BOOT_JDK="$new_path"
23440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23442  fi
23443
23444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23445
23446  path="$BOOT_JDK"
23447  has_colon=`$ECHO $path | $GREP ^.:`
23448  new_path="$path"
23449  if test "x$has_colon" = x; then
23450    # Not in mixed or Windows style, start by that.
23451    new_path=`cmd //c echo $path`
23452  fi
23453
23454
23455  input_path="$new_path"
23456  # Check if we need to convert this using DOS-style short mode. If the path
23457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23458  # take no chances and rewrite it.
23459  # Note: m4 eats our [], so we need to use [ and ] instead.
23460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23461  if test "x$has_forbidden_chars" != x; then
23462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23464  fi
23465
23466
23467  windows_path="$new_path"
23468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23469    unix_path=`$CYGPATH -u "$windows_path"`
23470    new_path="$unix_path"
23471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23473    new_path="$unix_path"
23474  fi
23475
23476  if test "x$path" != "x$new_path"; then
23477    BOOT_JDK="$new_path"
23478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23480  fi
23481
23482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23484
23485  else
23486    # We're on a posix platform. Hooray! :)
23487    path="$BOOT_JDK"
23488    has_space=`$ECHO "$path" | $GREP " "`
23489    if test "x$has_space" != x; then
23490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23493    fi
23494
23495    # Use eval to expand a potential ~
23496    eval path="$path"
23497    if test ! -f "$path" && test ! -d "$path"; then
23498      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23499    fi
23500
23501    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23502  fi
23503
23504              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23505$as_echo_n "checking for Boot JDK... " >&6; }
23506              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23507$as_echo "$BOOT_JDK" >&6; }
23508              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23509$as_echo_n "checking Boot JDK version... " >&6; }
23510              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23511              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23512$as_echo "$BOOT_JDK_VERSION" >&6; }
23513            fi # end check jdk version
23514          fi # end check rt.jar
23515        fi # end check javac
23516      fi # end check java
23517    fi # end check boot jdk found
23518  fi
23519
23520    done
23521  fi
23522
23523
23524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23526      # Do we have a bin/java?
23527      if test ! -x "$BOOT_JDK/bin/java"; then
23528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23530        BOOT_JDK_FOUND=no
23531      else
23532        # Do we have a bin/javac?
23533        if test ! -x "$BOOT_JDK/bin/javac"; then
23534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23538          BOOT_JDK_FOUND=no
23539        else
23540          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23541          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23544            BOOT_JDK_FOUND=no
23545          else
23546            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23547            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23548
23549            # Extra M4 quote needed to protect [] in grep expression.
23550            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23551            if test "x$FOUND_CORRECT_VERSION" = x; then
23552              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23554              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23555$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23556              BOOT_JDK_FOUND=no
23557            else
23558              # We're done! :-)
23559              BOOT_JDK_FOUND=yes
23560
23561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23562
23563  # Input might be given as Windows format, start by converting to
23564  # unix format.
23565  path="$BOOT_JDK"
23566  new_path=`$CYGPATH -u "$path"`
23567
23568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23571  # "foo.exe" is OK but "foo" is an error.
23572  #
23573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23574  # It is also a way to make sure we got the proper file name for the real test later on.
23575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23576  if test "x$test_shortpath" = x; then
23577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23580  fi
23581
23582  # Call helper function which possibly converts this using DOS-style short mode.
23583  # If so, the updated path is stored in $new_path.
23584
23585  input_path="$new_path"
23586  # Check if we need to convert this using DOS-style short mode. If the path
23587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23588  # take no chances and rewrite it.
23589  # Note: m4 eats our [], so we need to use [ and ] instead.
23590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23591  if test "x$has_forbidden_chars" != x; then
23592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23596      # Going to short mode and back again did indeed matter. Since short mode is
23597      # case insensitive, let's make it lowercase to improve readability.
23598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23599      # Now convert it back to Unix-stile (cygpath)
23600      input_path=`$CYGPATH -u "$shortmode_path"`
23601      new_path="$input_path"
23602    fi
23603  fi
23604
23605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23606  if test "x$test_cygdrive_prefix" = x; then
23607    # As a simple fix, exclude /usr/bin since it's not a real path.
23608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23610      # a path prefixed by /cygdrive for fixpath to work.
23611      new_path="$CYGWIN_ROOT_PATH$input_path"
23612    fi
23613  fi
23614
23615
23616  if test "x$path" != "x$new_path"; then
23617    BOOT_JDK="$new_path"
23618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23620  fi
23621
23622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23623
23624  path="$BOOT_JDK"
23625  has_colon=`$ECHO $path | $GREP ^.:`
23626  new_path="$path"
23627  if test "x$has_colon" = x; then
23628    # Not in mixed or Windows style, start by that.
23629    new_path=`cmd //c echo $path`
23630  fi
23631
23632
23633  input_path="$new_path"
23634  # Check if we need to convert this using DOS-style short mode. If the path
23635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23636  # take no chances and rewrite it.
23637  # Note: m4 eats our [], so we need to use [ and ] instead.
23638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23639  if test "x$has_forbidden_chars" != x; then
23640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23642  fi
23643
23644
23645  windows_path="$new_path"
23646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23647    unix_path=`$CYGPATH -u "$windows_path"`
23648    new_path="$unix_path"
23649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23651    new_path="$unix_path"
23652  fi
23653
23654  if test "x$path" != "x$new_path"; then
23655    BOOT_JDK="$new_path"
23656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23658  fi
23659
23660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23662
23663  else
23664    # We're on a posix platform. Hooray! :)
23665    path="$BOOT_JDK"
23666    has_space=`$ECHO "$path" | $GREP " "`
23667    if test "x$has_space" != x; then
23668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23670      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23671    fi
23672
23673    # Use eval to expand a potential ~
23674    eval path="$path"
23675    if test ! -f "$path" && test ! -d "$path"; then
23676      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23677    fi
23678
23679    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23680  fi
23681
23682              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23683$as_echo_n "checking for Boot JDK... " >&6; }
23684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23685$as_echo "$BOOT_JDK" >&6; }
23686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23687$as_echo_n "checking Boot JDK version... " >&6; }
23688              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23689              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23690$as_echo "$BOOT_JDK_VERSION" >&6; }
23691            fi # end check jdk version
23692          fi # end check rt.jar
23693        fi # end check javac
23694      fi # end check java
23695    fi # end check boot jdk found
23696  fi
23697
23698  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23699
23700  if test "x$BOOT_JDK_FOUND" = xno; then
23701    # Now execute the test
23702
23703  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23704  BOOT_JDK_SUFFIX="/Contents/Home"
23705  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23706  if test "x$ALL_JDKS_FOUND" != x; then
23707    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23708
23709  if test "x$BOOT_JDK_FOUND" = xno; then
23710    # Now execute the test
23711
23712        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23713        if test -d "$BOOT_JDK"; then
23714          BOOT_JDK_FOUND=maybe
23715          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23716$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23717        fi
23718
23719
23720    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23721    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23722      # Do we have a bin/java?
23723      if test ! -x "$BOOT_JDK/bin/java"; then
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23726        BOOT_JDK_FOUND=no
23727      else
23728        # Do we have a bin/javac?
23729        if test ! -x "$BOOT_JDK/bin/javac"; then
23730          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23732          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23733$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23734          BOOT_JDK_FOUND=no
23735        else
23736          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23737          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23738            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23740            BOOT_JDK_FOUND=no
23741          else
23742            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23744
23745            # Extra M4 quote needed to protect [] in grep expression.
23746            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23747            if test "x$FOUND_CORRECT_VERSION" = x; then
23748              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23750              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23751$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23752              BOOT_JDK_FOUND=no
23753            else
23754              # We're done! :-)
23755              BOOT_JDK_FOUND=yes
23756
23757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23758
23759  # Input might be given as Windows format, start by converting to
23760  # unix format.
23761  path="$BOOT_JDK"
23762  new_path=`$CYGPATH -u "$path"`
23763
23764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23767  # "foo.exe" is OK but "foo" is an error.
23768  #
23769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23770  # It is also a way to make sure we got the proper file name for the real test later on.
23771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23772  if test "x$test_shortpath" = x; then
23773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23776  fi
23777
23778  # Call helper function which possibly converts this using DOS-style short mode.
23779  # If so, the updated path is stored in $new_path.
23780
23781  input_path="$new_path"
23782  # Check if we need to convert this using DOS-style short mode. If the path
23783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23784  # take no chances and rewrite it.
23785  # Note: m4 eats our [], so we need to use [ and ] instead.
23786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23787  if test "x$has_forbidden_chars" != x; then
23788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23792      # Going to short mode and back again did indeed matter. Since short mode is
23793      # case insensitive, let's make it lowercase to improve readability.
23794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23795      # Now convert it back to Unix-stile (cygpath)
23796      input_path=`$CYGPATH -u "$shortmode_path"`
23797      new_path="$input_path"
23798    fi
23799  fi
23800
23801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23802  if test "x$test_cygdrive_prefix" = x; then
23803    # As a simple fix, exclude /usr/bin since it's not a real path.
23804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23806      # a path prefixed by /cygdrive for fixpath to work.
23807      new_path="$CYGWIN_ROOT_PATH$input_path"
23808    fi
23809  fi
23810
23811
23812  if test "x$path" != "x$new_path"; then
23813    BOOT_JDK="$new_path"
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23816  fi
23817
23818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23819
23820  path="$BOOT_JDK"
23821  has_colon=`$ECHO $path | $GREP ^.:`
23822  new_path="$path"
23823  if test "x$has_colon" = x; then
23824    # Not in mixed or Windows style, start by that.
23825    new_path=`cmd //c echo $path`
23826  fi
23827
23828
23829  input_path="$new_path"
23830  # Check if we need to convert this using DOS-style short mode. If the path
23831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23832  # take no chances and rewrite it.
23833  # Note: m4 eats our [], so we need to use [ and ] instead.
23834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23835  if test "x$has_forbidden_chars" != x; then
23836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23838  fi
23839
23840
23841  windows_path="$new_path"
23842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23843    unix_path=`$CYGPATH -u "$windows_path"`
23844    new_path="$unix_path"
23845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23847    new_path="$unix_path"
23848  fi
23849
23850  if test "x$path" != "x$new_path"; then
23851    BOOT_JDK="$new_path"
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23854  fi
23855
23856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23858
23859  else
23860    # We're on a posix platform. Hooray! :)
23861    path="$BOOT_JDK"
23862    has_space=`$ECHO "$path" | $GREP " "`
23863    if test "x$has_space" != x; then
23864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23866      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23867    fi
23868
23869    # Use eval to expand a potential ~
23870    eval path="$path"
23871    if test ! -f "$path" && test ! -d "$path"; then
23872      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23873    fi
23874
23875    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23876  fi
23877
23878              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23879$as_echo_n "checking for Boot JDK... " >&6; }
23880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23881$as_echo "$BOOT_JDK" >&6; }
23882              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23883$as_echo_n "checking Boot JDK version... " >&6; }
23884              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23885              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23886$as_echo "$BOOT_JDK_VERSION" >&6; }
23887            fi # end check jdk version
23888          fi # end check rt.jar
23889        fi # end check javac
23890      fi # end check java
23891    fi # end check boot jdk found
23892  fi
23893
23894    done
23895  fi
23896
23897
23898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23900      # Do we have a bin/java?
23901      if test ! -x "$BOOT_JDK/bin/java"; then
23902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23904        BOOT_JDK_FOUND=no
23905      else
23906        # Do we have a bin/javac?
23907        if test ! -x "$BOOT_JDK/bin/javac"; then
23908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23912          BOOT_JDK_FOUND=no
23913        else
23914          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23915          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23918            BOOT_JDK_FOUND=no
23919          else
23920            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23921            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23922
23923            # Extra M4 quote needed to protect [] in grep expression.
23924            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23925            if test "x$FOUND_CORRECT_VERSION" = x; then
23926              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23928              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23929$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23930              BOOT_JDK_FOUND=no
23931            else
23932              # We're done! :-)
23933              BOOT_JDK_FOUND=yes
23934
23935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23936
23937  # Input might be given as Windows format, start by converting to
23938  # unix format.
23939  path="$BOOT_JDK"
23940  new_path=`$CYGPATH -u "$path"`
23941
23942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23945  # "foo.exe" is OK but "foo" is an error.
23946  #
23947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23948  # It is also a way to make sure we got the proper file name for the real test later on.
23949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23950  if test "x$test_shortpath" = x; then
23951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23953    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23954  fi
23955
23956  # Call helper function which possibly converts this using DOS-style short mode.
23957  # If so, the updated path is stored in $new_path.
23958
23959  input_path="$new_path"
23960  # Check if we need to convert this using DOS-style short mode. If the path
23961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23962  # take no chances and rewrite it.
23963  # Note: m4 eats our [], so we need to use [ and ] instead.
23964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23965  if test "x$has_forbidden_chars" != x; then
23966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23970      # Going to short mode and back again did indeed matter. Since short mode is
23971      # case insensitive, let's make it lowercase to improve readability.
23972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23973      # Now convert it back to Unix-stile (cygpath)
23974      input_path=`$CYGPATH -u "$shortmode_path"`
23975      new_path="$input_path"
23976    fi
23977  fi
23978
23979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23980  if test "x$test_cygdrive_prefix" = x; then
23981    # As a simple fix, exclude /usr/bin since it's not a real path.
23982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23984      # a path prefixed by /cygdrive for fixpath to work.
23985      new_path="$CYGWIN_ROOT_PATH$input_path"
23986    fi
23987  fi
23988
23989
23990  if test "x$path" != "x$new_path"; then
23991    BOOT_JDK="$new_path"
23992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23994  fi
23995
23996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23997
23998  path="$BOOT_JDK"
23999  has_colon=`$ECHO $path | $GREP ^.:`
24000  new_path="$path"
24001  if test "x$has_colon" = x; then
24002    # Not in mixed or Windows style, start by that.
24003    new_path=`cmd //c echo $path`
24004  fi
24005
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24016  fi
24017
24018
24019  windows_path="$new_path"
24020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24021    unix_path=`$CYGPATH -u "$windows_path"`
24022    new_path="$unix_path"
24023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24025    new_path="$unix_path"
24026  fi
24027
24028  if test "x$path" != "x$new_path"; then
24029    BOOT_JDK="$new_path"
24030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24032  fi
24033
24034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24036
24037  else
24038    # We're on a posix platform. Hooray! :)
24039    path="$BOOT_JDK"
24040    has_space=`$ECHO "$path" | $GREP " "`
24041    if test "x$has_space" != x; then
24042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24044      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24045    fi
24046
24047    # Use eval to expand a potential ~
24048    eval path="$path"
24049    if test ! -f "$path" && test ! -d "$path"; then
24050      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24051    fi
24052
24053    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24054  fi
24055
24056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24057$as_echo_n "checking for Boot JDK... " >&6; }
24058              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24059$as_echo "$BOOT_JDK" >&6; }
24060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24061$as_echo_n "checking Boot JDK version... " >&6; }
24062              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24063              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24064$as_echo "$BOOT_JDK_VERSION" >&6; }
24065            fi # end check jdk version
24066          fi # end check rt.jar
24067        fi # end check javac
24068      fi # end check java
24069    fi # end check boot jdk found
24070  fi
24071
24072
24073  if test "x$BOOT_JDK_FOUND" = xno; then
24074    # Now execute the test
24075
24076  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24077  BOOT_JDK_SUFFIX="/Contents/Home"
24078  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24079  if test "x$ALL_JDKS_FOUND" != x; then
24080    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24081
24082  if test "x$BOOT_JDK_FOUND" = xno; then
24083    # Now execute the test
24084
24085        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24086        if test -d "$BOOT_JDK"; then
24087          BOOT_JDK_FOUND=maybe
24088          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24089$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24090        fi
24091
24092
24093    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24094    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24095      # Do we have a bin/java?
24096      if test ! -x "$BOOT_JDK/bin/java"; then
24097        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24099        BOOT_JDK_FOUND=no
24100      else
24101        # Do we have a bin/javac?
24102        if test ! -x "$BOOT_JDK/bin/javac"; then
24103          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24105          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24106$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24107          BOOT_JDK_FOUND=no
24108        else
24109          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24110          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24111            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24113            BOOT_JDK_FOUND=no
24114          else
24115            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24117
24118            # Extra M4 quote needed to protect [] in grep expression.
24119            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24120            if test "x$FOUND_CORRECT_VERSION" = x; then
24121              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24123              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24124$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24125              BOOT_JDK_FOUND=no
24126            else
24127              # We're done! :-)
24128              BOOT_JDK_FOUND=yes
24129
24130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24131
24132  # Input might be given as Windows format, start by converting to
24133  # unix format.
24134  path="$BOOT_JDK"
24135  new_path=`$CYGPATH -u "$path"`
24136
24137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24140  # "foo.exe" is OK but "foo" is an error.
24141  #
24142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24143  # It is also a way to make sure we got the proper file name for the real test later on.
24144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24145  if test "x$test_shortpath" = x; then
24146    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24148    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24149  fi
24150
24151  # Call helper function which possibly converts this using DOS-style short mode.
24152  # If so, the updated path is stored in $new_path.
24153
24154  input_path="$new_path"
24155  # Check if we need to convert this using DOS-style short mode. If the path
24156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24157  # take no chances and rewrite it.
24158  # Note: m4 eats our [], so we need to use [ and ] instead.
24159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24160  if test "x$has_forbidden_chars" != x; then
24161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24165      # Going to short mode and back again did indeed matter. Since short mode is
24166      # case insensitive, let's make it lowercase to improve readability.
24167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24168      # Now convert it back to Unix-stile (cygpath)
24169      input_path=`$CYGPATH -u "$shortmode_path"`
24170      new_path="$input_path"
24171    fi
24172  fi
24173
24174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24175  if test "x$test_cygdrive_prefix" = x; then
24176    # As a simple fix, exclude /usr/bin since it's not a real path.
24177    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24179      # a path prefixed by /cygdrive for fixpath to work.
24180      new_path="$CYGWIN_ROOT_PATH$input_path"
24181    fi
24182  fi
24183
24184
24185  if test "x$path" != "x$new_path"; then
24186    BOOT_JDK="$new_path"
24187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24188$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24189  fi
24190
24191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24192
24193  path="$BOOT_JDK"
24194  has_colon=`$ECHO $path | $GREP ^.:`
24195  new_path="$path"
24196  if test "x$has_colon" = x; then
24197    # Not in mixed or Windows style, start by that.
24198    new_path=`cmd //c echo $path`
24199  fi
24200
24201
24202  input_path="$new_path"
24203  # Check if we need to convert this using DOS-style short mode. If the path
24204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24205  # take no chances and rewrite it.
24206  # Note: m4 eats our [], so we need to use [ and ] instead.
24207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24208  if test "x$has_forbidden_chars" != x; then
24209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24211  fi
24212
24213
24214  windows_path="$new_path"
24215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24216    unix_path=`$CYGPATH -u "$windows_path"`
24217    new_path="$unix_path"
24218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24220    new_path="$unix_path"
24221  fi
24222
24223  if test "x$path" != "x$new_path"; then
24224    BOOT_JDK="$new_path"
24225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24227  fi
24228
24229  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24230  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24231
24232  else
24233    # We're on a posix platform. Hooray! :)
24234    path="$BOOT_JDK"
24235    has_space=`$ECHO "$path" | $GREP " "`
24236    if test "x$has_space" != x; then
24237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24239      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24240    fi
24241
24242    # Use eval to expand a potential ~
24243    eval path="$path"
24244    if test ! -f "$path" && test ! -d "$path"; then
24245      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24246    fi
24247
24248    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24249  fi
24250
24251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24252$as_echo_n "checking for Boot JDK... " >&6; }
24253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24254$as_echo "$BOOT_JDK" >&6; }
24255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24256$as_echo_n "checking Boot JDK version... " >&6; }
24257              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24259$as_echo "$BOOT_JDK_VERSION" >&6; }
24260            fi # end check jdk version
24261          fi # end check rt.jar
24262        fi # end check javac
24263      fi # end check java
24264    fi # end check boot jdk found
24265  fi
24266
24267    done
24268  fi
24269
24270
24271    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24272    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24273      # Do we have a bin/java?
24274      if test ! -x "$BOOT_JDK/bin/java"; then
24275        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24277        BOOT_JDK_FOUND=no
24278      else
24279        # Do we have a bin/javac?
24280        if test ! -x "$BOOT_JDK/bin/javac"; then
24281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24283          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24284$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24285          BOOT_JDK_FOUND=no
24286        else
24287          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24288          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24289            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24291            BOOT_JDK_FOUND=no
24292          else
24293            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24294            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24295
24296            # Extra M4 quote needed to protect [] in grep expression.
24297            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24298            if test "x$FOUND_CORRECT_VERSION" = x; then
24299              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24301              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24302$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24303              BOOT_JDK_FOUND=no
24304            else
24305              # We're done! :-)
24306              BOOT_JDK_FOUND=yes
24307
24308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24309
24310  # Input might be given as Windows format, start by converting to
24311  # unix format.
24312  path="$BOOT_JDK"
24313  new_path=`$CYGPATH -u "$path"`
24314
24315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24318  # "foo.exe" is OK but "foo" is an error.
24319  #
24320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24321  # It is also a way to make sure we got the proper file name for the real test later on.
24322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24323  if test "x$test_shortpath" = x; then
24324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24327  fi
24328
24329  # Call helper function which possibly converts this using DOS-style short mode.
24330  # If so, the updated path is stored in $new_path.
24331
24332  input_path="$new_path"
24333  # Check if we need to convert this using DOS-style short mode. If the path
24334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24335  # take no chances and rewrite it.
24336  # Note: m4 eats our [], so we need to use [ and ] instead.
24337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24338  if test "x$has_forbidden_chars" != x; then
24339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24343      # Going to short mode and back again did indeed matter. Since short mode is
24344      # case insensitive, let's make it lowercase to improve readability.
24345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24346      # Now convert it back to Unix-stile (cygpath)
24347      input_path=`$CYGPATH -u "$shortmode_path"`
24348      new_path="$input_path"
24349    fi
24350  fi
24351
24352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24353  if test "x$test_cygdrive_prefix" = x; then
24354    # As a simple fix, exclude /usr/bin since it's not a real path.
24355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24357      # a path prefixed by /cygdrive for fixpath to work.
24358      new_path="$CYGWIN_ROOT_PATH$input_path"
24359    fi
24360  fi
24361
24362
24363  if test "x$path" != "x$new_path"; then
24364    BOOT_JDK="$new_path"
24365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24367  fi
24368
24369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24370
24371  path="$BOOT_JDK"
24372  has_colon=`$ECHO $path | $GREP ^.:`
24373  new_path="$path"
24374  if test "x$has_colon" = x; then
24375    # Not in mixed or Windows style, start by that.
24376    new_path=`cmd //c echo $path`
24377  fi
24378
24379
24380  input_path="$new_path"
24381  # Check if we need to convert this using DOS-style short mode. If the path
24382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24383  # take no chances and rewrite it.
24384  # Note: m4 eats our [], so we need to use [ and ] instead.
24385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24386  if test "x$has_forbidden_chars" != x; then
24387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24389  fi
24390
24391
24392  windows_path="$new_path"
24393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24394    unix_path=`$CYGPATH -u "$windows_path"`
24395    new_path="$unix_path"
24396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24398    new_path="$unix_path"
24399  fi
24400
24401  if test "x$path" != "x$new_path"; then
24402    BOOT_JDK="$new_path"
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24405  fi
24406
24407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24409
24410  else
24411    # We're on a posix platform. Hooray! :)
24412    path="$BOOT_JDK"
24413    has_space=`$ECHO "$path" | $GREP " "`
24414    if test "x$has_space" != x; then
24415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24417      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24418    fi
24419
24420    # Use eval to expand a potential ~
24421    eval path="$path"
24422    if test ! -f "$path" && test ! -d "$path"; then
24423      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24424    fi
24425
24426    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24427  fi
24428
24429              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24430$as_echo_n "checking for Boot JDK... " >&6; }
24431              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24432$as_echo "$BOOT_JDK" >&6; }
24433              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24434$as_echo_n "checking Boot JDK version... " >&6; }
24435              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24436              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24437$as_echo "$BOOT_JDK_VERSION" >&6; }
24438            fi # end check jdk version
24439          fi # end check rt.jar
24440        fi # end check javac
24441      fi # end check java
24442    fi # end check boot jdk found
24443  fi
24444
24445  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24446
24447  if test "x$BOOT_JDK_FOUND" = xno; then
24448    # Now execute the test
24449
24450  BOOT_JDK_PREFIX="/usr/lib/jvm"
24451  BOOT_JDK_SUFFIX=""
24452  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24453  if test "x$ALL_JDKS_FOUND" != x; then
24454    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24455
24456  if test "x$BOOT_JDK_FOUND" = xno; then
24457    # Now execute the test
24458
24459        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24460        if test -d "$BOOT_JDK"; then
24461          BOOT_JDK_FOUND=maybe
24462          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24463$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24464        fi
24465
24466
24467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24469      # Do we have a bin/java?
24470      if test ! -x "$BOOT_JDK/bin/java"; then
24471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24473        BOOT_JDK_FOUND=no
24474      else
24475        # Do we have a bin/javac?
24476        if test ! -x "$BOOT_JDK/bin/javac"; then
24477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24481          BOOT_JDK_FOUND=no
24482        else
24483          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24484          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24487            BOOT_JDK_FOUND=no
24488          else
24489            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24490            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24491
24492            # Extra M4 quote needed to protect [] in grep expression.
24493            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24494            if test "x$FOUND_CORRECT_VERSION" = x; then
24495              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24497              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24498$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24499              BOOT_JDK_FOUND=no
24500            else
24501              # We're done! :-)
24502              BOOT_JDK_FOUND=yes
24503
24504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24505
24506  # Input might be given as Windows format, start by converting to
24507  # unix format.
24508  path="$BOOT_JDK"
24509  new_path=`$CYGPATH -u "$path"`
24510
24511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24514  # "foo.exe" is OK but "foo" is an error.
24515  #
24516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24517  # It is also a way to make sure we got the proper file name for the real test later on.
24518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24519  if test "x$test_shortpath" = x; then
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24523  fi
24524
24525  # Call helper function which possibly converts this using DOS-style short mode.
24526  # If so, the updated path is stored in $new_path.
24527
24528  input_path="$new_path"
24529  # Check if we need to convert this using DOS-style short mode. If the path
24530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24531  # take no chances and rewrite it.
24532  # Note: m4 eats our [], so we need to use [ and ] instead.
24533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24534  if test "x$has_forbidden_chars" != x; then
24535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24539      # Going to short mode and back again did indeed matter. Since short mode is
24540      # case insensitive, let's make it lowercase to improve readability.
24541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24542      # Now convert it back to Unix-stile (cygpath)
24543      input_path=`$CYGPATH -u "$shortmode_path"`
24544      new_path="$input_path"
24545    fi
24546  fi
24547
24548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24549  if test "x$test_cygdrive_prefix" = x; then
24550    # As a simple fix, exclude /usr/bin since it's not a real path.
24551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24553      # a path prefixed by /cygdrive for fixpath to work.
24554      new_path="$CYGWIN_ROOT_PATH$input_path"
24555    fi
24556  fi
24557
24558
24559  if test "x$path" != "x$new_path"; then
24560    BOOT_JDK="$new_path"
24561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24563  fi
24564
24565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24566
24567  path="$BOOT_JDK"
24568  has_colon=`$ECHO $path | $GREP ^.:`
24569  new_path="$path"
24570  if test "x$has_colon" = x; then
24571    # Not in mixed or Windows style, start by that.
24572    new_path=`cmd //c echo $path`
24573  fi
24574
24575
24576  input_path="$new_path"
24577  # Check if we need to convert this using DOS-style short mode. If the path
24578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24579  # take no chances and rewrite it.
24580  # Note: m4 eats our [], so we need to use [ and ] instead.
24581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24582  if test "x$has_forbidden_chars" != x; then
24583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24585  fi
24586
24587
24588  windows_path="$new_path"
24589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24590    unix_path=`$CYGPATH -u "$windows_path"`
24591    new_path="$unix_path"
24592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24594    new_path="$unix_path"
24595  fi
24596
24597  if test "x$path" != "x$new_path"; then
24598    BOOT_JDK="$new_path"
24599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24601  fi
24602
24603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24605
24606  else
24607    # We're on a posix platform. Hooray! :)
24608    path="$BOOT_JDK"
24609    has_space=`$ECHO "$path" | $GREP " "`
24610    if test "x$has_space" != x; then
24611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24613      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24614    fi
24615
24616    # Use eval to expand a potential ~
24617    eval path="$path"
24618    if test ! -f "$path" && test ! -d "$path"; then
24619      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24620    fi
24621
24622    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24623  fi
24624
24625              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24626$as_echo_n "checking for Boot JDK... " >&6; }
24627              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24628$as_echo "$BOOT_JDK" >&6; }
24629              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24630$as_echo_n "checking Boot JDK version... " >&6; }
24631              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24632              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24633$as_echo "$BOOT_JDK_VERSION" >&6; }
24634            fi # end check jdk version
24635          fi # end check rt.jar
24636        fi # end check javac
24637      fi # end check java
24638    fi # end check boot jdk found
24639  fi
24640
24641    done
24642  fi
24643
24644
24645    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24646    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24647      # Do we have a bin/java?
24648      if test ! -x "$BOOT_JDK/bin/java"; then
24649        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24651        BOOT_JDK_FOUND=no
24652      else
24653        # Do we have a bin/javac?
24654        if test ! -x "$BOOT_JDK/bin/javac"; then
24655          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24657          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24658$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24659          BOOT_JDK_FOUND=no
24660        else
24661          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24662          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24665            BOOT_JDK_FOUND=no
24666          else
24667            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24669
24670            # Extra M4 quote needed to protect [] in grep expression.
24671            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24672            if test "x$FOUND_CORRECT_VERSION" = x; then
24673              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24675              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24676$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24677              BOOT_JDK_FOUND=no
24678            else
24679              # We're done! :-)
24680              BOOT_JDK_FOUND=yes
24681
24682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24683
24684  # Input might be given as Windows format, start by converting to
24685  # unix format.
24686  path="$BOOT_JDK"
24687  new_path=`$CYGPATH -u "$path"`
24688
24689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24692  # "foo.exe" is OK but "foo" is an error.
24693  #
24694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24695  # It is also a way to make sure we got the proper file name for the real test later on.
24696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24697  if test "x$test_shortpath" = x; then
24698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24701  fi
24702
24703  # Call helper function which possibly converts this using DOS-style short mode.
24704  # If so, the updated path is stored in $new_path.
24705
24706  input_path="$new_path"
24707  # Check if we need to convert this using DOS-style short mode. If the path
24708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24709  # take no chances and rewrite it.
24710  # Note: m4 eats our [], so we need to use [ and ] instead.
24711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24712  if test "x$has_forbidden_chars" != x; then
24713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24717      # Going to short mode and back again did indeed matter. Since short mode is
24718      # case insensitive, let's make it lowercase to improve readability.
24719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24720      # Now convert it back to Unix-stile (cygpath)
24721      input_path=`$CYGPATH -u "$shortmode_path"`
24722      new_path="$input_path"
24723    fi
24724  fi
24725
24726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24727  if test "x$test_cygdrive_prefix" = x; then
24728    # As a simple fix, exclude /usr/bin since it's not a real path.
24729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24731      # a path prefixed by /cygdrive for fixpath to work.
24732      new_path="$CYGWIN_ROOT_PATH$input_path"
24733    fi
24734  fi
24735
24736
24737  if test "x$path" != "x$new_path"; then
24738    BOOT_JDK="$new_path"
24739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24741  fi
24742
24743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24744
24745  path="$BOOT_JDK"
24746  has_colon=`$ECHO $path | $GREP ^.:`
24747  new_path="$path"
24748  if test "x$has_colon" = x; then
24749    # Not in mixed or Windows style, start by that.
24750    new_path=`cmd //c echo $path`
24751  fi
24752
24753
24754  input_path="$new_path"
24755  # Check if we need to convert this using DOS-style short mode. If the path
24756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24757  # take no chances and rewrite it.
24758  # Note: m4 eats our [], so we need to use [ and ] instead.
24759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24760  if test "x$has_forbidden_chars" != x; then
24761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24763  fi
24764
24765
24766  windows_path="$new_path"
24767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24768    unix_path=`$CYGPATH -u "$windows_path"`
24769    new_path="$unix_path"
24770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24772    new_path="$unix_path"
24773  fi
24774
24775  if test "x$path" != "x$new_path"; then
24776    BOOT_JDK="$new_path"
24777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24779  fi
24780
24781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24783
24784  else
24785    # We're on a posix platform. Hooray! :)
24786    path="$BOOT_JDK"
24787    has_space=`$ECHO "$path" | $GREP " "`
24788    if test "x$has_space" != x; then
24789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24791      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24792    fi
24793
24794    # Use eval to expand a potential ~
24795    eval path="$path"
24796    if test ! -f "$path" && test ! -d "$path"; then
24797      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24798    fi
24799
24800    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24801  fi
24802
24803              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24804$as_echo_n "checking for Boot JDK... " >&6; }
24805              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24806$as_echo "$BOOT_JDK" >&6; }
24807              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24808$as_echo_n "checking Boot JDK version... " >&6; }
24809              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24811$as_echo "$BOOT_JDK_VERSION" >&6; }
24812            fi # end check jdk version
24813          fi # end check rt.jar
24814        fi # end check javac
24815      fi # end check java
24816    fi # end check boot jdk found
24817  fi
24818
24819  fi
24820
24821
24822    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24823    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24824      # Do we have a bin/java?
24825      if test ! -x "$BOOT_JDK/bin/java"; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24828        BOOT_JDK_FOUND=no
24829      else
24830        # Do we have a bin/javac?
24831        if test ! -x "$BOOT_JDK/bin/javac"; then
24832          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24834          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24835$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24836          BOOT_JDK_FOUND=no
24837        else
24838          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24839          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24842            BOOT_JDK_FOUND=no
24843          else
24844            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24845            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24846
24847            # Extra M4 quote needed to protect [] in grep expression.
24848            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24849            if test "x$FOUND_CORRECT_VERSION" = x; then
24850              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24852              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24853$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24854              BOOT_JDK_FOUND=no
24855            else
24856              # We're done! :-)
24857              BOOT_JDK_FOUND=yes
24858
24859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24860
24861  # Input might be given as Windows format, start by converting to
24862  # unix format.
24863  path="$BOOT_JDK"
24864  new_path=`$CYGPATH -u "$path"`
24865
24866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24869  # "foo.exe" is OK but "foo" is an error.
24870  #
24871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24872  # It is also a way to make sure we got the proper file name for the real test later on.
24873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24874  if test "x$test_shortpath" = x; then
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24878  fi
24879
24880  # Call helper function which possibly converts this using DOS-style short mode.
24881  # If so, the updated path is stored in $new_path.
24882
24883  input_path="$new_path"
24884  # Check if we need to convert this using DOS-style short mode. If the path
24885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24886  # take no chances and rewrite it.
24887  # Note: m4 eats our [], so we need to use [ and ] instead.
24888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24889  if test "x$has_forbidden_chars" != x; then
24890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24894      # Going to short mode and back again did indeed matter. Since short mode is
24895      # case insensitive, let's make it lowercase to improve readability.
24896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24897      # Now convert it back to Unix-stile (cygpath)
24898      input_path=`$CYGPATH -u "$shortmode_path"`
24899      new_path="$input_path"
24900    fi
24901  fi
24902
24903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24904  if test "x$test_cygdrive_prefix" = x; then
24905    # As a simple fix, exclude /usr/bin since it's not a real path.
24906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24908      # a path prefixed by /cygdrive for fixpath to work.
24909      new_path="$CYGWIN_ROOT_PATH$input_path"
24910    fi
24911  fi
24912
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24921
24922  path="$BOOT_JDK"
24923  has_colon=`$ECHO $path | $GREP ^.:`
24924  new_path="$path"
24925  if test "x$has_colon" = x; then
24926    # Not in mixed or Windows style, start by that.
24927    new_path=`cmd //c echo $path`
24928  fi
24929
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940  fi
24941
24942
24943  windows_path="$new_path"
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    unix_path=`$CYGPATH -u "$windows_path"`
24946    new_path="$unix_path"
24947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24949    new_path="$unix_path"
24950  fi
24951
24952  if test "x$path" != "x$new_path"; then
24953    BOOT_JDK="$new_path"
24954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24956  fi
24957
24958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24960
24961  else
24962    # We're on a posix platform. Hooray! :)
24963    path="$BOOT_JDK"
24964    has_space=`$ECHO "$path" | $GREP " "`
24965    if test "x$has_space" != x; then
24966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24969    fi
24970
24971    # Use eval to expand a potential ~
24972    eval path="$path"
24973    if test ! -f "$path" && test ! -d "$path"; then
24974      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24975    fi
24976
24977    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24978  fi
24979
24980              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24981$as_echo_n "checking for Boot JDK... " >&6; }
24982              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24983$as_echo "$BOOT_JDK" >&6; }
24984              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24985$as_echo_n "checking Boot JDK version... " >&6; }
24986              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24988$as_echo "$BOOT_JDK_VERSION" >&6; }
24989            fi # end check jdk version
24990          fi # end check rt.jar
24991        fi # end check javac
24992      fi # end check java
24993    fi # end check boot jdk found
24994  fi
24995
24996
24997  # If we haven't found anything yet, we've truly lost. Give up.
24998  if test "x$BOOT_JDK_FOUND" = xno; then
24999
25000  # Print a helpful message on how to acquire the necessary build dependency.
25001  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25002  MISSING_DEPENDENCY=openjdk
25003
25004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25005    cygwin_help $MISSING_DEPENDENCY
25006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25007    msys_help $MISSING_DEPENDENCY
25008  else
25009    PKGHANDLER_COMMAND=
25010
25011    case $PKGHANDLER in
25012      apt-get)
25013        apt_help     $MISSING_DEPENDENCY ;;
25014      yum)
25015        yum_help     $MISSING_DEPENDENCY ;;
25016      port)
25017        port_help    $MISSING_DEPENDENCY ;;
25018      pkgutil)
25019        pkgutil_help $MISSING_DEPENDENCY ;;
25020      pkgadd)
25021        pkgadd_help  $MISSING_DEPENDENCY ;;
25022    esac
25023
25024    if test "x$PKGHANDLER_COMMAND" != x; then
25025      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25026    fi
25027  fi
25028
25029    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25030$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25032$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25033    as_fn_error $? "Cannot continue" "$LINENO" 5
25034  fi
25035
25036  # Setup proper paths for what we found
25037  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25038  if test ! -f "$BOOT_RTJAR"; then
25039    # On MacOSX it is called classes.jar
25040    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25041    if test -f "$BOOT_RTJAR"; then
25042      # Remove the ..
25043      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25044    fi
25045  fi
25046  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25047  BOOT_JDK="$BOOT_JDK"
25048
25049
25050
25051
25052  # Setup tools from the Boot JDK.
25053
25054  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25055
25056  # Publish this variable in the help.
25057
25058
25059  if test "x$JAVA" = x; then
25060    # The variable is not set by user, try to locate tool using the code snippet
25061
25062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25063$as_echo_n "checking for java in Boot JDK... " >&6; }
25064      JAVA=$BOOT_JDK/bin/java
25065      if test ! -x $JAVA; then
25066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25067$as_echo "not found" >&6; }
25068        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25069$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25070        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25071      fi
25072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25073$as_echo "ok" >&6; }
25074
25075
25076  else
25077    # The variable is set, but is it from the command line or the environment?
25078
25079    # Try to remove the string !JAVA! from our list.
25080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25082      # If it failed, the variable was not from the command line. Ignore it,
25083      # but warn the user (except for BASH, which is always set by the calling BASH).
25084      if test "xJAVA" != xBASH; then
25085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25086$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25087      fi
25088      # Try to locate tool using the code snippet
25089
25090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25091$as_echo_n "checking for java in Boot JDK... " >&6; }
25092      JAVA=$BOOT_JDK/bin/java
25093      if test ! -x $JAVA; then
25094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25095$as_echo "not found" >&6; }
25096        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25097$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25098        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25099      fi
25100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25101$as_echo "ok" >&6; }
25102
25103
25104    else
25105      # If it succeeded, then it was overridden by the user. We will use it
25106      # for the tool.
25107
25108      # First remove it from the list of overridden variables, so we can test
25109      # for unknown variables in the end.
25110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25111
25112      # Check if the provided tool contains a complete path.
25113      tool_specified="$JAVA"
25114      tool_basename="${tool_specified##*/}"
25115      if test "x$tool_basename" = "x$tool_specified"; then
25116        # A command without a complete path is provided, search $PATH.
25117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25118$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25119        # Extract the first word of "$tool_basename", so it can be a program name with args.
25120set dummy $tool_basename; ac_word=$2
25121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25122$as_echo_n "checking for $ac_word... " >&6; }
25123if ${ac_cv_path_JAVA+:} false; then :
25124  $as_echo_n "(cached) " >&6
25125else
25126  case $JAVA in
25127  [\\/]* | ?:[\\/]*)
25128  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25129  ;;
25130  *)
25131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25132for as_dir in $PATH
25133do
25134  IFS=$as_save_IFS
25135  test -z "$as_dir" && as_dir=.
25136    for ac_exec_ext in '' $ac_executable_extensions; do
25137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25138    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25140    break 2
25141  fi
25142done
25143  done
25144IFS=$as_save_IFS
25145
25146  ;;
25147esac
25148fi
25149JAVA=$ac_cv_path_JAVA
25150if test -n "$JAVA"; then
25151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25152$as_echo "$JAVA" >&6; }
25153else
25154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25155$as_echo "no" >&6; }
25156fi
25157
25158
25159        if test "x$JAVA" = x; then
25160          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25161        fi
25162      else
25163        # Otherwise we believe it is a complete path. Use it as it is.
25164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25165$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25167$as_echo_n "checking for JAVA... " >&6; }
25168        if test ! -x "$tool_specified"; then
25169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25170$as_echo "not found" >&6; }
25171          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25172        fi
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25174$as_echo "$tool_specified" >&6; }
25175      fi
25176    fi
25177  fi
25178
25179
25180
25181  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25182
25183  # Publish this variable in the help.
25184
25185
25186  if test "x$JAVAC" = x; then
25187    # The variable is not set by user, try to locate tool using the code snippet
25188
25189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25190$as_echo_n "checking for javac in Boot JDK... " >&6; }
25191      JAVAC=$BOOT_JDK/bin/javac
25192      if test ! -x $JAVAC; then
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25194$as_echo "not found" >&6; }
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25196$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25197        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25198      fi
25199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25200$as_echo "ok" >&6; }
25201
25202
25203  else
25204    # The variable is set, but is it from the command line or the environment?
25205
25206    # Try to remove the string !JAVAC! from our list.
25207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25209      # If it failed, the variable was not from the command line. Ignore it,
25210      # but warn the user (except for BASH, which is always set by the calling BASH).
25211      if test "xJAVAC" != xBASH; then
25212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25213$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25214      fi
25215      # Try to locate tool using the code snippet
25216
25217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25218$as_echo_n "checking for javac in Boot JDK... " >&6; }
25219      JAVAC=$BOOT_JDK/bin/javac
25220      if test ! -x $JAVAC; then
25221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25222$as_echo "not found" >&6; }
25223        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25224$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25225        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25226      fi
25227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25228$as_echo "ok" >&6; }
25229
25230
25231    else
25232      # If it succeeded, then it was overridden by the user. We will use it
25233      # for the tool.
25234
25235      # First remove it from the list of overridden variables, so we can test
25236      # for unknown variables in the end.
25237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25238
25239      # Check if the provided tool contains a complete path.
25240      tool_specified="$JAVAC"
25241      tool_basename="${tool_specified##*/}"
25242      if test "x$tool_basename" = "x$tool_specified"; then
25243        # A command without a complete path is provided, search $PATH.
25244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25245$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25246        # Extract the first word of "$tool_basename", so it can be a program name with args.
25247set dummy $tool_basename; ac_word=$2
25248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25249$as_echo_n "checking for $ac_word... " >&6; }
25250if ${ac_cv_path_JAVAC+:} false; then :
25251  $as_echo_n "(cached) " >&6
25252else
25253  case $JAVAC in
25254  [\\/]* | ?:[\\/]*)
25255  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25256  ;;
25257  *)
25258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25259for as_dir in $PATH
25260do
25261  IFS=$as_save_IFS
25262  test -z "$as_dir" && as_dir=.
25263    for ac_exec_ext in '' $ac_executable_extensions; do
25264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25265    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25267    break 2
25268  fi
25269done
25270  done
25271IFS=$as_save_IFS
25272
25273  ;;
25274esac
25275fi
25276JAVAC=$ac_cv_path_JAVAC
25277if test -n "$JAVAC"; then
25278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25279$as_echo "$JAVAC" >&6; }
25280else
25281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25282$as_echo "no" >&6; }
25283fi
25284
25285
25286        if test "x$JAVAC" = x; then
25287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25288        fi
25289      else
25290        # Otherwise we believe it is a complete path. Use it as it is.
25291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25292$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25294$as_echo_n "checking for JAVAC... " >&6; }
25295        if test ! -x "$tool_specified"; then
25296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25297$as_echo "not found" >&6; }
25298          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25299        fi
25300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25301$as_echo "$tool_specified" >&6; }
25302      fi
25303    fi
25304  fi
25305
25306
25307
25308  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25309
25310  # Publish this variable in the help.
25311
25312
25313  if test "x$JAVAH" = x; then
25314    # The variable is not set by user, try to locate tool using the code snippet
25315
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25317$as_echo_n "checking for javah in Boot JDK... " >&6; }
25318      JAVAH=$BOOT_JDK/bin/javah
25319      if test ! -x $JAVAH; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25321$as_echo "not found" >&6; }
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25323$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25324        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25325      fi
25326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25327$as_echo "ok" >&6; }
25328
25329
25330  else
25331    # The variable is set, but is it from the command line or the environment?
25332
25333    # Try to remove the string !JAVAH! from our list.
25334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25336      # If it failed, the variable was not from the command line. Ignore it,
25337      # but warn the user (except for BASH, which is always set by the calling BASH).
25338      if test "xJAVAH" != xBASH; then
25339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25340$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25341      fi
25342      # Try to locate tool using the code snippet
25343
25344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25345$as_echo_n "checking for javah in Boot JDK... " >&6; }
25346      JAVAH=$BOOT_JDK/bin/javah
25347      if test ! -x $JAVAH; then
25348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25349$as_echo "not found" >&6; }
25350        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25351$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25352        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25353      fi
25354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25355$as_echo "ok" >&6; }
25356
25357
25358    else
25359      # If it succeeded, then it was overridden by the user. We will use it
25360      # for the tool.
25361
25362      # First remove it from the list of overridden variables, so we can test
25363      # for unknown variables in the end.
25364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25365
25366      # Check if the provided tool contains a complete path.
25367      tool_specified="$JAVAH"
25368      tool_basename="${tool_specified##*/}"
25369      if test "x$tool_basename" = "x$tool_specified"; then
25370        # A command without a complete path is provided, search $PATH.
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25372$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25373        # Extract the first word of "$tool_basename", so it can be a program name with args.
25374set dummy $tool_basename; ac_word=$2
25375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25376$as_echo_n "checking for $ac_word... " >&6; }
25377if ${ac_cv_path_JAVAH+:} false; then :
25378  $as_echo_n "(cached) " >&6
25379else
25380  case $JAVAH in
25381  [\\/]* | ?:[\\/]*)
25382  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25383  ;;
25384  *)
25385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25386for as_dir in $PATH
25387do
25388  IFS=$as_save_IFS
25389  test -z "$as_dir" && as_dir=.
25390    for ac_exec_ext in '' $ac_executable_extensions; do
25391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25392    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25394    break 2
25395  fi
25396done
25397  done
25398IFS=$as_save_IFS
25399
25400  ;;
25401esac
25402fi
25403JAVAH=$ac_cv_path_JAVAH
25404if test -n "$JAVAH"; then
25405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25406$as_echo "$JAVAH" >&6; }
25407else
25408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25409$as_echo "no" >&6; }
25410fi
25411
25412
25413        if test "x$JAVAH" = x; then
25414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25415        fi
25416      else
25417        # Otherwise we believe it is a complete path. Use it as it is.
25418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25419$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25421$as_echo_n "checking for JAVAH... " >&6; }
25422        if test ! -x "$tool_specified"; then
25423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25424$as_echo "not found" >&6; }
25425          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25426        fi
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25428$as_echo "$tool_specified" >&6; }
25429      fi
25430    fi
25431  fi
25432
25433
25434
25435  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25436
25437  # Publish this variable in the help.
25438
25439
25440  if test "x$JAR" = x; then
25441    # The variable is not set by user, try to locate tool using the code snippet
25442
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25444$as_echo_n "checking for jar in Boot JDK... " >&6; }
25445      JAR=$BOOT_JDK/bin/jar
25446      if test ! -x $JAR; then
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25448$as_echo "not found" >&6; }
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25450$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25451        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25452      fi
25453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25454$as_echo "ok" >&6; }
25455
25456
25457  else
25458    # The variable is set, but is it from the command line or the environment?
25459
25460    # Try to remove the string !JAR! from our list.
25461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25463      # If it failed, the variable was not from the command line. Ignore it,
25464      # but warn the user (except for BASH, which is always set by the calling BASH).
25465      if test "xJAR" != xBASH; then
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25467$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25468      fi
25469      # Try to locate tool using the code snippet
25470
25471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25472$as_echo_n "checking for jar in Boot JDK... " >&6; }
25473      JAR=$BOOT_JDK/bin/jar
25474      if test ! -x $JAR; then
25475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25476$as_echo "not found" >&6; }
25477        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25478$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25479        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25480      fi
25481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25482$as_echo "ok" >&6; }
25483
25484
25485    else
25486      # If it succeeded, then it was overridden by the user. We will use it
25487      # for the tool.
25488
25489      # First remove it from the list of overridden variables, so we can test
25490      # for unknown variables in the end.
25491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25492
25493      # Check if the provided tool contains a complete path.
25494      tool_specified="$JAR"
25495      tool_basename="${tool_specified##*/}"
25496      if test "x$tool_basename" = "x$tool_specified"; then
25497        # A command without a complete path is provided, search $PATH.
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25499$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25500        # Extract the first word of "$tool_basename", so it can be a program name with args.
25501set dummy $tool_basename; ac_word=$2
25502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25503$as_echo_n "checking for $ac_word... " >&6; }
25504if ${ac_cv_path_JAR+:} false; then :
25505  $as_echo_n "(cached) " >&6
25506else
25507  case $JAR in
25508  [\\/]* | ?:[\\/]*)
25509  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25510  ;;
25511  *)
25512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25513for as_dir in $PATH
25514do
25515  IFS=$as_save_IFS
25516  test -z "$as_dir" && as_dir=.
25517    for ac_exec_ext in '' $ac_executable_extensions; do
25518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25519    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25521    break 2
25522  fi
25523done
25524  done
25525IFS=$as_save_IFS
25526
25527  ;;
25528esac
25529fi
25530JAR=$ac_cv_path_JAR
25531if test -n "$JAR"; then
25532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25533$as_echo "$JAR" >&6; }
25534else
25535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25536$as_echo "no" >&6; }
25537fi
25538
25539
25540        if test "x$JAR" = x; then
25541          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25542        fi
25543      else
25544        # Otherwise we believe it is a complete path. Use it as it is.
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25546$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25548$as_echo_n "checking for JAR... " >&6; }
25549        if test ! -x "$tool_specified"; then
25550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25551$as_echo "not found" >&6; }
25552          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25553        fi
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25555$as_echo "$tool_specified" >&6; }
25556      fi
25557    fi
25558  fi
25559
25560
25561
25562  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25563
25564  # Publish this variable in the help.
25565
25566
25567  if test "x$NATIVE2ASCII" = x; then
25568    # The variable is not set by user, try to locate tool using the code snippet
25569
25570      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25571$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25572      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25573      if test ! -x $NATIVE2ASCII; then
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25575$as_echo "not found" >&6; }
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25577$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25578        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25579      fi
25580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25581$as_echo "ok" >&6; }
25582
25583
25584  else
25585    # The variable is set, but is it from the command line or the environment?
25586
25587    # Try to remove the string !NATIVE2ASCII! from our list.
25588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25590      # If it failed, the variable was not from the command line. Ignore it,
25591      # but warn the user (except for BASH, which is always set by the calling BASH).
25592      if test "xNATIVE2ASCII" != xBASH; then
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25594$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25595      fi
25596      # Try to locate tool using the code snippet
25597
25598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25599$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25600      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25601      if test ! -x $NATIVE2ASCII; then
25602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25603$as_echo "not found" >&6; }
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25605$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25606        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25607      fi
25608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25609$as_echo "ok" >&6; }
25610
25611
25612    else
25613      # If it succeeded, then it was overridden by the user. We will use it
25614      # for the tool.
25615
25616      # First remove it from the list of overridden variables, so we can test
25617      # for unknown variables in the end.
25618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25619
25620      # Check if the provided tool contains a complete path.
25621      tool_specified="$NATIVE2ASCII"
25622      tool_basename="${tool_specified##*/}"
25623      if test "x$tool_basename" = "x$tool_specified"; then
25624        # A command without a complete path is provided, search $PATH.
25625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25626$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25627        # Extract the first word of "$tool_basename", so it can be a program name with args.
25628set dummy $tool_basename; ac_word=$2
25629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25630$as_echo_n "checking for $ac_word... " >&6; }
25631if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25632  $as_echo_n "(cached) " >&6
25633else
25634  case $NATIVE2ASCII in
25635  [\\/]* | ?:[\\/]*)
25636  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25637  ;;
25638  *)
25639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25640for as_dir in $PATH
25641do
25642  IFS=$as_save_IFS
25643  test -z "$as_dir" && as_dir=.
25644    for ac_exec_ext in '' $ac_executable_extensions; do
25645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25646    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25648    break 2
25649  fi
25650done
25651  done
25652IFS=$as_save_IFS
25653
25654  ;;
25655esac
25656fi
25657NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25658if test -n "$NATIVE2ASCII"; then
25659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25660$as_echo "$NATIVE2ASCII" >&6; }
25661else
25662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25663$as_echo "no" >&6; }
25664fi
25665
25666
25667        if test "x$NATIVE2ASCII" = x; then
25668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25669        fi
25670      else
25671        # Otherwise we believe it is a complete path. Use it as it is.
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25673$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25675$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25676        if test ! -x "$tool_specified"; then
25677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25678$as_echo "not found" >&6; }
25679          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25680        fi
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25682$as_echo "$tool_specified" >&6; }
25683      fi
25684    fi
25685  fi
25686
25687
25688
25689  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25690
25691  # Publish this variable in the help.
25692
25693
25694  if test "x$JARSIGNER" = x; then
25695    # The variable is not set by user, try to locate tool using the code snippet
25696
25697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25698$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25699      JARSIGNER=$BOOT_JDK/bin/jarsigner
25700      if test ! -x $JARSIGNER; then
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25702$as_echo "not found" >&6; }
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25704$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25705        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25706      fi
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25708$as_echo "ok" >&6; }
25709
25710
25711  else
25712    # The variable is set, but is it from the command line or the environment?
25713
25714    # Try to remove the string !JARSIGNER! from our list.
25715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25717      # If it failed, the variable was not from the command line. Ignore it,
25718      # but warn the user (except for BASH, which is always set by the calling BASH).
25719      if test "xJARSIGNER" != xBASH; then
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25721$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25722      fi
25723      # Try to locate tool using the code snippet
25724
25725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25726$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25727      JARSIGNER=$BOOT_JDK/bin/jarsigner
25728      if test ! -x $JARSIGNER; then
25729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25730$as_echo "not found" >&6; }
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25732$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25733        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25734      fi
25735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25736$as_echo "ok" >&6; }
25737
25738
25739    else
25740      # If it succeeded, then it was overridden by the user. We will use it
25741      # for the tool.
25742
25743      # First remove it from the list of overridden variables, so we can test
25744      # for unknown variables in the end.
25745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25746
25747      # Check if the provided tool contains a complete path.
25748      tool_specified="$JARSIGNER"
25749      tool_basename="${tool_specified##*/}"
25750      if test "x$tool_basename" = "x$tool_specified"; then
25751        # A command without a complete path is provided, search $PATH.
25752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25753$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25754        # Extract the first word of "$tool_basename", so it can be a program name with args.
25755set dummy $tool_basename; ac_word=$2
25756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25757$as_echo_n "checking for $ac_word... " >&6; }
25758if ${ac_cv_path_JARSIGNER+:} false; then :
25759  $as_echo_n "(cached) " >&6
25760else
25761  case $JARSIGNER in
25762  [\\/]* | ?:[\\/]*)
25763  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25764  ;;
25765  *)
25766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25767for as_dir in $PATH
25768do
25769  IFS=$as_save_IFS
25770  test -z "$as_dir" && as_dir=.
25771    for ac_exec_ext in '' $ac_executable_extensions; do
25772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25773    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25775    break 2
25776  fi
25777done
25778  done
25779IFS=$as_save_IFS
25780
25781  ;;
25782esac
25783fi
25784JARSIGNER=$ac_cv_path_JARSIGNER
25785if test -n "$JARSIGNER"; then
25786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25787$as_echo "$JARSIGNER" >&6; }
25788else
25789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25790$as_echo "no" >&6; }
25791fi
25792
25793
25794        if test "x$JARSIGNER" = x; then
25795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25796        fi
25797      else
25798        # Otherwise we believe it is a complete path. Use it as it is.
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25800$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25802$as_echo_n "checking for JARSIGNER... " >&6; }
25803        if test ! -x "$tool_specified"; then
25804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25805$as_echo "not found" >&6; }
25806          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25807        fi
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25809$as_echo "$tool_specified" >&6; }
25810      fi
25811    fi
25812  fi
25813
25814
25815
25816  # Finally, set some other options...
25817
25818  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25819  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25820
25821
25822
25823
25824  ##############################################################################
25825  #
25826  # Specify options for anything that is run with the Boot JDK.
25827  #
25828
25829# Check whether --with-boot-jdk-jvmargs was given.
25830if test "${with_boot_jdk_jvmargs+set}" = set; then :
25831  withval=$with_boot_jdk_jvmargs;
25832fi
25833
25834
25835  if test "x$with_boot_jdk_jvmargs" = x; then
25836    # Not all JVM:s accept the same arguments on the command line.
25837    # OpenJDK specific increase in thread stack for JDK build,
25838    # well more specifically, when running javac.
25839    if test "x$BUILD_NUM_BITS" = x32; then
25840      STACK_SIZE=768
25841    else
25842      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25843      # since 64-bit pointers are pushed on the stach. Apparently, we need
25844      # to increase the stack space when javacing the JDK....
25845      STACK_SIZE=1536
25846    fi
25847
25848    # Minimum amount of heap memory.
25849
25850  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25851  $ECHO "Command: $JAVA -Xms64M -version" >&5
25852  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25853  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25854  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25855  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25856    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25857    JVM_ARG_OK=true
25858  else
25859    $ECHO "Arg failed:" >&5
25860    $ECHO "$OUTPUT" >&5
25861    JVM_ARG_OK=false
25862  fi
25863
25864    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25865      # Why does macosx need more heap? Its the huge JDK batch.
25866
25867  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25868  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25869  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25870  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25871  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25872  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25873    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25874    JVM_ARG_OK=true
25875  else
25876    $ECHO "Arg failed:" >&5
25877    $ECHO "$OUTPUT" >&5
25878    JVM_ARG_OK=false
25879  fi
25880
25881    else
25882
25883  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25884  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25885  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25886  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25887  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25888  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25889    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25890    JVM_ARG_OK=true
25891  else
25892    $ECHO "Arg failed:" >&5
25893    $ECHO "$OUTPUT" >&5
25894    JVM_ARG_OK=false
25895  fi
25896
25897    fi
25898    # When is adding -client something that speeds up the JVM?
25899    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25900
25901  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25902  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25903  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25904  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25905  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25906  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25907    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25908    JVM_ARG_OK=true
25909  else
25910    $ECHO "Arg failed:" >&5
25911    $ECHO "$OUTPUT" >&5
25912    JVM_ARG_OK=false
25913  fi
25914
25915    # Disable special log output when a debug build is used as Boot JDK...
25916
25917  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25918  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25919  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25920  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25921  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25922  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25923    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25924    JVM_ARG_OK=true
25925  else
25926    $ECHO "Arg failed:" >&5
25927    $ECHO "$OUTPUT" >&5
25928    JVM_ARG_OK=false
25929  fi
25930
25931  fi
25932
25933  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25934
25935
25936
25937###############################################################################
25938#
25939# Configure the sources to use. We can add or override individual directories.
25940#
25941###############################################################################
25942
25943
25944  # Where are the sources. Any of these can be overridden
25945  # using --with-override-corba and the likes.
25946  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25947  CORBA_TOPDIR="$SRC_ROOT/corba"
25948  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25949  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25950  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25951  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25952  JDK_TOPDIR="$SRC_ROOT/jdk"
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963  ###############################################################################
25964  #
25965  # Pickup additional source for a component from outside of the source root
25966  # or override source for a component.
25967  #
25968
25969# Check whether --with-add-source-root was given.
25970if test "${with_add_source_root+set}" = set; then :
25971  withval=$with_add_source_root;
25972fi
25973
25974
25975
25976# Check whether --with-override-source-root was given.
25977if test "${with_override_source_root+set}" = set; then :
25978  withval=$with_override_source_root;
25979fi
25980
25981
25982
25983# Check whether --with-adds-and-overrides was given.
25984if test "${with_adds_and_overrides+set}" = set; then :
25985  withval=$with_adds_and_overrides;
25986fi
25987
25988
25989  if test "x$with_adds_and_overrides" != x; then
25990    with_add_source_root="$with_adds_and_overrides/adds"
25991    with_override_source_root="$with_adds_and_overrides/overrides"
25992  fi
25993
25994  if test "x$with_add_source_root" != x; then
25995    if ! test -d $with_add_source_root; then
25996      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25997    fi
25998    CURDIR="$PWD"
25999    cd "$with_add_source_root"
26000    ADD_SRC_ROOT="`pwd`"
26001    cd "$CURDIR"
26002    # Verify that the addon source root does not have any root makefiles.
26003    # If it does, then it is usually an error, prevent this.
26004    if test -f $with_add_source_root/langtools/make/Makefile; then
26005      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
26006    fi
26007    if test -f $with_add_source_root/corba/make/Makefile; then
26008      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
26009    fi
26010    if test -f $with_add_source_root/jaxp/make/Makefile; then
26011      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
26012    fi
26013    if test -f $with_add_source_root/jaxws/make/Makefile; then
26014      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
26015    fi
26016    if test -f $with_add_source_root/hotspot/make/Makefile; then
26017      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
26018    fi
26019    if test -f $with_add_source_root/nashorn/make/Makefile; then
26020      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
26021    fi
26022    if test -f $with_add_source_root/jdk/make/Makefile; then
26023      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
26024    fi
26025  fi
26026
26027
26028  if test "x$with_override_source_root" != x; then
26029    if ! test -d $with_override_source_root; then
26030      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26031    fi
26032    CURDIR="$PWD"
26033    cd "$with_override_source_root"
26034    OVERRIDE_SRC_ROOT="`pwd`"
26035    cd "$CURDIR"
26036    if test -f $with_override_source_root/langtools/make/Makefile; then
26037      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
26038    fi
26039    if test -f $with_override_source_root/corba/make/Makefile; then
26040      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
26041    fi
26042    if test -f $with_override_source_root/jaxp/make/Makefile; then
26043      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
26044    fi
26045    if test -f $with_override_source_root/jaxws/make/Makefile; then
26046      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
26047    fi
26048    if test -f $with_override_source_root/hotspot/make/Makefile; then
26049      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
26050    fi
26051    if test -f $with_override_source_root/nashorn/make/Makefile; then
26052      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
26053    fi
26054    if test -f $with_override_source_root/jdk/make/Makefile; then
26055      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
26056    fi
26057  fi
26058
26059
26060  ###############################################################################
26061  #
26062  # Override a repo completely, this is used for example when you have 3 small
26063  # development sandboxes of the langtools sources and want to avoid having 3 full
26064  # OpenJDK sources checked out on disk.
26065  #
26066  # Assuming that the 3 langtools sandboxes are located here:
26067  # /home/fredrik/sandbox1/langtools
26068  # /home/fredrik/sandbox2/langtools
26069  # /home/fredrik/sandbox3/langtools
26070  #
26071  # From the source root you create build subdirs manually:
26072  #     mkdir -p build1 build2 build3
26073  # in each build directory run:
26074  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26075  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26076  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26077  #
26078
26079
26080# Check whether --with-override-langtools was given.
26081if test "${with_override_langtools+set}" = set; then :
26082  withval=$with_override_langtools;
26083fi
26084
26085
26086
26087# Check whether --with-override-corba was given.
26088if test "${with_override_corba+set}" = set; then :
26089  withval=$with_override_corba;
26090fi
26091
26092
26093
26094# Check whether --with-override-jaxp was given.
26095if test "${with_override_jaxp+set}" = set; then :
26096  withval=$with_override_jaxp;
26097fi
26098
26099
26100
26101# Check whether --with-override-jaxws was given.
26102if test "${with_override_jaxws+set}" = set; then :
26103  withval=$with_override_jaxws;
26104fi
26105
26106
26107
26108# Check whether --with-override-hotspot was given.
26109if test "${with_override_hotspot+set}" = set; then :
26110  withval=$with_override_hotspot;
26111fi
26112
26113
26114
26115# Check whether --with-override-nashorn was given.
26116if test "${with_override_nashorn+set}" = set; then :
26117  withval=$with_override_nashorn;
26118fi
26119
26120
26121
26122# Check whether --with-override-jdk was given.
26123if test "${with_override_jdk+set}" = set; then :
26124  withval=$with_override_jdk;
26125fi
26126
26127
26128  if test "x$with_override_langtools" != x; then
26129    CURDIR="$PWD"
26130    cd "$with_override_langtools"
26131    LANGTOOLS_TOPDIR="`pwd`"
26132    cd "$CURDIR"
26133    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26134      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26135    fi
26136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26137$as_echo_n "checking if langtools should be overridden... " >&6; }
26138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26139$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26140  fi
26141  if test "x$with_override_corba" != x; then
26142    CURDIR="$PWD"
26143    cd "$with_override_corba"
26144    CORBA_TOPDIR="`pwd`"
26145    cd "$CURDIR"
26146    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26147      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26148    fi
26149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26150$as_echo_n "checking if corba should be overridden... " >&6; }
26151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26152$as_echo "yes with $CORBA_TOPDIR" >&6; }
26153  fi
26154  if test "x$with_override_jaxp" != x; then
26155    CURDIR="$PWD"
26156    cd "$with_override_jaxp"
26157    JAXP_TOPDIR="`pwd`"
26158    cd "$CURDIR"
26159    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26160      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26161    fi
26162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26163$as_echo_n "checking if jaxp should be overridden... " >&6; }
26164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26165$as_echo "yes with $JAXP_TOPDIR" >&6; }
26166  fi
26167  if test "x$with_override_jaxws" != x; then
26168    CURDIR="$PWD"
26169    cd "$with_override_jaxws"
26170    JAXWS_TOPDIR="`pwd`"
26171    cd "$CURDIR"
26172    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26173      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26174    fi
26175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26176$as_echo_n "checking if jaxws should be overridden... " >&6; }
26177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26178$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26179  fi
26180  if test "x$with_override_hotspot" != x; then
26181    CURDIR="$PWD"
26182    cd "$with_override_hotspot"
26183    HOTSPOT_TOPDIR="`pwd`"
26184    cd "$CURDIR"
26185    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26186      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26187    fi
26188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26189$as_echo_n "checking if hotspot should be overridden... " >&6; }
26190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26191$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26192  fi
26193  if test "x$with_override_nashorn" != x; then
26194    CURDIR="$PWD"
26195    cd "$with_override_nashorn"
26196    NASHORN_TOPDIR="`pwd`"
26197    cd "$CURDIR"
26198    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26199      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26200    fi
26201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26202$as_echo_n "checking if nashorn should be overridden... " >&6; }
26203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26204$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26205  fi
26206  if test "x$with_override_jdk" != x; then
26207    CURDIR="$PWD"
26208    cd "$with_override_jdk"
26209    JDK_TOPDIR="`pwd`"
26210    cd "$CURDIR"
26211    if ! test -f $JDK_TOPDIR/make/Makefile; then
26212      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26213    fi
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26215$as_echo_n "checking if JDK should be overridden... " >&6; }
26216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26217$as_echo "yes with $JDK_TOPDIR" >&6; }
26218  fi
26219
26220
26221  BUILD_OUTPUT="$OUTPUT_ROOT"
26222
26223
26224  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26225  BUILD_HOTSPOT=true
26226
26227
26228
26229# Check whether --with-import-hotspot was given.
26230if test "${with_import_hotspot+set}" = set; then :
26231  withval=$with_import_hotspot;
26232fi
26233
26234  if test "x$with_import_hotspot" != x; then
26235    CURDIR="$PWD"
26236    cd "$with_import_hotspot"
26237    HOTSPOT_DIST="`pwd`"
26238    cd "$CURDIR"
26239    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26240      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26241    fi
26242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26243$as_echo_n "checking if hotspot should be imported... " >&6; }
26244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26245$as_echo "yes from $HOTSPOT_DIST" >&6; }
26246    BUILD_HOTSPOT=false
26247  fi
26248
26249  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26250
26251
26252###############################################################################
26253#
26254# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26255# native code.
26256#
26257###############################################################################
26258
26259# First determine the toolchain type (compiler family)
26260
26261
26262# Check whether --with-toolchain-type was given.
26263if test "${with_toolchain_type+set}" = set; then :
26264  withval=$with_toolchain_type;
26265fi
26266
26267
26268  # Use indirect variable referencing
26269  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26270  VALID_TOOLCHAINS=${!toolchain_var_name}
26271  # First toolchain type in the list is the default
26272  DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26273
26274  if test "x$with_toolchain_type" = xlist; then
26275    # List all toolchains
26276    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26277$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26278    for toolchain in $VALID_TOOLCHAINS; do
26279      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26280      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26281      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26282    done
26283
26284    exit 0
26285  elif test "x$with_toolchain_type" != x; then
26286    # User override; check that it is valid
26287    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26288      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26289$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26290      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26291$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26292      as_fn_error $? "Cannot continue." "$LINENO" 5
26293    fi
26294    TOOLCHAIN_TYPE=$with_toolchain_type
26295  else
26296    # No flag given, use default
26297    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26298  fi
26299
26300
26301  TOOLCHAIN_CC_BINARY_clang="clang"
26302  TOOLCHAIN_CC_BINARY_gcc="gcc"
26303  TOOLCHAIN_CC_BINARY_microsoft="cl"
26304  TOOLCHAIN_CC_BINARY_solstudio="cc"
26305  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26306
26307  TOOLCHAIN_CXX_BINARY_clang="clang++"
26308  TOOLCHAIN_CXX_BINARY_gcc="g++"
26309  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26310  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26311  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26312
26313  # Use indirect variable referencing
26314  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26315  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26316  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26317  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26318  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26319  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26320
26321
26322  # Define filename patterns
26323  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26324    LIBRARY_PREFIX=
26325    SHARED_LIBRARY_SUFFIX='.dll'
26326    STATIC_LIBRARY_SUFFIX='.lib'
26327    SHARED_LIBRARY='$1.dll'
26328    STATIC_LIBRARY='$1.lib'
26329    OBJ_SUFFIX='.obj'
26330    EXE_SUFFIX='.exe'
26331  else
26332    LIBRARY_PREFIX=lib
26333    SHARED_LIBRARY_SUFFIX='.so'
26334    STATIC_LIBRARY_SUFFIX='.a'
26335    SHARED_LIBRARY='lib$1.so'
26336    STATIC_LIBRARY='lib$1.a'
26337    OBJ_SUFFIX='.o'
26338    EXE_SUFFIX=''
26339    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26340      SHARED_LIBRARY='lib$1.dylib'
26341      SHARED_LIBRARY_SUFFIX='.dylib'
26342    fi
26343  fi
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26355    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26356$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26357  else
26358    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26359$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26360  fi
26361
26362
26363# Then detect the actual binaries needed
26364
26365  # FIXME: Is this needed?
26366  ac_ext=cpp
26367ac_cpp='$CXXCPP $CPPFLAGS'
26368ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26369ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26370ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26371
26372
26373  # Store the CFLAGS etc passed to the configure script.
26374  ORG_CFLAGS="$CFLAGS"
26375  ORG_CXXFLAGS="$CXXFLAGS"
26376  ORG_OBJCFLAGS="$OBJCFLAGS"
26377
26378  # autoconf magic only relies on PATH, so update it if tools dir is specified
26379  OLD_PATH="$PATH"
26380
26381  # For solaris we really need solaris tools, and not the GNU equivalent.
26382  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26383  # so add that to path before starting to probe.
26384  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26385  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26386    PATH="/usr/ccs/bin:$PATH"
26387  fi
26388
26389  # On Windows, we need to detect the visual studio installation first.
26390  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26391
26392  # Store path to cygwin link.exe to help excluding it when searching for
26393  # VS linker. This must be done before changing the PATH when looking for VS.
26394  # Extract the first word of "link", so it can be a program name with args.
26395set dummy link; ac_word=$2
26396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26397$as_echo_n "checking for $ac_word... " >&6; }
26398if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26399  $as_echo_n "(cached) " >&6
26400else
26401  case $CYGWIN_LINK in
26402  [\\/]* | ?:[\\/]*)
26403  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26404  ;;
26405  *)
26406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26407for as_dir in $PATH
26408do
26409  IFS=$as_save_IFS
26410  test -z "$as_dir" && as_dir=.
26411    for ac_exec_ext in '' $ac_executable_extensions; do
26412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26413    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26415    break 2
26416  fi
26417done
26418  done
26419IFS=$as_save_IFS
26420
26421  ;;
26422esac
26423fi
26424CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26425if test -n "$CYGWIN_LINK"; then
26426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26427$as_echo "$CYGWIN_LINK" >&6; }
26428else
26429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26430$as_echo "no" >&6; }
26431fi
26432
26433
26434  if test "x$CYGWIN_LINK" != x; then
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26436$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26437    "$CYGWIN_LINK" --version > /dev/null
26438    if test $? -eq 0 ; then
26439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26440$as_echo "yes" >&6; }
26441    else
26442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26443$as_echo "no" >&6; }
26444      # This might be the VS linker. Don't exclude it later on.
26445      CYGWIN_LINK=""
26446    fi
26447  fi
26448
26449  # First-hand choice is to locate and run the vsvars bat file.
26450
26451  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26452    VCVARSFILE="vc/bin/vcvars32.bat"
26453  else
26454    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26455  fi
26456
26457  VS_ENV_CMD=""
26458  VS_ENV_ARGS=""
26459  if test "x$with_toolsdir" != x; then
26460
26461  if test "x$VS_ENV_CMD" = x; then
26462    VS100BASE="$with_toolsdir/../.."
26463    METHOD="--with-tools-dir"
26464
26465  windows_path="$VS100BASE"
26466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26467    unix_path=`$CYGPATH -u "$windows_path"`
26468    VS100BASE="$unix_path"
26469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26471    VS100BASE="$unix_path"
26472  fi
26473
26474    if test -d "$VS100BASE"; then
26475      if test -f "$VS100BASE/$VCVARSFILE"; then
26476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26477$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26478        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26479      else
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26481$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26483$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26484      fi
26485    fi
26486  fi
26487
26488  fi
26489
26490  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26491    # Having specified an argument which is incorrect will produce an instant failure;
26492    # we should not go on looking
26493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26494$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26496$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26497    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26498  fi
26499
26500  if test "x$VS100COMNTOOLS" != x; then
26501
26502  if test "x$VS_ENV_CMD" = x; then
26503    VS100BASE="$VS100COMNTOOLS/../.."
26504    METHOD="VS100COMNTOOLS variable"
26505
26506  windows_path="$VS100BASE"
26507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26508    unix_path=`$CYGPATH -u "$windows_path"`
26509    VS100BASE="$unix_path"
26510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26512    VS100BASE="$unix_path"
26513  fi
26514
26515    if test -d "$VS100BASE"; then
26516      if test -f "$VS100BASE/$VCVARSFILE"; then
26517        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26518$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26519        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26520      else
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26522$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26524$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26525      fi
26526    fi
26527  fi
26528
26529  fi
26530  if test "x$PROGRAMFILES" != x; then
26531
26532  if test "x$VS_ENV_CMD" = x; then
26533    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26534    METHOD="well-known name"
26535
26536  windows_path="$VS100BASE"
26537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538    unix_path=`$CYGPATH -u "$windows_path"`
26539    VS100BASE="$unix_path"
26540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26542    VS100BASE="$unix_path"
26543  fi
26544
26545    if test -d "$VS100BASE"; then
26546      if test -f "$VS100BASE/$VCVARSFILE"; then
26547        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26548$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26549        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26550      else
26551        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26552$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26553        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26554$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26555      fi
26556    fi
26557  fi
26558
26559  fi
26560
26561  if test "x$VS_ENV_CMD" = x; then
26562    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26563    METHOD="well-known name"
26564
26565  windows_path="$VS100BASE"
26566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26567    unix_path=`$CYGPATH -u "$windows_path"`
26568    VS100BASE="$unix_path"
26569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26571    VS100BASE="$unix_path"
26572  fi
26573
26574    if test -d "$VS100BASE"; then
26575      if test -f "$VS100BASE/$VCVARSFILE"; then
26576        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26577$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26578        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26579      else
26580        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26581$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26582        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26583$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26584      fi
26585    fi
26586  fi
26587
26588
26589  if test "x$VS_ENV_CMD" = x; then
26590    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26591    METHOD="well-known name"
26592
26593  windows_path="$VS100BASE"
26594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26595    unix_path=`$CYGPATH -u "$windows_path"`
26596    VS100BASE="$unix_path"
26597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26599    VS100BASE="$unix_path"
26600  fi
26601
26602    if test -d "$VS100BASE"; then
26603      if test -f "$VS100BASE/$VCVARSFILE"; then
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26605$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26606        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26607      else
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26609$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26610        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26611$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26612      fi
26613    fi
26614  fi
26615
26616
26617  if test "x$ProgramW6432" != x; then
26618
26619  if test "x$VS_ENV_CMD" = x; then
26620    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26621    METHOD="well-known name"
26622
26623  windows_path="$WIN_SDK_BASE"
26624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26625    unix_path=`$CYGPATH -u "$windows_path"`
26626    WIN_SDK_BASE="$unix_path"
26627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26629    WIN_SDK_BASE="$unix_path"
26630  fi
26631
26632    if test -d "$WIN_SDK_BASE"; then
26633      # There have been cases of partial or broken SDK installations. A missing
26634      # lib dir is not going to work.
26635      if test ! -d "$WIN_SDK_BASE/../lib"; then
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26637$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26639$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26640      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26641        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26642$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26643        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26644        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26645          VS_ENV_ARGS="/x86"
26646        else
26647          VS_ENV_ARGS="/x64"
26648        fi
26649      else
26650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26651$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26652        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26653$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26654      fi
26655    fi
26656  fi
26657
26658  fi
26659  if test "x$PROGRAMW6432" != x; then
26660
26661  if test "x$VS_ENV_CMD" = x; then
26662    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26663    METHOD="well-known name"
26664
26665  windows_path="$WIN_SDK_BASE"
26666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26667    unix_path=`$CYGPATH -u "$windows_path"`
26668    WIN_SDK_BASE="$unix_path"
26669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26671    WIN_SDK_BASE="$unix_path"
26672  fi
26673
26674    if test -d "$WIN_SDK_BASE"; then
26675      # There have been cases of partial or broken SDK installations. A missing
26676      # lib dir is not going to work.
26677      if test ! -d "$WIN_SDK_BASE/../lib"; then
26678        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26679$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26680        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26681$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26682      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26683        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26684$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26685        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26686        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26687          VS_ENV_ARGS="/x86"
26688        else
26689          VS_ENV_ARGS="/x64"
26690        fi
26691      else
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26693$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26695$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26696      fi
26697    fi
26698  fi
26699
26700  fi
26701  if test "x$PROGRAMFILES" != x; then
26702
26703  if test "x$VS_ENV_CMD" = x; then
26704    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26705    METHOD="well-known name"
26706
26707  windows_path="$WIN_SDK_BASE"
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709    unix_path=`$CYGPATH -u "$windows_path"`
26710    WIN_SDK_BASE="$unix_path"
26711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26713    WIN_SDK_BASE="$unix_path"
26714  fi
26715
26716    if test -d "$WIN_SDK_BASE"; then
26717      # There have been cases of partial or broken SDK installations. A missing
26718      # lib dir is not going to work.
26719      if test ! -d "$WIN_SDK_BASE/../lib"; then
26720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26721$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26723$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26724      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26725        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26726$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26727        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26728        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26729          VS_ENV_ARGS="/x86"
26730        else
26731          VS_ENV_ARGS="/x64"
26732        fi
26733      else
26734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26735$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26736        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26737$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26738      fi
26739    fi
26740  fi
26741
26742  fi
26743
26744  if test "x$VS_ENV_CMD" = x; then
26745    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26746    METHOD="well-known name"
26747
26748  windows_path="$WIN_SDK_BASE"
26749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26750    unix_path=`$CYGPATH -u "$windows_path"`
26751    WIN_SDK_BASE="$unix_path"
26752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26754    WIN_SDK_BASE="$unix_path"
26755  fi
26756
26757    if test -d "$WIN_SDK_BASE"; then
26758      # There have been cases of partial or broken SDK installations. A missing
26759      # lib dir is not going to work.
26760      if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
26764$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26765      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26767$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26768        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26769        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26770          VS_ENV_ARGS="/x86"
26771        else
26772          VS_ENV_ARGS="/x64"
26773        fi
26774      else
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26776$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26777        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26778$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26779      fi
26780    fi
26781  fi
26782
26783
26784  if test "x$VS_ENV_CMD" = x; then
26785    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26786    METHOD="well-known name"
26787
26788  windows_path="$WIN_SDK_BASE"
26789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26790    unix_path=`$CYGPATH -u "$windows_path"`
26791    WIN_SDK_BASE="$unix_path"
26792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26794    WIN_SDK_BASE="$unix_path"
26795  fi
26796
26797    if test -d "$WIN_SDK_BASE"; then
26798      # There have been cases of partial or broken SDK installations. A missing
26799      # lib dir is not going to work.
26800      if test ! -d "$WIN_SDK_BASE/../lib"; then
26801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26802$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26804$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26805      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26807$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26808        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26809        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26810          VS_ENV_ARGS="/x86"
26811        else
26812          VS_ENV_ARGS="/x64"
26813        fi
26814      else
26815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26816$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26817        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26818$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26819      fi
26820    fi
26821  fi
26822
26823
26824  if test "x$VS_ENV_CMD" != x; then
26825    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26826
26827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26828
26829  # First separate the path from the arguments. This will split at the first
26830  # space.
26831  complete="$VS_ENV_CMD"
26832  path="${complete%% *}"
26833  tmp="$complete EOL"
26834  arguments="${tmp#* }"
26835
26836  # Input might be given as Windows format, start by converting to
26837  # unix format.
26838  new_path=`$CYGPATH -u "$path"`
26839
26840  # Now try to locate executable using which
26841  new_path=`$WHICH "$new_path" 2> /dev/null`
26842  # bat and cmd files are not always considered executable in cygwin causing which
26843  # to not find them
26844  if test "x$new_path" = x \
26845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26847    new_path=`$CYGPATH -u "$path"`
26848  fi
26849  if test "x$new_path" = x; then
26850    # Oops. Which didn't find the executable.
26851    # The splitting of arguments from the executable at a space might have been incorrect,
26852    # since paths with space are more likely in Windows. Give it another try with the whole
26853    # argument.
26854    path="$complete"
26855    arguments="EOL"
26856    new_path=`$CYGPATH -u "$path"`
26857    new_path=`$WHICH "$new_path" 2> /dev/null`
26858    # bat and cmd files are not always considered executable in cygwin causing which
26859    # to not find them
26860    if test "x$new_path" = x \
26861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26863      new_path=`$CYGPATH -u "$path"`
26864    fi
26865    if test "x$new_path" = x; then
26866      # It's still not found. Now this is an unrecoverable error.
26867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26868$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26869      has_space=`$ECHO "$complete" | $GREP " "`
26870      if test "x$has_space" != x; then
26871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26873      fi
26874      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26875    fi
26876  fi
26877
26878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26881  # "foo.exe" is OK but "foo" is an error.
26882  #
26883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26884  # It is also a way to make sure we got the proper file name for the real test later on.
26885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26886  if test "x$test_shortpath" = x; then
26887    # Short path failed, file does not exist as specified.
26888    # Try adding .exe or .cmd
26889    if test -f "${new_path}.exe"; then
26890      input_to_shortpath="${new_path}.exe"
26891    elif test -f "${new_path}.cmd"; then
26892      input_to_shortpath="${new_path}.cmd"
26893    else
26894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26895$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26898      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26899    fi
26900  else
26901    input_to_shortpath="$new_path"
26902  fi
26903
26904  # Call helper function which possibly converts this using DOS-style short mode.
26905  # If so, the updated path is stored in $new_path.
26906  new_path="$input_to_shortpath"
26907
26908  input_path="$input_to_shortpath"
26909  # Check if we need to convert this using DOS-style short mode. If the path
26910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26911  # take no chances and rewrite it.
26912  # Note: m4 eats our [], so we need to use [ and ] instead.
26913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26914  if test "x$has_forbidden_chars" != x; then
26915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26919      # Going to short mode and back again did indeed matter. Since short mode is
26920      # case insensitive, let's make it lowercase to improve readability.
26921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26922      # Now convert it back to Unix-stile (cygpath)
26923      input_path=`$CYGPATH -u "$shortmode_path"`
26924      new_path="$input_path"
26925    fi
26926  fi
26927
26928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26929  if test "x$test_cygdrive_prefix" = x; then
26930    # As a simple fix, exclude /usr/bin since it's not a real path.
26931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26933      # a path prefixed by /cygdrive for fixpath to work.
26934      new_path="$CYGWIN_ROOT_PATH$input_path"
26935    fi
26936  fi
26937
26938  # remove trailing .exe if any
26939  new_path="${new_path/%.exe/}"
26940
26941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26942
26943  # First separate the path from the arguments. This will split at the first
26944  # space.
26945  complete="$VS_ENV_CMD"
26946  path="${complete%% *}"
26947  tmp="$complete EOL"
26948  arguments="${tmp#* }"
26949
26950  # Input might be given as Windows format, start by converting to
26951  # unix format.
26952  new_path="$path"
26953
26954  windows_path="$new_path"
26955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26956    unix_path=`$CYGPATH -u "$windows_path"`
26957    new_path="$unix_path"
26958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26960    new_path="$unix_path"
26961  fi
26962
26963
26964  # Now try to locate executable using which
26965  new_path=`$WHICH "$new_path" 2> /dev/null`
26966
26967  if test "x$new_path" = x; then
26968    # Oops. Which didn't find the executable.
26969    # The splitting of arguments from the executable at a space might have been incorrect,
26970    # since paths with space are more likely in Windows. Give it another try with the whole
26971    # argument.
26972    path="$complete"
26973    arguments="EOL"
26974    new_path="$path"
26975
26976  windows_path="$new_path"
26977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26978    unix_path=`$CYGPATH -u "$windows_path"`
26979    new_path="$unix_path"
26980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26982    new_path="$unix_path"
26983  fi
26984
26985
26986    new_path=`$WHICH "$new_path" 2> /dev/null`
26987
26988    if test "x$new_path" = x; then
26989      # It's still not found. Now this is an unrecoverable error.
26990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26991$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26992      has_space=`$ECHO "$complete" | $GREP " "`
26993      if test "x$has_space" != x; then
26994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26996      fi
26997      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26998    fi
26999  fi
27000
27001  # Now new_path has a complete unix path to the binary
27002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27003    # Keep paths in /bin as-is, but remove trailing .exe if any
27004    new_path="${new_path/%.exe/}"
27005    # Do not save /bin paths to all_fixpath_prefixes!
27006  else
27007    # Not in mixed or Windows style, start by that.
27008    new_path=`cmd //c echo $new_path`
27009
27010  input_path="$new_path"
27011  # Check if we need to convert this using DOS-style short mode. If the path
27012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27013  # take no chances and rewrite it.
27014  # Note: m4 eats our [], so we need to use [ and ] instead.
27015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27016  if test "x$has_forbidden_chars" != x; then
27017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27019  fi
27020
27021    # Output is in $new_path
27022
27023  windows_path="$new_path"
27024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27025    unix_path=`$CYGPATH -u "$windows_path"`
27026    new_path="$unix_path"
27027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27029    new_path="$unix_path"
27030  fi
27031
27032    # remove trailing .exe if any
27033    new_path="${new_path/%.exe/}"
27034
27035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27037  fi
27038
27039  else
27040    # We're on a posix platform. Hooray! :)
27041    # First separate the path from the arguments. This will split at the first
27042    # space.
27043    complete="$VS_ENV_CMD"
27044    path="${complete%% *}"
27045    tmp="$complete EOL"
27046    arguments="${tmp#* }"
27047
27048    # Cannot rely on the command "which" here since it doesn't always work.
27049    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27050    if test -z "$is_absolute_path"; then
27051      # Path to executable is not absolute. Find it.
27052      IFS_save="$IFS"
27053      IFS=:
27054      for p in $PATH; do
27055        if test -f "$p/$path" && test -x "$p/$path"; then
27056          new_path="$p/$path"
27057          break
27058        fi
27059      done
27060      IFS="$IFS_save"
27061    else
27062      # This is an absolute path, we can use it without further modifications.
27063      new_path="$path"
27064    fi
27065
27066    if test "x$new_path" = x; then
27067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27068$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27069      has_space=`$ECHO "$complete" | $GREP " "`
27070      if test "x$has_space" != x; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27072$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27073      fi
27074      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27075    fi
27076  fi
27077
27078  # Now join together the path and the arguments once again
27079  if test "x$arguments" != xEOL; then
27080    new_complete="$new_path ${arguments% *}"
27081  else
27082    new_complete="$new_path"
27083  fi
27084
27085  if test "x$complete" != "x$new_complete"; then
27086    VS_ENV_CMD="$new_complete"
27087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27088$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27089  fi
27090
27091
27092    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27093    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27094$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27095    cd $OUTPUT_ROOT
27096    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27097    # to autoconf standards.
27098
27099    #----
27100
27101    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27102    # but calculate the difference in Cygwin environment before/after running it and then
27103    # apply the diff.
27104
27105    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27106      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27107      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27108      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27109    else
27110      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27111      _dosbash=`cmd //c echo \`which bash\``
27112    fi
27113
27114    # generate the set of exported vars before/after the vs10 setup
27115    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27116    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27117    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27118    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27119
27120    # Now execute the newly created bat file.
27121    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27122    cmd /c localdevenvtmp.bat | cat
27123
27124    # apply the diff (less some non-vs10 vars named by "!")
27125    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27126    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27127    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27128
27129    # cleanup
27130    $RM localdevenvtmp*
27131    #----
27132    cd $CURDIR
27133    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27135$as_echo "no" >&6; }
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27137$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27138      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27139$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27140      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27141$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27142      as_fn_error $? "Cannot continue" "$LINENO" 5
27143    fi
27144
27145    # Now set all paths and other env variables. This will allow the rest of
27146    # the configure script to find and run the compiler in the proper way.
27147    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27148$as_echo "$as_me: Setting extracted environment variables" >&6;}
27149    . $OUTPUT_ROOT/localdevenv.sh
27150  else
27151    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27152    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27153$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27154  fi
27155
27156  # At this point, we should have corrent variables in the environment, or we can't continue.
27157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27158$as_echo_n "checking for Visual Studio variables... " >&6; }
27159
27160  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27161    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27163$as_echo "present but broken" >&6; }
27164      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27165    else
27166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27167$as_echo "ok" >&6; }
27168      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27169      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27170      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27171      # Remove any paths containing # (typically F#) as that messes up make
27172      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27173      VS_PATH="$PATH"
27174
27175
27176
27177    fi
27178  else
27179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27180$as_echo "not found" >&6; }
27181
27182    if test "x$VS_ENV_CMD" = x; then
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27184$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27185      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27186$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27187    else
27188      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27189$as_echo "$as_me: Running the extraction script failed." >&6;}
27190    fi
27191    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27192$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27193    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27194$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27195    as_fn_error $? "Cannot continue" "$LINENO" 5
27196  fi
27197
27198  fi
27199
27200  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27201  # override all other locations.
27202  if test "x$TOOLS_DIR" != x; then
27203    PATH=$TOOLS_DIR:$PATH
27204  fi
27205
27206  # If a devkit is found on the builddeps server, then prepend its path to the
27207  # PATH variable. If there are cross compilers available in the devkit, these
27208  # will be found by AC_PROG_CC et al.
27209  DEVKIT=
27210
27211
27212  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27213    # Source the builddeps file again, to make sure it uses the latest variables!
27214    . $builddepsfile
27215    # Look for a target and build machine specific resource!
27216    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27217    if test "x$resource" = x; then
27218      # Ok, lets instead look for a target specific resource
27219      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27220    fi
27221    if test "x$resource" = x; then
27222      # Ok, lets instead look for a build specific resource
27223      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27224    fi
27225    if test "x$resource" = x; then
27226      # Ok, lets instead look for a generic resource
27227      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27228      resource=${builddep_devkit}
27229    fi
27230    if test "x$resource" != x; then
27231      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27232$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27233      # If the resource in the builddeps.conf file is an existing directory,
27234      # for example /java/linux/cups
27235      if test -d ${resource}; then
27236        depdir=${resource}
27237      else
27238
27239  # devkit is for example mymodule
27240  # $resource is for example libs/general/libmymod_1_2_3.zip
27241  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27242  # $with_builddeps_dir is for example /localhome/builddeps
27243  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27244  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27245  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27246  filename=`basename $resource`
27247  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27248  filebase=${filename%%.*}
27249  extension=${filename#*.}
27250  installdir=$with_builddeps_dir/$filebase
27251  if test ! -f $installdir/$filename.unpacked; then
27252    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27253$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27254    if test ! -d $installdir; then
27255      mkdir -p $installdir
27256    fi
27257    if test ! -d $installdir; then
27258      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27259    fi
27260    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27261    touch $tmpfile
27262    if test ! -f $tmpfile; then
27263      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27264    fi
27265
27266  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27267  # $tmpfile is the local file name for the downloaded file.
27268  VALID_TOOL=no
27269  if test "x$BDEPS_FTP" = xwget; then
27270    VALID_TOOL=yes
27271    wget -O $tmpfile $with_builddeps_server/$resource
27272  fi
27273  if test "x$BDEPS_FTP" = xlftp; then
27274    VALID_TOOL=yes
27275    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27276  fi
27277  if test "x$BDEPS_FTP" = xftp; then
27278    VALID_TOOL=yes
27279    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27280    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27281    FTPUSERPWD=${FTPSERVER%%@*}
27282    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27283      FTPUSER=${userpwd%%:*}
27284      FTPPWD=${userpwd#*@}
27285      FTPSERVER=${FTPSERVER#*@}
27286    else
27287      FTPUSER=ftp
27288      FTPPWD=ftp
27289    fi
27290    # the "pass" command does not work on some
27291    # ftp clients (read ftp.exe) but if it works,
27292    # passive mode is better!
27293    ( \
27294        echo "user $FTPUSER $FTPPWD"        ; \
27295        echo "pass"                         ; \
27296        echo "bin"                          ; \
27297        echo "get $FTPPATH $tmpfile"              ; \
27298    ) | ftp -in $FTPSERVER
27299  fi
27300  if test "x$VALID_TOOL" != xyes; then
27301    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27302  fi
27303
27304    mv $tmpfile $installdir/$filename
27305    if test ! -s $installdir/$filename; then
27306      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27307    fi
27308    case "$extension" in
27309      zip)  echo "Unzipping $installdir/$filename..."
27310        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27311        ;;
27312      tar.gz) echo "Untaring $installdir/$filename..."
27313        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27314        ;;
27315      tgz) echo "Untaring $installdir/$filename..."
27316        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27317        ;;
27318      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27319        ;;
27320    esac
27321  fi
27322  if test -f $installdir/$filename.unpacked; then
27323    depdir=$installdir
27324  fi
27325
27326      fi
27327      # Source the builddeps file again, because in the previous command, the depdir
27328      # was updated to point at the current build dependency install directory.
27329      . $builddepsfile
27330      # Now extract variables from the builddeps.conf files.
27331      theroot=${builddep_devkit_ROOT}
27332      thecflags=${builddep_devkit_CFLAGS}
27333      thelibs=${builddep_devkit_LIBS}
27334      if test "x$depdir" = x; then
27335        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27336      fi
27337      DEVKIT=$depdir
27338      if test "x$theroot" != x; then
27339        DEVKIT="$theroot"
27340      fi
27341      if test "x$thecflags" != x; then
27342        DEVKIT_CFLAGS="$thecflags"
27343      fi
27344      if test "x$thelibs" != x; then
27345        DEVKIT_LIBS="$thelibs"
27346      fi
27347
27348        # Found devkit
27349        PATH="$DEVKIT/bin:$PATH"
27350        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27351        if test "x$x_includes" = "xNONE"; then
27352          x_includes="$SYS_ROOT/usr/include/X11"
27353        fi
27354        if test "x$x_libraries" = "xNONE"; then
27355          x_libraries="$SYS_ROOT/usr/lib"
27356        fi
27357
27358
27359    fi
27360
27361  fi
27362
27363
27364
27365  #
27366  # Setup the compilers (CC and CXX)
27367  #
27368
27369  COMPILER_NAME=C
27370  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27371
27372  if test "x$CC" != x; then
27373    # User has supplied compiler name already, always let that override.
27374    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27375$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27376    if test "x`basename $CC`" = "x$CC"; then
27377      # A command without a complete path is provided, search $PATH.
27378
27379      for ac_prog in $CC
27380do
27381  # Extract the first word of "$ac_prog", so it can be a program name with args.
27382set dummy $ac_prog; ac_word=$2
27383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27384$as_echo_n "checking for $ac_word... " >&6; }
27385if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27386  $as_echo_n "(cached) " >&6
27387else
27388  case $POTENTIAL_CC in
27389  [\\/]* | ?:[\\/]*)
27390  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27391  ;;
27392  *)
27393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27394for as_dir in $PATH
27395do
27396  IFS=$as_save_IFS
27397  test -z "$as_dir" && as_dir=.
27398    for ac_exec_ext in '' $ac_executable_extensions; do
27399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27400    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27402    break 2
27403  fi
27404done
27405  done
27406IFS=$as_save_IFS
27407
27408  ;;
27409esac
27410fi
27411POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27412if test -n "$POTENTIAL_CC"; then
27413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27414$as_echo "$POTENTIAL_CC" >&6; }
27415else
27416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27417$as_echo "no" >&6; }
27418fi
27419
27420
27421  test -n "$POTENTIAL_CC" && break
27422done
27423
27424      if test "x$POTENTIAL_CC" != x; then
27425        CC=$POTENTIAL_CC
27426      else
27427        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27428      fi
27429    else
27430      # Otherwise it might already be a complete path
27431      if test ! -x "$CC"; then
27432        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27433      fi
27434    fi
27435  else
27436    # No user supplied value. Locate compiler ourselves.
27437
27438    # If we are cross compiling, assume cross compilation tools follows the
27439    # cross compilation standard where they are prefixed with the autoconf
27440    # standard name for the target. For example the binary
27441    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27442    # If we are not cross compiling, then the default compiler name will be
27443    # used.
27444
27445    CC=
27446    # If TOOLS_DIR is set, check for all compiler names in there first
27447    # before checking the rest of the PATH.
27448    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27449    # step, this should not be necessary.
27450    if test -n "$TOOLS_DIR"; then
27451      PATH_save="$PATH"
27452      PATH="$TOOLS_DIR"
27453      for ac_prog in $SEARCH_LIST
27454do
27455  # Extract the first word of "$ac_prog", so it can be a program name with args.
27456set dummy $ac_prog; ac_word=$2
27457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27458$as_echo_n "checking for $ac_word... " >&6; }
27459if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27460  $as_echo_n "(cached) " >&6
27461else
27462  case $TOOLS_DIR_CC in
27463  [\\/]* | ?:[\\/]*)
27464  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27465  ;;
27466  *)
27467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27468for as_dir in $PATH
27469do
27470  IFS=$as_save_IFS
27471  test -z "$as_dir" && as_dir=.
27472    for ac_exec_ext in '' $ac_executable_extensions; do
27473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27474    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27476    break 2
27477  fi
27478done
27479  done
27480IFS=$as_save_IFS
27481
27482  ;;
27483esac
27484fi
27485TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27486if test -n "$TOOLS_DIR_CC"; then
27487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27488$as_echo "$TOOLS_DIR_CC" >&6; }
27489else
27490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27491$as_echo "no" >&6; }
27492fi
27493
27494
27495  test -n "$TOOLS_DIR_CC" && break
27496done
27497
27498      CC=$TOOLS_DIR_CC
27499      PATH="$PATH_save"
27500    fi
27501
27502    # AC_PATH_PROGS can't be run multiple times with the same variable,
27503    # so create a new name for this run.
27504    if test "x$CC" = x; then
27505      for ac_prog in $SEARCH_LIST
27506do
27507  # Extract the first word of "$ac_prog", so it can be a program name with args.
27508set dummy $ac_prog; ac_word=$2
27509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27510$as_echo_n "checking for $ac_word... " >&6; }
27511if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27512  $as_echo_n "(cached) " >&6
27513else
27514  case $POTENTIAL_CC in
27515  [\\/]* | ?:[\\/]*)
27516  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27517  ;;
27518  *)
27519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27520for as_dir in $PATH
27521do
27522  IFS=$as_save_IFS
27523  test -z "$as_dir" && as_dir=.
27524    for ac_exec_ext in '' $ac_executable_extensions; do
27525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27526    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27528    break 2
27529  fi
27530done
27531  done
27532IFS=$as_save_IFS
27533
27534  ;;
27535esac
27536fi
27537POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27538if test -n "$POTENTIAL_CC"; then
27539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27540$as_echo "$POTENTIAL_CC" >&6; }
27541else
27542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27543$as_echo "no" >&6; }
27544fi
27545
27546
27547  test -n "$POTENTIAL_CC" && break
27548done
27549
27550      CC=$POTENTIAL_CC
27551    fi
27552
27553    if test "x$CC" = x; then
27554
27555  # Print a helpful message on how to acquire the necessary build dependency.
27556  # devkit is the help tag: freetype, cups, pulse, alsa etc
27557  MISSING_DEPENDENCY=devkit
27558
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    cygwin_help $MISSING_DEPENDENCY
27561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27562    msys_help $MISSING_DEPENDENCY
27563  else
27564    PKGHANDLER_COMMAND=
27565
27566    case $PKGHANDLER in
27567      apt-get)
27568        apt_help     $MISSING_DEPENDENCY ;;
27569      yum)
27570        yum_help     $MISSING_DEPENDENCY ;;
27571      port)
27572        port_help    $MISSING_DEPENDENCY ;;
27573      pkgutil)
27574        pkgutil_help $MISSING_DEPENDENCY ;;
27575      pkgadd)
27576        pkgadd_help  $MISSING_DEPENDENCY ;;
27577    esac
27578
27579    if test "x$PKGHANDLER_COMMAND" != x; then
27580      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27581    fi
27582  fi
27583
27584      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27585    fi
27586  fi
27587
27588  # Now we have a compiler binary in CC. Make sure it's okay.
27589
27590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27591
27592  # First separate the path from the arguments. This will split at the first
27593  # space.
27594  complete="$CC"
27595  path="${complete%% *}"
27596  tmp="$complete EOL"
27597  arguments="${tmp#* }"
27598
27599  # Input might be given as Windows format, start by converting to
27600  # unix format.
27601  new_path=`$CYGPATH -u "$path"`
27602
27603  # Now try to locate executable using which
27604  new_path=`$WHICH "$new_path" 2> /dev/null`
27605  # bat and cmd files are not always considered executable in cygwin causing which
27606  # to not find them
27607  if test "x$new_path" = x \
27608      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27609      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27610    new_path=`$CYGPATH -u "$path"`
27611  fi
27612  if test "x$new_path" = x; then
27613    # Oops. Which didn't find the executable.
27614    # The splitting of arguments from the executable at a space might have been incorrect,
27615    # since paths with space are more likely in Windows. Give it another try with the whole
27616    # argument.
27617    path="$complete"
27618    arguments="EOL"
27619    new_path=`$CYGPATH -u "$path"`
27620    new_path=`$WHICH "$new_path" 2> /dev/null`
27621    # bat and cmd files are not always considered executable in cygwin causing which
27622    # to not find them
27623    if test "x$new_path" = x \
27624        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27625        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27626      new_path=`$CYGPATH -u "$path"`
27627    fi
27628    if test "x$new_path" = x; then
27629      # It's still not found. Now this is an unrecoverable error.
27630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27631$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27632      has_space=`$ECHO "$complete" | $GREP " "`
27633      if test "x$has_space" != x; then
27634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27636      fi
27637      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27638    fi
27639  fi
27640
27641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27644  # "foo.exe" is OK but "foo" is an error.
27645  #
27646  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27647  # It is also a way to make sure we got the proper file name for the real test later on.
27648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27649  if test "x$test_shortpath" = x; then
27650    # Short path failed, file does not exist as specified.
27651    # Try adding .exe or .cmd
27652    if test -f "${new_path}.exe"; then
27653      input_to_shortpath="${new_path}.exe"
27654    elif test -f "${new_path}.cmd"; then
27655      input_to_shortpath="${new_path}.cmd"
27656    else
27657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27658$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27659      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27660$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27661      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27662    fi
27663  else
27664    input_to_shortpath="$new_path"
27665  fi
27666
27667  # Call helper function which possibly converts this using DOS-style short mode.
27668  # If so, the updated path is stored in $new_path.
27669  new_path="$input_to_shortpath"
27670
27671  input_path="$input_to_shortpath"
27672  # Check if we need to convert this using DOS-style short mode. If the path
27673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27674  # take no chances and rewrite it.
27675  # Note: m4 eats our [], so we need to use [ and ] instead.
27676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27677  if test "x$has_forbidden_chars" != x; then
27678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27682      # Going to short mode and back again did indeed matter. Since short mode is
27683      # case insensitive, let's make it lowercase to improve readability.
27684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27685      # Now convert it back to Unix-stile (cygpath)
27686      input_path=`$CYGPATH -u "$shortmode_path"`
27687      new_path="$input_path"
27688    fi
27689  fi
27690
27691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27692  if test "x$test_cygdrive_prefix" = x; then
27693    # As a simple fix, exclude /usr/bin since it's not a real path.
27694    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27696      # a path prefixed by /cygdrive for fixpath to work.
27697      new_path="$CYGWIN_ROOT_PATH$input_path"
27698    fi
27699  fi
27700
27701  # remove trailing .exe if any
27702  new_path="${new_path/%.exe/}"
27703
27704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27705
27706  # First separate the path from the arguments. This will split at the first
27707  # space.
27708  complete="$CC"
27709  path="${complete%% *}"
27710  tmp="$complete EOL"
27711  arguments="${tmp#* }"
27712
27713  # Input might be given as Windows format, start by converting to
27714  # unix format.
27715  new_path="$path"
27716
27717  windows_path="$new_path"
27718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27719    unix_path=`$CYGPATH -u "$windows_path"`
27720    new_path="$unix_path"
27721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27723    new_path="$unix_path"
27724  fi
27725
27726
27727  # Now try to locate executable using which
27728  new_path=`$WHICH "$new_path" 2> /dev/null`
27729
27730  if test "x$new_path" = x; then
27731    # Oops. Which didn't find the executable.
27732    # The splitting of arguments from the executable at a space might have been incorrect,
27733    # since paths with space are more likely in Windows. Give it another try with the whole
27734    # argument.
27735    path="$complete"
27736    arguments="EOL"
27737    new_path="$path"
27738
27739  windows_path="$new_path"
27740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27741    unix_path=`$CYGPATH -u "$windows_path"`
27742    new_path="$unix_path"
27743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27745    new_path="$unix_path"
27746  fi
27747
27748
27749    new_path=`$WHICH "$new_path" 2> /dev/null`
27750
27751    if test "x$new_path" = x; then
27752      # It's still not found. Now this is an unrecoverable error.
27753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27754$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27755      has_space=`$ECHO "$complete" | $GREP " "`
27756      if test "x$has_space" != x; then
27757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27759      fi
27760      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27761    fi
27762  fi
27763
27764  # Now new_path has a complete unix path to the binary
27765  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27766    # Keep paths in /bin as-is, but remove trailing .exe if any
27767    new_path="${new_path/%.exe/}"
27768    # Do not save /bin paths to all_fixpath_prefixes!
27769  else
27770    # Not in mixed or Windows style, start by that.
27771    new_path=`cmd //c echo $new_path`
27772
27773  input_path="$new_path"
27774  # Check if we need to convert this using DOS-style short mode. If the path
27775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27776  # take no chances and rewrite it.
27777  # Note: m4 eats our [], so we need to use [ and ] instead.
27778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27779  if test "x$has_forbidden_chars" != x; then
27780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27782  fi
27783
27784    # Output is in $new_path
27785
27786  windows_path="$new_path"
27787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27788    unix_path=`$CYGPATH -u "$windows_path"`
27789    new_path="$unix_path"
27790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27792    new_path="$unix_path"
27793  fi
27794
27795    # remove trailing .exe if any
27796    new_path="${new_path/%.exe/}"
27797
27798    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27799    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27800  fi
27801
27802  else
27803    # We're on a posix platform. Hooray! :)
27804    # First separate the path from the arguments. This will split at the first
27805    # space.
27806    complete="$CC"
27807    path="${complete%% *}"
27808    tmp="$complete EOL"
27809    arguments="${tmp#* }"
27810
27811    # Cannot rely on the command "which" here since it doesn't always work.
27812    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27813    if test -z "$is_absolute_path"; then
27814      # Path to executable is not absolute. Find it.
27815      IFS_save="$IFS"
27816      IFS=:
27817      for p in $PATH; do
27818        if test -f "$p/$path" && test -x "$p/$path"; then
27819          new_path="$p/$path"
27820          break
27821        fi
27822      done
27823      IFS="$IFS_save"
27824    else
27825      # This is an absolute path, we can use it without further modifications.
27826      new_path="$path"
27827    fi
27828
27829    if test "x$new_path" = x; then
27830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27831$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27832      has_space=`$ECHO "$complete" | $GREP " "`
27833      if test "x$has_space" != x; then
27834        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27836      fi
27837      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27838    fi
27839  fi
27840
27841  # Now join together the path and the arguments once again
27842  if test "x$arguments" != xEOL; then
27843    new_complete="$new_path ${arguments% *}"
27844  else
27845    new_complete="$new_path"
27846  fi
27847
27848  if test "x$complete" != "x$new_complete"; then
27849    CC="$new_complete"
27850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27851$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27852  fi
27853
27854  TEST_COMPILER="$CC"
27855  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27856  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27857  if test "x$OPENJDK_BUILD_OS" != xaix; then
27858    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27860$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27861
27862  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27863    # Follow a chain of symbolic links. Use readlink
27864    # where it exists, else fall back to horribly
27865    # complicated shell code.
27866    if test "x$READLINK_TESTED" != yes; then
27867      # On MacOSX there is a readlink tool with a different
27868      # purpose than the GNU readlink tool. Check the found readlink.
27869      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27870      if test "x$ISGNU" = x; then
27871        # A readlink that we do not know how to use.
27872        # Are there other non-GNU readlinks out there?
27873        READLINK_TESTED=yes
27874        READLINK=
27875      fi
27876    fi
27877
27878    if test "x$READLINK" != x; then
27879      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27880    else
27881      # Save the current directory for restoring afterwards
27882      STARTDIR=$PWD
27883      COUNTER=0
27884      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27885      sym_link_file=`$BASENAME $TEST_COMPILER`
27886      cd $sym_link_dir
27887      # Use -P flag to resolve symlinks in directories.
27888      cd `$THEPWDCMD -P`
27889      sym_link_dir=`$THEPWDCMD -P`
27890      # Resolve file symlinks
27891      while test $COUNTER -lt 20; do
27892        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27893        if test "x$ISLINK" == x; then
27894          # This is not a symbolic link! We are done!
27895          break
27896        fi
27897        # Again resolve directory symlinks since the target of the just found
27898        # link could be in a different directory
27899        cd `$DIRNAME $ISLINK`
27900        sym_link_dir=`$THEPWDCMD -P`
27901        sym_link_file=`$BASENAME $ISLINK`
27902        let COUNTER=COUNTER+1
27903      done
27904      cd $STARTDIR
27905      TEST_COMPILER=$sym_link_dir/$sym_link_file
27906    fi
27907  fi
27908
27909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27910$as_echo "$TEST_COMPILER" >&6; }
27911  fi
27912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27913$as_echo_n "checking if CC is disguised ccache... " >&6; }
27914
27915  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27916  if test "x$COMPILER_BASENAME" = "xccache"; then
27917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27918$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27919    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27920    # We want to control ccache invocation ourselves, so ignore this cc and try
27921    # searching again.
27922
27923    # Remove the path to the fake ccache cc from the PATH
27924    RETRY_COMPILER_SAVED_PATH="$PATH"
27925    COMPILER_DIRNAME=`$DIRNAME $CC`
27926    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27927
27928    # Try again looking for our compiler
27929    if test -n "$ac_tool_prefix"; then
27930  for ac_prog in $TOOLCHAIN_CC_BINARY
27931  do
27932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27935$as_echo_n "checking for $ac_word... " >&6; }
27936if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27937  $as_echo_n "(cached) " >&6
27938else
27939  if test -n "$PROPER_COMPILER_CC"; then
27940  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27941else
27942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27943for as_dir in $PATH
27944do
27945  IFS=$as_save_IFS
27946  test -z "$as_dir" && as_dir=.
27947    for ac_exec_ext in '' $ac_executable_extensions; do
27948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27949    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27951    break 2
27952  fi
27953done
27954  done
27955IFS=$as_save_IFS
27956
27957fi
27958fi
27959PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27960if test -n "$PROPER_COMPILER_CC"; then
27961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27962$as_echo "$PROPER_COMPILER_CC" >&6; }
27963else
27964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27965$as_echo "no" >&6; }
27966fi
27967
27968
27969    test -n "$PROPER_COMPILER_CC" && break
27970  done
27971fi
27972if test -z "$PROPER_COMPILER_CC"; then
27973  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27974  for ac_prog in $TOOLCHAIN_CC_BINARY
27975do
27976  # Extract the first word of "$ac_prog", so it can be a program name with args.
27977set dummy $ac_prog; ac_word=$2
27978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27979$as_echo_n "checking for $ac_word... " >&6; }
27980if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27981  $as_echo_n "(cached) " >&6
27982else
27983  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27984  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27985else
27986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27987for as_dir in $PATH
27988do
27989  IFS=$as_save_IFS
27990  test -z "$as_dir" && as_dir=.
27991    for ac_exec_ext in '' $ac_executable_extensions; do
27992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27993    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27995    break 2
27996  fi
27997done
27998  done
27999IFS=$as_save_IFS
28000
28001fi
28002fi
28003ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28004if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28006$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28007else
28008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28009$as_echo "no" >&6; }
28010fi
28011
28012
28013  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28014done
28015
28016  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28017    PROPER_COMPILER_CC=""
28018  else
28019    case $cross_compiling:$ac_tool_warned in
28020yes:)
28021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28023ac_tool_warned=yes ;;
28024esac
28025    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28026  fi
28027fi
28028
28029
28030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28031
28032  # First separate the path from the arguments. This will split at the first
28033  # space.
28034  complete="$PROPER_COMPILER_CC"
28035  path="${complete%% *}"
28036  tmp="$complete EOL"
28037  arguments="${tmp#* }"
28038
28039  # Input might be given as Windows format, start by converting to
28040  # unix format.
28041  new_path=`$CYGPATH -u "$path"`
28042
28043  # Now try to locate executable using which
28044  new_path=`$WHICH "$new_path" 2> /dev/null`
28045  # bat and cmd files are not always considered executable in cygwin causing which
28046  # to not find them
28047  if test "x$new_path" = x \
28048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28050    new_path=`$CYGPATH -u "$path"`
28051  fi
28052  if test "x$new_path" = x; then
28053    # Oops. Which didn't find the executable.
28054    # The splitting of arguments from the executable at a space might have been incorrect,
28055    # since paths with space are more likely in Windows. Give it another try with the whole
28056    # argument.
28057    path="$complete"
28058    arguments="EOL"
28059    new_path=`$CYGPATH -u "$path"`
28060    new_path=`$WHICH "$new_path" 2> /dev/null`
28061    # bat and cmd files are not always considered executable in cygwin causing which
28062    # to not find them
28063    if test "x$new_path" = x \
28064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28066      new_path=`$CYGPATH -u "$path"`
28067    fi
28068    if test "x$new_path" = x; then
28069      # It's still not found. Now this is an unrecoverable error.
28070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28071$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28072      has_space=`$ECHO "$complete" | $GREP " "`
28073      if test "x$has_space" != x; then
28074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28076      fi
28077      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28078    fi
28079  fi
28080
28081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28084  # "foo.exe" is OK but "foo" is an error.
28085  #
28086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28087  # It is also a way to make sure we got the proper file name for the real test later on.
28088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28089  if test "x$test_shortpath" = x; then
28090    # Short path failed, file does not exist as specified.
28091    # Try adding .exe or .cmd
28092    if test -f "${new_path}.exe"; then
28093      input_to_shortpath="${new_path}.exe"
28094    elif test -f "${new_path}.cmd"; then
28095      input_to_shortpath="${new_path}.cmd"
28096    else
28097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28098$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28101      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28102    fi
28103  else
28104    input_to_shortpath="$new_path"
28105  fi
28106
28107  # Call helper function which possibly converts this using DOS-style short mode.
28108  # If so, the updated path is stored in $new_path.
28109  new_path="$input_to_shortpath"
28110
28111  input_path="$input_to_shortpath"
28112  # Check if we need to convert this using DOS-style short mode. If the path
28113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28114  # take no chances and rewrite it.
28115  # Note: m4 eats our [], so we need to use [ and ] instead.
28116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28117  if test "x$has_forbidden_chars" != x; then
28118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28122      # Going to short mode and back again did indeed matter. Since short mode is
28123      # case insensitive, let's make it lowercase to improve readability.
28124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28125      # Now convert it back to Unix-stile (cygpath)
28126      input_path=`$CYGPATH -u "$shortmode_path"`
28127      new_path="$input_path"
28128    fi
28129  fi
28130
28131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28132  if test "x$test_cygdrive_prefix" = x; then
28133    # As a simple fix, exclude /usr/bin since it's not a real path.
28134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28136      # a path prefixed by /cygdrive for fixpath to work.
28137      new_path="$CYGWIN_ROOT_PATH$input_path"
28138    fi
28139  fi
28140
28141  # remove trailing .exe if any
28142  new_path="${new_path/%.exe/}"
28143
28144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28145
28146  # First separate the path from the arguments. This will split at the first
28147  # space.
28148  complete="$PROPER_COMPILER_CC"
28149  path="${complete%% *}"
28150  tmp="$complete EOL"
28151  arguments="${tmp#* }"
28152
28153  # Input might be given as Windows format, start by converting to
28154  # unix format.
28155  new_path="$path"
28156
28157  windows_path="$new_path"
28158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28159    unix_path=`$CYGPATH -u "$windows_path"`
28160    new_path="$unix_path"
28161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28163    new_path="$unix_path"
28164  fi
28165
28166
28167  # Now try to locate executable using which
28168  new_path=`$WHICH "$new_path" 2> /dev/null`
28169
28170  if test "x$new_path" = x; then
28171    # Oops. Which didn't find the executable.
28172    # The splitting of arguments from the executable at a space might have been incorrect,
28173    # since paths with space are more likely in Windows. Give it another try with the whole
28174    # argument.
28175    path="$complete"
28176    arguments="EOL"
28177    new_path="$path"
28178
28179  windows_path="$new_path"
28180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181    unix_path=`$CYGPATH -u "$windows_path"`
28182    new_path="$unix_path"
28183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185    new_path="$unix_path"
28186  fi
28187
28188
28189    new_path=`$WHICH "$new_path" 2> /dev/null`
28190
28191    if test "x$new_path" = x; then
28192      # It's still not found. Now this is an unrecoverable error.
28193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28194$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28195      has_space=`$ECHO "$complete" | $GREP " "`
28196      if test "x$has_space" != x; then
28197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28199      fi
28200      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28201    fi
28202  fi
28203
28204  # Now new_path has a complete unix path to the binary
28205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28206    # Keep paths in /bin as-is, but remove trailing .exe if any
28207    new_path="${new_path/%.exe/}"
28208    # Do not save /bin paths to all_fixpath_prefixes!
28209  else
28210    # Not in mixed or Windows style, start by that.
28211    new_path=`cmd //c echo $new_path`
28212
28213  input_path="$new_path"
28214  # Check if we need to convert this using DOS-style short mode. If the path
28215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28216  # take no chances and rewrite it.
28217  # Note: m4 eats our [], so we need to use [ and ] instead.
28218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28219  if test "x$has_forbidden_chars" != x; then
28220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28222  fi
28223
28224    # Output is in $new_path
28225
28226  windows_path="$new_path"
28227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28228    unix_path=`$CYGPATH -u "$windows_path"`
28229    new_path="$unix_path"
28230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28232    new_path="$unix_path"
28233  fi
28234
28235    # remove trailing .exe if any
28236    new_path="${new_path/%.exe/}"
28237
28238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28240  fi
28241
28242  else
28243    # We're on a posix platform. Hooray! :)
28244    # First separate the path from the arguments. This will split at the first
28245    # space.
28246    complete="$PROPER_COMPILER_CC"
28247    path="${complete%% *}"
28248    tmp="$complete EOL"
28249    arguments="${tmp#* }"
28250
28251    # Cannot rely on the command "which" here since it doesn't always work.
28252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28253    if test -z "$is_absolute_path"; then
28254      # Path to executable is not absolute. Find it.
28255      IFS_save="$IFS"
28256      IFS=:
28257      for p in $PATH; do
28258        if test -f "$p/$path" && test -x "$p/$path"; then
28259          new_path="$p/$path"
28260          break
28261        fi
28262      done
28263      IFS="$IFS_save"
28264    else
28265      # This is an absolute path, we can use it without further modifications.
28266      new_path="$path"
28267    fi
28268
28269    if test "x$new_path" = x; then
28270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28271$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28272      has_space=`$ECHO "$complete" | $GREP " "`
28273      if test "x$has_space" != x; then
28274        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28276      fi
28277      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28278    fi
28279  fi
28280
28281  # Now join together the path and the arguments once again
28282  if test "x$arguments" != xEOL; then
28283    new_complete="$new_path ${arguments% *}"
28284  else
28285    new_complete="$new_path"
28286  fi
28287
28288  if test "x$complete" != "x$new_complete"; then
28289    PROPER_COMPILER_CC="$new_complete"
28290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28291$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28292  fi
28293
28294    PATH="$RETRY_COMPILER_SAVED_PATH"
28295
28296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28297$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28298
28299  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28300    # Follow a chain of symbolic links. Use readlink
28301    # where it exists, else fall back to horribly
28302    # complicated shell code.
28303    if test "x$READLINK_TESTED" != yes; then
28304      # On MacOSX there is a readlink tool with a different
28305      # purpose than the GNU readlink tool. Check the found readlink.
28306      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28307      if test "x$ISGNU" = x; then
28308        # A readlink that we do not know how to use.
28309        # Are there other non-GNU readlinks out there?
28310        READLINK_TESTED=yes
28311        READLINK=
28312      fi
28313    fi
28314
28315    if test "x$READLINK" != x; then
28316      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28317    else
28318      # Save the current directory for restoring afterwards
28319      STARTDIR=$PWD
28320      COUNTER=0
28321      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28322      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28323      cd $sym_link_dir
28324      # Use -P flag to resolve symlinks in directories.
28325      cd `$THEPWDCMD -P`
28326      sym_link_dir=`$THEPWDCMD -P`
28327      # Resolve file symlinks
28328      while test $COUNTER -lt 20; do
28329        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28330        if test "x$ISLINK" == x; then
28331          # This is not a symbolic link! We are done!
28332          break
28333        fi
28334        # Again resolve directory symlinks since the target of the just found
28335        # link could be in a different directory
28336        cd `$DIRNAME $ISLINK`
28337        sym_link_dir=`$THEPWDCMD -P`
28338        sym_link_file=`$BASENAME $ISLINK`
28339        let COUNTER=COUNTER+1
28340      done
28341      cd $STARTDIR
28342      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28343    fi
28344  fi
28345
28346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28347$as_echo "$PROPER_COMPILER_CC" >&6; }
28348    CC="$PROPER_COMPILER_CC"
28349  else
28350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28351$as_echo "no, keeping CC" >&6; }
28352  fi
28353
28354
28355  COMPILER=$CC
28356  COMPILER_NAME=$COMPILER_NAME
28357
28358  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28359    # cc -V output typically looks like
28360    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28361    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28362    # Check that this is likely to be the Solaris Studio cc.
28363    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28364    if test $? -ne 0; then
28365      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28366      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28367$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28368      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28369$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28370      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28371$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28372      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28373    fi
28374    # Remove usage instructions (if present), and
28375    # collapse compiler output into a single line
28376    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28377        $SED -e 's/ *[Uu]sage:.*//'`
28378    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28379        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28380  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28381    # xlc -qversion output typically looks like
28382    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28383    #     Version: 11.01.0000.0015
28384    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28385    # Check that this is likely to be the IBM XL C compiler.
28386    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28387    if test $? -ne 0; then
28388      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28389      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28392$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28393      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28394$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28395      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28396    fi
28397    # Collapse compiler output into a single line
28398    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28399    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28400        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28401  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28402    # There is no specific version flag, but all output starts with a version string.
28403    # First line typically looks something like:
28404    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28405    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28406    # Check that this is likely to be Microsoft CL.EXE.
28407    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28408    if test $? -ne 0; then
28409      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28410$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28412$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28413      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28414    fi
28415    # Collapse compiler output into a single line
28416    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28417    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28418        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28419  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28420    # gcc --version output typically looks like
28421    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28422    #     Copyright (C) 2013 Free Software Foundation, Inc.
28423    #     This is free software; see the source for copying conditions.  There is NO
28424    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28425    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28426    # Check that this is likely to be GCC.
28427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28428    if test $? -ne 0; then
28429      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28430$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28432$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28434    fi
28435    # Remove Copyright and legalese from version string, and
28436    # collapse into a single line
28437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28438        $SED -e 's/ *Copyright .*//'`
28439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28440        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28441  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28442    # clang --version output typically looks like
28443    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28444    #    clang version 3.3 (tags/RELEASE_33/final)
28445    # or
28446    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28447    #    Target: x86_64-pc-linux-gnu
28448    #    Thread model: posix
28449    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28450    # Check that this is likely to be clang
28451    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28452    if test $? -ne 0; then
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28454$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28455      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28456$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28457      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28458    fi
28459    # Collapse compiler output into a single line
28460    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28461    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28462        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28463  else
28464      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28465  fi
28466  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28467  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28468  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28469  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28470
28471  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28472$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28473
28474
28475  # Now that we have resolved CC ourself, let autoconf have its go at it
28476  ac_ext=c
28477ac_cpp='$CPP $CPPFLAGS'
28478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28480ac_compiler_gnu=$ac_cv_c_compiler_gnu
28481if test -n "$ac_tool_prefix"; then
28482  for ac_prog in $CC
28483  do
28484    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28485set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28487$as_echo_n "checking for $ac_word... " >&6; }
28488if ${ac_cv_prog_CC+:} false; then :
28489  $as_echo_n "(cached) " >&6
28490else
28491  if test -n "$CC"; then
28492  ac_cv_prog_CC="$CC" # Let the user override the test.
28493else
28494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28495for as_dir in $PATH
28496do
28497  IFS=$as_save_IFS
28498  test -z "$as_dir" && as_dir=.
28499    for ac_exec_ext in '' $ac_executable_extensions; do
28500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28501    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28503    break 2
28504  fi
28505done
28506  done
28507IFS=$as_save_IFS
28508
28509fi
28510fi
28511CC=$ac_cv_prog_CC
28512if test -n "$CC"; then
28513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28514$as_echo "$CC" >&6; }
28515else
28516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28517$as_echo "no" >&6; }
28518fi
28519
28520
28521    test -n "$CC" && break
28522  done
28523fi
28524if test -z "$CC"; then
28525  ac_ct_CC=$CC
28526  for ac_prog in $CC
28527do
28528  # Extract the first word of "$ac_prog", so it can be a program name with args.
28529set dummy $ac_prog; ac_word=$2
28530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28531$as_echo_n "checking for $ac_word... " >&6; }
28532if ${ac_cv_prog_ac_ct_CC+:} false; then :
28533  $as_echo_n "(cached) " >&6
28534else
28535  if test -n "$ac_ct_CC"; then
28536  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28537else
28538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28539for as_dir in $PATH
28540do
28541  IFS=$as_save_IFS
28542  test -z "$as_dir" && as_dir=.
28543    for ac_exec_ext in '' $ac_executable_extensions; do
28544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28545    ac_cv_prog_ac_ct_CC="$ac_prog"
28546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28547    break 2
28548  fi
28549done
28550  done
28551IFS=$as_save_IFS
28552
28553fi
28554fi
28555ac_ct_CC=$ac_cv_prog_ac_ct_CC
28556if test -n "$ac_ct_CC"; then
28557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28558$as_echo "$ac_ct_CC" >&6; }
28559else
28560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28561$as_echo "no" >&6; }
28562fi
28563
28564
28565  test -n "$ac_ct_CC" && break
28566done
28567
28568  if test "x$ac_ct_CC" = x; then
28569    CC=""
28570  else
28571    case $cross_compiling:$ac_tool_warned in
28572yes:)
28573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28575ac_tool_warned=yes ;;
28576esac
28577    CC=$ac_ct_CC
28578  fi
28579fi
28580
28581
28582test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28584as_fn_error $? "no acceptable C compiler found in \$PATH
28585See \`config.log' for more details" "$LINENO" 5; }
28586
28587# Provide some information about the compiler.
28588$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28589set X $ac_compile
28590ac_compiler=$2
28591for ac_option in --version -v -V -qversion; do
28592  { { ac_try="$ac_compiler $ac_option >&5"
28593case "(($ac_try" in
28594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28595  *) ac_try_echo=$ac_try;;
28596esac
28597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28598$as_echo "$ac_try_echo"; } >&5
28599  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28600  ac_status=$?
28601  if test -s conftest.err; then
28602    sed '10a\
28603... rest of stderr output deleted ...
28604         10q' conftest.err >conftest.er1
28605    cat conftest.er1 >&5
28606  fi
28607  rm -f conftest.er1 conftest.err
28608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28609  test $ac_status = 0; }
28610done
28611
28612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28613/* end confdefs.h.  */
28614
28615int
28616main ()
28617{
28618
28619  ;
28620  return 0;
28621}
28622_ACEOF
28623ac_clean_files_save=$ac_clean_files
28624ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28625# Try to create an executable without -o first, disregard a.out.
28626# It will help us diagnose broken compilers, and finding out an intuition
28627# of exeext.
28628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28629$as_echo_n "checking whether the C compiler works... " >&6; }
28630ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28631
28632# The possible output files:
28633ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28634
28635ac_rmfiles=
28636for ac_file in $ac_files
28637do
28638  case $ac_file in
28639    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28640    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28641  esac
28642done
28643rm -f $ac_rmfiles
28644
28645if { { ac_try="$ac_link_default"
28646case "(($ac_try" in
28647  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28648  *) ac_try_echo=$ac_try;;
28649esac
28650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28651$as_echo "$ac_try_echo"; } >&5
28652  (eval "$ac_link_default") 2>&5
28653  ac_status=$?
28654  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28655  test $ac_status = 0; }; then :
28656  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28657# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28658# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28659# so that the user can short-circuit this test for compilers unknown to
28660# Autoconf.
28661for ac_file in $ac_files ''
28662do
28663  test -f "$ac_file" || continue
28664  case $ac_file in
28665    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28666	;;
28667    [ab].out )
28668	# We found the default executable, but exeext='' is most
28669	# certainly right.
28670	break;;
28671    *.* )
28672	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28673	then :; else
28674	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28675	fi
28676	# We set ac_cv_exeext here because the later test for it is not
28677	# safe: cross compilers may not add the suffix if given an `-o'
28678	# argument, so we may need to know it at that point already.
28679	# Even if this section looks crufty: it has the advantage of
28680	# actually working.
28681	break;;
28682    * )
28683	break;;
28684  esac
28685done
28686test "$ac_cv_exeext" = no && ac_cv_exeext=
28687
28688else
28689  ac_file=''
28690fi
28691if test -z "$ac_file"; then :
28692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28693$as_echo "no" >&6; }
28694$as_echo "$as_me: failed program was:" >&5
28695sed 's/^/| /' conftest.$ac_ext >&5
28696
28697{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28699as_fn_error 77 "C compiler cannot create executables
28700See \`config.log' for more details" "$LINENO" 5; }
28701else
28702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28703$as_echo "yes" >&6; }
28704fi
28705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28706$as_echo_n "checking for C compiler default output file name... " >&6; }
28707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28708$as_echo "$ac_file" >&6; }
28709ac_exeext=$ac_cv_exeext
28710
28711rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28712ac_clean_files=$ac_clean_files_save
28713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28714$as_echo_n "checking for suffix of executables... " >&6; }
28715if { { ac_try="$ac_link"
28716case "(($ac_try" in
28717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28718  *) ac_try_echo=$ac_try;;
28719esac
28720eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28721$as_echo "$ac_try_echo"; } >&5
28722  (eval "$ac_link") 2>&5
28723  ac_status=$?
28724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28725  test $ac_status = 0; }; then :
28726  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28727# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28728# work properly (i.e., refer to `conftest.exe'), while it won't with
28729# `rm'.
28730for ac_file in conftest.exe conftest conftest.*; do
28731  test -f "$ac_file" || continue
28732  case $ac_file in
28733    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28734    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28735	  break;;
28736    * ) break;;
28737  esac
28738done
28739else
28740  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28742as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28743See \`config.log' for more details" "$LINENO" 5; }
28744fi
28745rm -f conftest conftest$ac_cv_exeext
28746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28747$as_echo "$ac_cv_exeext" >&6; }
28748
28749rm -f conftest.$ac_ext
28750EXEEXT=$ac_cv_exeext
28751ac_exeext=$EXEEXT
28752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28753/* end confdefs.h.  */
28754#include <stdio.h>
28755int
28756main ()
28757{
28758FILE *f = fopen ("conftest.out", "w");
28759 return ferror (f) || fclose (f) != 0;
28760
28761  ;
28762  return 0;
28763}
28764_ACEOF
28765ac_clean_files="$ac_clean_files conftest.out"
28766# Check that the compiler produces executables we can run.  If not, either
28767# the compiler is broken, or we cross compile.
28768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28769$as_echo_n "checking whether we are cross compiling... " >&6; }
28770if test "$cross_compiling" != yes; then
28771  { { ac_try="$ac_link"
28772case "(($ac_try" in
28773  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28774  *) ac_try_echo=$ac_try;;
28775esac
28776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28777$as_echo "$ac_try_echo"; } >&5
28778  (eval "$ac_link") 2>&5
28779  ac_status=$?
28780  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28781  test $ac_status = 0; }
28782  if { ac_try='./conftest$ac_cv_exeext'
28783  { { case "(($ac_try" in
28784  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28785  *) ac_try_echo=$ac_try;;
28786esac
28787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28788$as_echo "$ac_try_echo"; } >&5
28789  (eval "$ac_try") 2>&5
28790  ac_status=$?
28791  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28792  test $ac_status = 0; }; }; then
28793    cross_compiling=no
28794  else
28795    if test "$cross_compiling" = maybe; then
28796	cross_compiling=yes
28797    else
28798	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28800as_fn_error $? "cannot run C compiled programs.
28801If you meant to cross compile, use \`--host'.
28802See \`config.log' for more details" "$LINENO" 5; }
28803    fi
28804  fi
28805fi
28806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28807$as_echo "$cross_compiling" >&6; }
28808
28809rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28810ac_clean_files=$ac_clean_files_save
28811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28812$as_echo_n "checking for suffix of object files... " >&6; }
28813if ${ac_cv_objext+:} false; then :
28814  $as_echo_n "(cached) " >&6
28815else
28816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28817/* end confdefs.h.  */
28818
28819int
28820main ()
28821{
28822
28823  ;
28824  return 0;
28825}
28826_ACEOF
28827rm -f conftest.o conftest.obj
28828if { { ac_try="$ac_compile"
28829case "(($ac_try" in
28830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28831  *) ac_try_echo=$ac_try;;
28832esac
28833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28834$as_echo "$ac_try_echo"; } >&5
28835  (eval "$ac_compile") 2>&5
28836  ac_status=$?
28837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28838  test $ac_status = 0; }; then :
28839  for ac_file in conftest.o conftest.obj conftest.*; do
28840  test -f "$ac_file" || continue;
28841  case $ac_file in
28842    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28843    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28844       break;;
28845  esac
28846done
28847else
28848  $as_echo "$as_me: failed program was:" >&5
28849sed 's/^/| /' conftest.$ac_ext >&5
28850
28851{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28853as_fn_error $? "cannot compute suffix of object files: cannot compile
28854See \`config.log' for more details" "$LINENO" 5; }
28855fi
28856rm -f conftest.$ac_cv_objext conftest.$ac_ext
28857fi
28858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28859$as_echo "$ac_cv_objext" >&6; }
28860OBJEXT=$ac_cv_objext
28861ac_objext=$OBJEXT
28862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28863$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28864if ${ac_cv_c_compiler_gnu+:} false; then :
28865  $as_echo_n "(cached) " >&6
28866else
28867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28868/* end confdefs.h.  */
28869
28870int
28871main ()
28872{
28873#ifndef __GNUC__
28874       choke me
28875#endif
28876
28877  ;
28878  return 0;
28879}
28880_ACEOF
28881if ac_fn_c_try_compile "$LINENO"; then :
28882  ac_compiler_gnu=yes
28883else
28884  ac_compiler_gnu=no
28885fi
28886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28887ac_cv_c_compiler_gnu=$ac_compiler_gnu
28888
28889fi
28890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28891$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28892if test $ac_compiler_gnu = yes; then
28893  GCC=yes
28894else
28895  GCC=
28896fi
28897ac_test_CFLAGS=${CFLAGS+set}
28898ac_save_CFLAGS=$CFLAGS
28899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28900$as_echo_n "checking whether $CC accepts -g... " >&6; }
28901if ${ac_cv_prog_cc_g+:} false; then :
28902  $as_echo_n "(cached) " >&6
28903else
28904  ac_save_c_werror_flag=$ac_c_werror_flag
28905   ac_c_werror_flag=yes
28906   ac_cv_prog_cc_g=no
28907   CFLAGS="-g"
28908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28909/* end confdefs.h.  */
28910
28911int
28912main ()
28913{
28914
28915  ;
28916  return 0;
28917}
28918_ACEOF
28919if ac_fn_c_try_compile "$LINENO"; then :
28920  ac_cv_prog_cc_g=yes
28921else
28922  CFLAGS=""
28923      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28924/* end confdefs.h.  */
28925
28926int
28927main ()
28928{
28929
28930  ;
28931  return 0;
28932}
28933_ACEOF
28934if ac_fn_c_try_compile "$LINENO"; then :
28935
28936else
28937  ac_c_werror_flag=$ac_save_c_werror_flag
28938	 CFLAGS="-g"
28939	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28940/* end confdefs.h.  */
28941
28942int
28943main ()
28944{
28945
28946  ;
28947  return 0;
28948}
28949_ACEOF
28950if ac_fn_c_try_compile "$LINENO"; then :
28951  ac_cv_prog_cc_g=yes
28952fi
28953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28954fi
28955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28956fi
28957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28958   ac_c_werror_flag=$ac_save_c_werror_flag
28959fi
28960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28961$as_echo "$ac_cv_prog_cc_g" >&6; }
28962if test "$ac_test_CFLAGS" = set; then
28963  CFLAGS=$ac_save_CFLAGS
28964elif test $ac_cv_prog_cc_g = yes; then
28965  if test "$GCC" = yes; then
28966    CFLAGS="-g -O2"
28967  else
28968    CFLAGS="-g"
28969  fi
28970else
28971  if test "$GCC" = yes; then
28972    CFLAGS="-O2"
28973  else
28974    CFLAGS=
28975  fi
28976fi
28977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28978$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28979if ${ac_cv_prog_cc_c89+:} false; then :
28980  $as_echo_n "(cached) " >&6
28981else
28982  ac_cv_prog_cc_c89=no
28983ac_save_CC=$CC
28984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28985/* end confdefs.h.  */
28986#include <stdarg.h>
28987#include <stdio.h>
28988struct stat;
28989/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28990struct buf { int x; };
28991FILE * (*rcsopen) (struct buf *, struct stat *, int);
28992static char *e (p, i)
28993     char **p;
28994     int i;
28995{
28996  return p[i];
28997}
28998static char *f (char * (*g) (char **, int), char **p, ...)
28999{
29000  char *s;
29001  va_list v;
29002  va_start (v,p);
29003  s = g (p, va_arg (v,int));
29004  va_end (v);
29005  return s;
29006}
29007
29008/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29009   function prototypes and stuff, but not '\xHH' hex character constants.
29010   These don't provoke an error unfortunately, instead are silently treated
29011   as 'x'.  The following induces an error, until -std is added to get
29012   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29013   array size at least.  It's necessary to write '\x00'==0 to get something
29014   that's true only with -std.  */
29015int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29016
29017/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29018   inside strings and character constants.  */
29019#define FOO(x) 'x'
29020int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29021
29022int test (int i, double x);
29023struct s1 {int (*f) (int a);};
29024struct s2 {int (*f) (double a);};
29025int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29026int argc;
29027char **argv;
29028int
29029main ()
29030{
29031return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29032  ;
29033  return 0;
29034}
29035_ACEOF
29036for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29037	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29038do
29039  CC="$ac_save_CC $ac_arg"
29040  if ac_fn_c_try_compile "$LINENO"; then :
29041  ac_cv_prog_cc_c89=$ac_arg
29042fi
29043rm -f core conftest.err conftest.$ac_objext
29044  test "x$ac_cv_prog_cc_c89" != "xno" && break
29045done
29046rm -f conftest.$ac_ext
29047CC=$ac_save_CC
29048
29049fi
29050# AC_CACHE_VAL
29051case "x$ac_cv_prog_cc_c89" in
29052  x)
29053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29054$as_echo "none needed" >&6; } ;;
29055  xno)
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29057$as_echo "unsupported" >&6; } ;;
29058  *)
29059    CC="$CC $ac_cv_prog_cc_c89"
29060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29061$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29062esac
29063if test "x$ac_cv_prog_cc_c89" != xno; then :
29064
29065fi
29066
29067ac_ext=cpp
29068ac_cpp='$CXXCPP $CPPFLAGS'
29069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29072
29073
29074
29075  COMPILER_NAME=C++
29076  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29077
29078  if test "x$CXX" != x; then
29079    # User has supplied compiler name already, always let that override.
29080    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29081$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29082    if test "x`basename $CXX`" = "x$CXX"; then
29083      # A command without a complete path is provided, search $PATH.
29084
29085      for ac_prog in $CXX
29086do
29087  # Extract the first word of "$ac_prog", so it can be a program name with args.
29088set dummy $ac_prog; ac_word=$2
29089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29090$as_echo_n "checking for $ac_word... " >&6; }
29091if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29092  $as_echo_n "(cached) " >&6
29093else
29094  case $POTENTIAL_CXX in
29095  [\\/]* | ?:[\\/]*)
29096  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29097  ;;
29098  *)
29099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29100for as_dir in $PATH
29101do
29102  IFS=$as_save_IFS
29103  test -z "$as_dir" && as_dir=.
29104    for ac_exec_ext in '' $ac_executable_extensions; do
29105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29106    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29108    break 2
29109  fi
29110done
29111  done
29112IFS=$as_save_IFS
29113
29114  ;;
29115esac
29116fi
29117POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29118if test -n "$POTENTIAL_CXX"; then
29119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29120$as_echo "$POTENTIAL_CXX" >&6; }
29121else
29122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29123$as_echo "no" >&6; }
29124fi
29125
29126
29127  test -n "$POTENTIAL_CXX" && break
29128done
29129
29130      if test "x$POTENTIAL_CXX" != x; then
29131        CXX=$POTENTIAL_CXX
29132      else
29133        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29134      fi
29135    else
29136      # Otherwise it might already be a complete path
29137      if test ! -x "$CXX"; then
29138        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29139      fi
29140    fi
29141  else
29142    # No user supplied value. Locate compiler ourselves.
29143
29144    # If we are cross compiling, assume cross compilation tools follows the
29145    # cross compilation standard where they are prefixed with the autoconf
29146    # standard name for the target. For example the binary
29147    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29148    # If we are not cross compiling, then the default compiler name will be
29149    # used.
29150
29151    CXX=
29152    # If TOOLS_DIR is set, check for all compiler names in there first
29153    # before checking the rest of the PATH.
29154    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29155    # step, this should not be necessary.
29156    if test -n "$TOOLS_DIR"; then
29157      PATH_save="$PATH"
29158      PATH="$TOOLS_DIR"
29159      for ac_prog in $SEARCH_LIST
29160do
29161  # Extract the first word of "$ac_prog", so it can be a program name with args.
29162set dummy $ac_prog; ac_word=$2
29163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29164$as_echo_n "checking for $ac_word... " >&6; }
29165if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29166  $as_echo_n "(cached) " >&6
29167else
29168  case $TOOLS_DIR_CXX in
29169  [\\/]* | ?:[\\/]*)
29170  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29171  ;;
29172  *)
29173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29174for as_dir in $PATH
29175do
29176  IFS=$as_save_IFS
29177  test -z "$as_dir" && as_dir=.
29178    for ac_exec_ext in '' $ac_executable_extensions; do
29179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29180    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29182    break 2
29183  fi
29184done
29185  done
29186IFS=$as_save_IFS
29187
29188  ;;
29189esac
29190fi
29191TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29192if test -n "$TOOLS_DIR_CXX"; then
29193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29194$as_echo "$TOOLS_DIR_CXX" >&6; }
29195else
29196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29197$as_echo "no" >&6; }
29198fi
29199
29200
29201  test -n "$TOOLS_DIR_CXX" && break
29202done
29203
29204      CXX=$TOOLS_DIR_CXX
29205      PATH="$PATH_save"
29206    fi
29207
29208    # AC_PATH_PROGS can't be run multiple times with the same variable,
29209    # so create a new name for this run.
29210    if test "x$CXX" = x; then
29211      for ac_prog in $SEARCH_LIST
29212do
29213  # Extract the first word of "$ac_prog", so it can be a program name with args.
29214set dummy $ac_prog; ac_word=$2
29215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29216$as_echo_n "checking for $ac_word... " >&6; }
29217if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29218  $as_echo_n "(cached) " >&6
29219else
29220  case $POTENTIAL_CXX in
29221  [\\/]* | ?:[\\/]*)
29222  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29223  ;;
29224  *)
29225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29226for as_dir in $PATH
29227do
29228  IFS=$as_save_IFS
29229  test -z "$as_dir" && as_dir=.
29230    for ac_exec_ext in '' $ac_executable_extensions; do
29231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29232    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29234    break 2
29235  fi
29236done
29237  done
29238IFS=$as_save_IFS
29239
29240  ;;
29241esac
29242fi
29243POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29244if test -n "$POTENTIAL_CXX"; then
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29246$as_echo "$POTENTIAL_CXX" >&6; }
29247else
29248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29249$as_echo "no" >&6; }
29250fi
29251
29252
29253  test -n "$POTENTIAL_CXX" && break
29254done
29255
29256      CXX=$POTENTIAL_CXX
29257    fi
29258
29259    if test "x$CXX" = x; then
29260
29261  # Print a helpful message on how to acquire the necessary build dependency.
29262  # devkit is the help tag: freetype, cups, pulse, alsa etc
29263  MISSING_DEPENDENCY=devkit
29264
29265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29266    cygwin_help $MISSING_DEPENDENCY
29267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29268    msys_help $MISSING_DEPENDENCY
29269  else
29270    PKGHANDLER_COMMAND=
29271
29272    case $PKGHANDLER in
29273      apt-get)
29274        apt_help     $MISSING_DEPENDENCY ;;
29275      yum)
29276        yum_help     $MISSING_DEPENDENCY ;;
29277      port)
29278        port_help    $MISSING_DEPENDENCY ;;
29279      pkgutil)
29280        pkgutil_help $MISSING_DEPENDENCY ;;
29281      pkgadd)
29282        pkgadd_help  $MISSING_DEPENDENCY ;;
29283    esac
29284
29285    if test "x$PKGHANDLER_COMMAND" != x; then
29286      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29287    fi
29288  fi
29289
29290      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29291    fi
29292  fi
29293
29294  # Now we have a compiler binary in CXX. Make sure it's okay.
29295
29296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29297
29298  # First separate the path from the arguments. This will split at the first
29299  # space.
29300  complete="$CXX"
29301  path="${complete%% *}"
29302  tmp="$complete EOL"
29303  arguments="${tmp#* }"
29304
29305  # Input might be given as Windows format, start by converting to
29306  # unix format.
29307  new_path=`$CYGPATH -u "$path"`
29308
29309  # Now try to locate executable using which
29310  new_path=`$WHICH "$new_path" 2> /dev/null`
29311  # bat and cmd files are not always considered executable in cygwin causing which
29312  # to not find them
29313  if test "x$new_path" = x \
29314      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29315      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29316    new_path=`$CYGPATH -u "$path"`
29317  fi
29318  if test "x$new_path" = x; then
29319    # Oops. Which didn't find the executable.
29320    # The splitting of arguments from the executable at a space might have been incorrect,
29321    # since paths with space are more likely in Windows. Give it another try with the whole
29322    # argument.
29323    path="$complete"
29324    arguments="EOL"
29325    new_path=`$CYGPATH -u "$path"`
29326    new_path=`$WHICH "$new_path" 2> /dev/null`
29327    # bat and cmd files are not always considered executable in cygwin causing which
29328    # to not find them
29329    if test "x$new_path" = x \
29330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29332      new_path=`$CYGPATH -u "$path"`
29333    fi
29334    if test "x$new_path" = x; then
29335      # It's still not found. Now this is an unrecoverable error.
29336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29337$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29338      has_space=`$ECHO "$complete" | $GREP " "`
29339      if test "x$has_space" != x; then
29340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29342      fi
29343      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29344    fi
29345  fi
29346
29347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29350  # "foo.exe" is OK but "foo" is an error.
29351  #
29352  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29353  # It is also a way to make sure we got the proper file name for the real test later on.
29354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29355  if test "x$test_shortpath" = x; then
29356    # Short path failed, file does not exist as specified.
29357    # Try adding .exe or .cmd
29358    if test -f "${new_path}.exe"; then
29359      input_to_shortpath="${new_path}.exe"
29360    elif test -f "${new_path}.cmd"; then
29361      input_to_shortpath="${new_path}.cmd"
29362    else
29363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29364$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29367      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29368    fi
29369  else
29370    input_to_shortpath="$new_path"
29371  fi
29372
29373  # Call helper function which possibly converts this using DOS-style short mode.
29374  # If so, the updated path is stored in $new_path.
29375  new_path="$input_to_shortpath"
29376
29377  input_path="$input_to_shortpath"
29378  # Check if we need to convert this using DOS-style short mode. If the path
29379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29380  # take no chances and rewrite it.
29381  # Note: m4 eats our [], so we need to use [ and ] instead.
29382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29383  if test "x$has_forbidden_chars" != x; then
29384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29388      # Going to short mode and back again did indeed matter. Since short mode is
29389      # case insensitive, let's make it lowercase to improve readability.
29390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29391      # Now convert it back to Unix-stile (cygpath)
29392      input_path=`$CYGPATH -u "$shortmode_path"`
29393      new_path="$input_path"
29394    fi
29395  fi
29396
29397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29398  if test "x$test_cygdrive_prefix" = x; then
29399    # As a simple fix, exclude /usr/bin since it's not a real path.
29400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29402      # a path prefixed by /cygdrive for fixpath to work.
29403      new_path="$CYGWIN_ROOT_PATH$input_path"
29404    fi
29405  fi
29406
29407  # remove trailing .exe if any
29408  new_path="${new_path/%.exe/}"
29409
29410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29411
29412  # First separate the path from the arguments. This will split at the first
29413  # space.
29414  complete="$CXX"
29415  path="${complete%% *}"
29416  tmp="$complete EOL"
29417  arguments="${tmp#* }"
29418
29419  # Input might be given as Windows format, start by converting to
29420  # unix format.
29421  new_path="$path"
29422
29423  windows_path="$new_path"
29424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29425    unix_path=`$CYGPATH -u "$windows_path"`
29426    new_path="$unix_path"
29427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29429    new_path="$unix_path"
29430  fi
29431
29432
29433  # Now try to locate executable using which
29434  new_path=`$WHICH "$new_path" 2> /dev/null`
29435
29436  if test "x$new_path" = x; then
29437    # Oops. Which didn't find the executable.
29438    # The splitting of arguments from the executable at a space might have been incorrect,
29439    # since paths with space are more likely in Windows. Give it another try with the whole
29440    # argument.
29441    path="$complete"
29442    arguments="EOL"
29443    new_path="$path"
29444
29445  windows_path="$new_path"
29446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29447    unix_path=`$CYGPATH -u "$windows_path"`
29448    new_path="$unix_path"
29449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29451    new_path="$unix_path"
29452  fi
29453
29454
29455    new_path=`$WHICH "$new_path" 2> /dev/null`
29456
29457    if test "x$new_path" = x; then
29458      # It's still not found. Now this is an unrecoverable error.
29459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29460$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29461      has_space=`$ECHO "$complete" | $GREP " "`
29462      if test "x$has_space" != x; then
29463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29465      fi
29466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29467    fi
29468  fi
29469
29470  # Now new_path has a complete unix path to the binary
29471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29472    # Keep paths in /bin as-is, but remove trailing .exe if any
29473    new_path="${new_path/%.exe/}"
29474    # Do not save /bin paths to all_fixpath_prefixes!
29475  else
29476    # Not in mixed or Windows style, start by that.
29477    new_path=`cmd //c echo $new_path`
29478
29479  input_path="$new_path"
29480  # Check if we need to convert this using DOS-style short mode. If the path
29481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29482  # take no chances and rewrite it.
29483  # Note: m4 eats our [], so we need to use [ and ] instead.
29484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29485  if test "x$has_forbidden_chars" != x; then
29486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29488  fi
29489
29490    # Output is in $new_path
29491
29492  windows_path="$new_path"
29493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29494    unix_path=`$CYGPATH -u "$windows_path"`
29495    new_path="$unix_path"
29496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29498    new_path="$unix_path"
29499  fi
29500
29501    # remove trailing .exe if any
29502    new_path="${new_path/%.exe/}"
29503
29504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29506  fi
29507
29508  else
29509    # We're on a posix platform. Hooray! :)
29510    # First separate the path from the arguments. This will split at the first
29511    # space.
29512    complete="$CXX"
29513    path="${complete%% *}"
29514    tmp="$complete EOL"
29515    arguments="${tmp#* }"
29516
29517    # Cannot rely on the command "which" here since it doesn't always work.
29518    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29519    if test -z "$is_absolute_path"; then
29520      # Path to executable is not absolute. Find it.
29521      IFS_save="$IFS"
29522      IFS=:
29523      for p in $PATH; do
29524        if test -f "$p/$path" && test -x "$p/$path"; then
29525          new_path="$p/$path"
29526          break
29527        fi
29528      done
29529      IFS="$IFS_save"
29530    else
29531      # This is an absolute path, we can use it without further modifications.
29532      new_path="$path"
29533    fi
29534
29535    if test "x$new_path" = x; then
29536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29537$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29538      has_space=`$ECHO "$complete" | $GREP " "`
29539      if test "x$has_space" != x; then
29540        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29542      fi
29543      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29544    fi
29545  fi
29546
29547  # Now join together the path and the arguments once again
29548  if test "x$arguments" != xEOL; then
29549    new_complete="$new_path ${arguments% *}"
29550  else
29551    new_complete="$new_path"
29552  fi
29553
29554  if test "x$complete" != "x$new_complete"; then
29555    CXX="$new_complete"
29556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29557$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29558  fi
29559
29560  TEST_COMPILER="$CXX"
29561  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29562  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29563  if test "x$OPENJDK_BUILD_OS" != xaix; then
29564    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29566$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29567
29568  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29569    # Follow a chain of symbolic links. Use readlink
29570    # where it exists, else fall back to horribly
29571    # complicated shell code.
29572    if test "x$READLINK_TESTED" != yes; then
29573      # On MacOSX there is a readlink tool with a different
29574      # purpose than the GNU readlink tool. Check the found readlink.
29575      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29576      if test "x$ISGNU" = x; then
29577        # A readlink that we do not know how to use.
29578        # Are there other non-GNU readlinks out there?
29579        READLINK_TESTED=yes
29580        READLINK=
29581      fi
29582    fi
29583
29584    if test "x$READLINK" != x; then
29585      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29586    else
29587      # Save the current directory for restoring afterwards
29588      STARTDIR=$PWD
29589      COUNTER=0
29590      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29591      sym_link_file=`$BASENAME $TEST_COMPILER`
29592      cd $sym_link_dir
29593      # Use -P flag to resolve symlinks in directories.
29594      cd `$THEPWDCMD -P`
29595      sym_link_dir=`$THEPWDCMD -P`
29596      # Resolve file symlinks
29597      while test $COUNTER -lt 20; do
29598        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29599        if test "x$ISLINK" == x; then
29600          # This is not a symbolic link! We are done!
29601          break
29602        fi
29603        # Again resolve directory symlinks since the target of the just found
29604        # link could be in a different directory
29605        cd `$DIRNAME $ISLINK`
29606        sym_link_dir=`$THEPWDCMD -P`
29607        sym_link_file=`$BASENAME $ISLINK`
29608        let COUNTER=COUNTER+1
29609      done
29610      cd $STARTDIR
29611      TEST_COMPILER=$sym_link_dir/$sym_link_file
29612    fi
29613  fi
29614
29615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29616$as_echo "$TEST_COMPILER" >&6; }
29617  fi
29618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29619$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29620
29621  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29622  if test "x$COMPILER_BASENAME" = "xccache"; then
29623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29624$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29625    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29626    # We want to control ccache invocation ourselves, so ignore this cc and try
29627    # searching again.
29628
29629    # Remove the path to the fake ccache cc from the PATH
29630    RETRY_COMPILER_SAVED_PATH="$PATH"
29631    COMPILER_DIRNAME=`$DIRNAME $CXX`
29632    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29633
29634    # Try again looking for our compiler
29635    if test -n "$ac_tool_prefix"; then
29636  for ac_prog in $TOOLCHAIN_CXX_BINARY
29637  do
29638    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29639set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29641$as_echo_n "checking for $ac_word... " >&6; }
29642if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29643  $as_echo_n "(cached) " >&6
29644else
29645  if test -n "$PROPER_COMPILER_CXX"; then
29646  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29647else
29648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29649for as_dir in $PATH
29650do
29651  IFS=$as_save_IFS
29652  test -z "$as_dir" && as_dir=.
29653    for ac_exec_ext in '' $ac_executable_extensions; do
29654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29655    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29657    break 2
29658  fi
29659done
29660  done
29661IFS=$as_save_IFS
29662
29663fi
29664fi
29665PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29666if test -n "$PROPER_COMPILER_CXX"; then
29667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29668$as_echo "$PROPER_COMPILER_CXX" >&6; }
29669else
29670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29671$as_echo "no" >&6; }
29672fi
29673
29674
29675    test -n "$PROPER_COMPILER_CXX" && break
29676  done
29677fi
29678if test -z "$PROPER_COMPILER_CXX"; then
29679  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29680  for ac_prog in $TOOLCHAIN_CXX_BINARY
29681do
29682  # Extract the first word of "$ac_prog", so it can be a program name with args.
29683set dummy $ac_prog; ac_word=$2
29684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29685$as_echo_n "checking for $ac_word... " >&6; }
29686if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29687  $as_echo_n "(cached) " >&6
29688else
29689  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29690  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29691else
29692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29693for as_dir in $PATH
29694do
29695  IFS=$as_save_IFS
29696  test -z "$as_dir" && as_dir=.
29697    for ac_exec_ext in '' $ac_executable_extensions; do
29698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29699    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29701    break 2
29702  fi
29703done
29704  done
29705IFS=$as_save_IFS
29706
29707fi
29708fi
29709ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29710if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29712$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29713else
29714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29715$as_echo "no" >&6; }
29716fi
29717
29718
29719  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29720done
29721
29722  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29723    PROPER_COMPILER_CXX=""
29724  else
29725    case $cross_compiling:$ac_tool_warned in
29726yes:)
29727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29729ac_tool_warned=yes ;;
29730esac
29731    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29732  fi
29733fi
29734
29735
29736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29737
29738  # First separate the path from the arguments. This will split at the first
29739  # space.
29740  complete="$PROPER_COMPILER_CXX"
29741  path="${complete%% *}"
29742  tmp="$complete EOL"
29743  arguments="${tmp#* }"
29744
29745  # Input might be given as Windows format, start by converting to
29746  # unix format.
29747  new_path=`$CYGPATH -u "$path"`
29748
29749  # Now try to locate executable using which
29750  new_path=`$WHICH "$new_path" 2> /dev/null`
29751  # bat and cmd files are not always considered executable in cygwin causing which
29752  # to not find them
29753  if test "x$new_path" = x \
29754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29756    new_path=`$CYGPATH -u "$path"`
29757  fi
29758  if test "x$new_path" = x; then
29759    # Oops. Which didn't find the executable.
29760    # The splitting of arguments from the executable at a space might have been incorrect,
29761    # since paths with space are more likely in Windows. Give it another try with the whole
29762    # argument.
29763    path="$complete"
29764    arguments="EOL"
29765    new_path=`$CYGPATH -u "$path"`
29766    new_path=`$WHICH "$new_path" 2> /dev/null`
29767    # bat and cmd files are not always considered executable in cygwin causing which
29768    # to not find them
29769    if test "x$new_path" = x \
29770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29772      new_path=`$CYGPATH -u "$path"`
29773    fi
29774    if test "x$new_path" = x; then
29775      # It's still not found. Now this is an unrecoverable error.
29776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29777$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29778      has_space=`$ECHO "$complete" | $GREP " "`
29779      if test "x$has_space" != x; then
29780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29782      fi
29783      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29784    fi
29785  fi
29786
29787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29790  # "foo.exe" is OK but "foo" is an error.
29791  #
29792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29793  # It is also a way to make sure we got the proper file name for the real test later on.
29794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29795  if test "x$test_shortpath" = x; then
29796    # Short path failed, file does not exist as specified.
29797    # Try adding .exe or .cmd
29798    if test -f "${new_path}.exe"; then
29799      input_to_shortpath="${new_path}.exe"
29800    elif test -f "${new_path}.cmd"; then
29801      input_to_shortpath="${new_path}.cmd"
29802    else
29803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29804$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29807      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29808    fi
29809  else
29810    input_to_shortpath="$new_path"
29811  fi
29812
29813  # Call helper function which possibly converts this using DOS-style short mode.
29814  # If so, the updated path is stored in $new_path.
29815  new_path="$input_to_shortpath"
29816
29817  input_path="$input_to_shortpath"
29818  # Check if we need to convert this using DOS-style short mode. If the path
29819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29820  # take no chances and rewrite it.
29821  # Note: m4 eats our [], so we need to use [ and ] instead.
29822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29823  if test "x$has_forbidden_chars" != x; then
29824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29828      # Going to short mode and back again did indeed matter. Since short mode is
29829      # case insensitive, let's make it lowercase to improve readability.
29830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29831      # Now convert it back to Unix-stile (cygpath)
29832      input_path=`$CYGPATH -u "$shortmode_path"`
29833      new_path="$input_path"
29834    fi
29835  fi
29836
29837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29838  if test "x$test_cygdrive_prefix" = x; then
29839    # As a simple fix, exclude /usr/bin since it's not a real path.
29840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29842      # a path prefixed by /cygdrive for fixpath to work.
29843      new_path="$CYGWIN_ROOT_PATH$input_path"
29844    fi
29845  fi
29846
29847  # remove trailing .exe if any
29848  new_path="${new_path/%.exe/}"
29849
29850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29851
29852  # First separate the path from the arguments. This will split at the first
29853  # space.
29854  complete="$PROPER_COMPILER_CXX"
29855  path="${complete%% *}"
29856  tmp="$complete EOL"
29857  arguments="${tmp#* }"
29858
29859  # Input might be given as Windows format, start by converting to
29860  # unix format.
29861  new_path="$path"
29862
29863  windows_path="$new_path"
29864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29865    unix_path=`$CYGPATH -u "$windows_path"`
29866    new_path="$unix_path"
29867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29869    new_path="$unix_path"
29870  fi
29871
29872
29873  # Now try to locate executable using which
29874  new_path=`$WHICH "$new_path" 2> /dev/null`
29875
29876  if test "x$new_path" = x; then
29877    # Oops. Which didn't find the executable.
29878    # The splitting of arguments from the executable at a space might have been incorrect,
29879    # since paths with space are more likely in Windows. Give it another try with the whole
29880    # argument.
29881    path="$complete"
29882    arguments="EOL"
29883    new_path="$path"
29884
29885  windows_path="$new_path"
29886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29887    unix_path=`$CYGPATH -u "$windows_path"`
29888    new_path="$unix_path"
29889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29891    new_path="$unix_path"
29892  fi
29893
29894
29895    new_path=`$WHICH "$new_path" 2> /dev/null`
29896
29897    if test "x$new_path" = x; then
29898      # It's still not found. Now this is an unrecoverable error.
29899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29900$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29901      has_space=`$ECHO "$complete" | $GREP " "`
29902      if test "x$has_space" != x; then
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29905      fi
29906      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29907    fi
29908  fi
29909
29910  # Now new_path has a complete unix path to the binary
29911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29912    # Keep paths in /bin as-is, but remove trailing .exe if any
29913    new_path="${new_path/%.exe/}"
29914    # Do not save /bin paths to all_fixpath_prefixes!
29915  else
29916    # Not in mixed or Windows style, start by that.
29917    new_path=`cmd //c echo $new_path`
29918
29919  input_path="$new_path"
29920  # Check if we need to convert this using DOS-style short mode. If the path
29921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29922  # take no chances and rewrite it.
29923  # Note: m4 eats our [], so we need to use [ and ] instead.
29924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29925  if test "x$has_forbidden_chars" != x; then
29926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29928  fi
29929
29930    # Output is in $new_path
29931
29932  windows_path="$new_path"
29933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29934    unix_path=`$CYGPATH -u "$windows_path"`
29935    new_path="$unix_path"
29936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29938    new_path="$unix_path"
29939  fi
29940
29941    # remove trailing .exe if any
29942    new_path="${new_path/%.exe/}"
29943
29944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29946  fi
29947
29948  else
29949    # We're on a posix platform. Hooray! :)
29950    # First separate the path from the arguments. This will split at the first
29951    # space.
29952    complete="$PROPER_COMPILER_CXX"
29953    path="${complete%% *}"
29954    tmp="$complete EOL"
29955    arguments="${tmp#* }"
29956
29957    # Cannot rely on the command "which" here since it doesn't always work.
29958    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29959    if test -z "$is_absolute_path"; then
29960      # Path to executable is not absolute. Find it.
29961      IFS_save="$IFS"
29962      IFS=:
29963      for p in $PATH; do
29964        if test -f "$p/$path" && test -x "$p/$path"; then
29965          new_path="$p/$path"
29966          break
29967        fi
29968      done
29969      IFS="$IFS_save"
29970    else
29971      # This is an absolute path, we can use it without further modifications.
29972      new_path="$path"
29973    fi
29974
29975    if test "x$new_path" = x; then
29976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29977$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29978      has_space=`$ECHO "$complete" | $GREP " "`
29979      if test "x$has_space" != x; then
29980        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29982      fi
29983      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29984    fi
29985  fi
29986
29987  # Now join together the path and the arguments once again
29988  if test "x$arguments" != xEOL; then
29989    new_complete="$new_path ${arguments% *}"
29990  else
29991    new_complete="$new_path"
29992  fi
29993
29994  if test "x$complete" != "x$new_complete"; then
29995    PROPER_COMPILER_CXX="$new_complete"
29996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29997$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29998  fi
29999
30000    PATH="$RETRY_COMPILER_SAVED_PATH"
30001
30002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30003$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30004
30005  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30006    # Follow a chain of symbolic links. Use readlink
30007    # where it exists, else fall back to horribly
30008    # complicated shell code.
30009    if test "x$READLINK_TESTED" != yes; then
30010      # On MacOSX there is a readlink tool with a different
30011      # purpose than the GNU readlink tool. Check the found readlink.
30012      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30013      if test "x$ISGNU" = x; then
30014        # A readlink that we do not know how to use.
30015        # Are there other non-GNU readlinks out there?
30016        READLINK_TESTED=yes
30017        READLINK=
30018      fi
30019    fi
30020
30021    if test "x$READLINK" != x; then
30022      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30023    else
30024      # Save the current directory for restoring afterwards
30025      STARTDIR=$PWD
30026      COUNTER=0
30027      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30028      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30029      cd $sym_link_dir
30030      # Use -P flag to resolve symlinks in directories.
30031      cd `$THEPWDCMD -P`
30032      sym_link_dir=`$THEPWDCMD -P`
30033      # Resolve file symlinks
30034      while test $COUNTER -lt 20; do
30035        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30036        if test "x$ISLINK" == x; then
30037          # This is not a symbolic link! We are done!
30038          break
30039        fi
30040        # Again resolve directory symlinks since the target of the just found
30041        # link could be in a different directory
30042        cd `$DIRNAME $ISLINK`
30043        sym_link_dir=`$THEPWDCMD -P`
30044        sym_link_file=`$BASENAME $ISLINK`
30045        let COUNTER=COUNTER+1
30046      done
30047      cd $STARTDIR
30048      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30049    fi
30050  fi
30051
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30053$as_echo "$PROPER_COMPILER_CXX" >&6; }
30054    CXX="$PROPER_COMPILER_CXX"
30055  else
30056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30057$as_echo "no, keeping CXX" >&6; }
30058  fi
30059
30060
30061  COMPILER=$CXX
30062  COMPILER_NAME=$COMPILER_NAME
30063
30064  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30065    # cc -V output typically looks like
30066    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30067    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30068    # Check that this is likely to be the Solaris Studio cc.
30069    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30070    if test $? -ne 0; then
30071      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30072      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30073$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30074      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30075$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30077$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30078      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30079    fi
30080    # Remove usage instructions (if present), and
30081    # collapse compiler output into a single line
30082    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30083        $SED -e 's/ *[Uu]sage:.*//'`
30084    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30085        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30086  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30087    # xlc -qversion output typically looks like
30088    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30089    #     Version: 11.01.0000.0015
30090    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30091    # Check that this is likely to be the IBM XL C compiler.
30092    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30093    if test $? -ne 0; then
30094      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30095      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30096$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30097      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30098$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30099      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30100$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30101      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30102    fi
30103    # Collapse compiler output into a single line
30104    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30105    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30106        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30107  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30108    # There is no specific version flag, but all output starts with a version string.
30109    # First line typically looks something like:
30110    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30111    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30112    # Check that this is likely to be Microsoft CL.EXE.
30113    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30114    if test $? -ne 0; then
30115      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30116$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30118$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30119      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30120    fi
30121    # Collapse compiler output into a single line
30122    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30123    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30124        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30125  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30126    # gcc --version output typically looks like
30127    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30128    #     Copyright (C) 2013 Free Software Foundation, Inc.
30129    #     This is free software; see the source for copying conditions.  There is NO
30130    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30131    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30132    # Check that this is likely to be GCC.
30133    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30134    if test $? -ne 0; then
30135      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30138$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30140    fi
30141    # Remove Copyright and legalese from version string, and
30142    # collapse into a single line
30143    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30144        $SED -e 's/ *Copyright .*//'`
30145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30146        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30147  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30148    # clang --version output typically looks like
30149    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30150    #    clang version 3.3 (tags/RELEASE_33/final)
30151    # or
30152    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30153    #    Target: x86_64-pc-linux-gnu
30154    #    Thread model: posix
30155    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30156    # Check that this is likely to be clang
30157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30158    if test $? -ne 0; then
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30162$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30164    fi
30165    # Collapse compiler output into a single line
30166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30168        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30169  else
30170      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30171  fi
30172  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30173  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30174  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30175  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30176
30177  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30178$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30179
30180
30181  # Now that we have resolved CXX ourself, let autoconf have its go at it
30182  ac_ext=cpp
30183ac_cpp='$CXXCPP $CPPFLAGS'
30184ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30185ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30186ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30187if test -z "$CXX"; then
30188  if test -n "$CCC"; then
30189    CXX=$CCC
30190  else
30191    if test -n "$ac_tool_prefix"; then
30192  for ac_prog in $CXX
30193  do
30194    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30197$as_echo_n "checking for $ac_word... " >&6; }
30198if ${ac_cv_prog_CXX+:} false; then :
30199  $as_echo_n "(cached) " >&6
30200else
30201  if test -n "$CXX"; then
30202  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30203else
30204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30205for as_dir in $PATH
30206do
30207  IFS=$as_save_IFS
30208  test -z "$as_dir" && as_dir=.
30209    for ac_exec_ext in '' $ac_executable_extensions; do
30210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30211    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30213    break 2
30214  fi
30215done
30216  done
30217IFS=$as_save_IFS
30218
30219fi
30220fi
30221CXX=$ac_cv_prog_CXX
30222if test -n "$CXX"; then
30223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30224$as_echo "$CXX" >&6; }
30225else
30226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30227$as_echo "no" >&6; }
30228fi
30229
30230
30231    test -n "$CXX" && break
30232  done
30233fi
30234if test -z "$CXX"; then
30235  ac_ct_CXX=$CXX
30236  for ac_prog in $CXX
30237do
30238  # Extract the first word of "$ac_prog", so it can be a program name with args.
30239set dummy $ac_prog; ac_word=$2
30240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30241$as_echo_n "checking for $ac_word... " >&6; }
30242if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30243  $as_echo_n "(cached) " >&6
30244else
30245  if test -n "$ac_ct_CXX"; then
30246  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30247else
30248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30249for as_dir in $PATH
30250do
30251  IFS=$as_save_IFS
30252  test -z "$as_dir" && as_dir=.
30253    for ac_exec_ext in '' $ac_executable_extensions; do
30254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30255    ac_cv_prog_ac_ct_CXX="$ac_prog"
30256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30257    break 2
30258  fi
30259done
30260  done
30261IFS=$as_save_IFS
30262
30263fi
30264fi
30265ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30266if test -n "$ac_ct_CXX"; then
30267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30268$as_echo "$ac_ct_CXX" >&6; }
30269else
30270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30271$as_echo "no" >&6; }
30272fi
30273
30274
30275  test -n "$ac_ct_CXX" && break
30276done
30277
30278  if test "x$ac_ct_CXX" = x; then
30279    CXX="g++"
30280  else
30281    case $cross_compiling:$ac_tool_warned in
30282yes:)
30283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30285ac_tool_warned=yes ;;
30286esac
30287    CXX=$ac_ct_CXX
30288  fi
30289fi
30290
30291  fi
30292fi
30293# Provide some information about the compiler.
30294$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30295set X $ac_compile
30296ac_compiler=$2
30297for ac_option in --version -v -V -qversion; do
30298  { { ac_try="$ac_compiler $ac_option >&5"
30299case "(($ac_try" in
30300  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30301  *) ac_try_echo=$ac_try;;
30302esac
30303eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30304$as_echo "$ac_try_echo"; } >&5
30305  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30306  ac_status=$?
30307  if test -s conftest.err; then
30308    sed '10a\
30309... rest of stderr output deleted ...
30310         10q' conftest.err >conftest.er1
30311    cat conftest.er1 >&5
30312  fi
30313  rm -f conftest.er1 conftest.err
30314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30315  test $ac_status = 0; }
30316done
30317
30318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30319$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30320if ${ac_cv_cxx_compiler_gnu+:} false; then :
30321  $as_echo_n "(cached) " >&6
30322else
30323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30324/* end confdefs.h.  */
30325
30326int
30327main ()
30328{
30329#ifndef __GNUC__
30330       choke me
30331#endif
30332
30333  ;
30334  return 0;
30335}
30336_ACEOF
30337if ac_fn_cxx_try_compile "$LINENO"; then :
30338  ac_compiler_gnu=yes
30339else
30340  ac_compiler_gnu=no
30341fi
30342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30343ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30344
30345fi
30346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30347$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30348if test $ac_compiler_gnu = yes; then
30349  GXX=yes
30350else
30351  GXX=
30352fi
30353ac_test_CXXFLAGS=${CXXFLAGS+set}
30354ac_save_CXXFLAGS=$CXXFLAGS
30355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30356$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30357if ${ac_cv_prog_cxx_g+:} false; then :
30358  $as_echo_n "(cached) " >&6
30359else
30360  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30361   ac_cxx_werror_flag=yes
30362   ac_cv_prog_cxx_g=no
30363   CXXFLAGS="-g"
30364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30365/* end confdefs.h.  */
30366
30367int
30368main ()
30369{
30370
30371  ;
30372  return 0;
30373}
30374_ACEOF
30375if ac_fn_cxx_try_compile "$LINENO"; then :
30376  ac_cv_prog_cxx_g=yes
30377else
30378  CXXFLAGS=""
30379      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30380/* end confdefs.h.  */
30381
30382int
30383main ()
30384{
30385
30386  ;
30387  return 0;
30388}
30389_ACEOF
30390if ac_fn_cxx_try_compile "$LINENO"; then :
30391
30392else
30393  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30394	 CXXFLAGS="-g"
30395	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396/* end confdefs.h.  */
30397
30398int
30399main ()
30400{
30401
30402  ;
30403  return 0;
30404}
30405_ACEOF
30406if ac_fn_cxx_try_compile "$LINENO"; then :
30407  ac_cv_prog_cxx_g=yes
30408fi
30409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30410fi
30411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30412fi
30413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30414   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30415fi
30416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30417$as_echo "$ac_cv_prog_cxx_g" >&6; }
30418if test "$ac_test_CXXFLAGS" = set; then
30419  CXXFLAGS=$ac_save_CXXFLAGS
30420elif test $ac_cv_prog_cxx_g = yes; then
30421  if test "$GXX" = yes; then
30422    CXXFLAGS="-g -O2"
30423  else
30424    CXXFLAGS="-g"
30425  fi
30426else
30427  if test "$GXX" = yes; then
30428    CXXFLAGS="-O2"
30429  else
30430    CXXFLAGS=
30431  fi
30432fi
30433ac_ext=cpp
30434ac_cpp='$CXXCPP $CPPFLAGS'
30435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30438
30439
30440  #
30441  # Setup the preprocessor (CPP and CXXCPP)
30442  #
30443  ac_ext=c
30444ac_cpp='$CPP $CPPFLAGS'
30445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30447ac_compiler_gnu=$ac_cv_c_compiler_gnu
30448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30449$as_echo_n "checking how to run the C preprocessor... " >&6; }
30450# On Suns, sometimes $CPP names a directory.
30451if test -n "$CPP" && test -d "$CPP"; then
30452  CPP=
30453fi
30454if test -z "$CPP"; then
30455  if ${ac_cv_prog_CPP+:} false; then :
30456  $as_echo_n "(cached) " >&6
30457else
30458      # Double quotes because CPP needs to be expanded
30459    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30460    do
30461      ac_preproc_ok=false
30462for ac_c_preproc_warn_flag in '' yes
30463do
30464  # Use a header file that comes with gcc, so configuring glibc
30465  # with a fresh cross-compiler works.
30466  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30467  # <limits.h> exists even on freestanding compilers.
30468  # On the NeXT, cc -E runs the code through the compiler's parser,
30469  # not just through cpp. "Syntax error" is here to catch this case.
30470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30471/* end confdefs.h.  */
30472#ifdef __STDC__
30473# include <limits.h>
30474#else
30475# include <assert.h>
30476#endif
30477		     Syntax error
30478_ACEOF
30479if ac_fn_c_try_cpp "$LINENO"; then :
30480
30481else
30482  # Broken: fails on valid input.
30483continue
30484fi
30485rm -f conftest.err conftest.i conftest.$ac_ext
30486
30487  # OK, works on sane cases.  Now check whether nonexistent headers
30488  # can be detected and how.
30489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30490/* end confdefs.h.  */
30491#include <ac_nonexistent.h>
30492_ACEOF
30493if ac_fn_c_try_cpp "$LINENO"; then :
30494  # Broken: success on invalid input.
30495continue
30496else
30497  # Passes both tests.
30498ac_preproc_ok=:
30499break
30500fi
30501rm -f conftest.err conftest.i conftest.$ac_ext
30502
30503done
30504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30505rm -f conftest.i conftest.err conftest.$ac_ext
30506if $ac_preproc_ok; then :
30507  break
30508fi
30509
30510    done
30511    ac_cv_prog_CPP=$CPP
30512
30513fi
30514  CPP=$ac_cv_prog_CPP
30515else
30516  ac_cv_prog_CPP=$CPP
30517fi
30518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30519$as_echo "$CPP" >&6; }
30520ac_preproc_ok=false
30521for ac_c_preproc_warn_flag in '' yes
30522do
30523  # Use a header file that comes with gcc, so configuring glibc
30524  # with a fresh cross-compiler works.
30525  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30526  # <limits.h> exists even on freestanding compilers.
30527  # On the NeXT, cc -E runs the code through the compiler's parser,
30528  # not just through cpp. "Syntax error" is here to catch this case.
30529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30530/* end confdefs.h.  */
30531#ifdef __STDC__
30532# include <limits.h>
30533#else
30534# include <assert.h>
30535#endif
30536		     Syntax error
30537_ACEOF
30538if ac_fn_c_try_cpp "$LINENO"; then :
30539
30540else
30541  # Broken: fails on valid input.
30542continue
30543fi
30544rm -f conftest.err conftest.i conftest.$ac_ext
30545
30546  # OK, works on sane cases.  Now check whether nonexistent headers
30547  # can be detected and how.
30548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549/* end confdefs.h.  */
30550#include <ac_nonexistent.h>
30551_ACEOF
30552if ac_fn_c_try_cpp "$LINENO"; then :
30553  # Broken: success on invalid input.
30554continue
30555else
30556  # Passes both tests.
30557ac_preproc_ok=:
30558break
30559fi
30560rm -f conftest.err conftest.i conftest.$ac_ext
30561
30562done
30563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30564rm -f conftest.i conftest.err conftest.$ac_ext
30565if $ac_preproc_ok; then :
30566
30567else
30568  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30570as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30571See \`config.log' for more details" "$LINENO" 5; }
30572fi
30573
30574ac_ext=cpp
30575ac_cpp='$CXXCPP $CPPFLAGS'
30576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30579
30580
30581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30582
30583  # First separate the path from the arguments. This will split at the first
30584  # space.
30585  complete="$CPP"
30586  path="${complete%% *}"
30587  tmp="$complete EOL"
30588  arguments="${tmp#* }"
30589
30590  # Input might be given as Windows format, start by converting to
30591  # unix format.
30592  new_path=`$CYGPATH -u "$path"`
30593
30594  # Now try to locate executable using which
30595  new_path=`$WHICH "$new_path" 2> /dev/null`
30596  # bat and cmd files are not always considered executable in cygwin causing which
30597  # to not find them
30598  if test "x$new_path" = x \
30599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30601    new_path=`$CYGPATH -u "$path"`
30602  fi
30603  if test "x$new_path" = x; then
30604    # Oops. Which didn't find the executable.
30605    # The splitting of arguments from the executable at a space might have been incorrect,
30606    # since paths with space are more likely in Windows. Give it another try with the whole
30607    # argument.
30608    path="$complete"
30609    arguments="EOL"
30610    new_path=`$CYGPATH -u "$path"`
30611    new_path=`$WHICH "$new_path" 2> /dev/null`
30612    # bat and cmd files are not always considered executable in cygwin causing which
30613    # to not find them
30614    if test "x$new_path" = x \
30615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30617      new_path=`$CYGPATH -u "$path"`
30618    fi
30619    if test "x$new_path" = x; then
30620      # It's still not found. Now this is an unrecoverable error.
30621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30622$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30623      has_space=`$ECHO "$complete" | $GREP " "`
30624      if test "x$has_space" != x; then
30625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30627      fi
30628      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30629    fi
30630  fi
30631
30632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30635  # "foo.exe" is OK but "foo" is an error.
30636  #
30637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30638  # It is also a way to make sure we got the proper file name for the real test later on.
30639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30640  if test "x$test_shortpath" = x; then
30641    # Short path failed, file does not exist as specified.
30642    # Try adding .exe or .cmd
30643    if test -f "${new_path}.exe"; then
30644      input_to_shortpath="${new_path}.exe"
30645    elif test -f "${new_path}.cmd"; then
30646      input_to_shortpath="${new_path}.cmd"
30647    else
30648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30649$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30653    fi
30654  else
30655    input_to_shortpath="$new_path"
30656  fi
30657
30658  # Call helper function which possibly converts this using DOS-style short mode.
30659  # If so, the updated path is stored in $new_path.
30660  new_path="$input_to_shortpath"
30661
30662  input_path="$input_to_shortpath"
30663  # Check if we need to convert this using DOS-style short mode. If the path
30664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30665  # take no chances and rewrite it.
30666  # Note: m4 eats our [], so we need to use [ and ] instead.
30667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30668  if test "x$has_forbidden_chars" != x; then
30669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30673      # Going to short mode and back again did indeed matter. Since short mode is
30674      # case insensitive, let's make it lowercase to improve readability.
30675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30676      # Now convert it back to Unix-stile (cygpath)
30677      input_path=`$CYGPATH -u "$shortmode_path"`
30678      new_path="$input_path"
30679    fi
30680  fi
30681
30682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30683  if test "x$test_cygdrive_prefix" = x; then
30684    # As a simple fix, exclude /usr/bin since it's not a real path.
30685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30687      # a path prefixed by /cygdrive for fixpath to work.
30688      new_path="$CYGWIN_ROOT_PATH$input_path"
30689    fi
30690  fi
30691
30692  # remove trailing .exe if any
30693  new_path="${new_path/%.exe/}"
30694
30695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30696
30697  # First separate the path from the arguments. This will split at the first
30698  # space.
30699  complete="$CPP"
30700  path="${complete%% *}"
30701  tmp="$complete EOL"
30702  arguments="${tmp#* }"
30703
30704  # Input might be given as Windows format, start by converting to
30705  # unix format.
30706  new_path="$path"
30707
30708  windows_path="$new_path"
30709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30710    unix_path=`$CYGPATH -u "$windows_path"`
30711    new_path="$unix_path"
30712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30714    new_path="$unix_path"
30715  fi
30716
30717
30718  # Now try to locate executable using which
30719  new_path=`$WHICH "$new_path" 2> /dev/null`
30720
30721  if test "x$new_path" = x; then
30722    # Oops. Which didn't find the executable.
30723    # The splitting of arguments from the executable at a space might have been incorrect,
30724    # since paths with space are more likely in Windows. Give it another try with the whole
30725    # argument.
30726    path="$complete"
30727    arguments="EOL"
30728    new_path="$path"
30729
30730  windows_path="$new_path"
30731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30732    unix_path=`$CYGPATH -u "$windows_path"`
30733    new_path="$unix_path"
30734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30736    new_path="$unix_path"
30737  fi
30738
30739
30740    new_path=`$WHICH "$new_path" 2> /dev/null`
30741
30742    if test "x$new_path" = x; then
30743      # It's still not found. Now this is an unrecoverable error.
30744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30745$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30746      has_space=`$ECHO "$complete" | $GREP " "`
30747      if test "x$has_space" != x; then
30748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30750      fi
30751      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30752    fi
30753  fi
30754
30755  # Now new_path has a complete unix path to the binary
30756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30757    # Keep paths in /bin as-is, but remove trailing .exe if any
30758    new_path="${new_path/%.exe/}"
30759    # Do not save /bin paths to all_fixpath_prefixes!
30760  else
30761    # Not in mixed or Windows style, start by that.
30762    new_path=`cmd //c echo $new_path`
30763
30764  input_path="$new_path"
30765  # Check if we need to convert this using DOS-style short mode. If the path
30766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30767  # take no chances and rewrite it.
30768  # Note: m4 eats our [], so we need to use [ and ] instead.
30769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30770  if test "x$has_forbidden_chars" != x; then
30771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30773  fi
30774
30775    # Output is in $new_path
30776
30777  windows_path="$new_path"
30778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30779    unix_path=`$CYGPATH -u "$windows_path"`
30780    new_path="$unix_path"
30781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30783    new_path="$unix_path"
30784  fi
30785
30786    # remove trailing .exe if any
30787    new_path="${new_path/%.exe/}"
30788
30789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30791  fi
30792
30793  else
30794    # We're on a posix platform. Hooray! :)
30795    # First separate the path from the arguments. This will split at the first
30796    # space.
30797    complete="$CPP"
30798    path="${complete%% *}"
30799    tmp="$complete EOL"
30800    arguments="${tmp#* }"
30801
30802    # Cannot rely on the command "which" here since it doesn't always work.
30803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30804    if test -z "$is_absolute_path"; then
30805      # Path to executable is not absolute. Find it.
30806      IFS_save="$IFS"
30807      IFS=:
30808      for p in $PATH; do
30809        if test -f "$p/$path" && test -x "$p/$path"; then
30810          new_path="$p/$path"
30811          break
30812        fi
30813      done
30814      IFS="$IFS_save"
30815    else
30816      # This is an absolute path, we can use it without further modifications.
30817      new_path="$path"
30818    fi
30819
30820    if test "x$new_path" = x; then
30821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30822$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30823      has_space=`$ECHO "$complete" | $GREP " "`
30824      if test "x$has_space" != x; then
30825        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30827      fi
30828      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30829    fi
30830  fi
30831
30832  # Now join together the path and the arguments once again
30833  if test "x$arguments" != xEOL; then
30834    new_complete="$new_path ${arguments% *}"
30835  else
30836    new_complete="$new_path"
30837  fi
30838
30839  if test "x$complete" != "x$new_complete"; then
30840    CPP="$new_complete"
30841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30842$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30843  fi
30844
30845  ac_ext=cpp
30846ac_cpp='$CXXCPP $CPPFLAGS'
30847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30851$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30852if test -z "$CXXCPP"; then
30853  if ${ac_cv_prog_CXXCPP+:} false; then :
30854  $as_echo_n "(cached) " >&6
30855else
30856      # Double quotes because CXXCPP needs to be expanded
30857    for CXXCPP in "$CXX -E" "/lib/cpp"
30858    do
30859      ac_preproc_ok=false
30860for ac_cxx_preproc_warn_flag in '' yes
30861do
30862  # Use a header file that comes with gcc, so configuring glibc
30863  # with a fresh cross-compiler works.
30864  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30865  # <limits.h> exists even on freestanding compilers.
30866  # On the NeXT, cc -E runs the code through the compiler's parser,
30867  # not just through cpp. "Syntax error" is here to catch this case.
30868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30869/* end confdefs.h.  */
30870#ifdef __STDC__
30871# include <limits.h>
30872#else
30873# include <assert.h>
30874#endif
30875		     Syntax error
30876_ACEOF
30877if ac_fn_cxx_try_cpp "$LINENO"; then :
30878
30879else
30880  # Broken: fails on valid input.
30881continue
30882fi
30883rm -f conftest.err conftest.i conftest.$ac_ext
30884
30885  # OK, works on sane cases.  Now check whether nonexistent headers
30886  # can be detected and how.
30887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30888/* end confdefs.h.  */
30889#include <ac_nonexistent.h>
30890_ACEOF
30891if ac_fn_cxx_try_cpp "$LINENO"; then :
30892  # Broken: success on invalid input.
30893continue
30894else
30895  # Passes both tests.
30896ac_preproc_ok=:
30897break
30898fi
30899rm -f conftest.err conftest.i conftest.$ac_ext
30900
30901done
30902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30903rm -f conftest.i conftest.err conftest.$ac_ext
30904if $ac_preproc_ok; then :
30905  break
30906fi
30907
30908    done
30909    ac_cv_prog_CXXCPP=$CXXCPP
30910
30911fi
30912  CXXCPP=$ac_cv_prog_CXXCPP
30913else
30914  ac_cv_prog_CXXCPP=$CXXCPP
30915fi
30916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30917$as_echo "$CXXCPP" >&6; }
30918ac_preproc_ok=false
30919for ac_cxx_preproc_warn_flag in '' yes
30920do
30921  # Use a header file that comes with gcc, so configuring glibc
30922  # with a fresh cross-compiler works.
30923  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30924  # <limits.h> exists even on freestanding compilers.
30925  # On the NeXT, cc -E runs the code through the compiler's parser,
30926  # not just through cpp. "Syntax error" is here to catch this case.
30927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30928/* end confdefs.h.  */
30929#ifdef __STDC__
30930# include <limits.h>
30931#else
30932# include <assert.h>
30933#endif
30934		     Syntax error
30935_ACEOF
30936if ac_fn_cxx_try_cpp "$LINENO"; then :
30937
30938else
30939  # Broken: fails on valid input.
30940continue
30941fi
30942rm -f conftest.err conftest.i conftest.$ac_ext
30943
30944  # OK, works on sane cases.  Now check whether nonexistent headers
30945  # can be detected and how.
30946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30947/* end confdefs.h.  */
30948#include <ac_nonexistent.h>
30949_ACEOF
30950if ac_fn_cxx_try_cpp "$LINENO"; then :
30951  # Broken: success on invalid input.
30952continue
30953else
30954  # Passes both tests.
30955ac_preproc_ok=:
30956break
30957fi
30958rm -f conftest.err conftest.i conftest.$ac_ext
30959
30960done
30961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30962rm -f conftest.i conftest.err conftest.$ac_ext
30963if $ac_preproc_ok; then :
30964
30965else
30966  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30968as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30969See \`config.log' for more details" "$LINENO" 5; }
30970fi
30971
30972ac_ext=cpp
30973ac_cpp='$CXXCPP $CPPFLAGS'
30974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30977
30978
30979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30980
30981  # First separate the path from the arguments. This will split at the first
30982  # space.
30983  complete="$CXXCPP"
30984  path="${complete%% *}"
30985  tmp="$complete EOL"
30986  arguments="${tmp#* }"
30987
30988  # Input might be given as Windows format, start by converting to
30989  # unix format.
30990  new_path=`$CYGPATH -u "$path"`
30991
30992  # Now try to locate executable using which
30993  new_path=`$WHICH "$new_path" 2> /dev/null`
30994  # bat and cmd files are not always considered executable in cygwin causing which
30995  # to not find them
30996  if test "x$new_path" = x \
30997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30999    new_path=`$CYGPATH -u "$path"`
31000  fi
31001  if test "x$new_path" = x; then
31002    # Oops. Which didn't find the executable.
31003    # The splitting of arguments from the executable at a space might have been incorrect,
31004    # since paths with space are more likely in Windows. Give it another try with the whole
31005    # argument.
31006    path="$complete"
31007    arguments="EOL"
31008    new_path=`$CYGPATH -u "$path"`
31009    new_path=`$WHICH "$new_path" 2> /dev/null`
31010    # bat and cmd files are not always considered executable in cygwin causing which
31011    # to not find them
31012    if test "x$new_path" = x \
31013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31015      new_path=`$CYGPATH -u "$path"`
31016    fi
31017    if test "x$new_path" = x; then
31018      # It's still not found. Now this is an unrecoverable error.
31019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31020$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31021      has_space=`$ECHO "$complete" | $GREP " "`
31022      if test "x$has_space" != x; then
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31025      fi
31026      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31027    fi
31028  fi
31029
31030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31033  # "foo.exe" is OK but "foo" is an error.
31034  #
31035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31036  # It is also a way to make sure we got the proper file name for the real test later on.
31037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31038  if test "x$test_shortpath" = x; then
31039    # Short path failed, file does not exist as specified.
31040    # Try adding .exe or .cmd
31041    if test -f "${new_path}.exe"; then
31042      input_to_shortpath="${new_path}.exe"
31043    elif test -f "${new_path}.cmd"; then
31044      input_to_shortpath="${new_path}.cmd"
31045    else
31046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31047$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31050      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31051    fi
31052  else
31053    input_to_shortpath="$new_path"
31054  fi
31055
31056  # Call helper function which possibly converts this using DOS-style short mode.
31057  # If so, the updated path is stored in $new_path.
31058  new_path="$input_to_shortpath"
31059
31060  input_path="$input_to_shortpath"
31061  # Check if we need to convert this using DOS-style short mode. If the path
31062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31063  # take no chances and rewrite it.
31064  # Note: m4 eats our [], so we need to use [ and ] instead.
31065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31066  if test "x$has_forbidden_chars" != x; then
31067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31071      # Going to short mode and back again did indeed matter. Since short mode is
31072      # case insensitive, let's make it lowercase to improve readability.
31073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31074      # Now convert it back to Unix-stile (cygpath)
31075      input_path=`$CYGPATH -u "$shortmode_path"`
31076      new_path="$input_path"
31077    fi
31078  fi
31079
31080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31081  if test "x$test_cygdrive_prefix" = x; then
31082    # As a simple fix, exclude /usr/bin since it's not a real path.
31083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31085      # a path prefixed by /cygdrive for fixpath to work.
31086      new_path="$CYGWIN_ROOT_PATH$input_path"
31087    fi
31088  fi
31089
31090  # remove trailing .exe if any
31091  new_path="${new_path/%.exe/}"
31092
31093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31094
31095  # First separate the path from the arguments. This will split at the first
31096  # space.
31097  complete="$CXXCPP"
31098  path="${complete%% *}"
31099  tmp="$complete EOL"
31100  arguments="${tmp#* }"
31101
31102  # Input might be given as Windows format, start by converting to
31103  # unix format.
31104  new_path="$path"
31105
31106  windows_path="$new_path"
31107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31108    unix_path=`$CYGPATH -u "$windows_path"`
31109    new_path="$unix_path"
31110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31112    new_path="$unix_path"
31113  fi
31114
31115
31116  # Now try to locate executable using which
31117  new_path=`$WHICH "$new_path" 2> /dev/null`
31118
31119  if test "x$new_path" = x; then
31120    # Oops. Which didn't find the executable.
31121    # The splitting of arguments from the executable at a space might have been incorrect,
31122    # since paths with space are more likely in Windows. Give it another try with the whole
31123    # argument.
31124    path="$complete"
31125    arguments="EOL"
31126    new_path="$path"
31127
31128  windows_path="$new_path"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    new_path="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    new_path="$unix_path"
31135  fi
31136
31137
31138    new_path=`$WHICH "$new_path" 2> /dev/null`
31139
31140    if test "x$new_path" = x; then
31141      # It's still not found. Now this is an unrecoverable error.
31142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31143$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31144      has_space=`$ECHO "$complete" | $GREP " "`
31145      if test "x$has_space" != x; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31148      fi
31149      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31150    fi
31151  fi
31152
31153  # Now new_path has a complete unix path to the binary
31154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31155    # Keep paths in /bin as-is, but remove trailing .exe if any
31156    new_path="${new_path/%.exe/}"
31157    # Do not save /bin paths to all_fixpath_prefixes!
31158  else
31159    # Not in mixed or Windows style, start by that.
31160    new_path=`cmd //c echo $new_path`
31161
31162  input_path="$new_path"
31163  # Check if we need to convert this using DOS-style short mode. If the path
31164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31165  # take no chances and rewrite it.
31166  # Note: m4 eats our [], so we need to use [ and ] instead.
31167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31168  if test "x$has_forbidden_chars" != x; then
31169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31171  fi
31172
31173    # Output is in $new_path
31174
31175  windows_path="$new_path"
31176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31177    unix_path=`$CYGPATH -u "$windows_path"`
31178    new_path="$unix_path"
31179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31181    new_path="$unix_path"
31182  fi
31183
31184    # remove trailing .exe if any
31185    new_path="${new_path/%.exe/}"
31186
31187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31189  fi
31190
31191  else
31192    # We're on a posix platform. Hooray! :)
31193    # First separate the path from the arguments. This will split at the first
31194    # space.
31195    complete="$CXXCPP"
31196    path="${complete%% *}"
31197    tmp="$complete EOL"
31198    arguments="${tmp#* }"
31199
31200    # Cannot rely on the command "which" here since it doesn't always work.
31201    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31202    if test -z "$is_absolute_path"; then
31203      # Path to executable is not absolute. Find it.
31204      IFS_save="$IFS"
31205      IFS=:
31206      for p in $PATH; do
31207        if test -f "$p/$path" && test -x "$p/$path"; then
31208          new_path="$p/$path"
31209          break
31210        fi
31211      done
31212      IFS="$IFS_save"
31213    else
31214      # This is an absolute path, we can use it without further modifications.
31215      new_path="$path"
31216    fi
31217
31218    if test "x$new_path" = x; then
31219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31220$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31221      has_space=`$ECHO "$complete" | $GREP " "`
31222      if test "x$has_space" != x; then
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31225      fi
31226      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31227    fi
31228  fi
31229
31230  # Now join together the path and the arguments once again
31231  if test "x$arguments" != xEOL; then
31232    new_complete="$new_path ${arguments% *}"
31233  else
31234    new_complete="$new_path"
31235  fi
31236
31237  if test "x$complete" != "x$new_complete"; then
31238    CXXCPP="$new_complete"
31239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31240$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31241  fi
31242
31243
31244  #
31245  # Setup the linker (LD)
31246  #
31247  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31248    # In the Microsoft toolchain we have a separate LD command "link".
31249    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31250    # a cygwin program for something completely different.
31251    # Extract the first word of "link", so it can be a program name with args.
31252set dummy link; ac_word=$2
31253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31254$as_echo_n "checking for $ac_word... " >&6; }
31255if ${ac_cv_prog_LD+:} false; then :
31256  $as_echo_n "(cached) " >&6
31257else
31258  if test -n "$LD"; then
31259  ac_cv_prog_LD="$LD" # Let the user override the test.
31260else
31261  ac_prog_rejected=no
31262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31263for as_dir in $PATH
31264do
31265  IFS=$as_save_IFS
31266  test -z "$as_dir" && as_dir=.
31267    for ac_exec_ext in '' $ac_executable_extensions; do
31268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31269    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31270       ac_prog_rejected=yes
31271       continue
31272     fi
31273    ac_cv_prog_LD="link"
31274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31275    break 2
31276  fi
31277done
31278  done
31279IFS=$as_save_IFS
31280
31281if test $ac_prog_rejected = yes; then
31282  # We found a bogon in the path, so make sure we never use it.
31283  set dummy $ac_cv_prog_LD
31284  shift
31285  if test $# != 0; then
31286    # We chose a different compiler from the bogus one.
31287    # However, it has the same basename, so the bogon will be chosen
31288    # first if we set LD to just the basename; use the full file name.
31289    shift
31290    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31291  fi
31292fi
31293fi
31294fi
31295LD=$ac_cv_prog_LD
31296if test -n "$LD"; then
31297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31298$as_echo "$LD" >&6; }
31299else
31300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31301$as_echo "no" >&6; }
31302fi
31303
31304
31305
31306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31307
31308  # First separate the path from the arguments. This will split at the first
31309  # space.
31310  complete="$LD"
31311  path="${complete%% *}"
31312  tmp="$complete EOL"
31313  arguments="${tmp#* }"
31314
31315  # Input might be given as Windows format, start by converting to
31316  # unix format.
31317  new_path=`$CYGPATH -u "$path"`
31318
31319  # Now try to locate executable using which
31320  new_path=`$WHICH "$new_path" 2> /dev/null`
31321  # bat and cmd files are not always considered executable in cygwin causing which
31322  # to not find them
31323  if test "x$new_path" = x \
31324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31326    new_path=`$CYGPATH -u "$path"`
31327  fi
31328  if test "x$new_path" = x; then
31329    # Oops. Which didn't find the executable.
31330    # The splitting of arguments from the executable at a space might have been incorrect,
31331    # since paths with space are more likely in Windows. Give it another try with the whole
31332    # argument.
31333    path="$complete"
31334    arguments="EOL"
31335    new_path=`$CYGPATH -u "$path"`
31336    new_path=`$WHICH "$new_path" 2> /dev/null`
31337    # bat and cmd files are not always considered executable in cygwin causing which
31338    # to not find them
31339    if test "x$new_path" = x \
31340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31342      new_path=`$CYGPATH -u "$path"`
31343    fi
31344    if test "x$new_path" = x; then
31345      # It's still not found. Now this is an unrecoverable error.
31346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31347$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31348      has_space=`$ECHO "$complete" | $GREP " "`
31349      if test "x$has_space" != x; then
31350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31352      fi
31353      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31354    fi
31355  fi
31356
31357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31360  # "foo.exe" is OK but "foo" is an error.
31361  #
31362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31363  # It is also a way to make sure we got the proper file name for the real test later on.
31364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31365  if test "x$test_shortpath" = x; then
31366    # Short path failed, file does not exist as specified.
31367    # Try adding .exe or .cmd
31368    if test -f "${new_path}.exe"; then
31369      input_to_shortpath="${new_path}.exe"
31370    elif test -f "${new_path}.cmd"; then
31371      input_to_shortpath="${new_path}.cmd"
31372    else
31373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31374$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31377      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31378    fi
31379  else
31380    input_to_shortpath="$new_path"
31381  fi
31382
31383  # Call helper function which possibly converts this using DOS-style short mode.
31384  # If so, the updated path is stored in $new_path.
31385  new_path="$input_to_shortpath"
31386
31387  input_path="$input_to_shortpath"
31388  # Check if we need to convert this using DOS-style short mode. If the path
31389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31390  # take no chances and rewrite it.
31391  # Note: m4 eats our [], so we need to use [ and ] instead.
31392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31393  if test "x$has_forbidden_chars" != x; then
31394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31398      # Going to short mode and back again did indeed matter. Since short mode is
31399      # case insensitive, let's make it lowercase to improve readability.
31400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31401      # Now convert it back to Unix-stile (cygpath)
31402      input_path=`$CYGPATH -u "$shortmode_path"`
31403      new_path="$input_path"
31404    fi
31405  fi
31406
31407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31408  if test "x$test_cygdrive_prefix" = x; then
31409    # As a simple fix, exclude /usr/bin since it's not a real path.
31410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31412      # a path prefixed by /cygdrive for fixpath to work.
31413      new_path="$CYGWIN_ROOT_PATH$input_path"
31414    fi
31415  fi
31416
31417  # remove trailing .exe if any
31418  new_path="${new_path/%.exe/}"
31419
31420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31421
31422  # First separate the path from the arguments. This will split at the first
31423  # space.
31424  complete="$LD"
31425  path="${complete%% *}"
31426  tmp="$complete EOL"
31427  arguments="${tmp#* }"
31428
31429  # Input might be given as Windows format, start by converting to
31430  # unix format.
31431  new_path="$path"
31432
31433  windows_path="$new_path"
31434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31435    unix_path=`$CYGPATH -u "$windows_path"`
31436    new_path="$unix_path"
31437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31439    new_path="$unix_path"
31440  fi
31441
31442
31443  # Now try to locate executable using which
31444  new_path=`$WHICH "$new_path" 2> /dev/null`
31445
31446  if test "x$new_path" = x; then
31447    # Oops. Which didn't find the executable.
31448    # The splitting of arguments from the executable at a space might have been incorrect,
31449    # since paths with space are more likely in Windows. Give it another try with the whole
31450    # argument.
31451    path="$complete"
31452    arguments="EOL"
31453    new_path="$path"
31454
31455  windows_path="$new_path"
31456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31457    unix_path=`$CYGPATH -u "$windows_path"`
31458    new_path="$unix_path"
31459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31461    new_path="$unix_path"
31462  fi
31463
31464
31465    new_path=`$WHICH "$new_path" 2> /dev/null`
31466
31467    if test "x$new_path" = x; then
31468      # It's still not found. Now this is an unrecoverable error.
31469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31470$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31471      has_space=`$ECHO "$complete" | $GREP " "`
31472      if test "x$has_space" != x; then
31473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31475      fi
31476      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31477    fi
31478  fi
31479
31480  # Now new_path has a complete unix path to the binary
31481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31482    # Keep paths in /bin as-is, but remove trailing .exe if any
31483    new_path="${new_path/%.exe/}"
31484    # Do not save /bin paths to all_fixpath_prefixes!
31485  else
31486    # Not in mixed or Windows style, start by that.
31487    new_path=`cmd //c echo $new_path`
31488
31489  input_path="$new_path"
31490  # Check if we need to convert this using DOS-style short mode. If the path
31491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31492  # take no chances and rewrite it.
31493  # Note: m4 eats our [], so we need to use [ and ] instead.
31494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31495  if test "x$has_forbidden_chars" != x; then
31496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31498  fi
31499
31500    # Output is in $new_path
31501
31502  windows_path="$new_path"
31503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31504    unix_path=`$CYGPATH -u "$windows_path"`
31505    new_path="$unix_path"
31506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31508    new_path="$unix_path"
31509  fi
31510
31511    # remove trailing .exe if any
31512    new_path="${new_path/%.exe/}"
31513
31514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31516  fi
31517
31518  else
31519    # We're on a posix platform. Hooray! :)
31520    # First separate the path from the arguments. This will split at the first
31521    # space.
31522    complete="$LD"
31523    path="${complete%% *}"
31524    tmp="$complete EOL"
31525    arguments="${tmp#* }"
31526
31527    # Cannot rely on the command "which" here since it doesn't always work.
31528    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31529    if test -z "$is_absolute_path"; then
31530      # Path to executable is not absolute. Find it.
31531      IFS_save="$IFS"
31532      IFS=:
31533      for p in $PATH; do
31534        if test -f "$p/$path" && test -x "$p/$path"; then
31535          new_path="$p/$path"
31536          break
31537        fi
31538      done
31539      IFS="$IFS_save"
31540    else
31541      # This is an absolute path, we can use it without further modifications.
31542      new_path="$path"
31543    fi
31544
31545    if test "x$new_path" = x; then
31546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31547$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31548      has_space=`$ECHO "$complete" | $GREP " "`
31549      if test "x$has_space" != x; then
31550        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31552      fi
31553      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31554    fi
31555  fi
31556
31557  # Now join together the path and the arguments once again
31558  if test "x$arguments" != xEOL; then
31559    new_complete="$new_path ${arguments% *}"
31560  else
31561    new_complete="$new_path"
31562  fi
31563
31564  if test "x$complete" != "x$new_complete"; then
31565    LD="$new_complete"
31566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31567$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31568  fi
31569
31570    # Verify that we indeed succeeded with this trick.
31571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31572$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31573    "$LD" --version > /dev/null
31574    if test $? -eq 0 ; then
31575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31576$as_echo "no" >&6; }
31577      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31578    else
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31580$as_echo "yes" >&6; }
31581    fi
31582    LDCXX="$LD"
31583  else
31584    # All other toolchains use the compiler to link.
31585    LD="$CC"
31586    LDCXX="$CXX"
31587  fi
31588
31589  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31590
31591
31592  #
31593  # Setup the assembler (AS)
31594  #
31595  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31596    # FIXME: should this really be solaris, or solstudio?
31597
31598
31599  # Publish this variable in the help.
31600
31601
31602  if test "x$AS" = x; then
31603    # The variable is not set by user, try to locate tool using the code snippet
31604    for ac_prog in as
31605do
31606  # Extract the first word of "$ac_prog", so it can be a program name with args.
31607set dummy $ac_prog; ac_word=$2
31608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31609$as_echo_n "checking for $ac_word... " >&6; }
31610if ${ac_cv_path_AS+:} false; then :
31611  $as_echo_n "(cached) " >&6
31612else
31613  case $AS in
31614  [\\/]* | ?:[\\/]*)
31615  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31616  ;;
31617  *)
31618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31619for as_dir in $PATH
31620do
31621  IFS=$as_save_IFS
31622  test -z "$as_dir" && as_dir=.
31623    for ac_exec_ext in '' $ac_executable_extensions; do
31624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31625    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31627    break 2
31628  fi
31629done
31630  done
31631IFS=$as_save_IFS
31632
31633  ;;
31634esac
31635fi
31636AS=$ac_cv_path_AS
31637if test -n "$AS"; then
31638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31639$as_echo "$AS" >&6; }
31640else
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31642$as_echo "no" >&6; }
31643fi
31644
31645
31646  test -n "$AS" && break
31647done
31648
31649  else
31650    # The variable is set, but is it from the command line or the environment?
31651
31652    # Try to remove the string !AS! from our list.
31653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31655      # If it failed, the variable was not from the command line. Ignore it,
31656      # but warn the user (except for BASH, which is always set by the calling BASH).
31657      if test "xAS" != xBASH; then
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31659$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31660      fi
31661      # Try to locate tool using the code snippet
31662      for ac_prog in as
31663do
31664  # Extract the first word of "$ac_prog", so it can be a program name with args.
31665set dummy $ac_prog; ac_word=$2
31666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31667$as_echo_n "checking for $ac_word... " >&6; }
31668if ${ac_cv_path_AS+:} false; then :
31669  $as_echo_n "(cached) " >&6
31670else
31671  case $AS in
31672  [\\/]* | ?:[\\/]*)
31673  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31674  ;;
31675  *)
31676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31677for as_dir in $PATH
31678do
31679  IFS=$as_save_IFS
31680  test -z "$as_dir" && as_dir=.
31681    for ac_exec_ext in '' $ac_executable_extensions; do
31682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31683    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31685    break 2
31686  fi
31687done
31688  done
31689IFS=$as_save_IFS
31690
31691  ;;
31692esac
31693fi
31694AS=$ac_cv_path_AS
31695if test -n "$AS"; then
31696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31697$as_echo "$AS" >&6; }
31698else
31699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31700$as_echo "no" >&6; }
31701fi
31702
31703
31704  test -n "$AS" && break
31705done
31706
31707    else
31708      # If it succeeded, then it was overridden by the user. We will use it
31709      # for the tool.
31710
31711      # First remove it from the list of overridden variables, so we can test
31712      # for unknown variables in the end.
31713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31714
31715      # Check if the provided tool contains a complete path.
31716      tool_specified="$AS"
31717      tool_basename="${tool_specified##*/}"
31718      if test "x$tool_basename" = "x$tool_specified"; then
31719        # A command without a complete path is provided, search $PATH.
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31721$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31722        # Extract the first word of "$tool_basename", so it can be a program name with args.
31723set dummy $tool_basename; ac_word=$2
31724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31725$as_echo_n "checking for $ac_word... " >&6; }
31726if ${ac_cv_path_AS+:} false; then :
31727  $as_echo_n "(cached) " >&6
31728else
31729  case $AS in
31730  [\\/]* | ?:[\\/]*)
31731  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31732  ;;
31733  *)
31734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31735for as_dir in $PATH
31736do
31737  IFS=$as_save_IFS
31738  test -z "$as_dir" && as_dir=.
31739    for ac_exec_ext in '' $ac_executable_extensions; do
31740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31741    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31743    break 2
31744  fi
31745done
31746  done
31747IFS=$as_save_IFS
31748
31749  ;;
31750esac
31751fi
31752AS=$ac_cv_path_AS
31753if test -n "$AS"; then
31754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31755$as_echo "$AS" >&6; }
31756else
31757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31758$as_echo "no" >&6; }
31759fi
31760
31761
31762        if test "x$AS" = x; then
31763          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31764        fi
31765      else
31766        # Otherwise we believe it is a complete path. Use it as it is.
31767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31768$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31770$as_echo_n "checking for AS... " >&6; }
31771        if test ! -x "$tool_specified"; then
31772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31773$as_echo "not found" >&6; }
31774          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31775        fi
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31777$as_echo "$tool_specified" >&6; }
31778      fi
31779    fi
31780  fi
31781
31782
31783
31784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785
31786  # First separate the path from the arguments. This will split at the first
31787  # space.
31788  complete="$AS"
31789  path="${complete%% *}"
31790  tmp="$complete EOL"
31791  arguments="${tmp#* }"
31792
31793  # Input might be given as Windows format, start by converting to
31794  # unix format.
31795  new_path=`$CYGPATH -u "$path"`
31796
31797  # Now try to locate executable using which
31798  new_path=`$WHICH "$new_path" 2> /dev/null`
31799  # bat and cmd files are not always considered executable in cygwin causing which
31800  # to not find them
31801  if test "x$new_path" = x \
31802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31804    new_path=`$CYGPATH -u "$path"`
31805  fi
31806  if test "x$new_path" = x; then
31807    # Oops. Which didn't find the executable.
31808    # The splitting of arguments from the executable at a space might have been incorrect,
31809    # since paths with space are more likely in Windows. Give it another try with the whole
31810    # argument.
31811    path="$complete"
31812    arguments="EOL"
31813    new_path=`$CYGPATH -u "$path"`
31814    new_path=`$WHICH "$new_path" 2> /dev/null`
31815    # bat and cmd files are not always considered executable in cygwin causing which
31816    # to not find them
31817    if test "x$new_path" = x \
31818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31820      new_path=`$CYGPATH -u "$path"`
31821    fi
31822    if test "x$new_path" = x; then
31823      # It's still not found. Now this is an unrecoverable error.
31824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31825$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31826      has_space=`$ECHO "$complete" | $GREP " "`
31827      if test "x$has_space" != x; then
31828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31830      fi
31831      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31832    fi
31833  fi
31834
31835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31838  # "foo.exe" is OK but "foo" is an error.
31839  #
31840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31841  # It is also a way to make sure we got the proper file name for the real test later on.
31842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31843  if test "x$test_shortpath" = x; then
31844    # Short path failed, file does not exist as specified.
31845    # Try adding .exe or .cmd
31846    if test -f "${new_path}.exe"; then
31847      input_to_shortpath="${new_path}.exe"
31848    elif test -f "${new_path}.cmd"; then
31849      input_to_shortpath="${new_path}.cmd"
31850    else
31851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31852$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31855      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31856    fi
31857  else
31858    input_to_shortpath="$new_path"
31859  fi
31860
31861  # Call helper function which possibly converts this using DOS-style short mode.
31862  # If so, the updated path is stored in $new_path.
31863  new_path="$input_to_shortpath"
31864
31865  input_path="$input_to_shortpath"
31866  # Check if we need to convert this using DOS-style short mode. If the path
31867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31868  # take no chances and rewrite it.
31869  # Note: m4 eats our [], so we need to use [ and ] instead.
31870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31871  if test "x$has_forbidden_chars" != x; then
31872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31876      # Going to short mode and back again did indeed matter. Since short mode is
31877      # case insensitive, let's make it lowercase to improve readability.
31878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31879      # Now convert it back to Unix-stile (cygpath)
31880      input_path=`$CYGPATH -u "$shortmode_path"`
31881      new_path="$input_path"
31882    fi
31883  fi
31884
31885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31886  if test "x$test_cygdrive_prefix" = x; then
31887    # As a simple fix, exclude /usr/bin since it's not a real path.
31888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31890      # a path prefixed by /cygdrive for fixpath to work.
31891      new_path="$CYGWIN_ROOT_PATH$input_path"
31892    fi
31893  fi
31894
31895  # remove trailing .exe if any
31896  new_path="${new_path/%.exe/}"
31897
31898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31899
31900  # First separate the path from the arguments. This will split at the first
31901  # space.
31902  complete="$AS"
31903  path="${complete%% *}"
31904  tmp="$complete EOL"
31905  arguments="${tmp#* }"
31906
31907  # Input might be given as Windows format, start by converting to
31908  # unix format.
31909  new_path="$path"
31910
31911  windows_path="$new_path"
31912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31913    unix_path=`$CYGPATH -u "$windows_path"`
31914    new_path="$unix_path"
31915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31917    new_path="$unix_path"
31918  fi
31919
31920
31921  # Now try to locate executable using which
31922  new_path=`$WHICH "$new_path" 2> /dev/null`
31923
31924  if test "x$new_path" = x; then
31925    # Oops. Which didn't find the executable.
31926    # The splitting of arguments from the executable at a space might have been incorrect,
31927    # since paths with space are more likely in Windows. Give it another try with the whole
31928    # argument.
31929    path="$complete"
31930    arguments="EOL"
31931    new_path="$path"
31932
31933  windows_path="$new_path"
31934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31935    unix_path=`$CYGPATH -u "$windows_path"`
31936    new_path="$unix_path"
31937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31939    new_path="$unix_path"
31940  fi
31941
31942
31943    new_path=`$WHICH "$new_path" 2> /dev/null`
31944
31945    if test "x$new_path" = x; then
31946      # It's still not found. Now this is an unrecoverable error.
31947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31948$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31949      has_space=`$ECHO "$complete" | $GREP " "`
31950      if test "x$has_space" != x; then
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31953      fi
31954      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31955    fi
31956  fi
31957
31958  # Now new_path has a complete unix path to the binary
31959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31960    # Keep paths in /bin as-is, but remove trailing .exe if any
31961    new_path="${new_path/%.exe/}"
31962    # Do not save /bin paths to all_fixpath_prefixes!
31963  else
31964    # Not in mixed or Windows style, start by that.
31965    new_path=`cmd //c echo $new_path`
31966
31967  input_path="$new_path"
31968  # Check if we need to convert this using DOS-style short mode. If the path
31969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31970  # take no chances and rewrite it.
31971  # Note: m4 eats our [], so we need to use [ and ] instead.
31972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31973  if test "x$has_forbidden_chars" != x; then
31974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31976  fi
31977
31978    # Output is in $new_path
31979
31980  windows_path="$new_path"
31981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31982    unix_path=`$CYGPATH -u "$windows_path"`
31983    new_path="$unix_path"
31984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31986    new_path="$unix_path"
31987  fi
31988
31989    # remove trailing .exe if any
31990    new_path="${new_path/%.exe/}"
31991
31992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31994  fi
31995
31996  else
31997    # We're on a posix platform. Hooray! :)
31998    # First separate the path from the arguments. This will split at the first
31999    # space.
32000    complete="$AS"
32001    path="${complete%% *}"
32002    tmp="$complete EOL"
32003    arguments="${tmp#* }"
32004
32005    # Cannot rely on the command "which" here since it doesn't always work.
32006    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32007    if test -z "$is_absolute_path"; then
32008      # Path to executable is not absolute. Find it.
32009      IFS_save="$IFS"
32010      IFS=:
32011      for p in $PATH; do
32012        if test -f "$p/$path" && test -x "$p/$path"; then
32013          new_path="$p/$path"
32014          break
32015        fi
32016      done
32017      IFS="$IFS_save"
32018    else
32019      # This is an absolute path, we can use it without further modifications.
32020      new_path="$path"
32021    fi
32022
32023    if test "x$new_path" = x; then
32024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32025$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32026      has_space=`$ECHO "$complete" | $GREP " "`
32027      if test "x$has_space" != x; then
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32030      fi
32031      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32032    fi
32033  fi
32034
32035  # Now join together the path and the arguments once again
32036  if test "x$arguments" != xEOL; then
32037    new_complete="$new_path ${arguments% *}"
32038  else
32039    new_complete="$new_path"
32040  fi
32041
32042  if test "x$complete" != "x$new_complete"; then
32043    AS="$new_complete"
32044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32045$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32046  fi
32047
32048  else
32049    # FIXME: is this correct for microsoft?
32050    AS="$CC -c"
32051  fi
32052
32053
32054  #
32055  # Setup the archiver (AR)
32056  #
32057  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32058    # The corresponding ar tool is lib.exe (used to create static libraries)
32059    # Extract the first word of "lib", so it can be a program name with args.
32060set dummy lib; ac_word=$2
32061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32062$as_echo_n "checking for $ac_word... " >&6; }
32063if ${ac_cv_prog_AR+:} false; then :
32064  $as_echo_n "(cached) " >&6
32065else
32066  if test -n "$AR"; then
32067  ac_cv_prog_AR="$AR" # Let the user override the test.
32068else
32069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32070for as_dir in $PATH
32071do
32072  IFS=$as_save_IFS
32073  test -z "$as_dir" && as_dir=.
32074    for ac_exec_ext in '' $ac_executable_extensions; do
32075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32076    ac_cv_prog_AR="lib"
32077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32078    break 2
32079  fi
32080done
32081  done
32082IFS=$as_save_IFS
32083
32084fi
32085fi
32086AR=$ac_cv_prog_AR
32087if test -n "$AR"; then
32088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32089$as_echo "$AR" >&6; }
32090else
32091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32092$as_echo "no" >&6; }
32093fi
32094
32095
32096  else
32097
32098
32099  # Publish this variable in the help.
32100
32101
32102  if test "x$AR" = x; then
32103    # The variable is not set by user, try to locate tool using the code snippet
32104    if test -n "$ac_tool_prefix"; then
32105  for ac_prog in ar
32106  do
32107    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32110$as_echo_n "checking for $ac_word... " >&6; }
32111if ${ac_cv_prog_AR+:} false; then :
32112  $as_echo_n "(cached) " >&6
32113else
32114  if test -n "$AR"; then
32115  ac_cv_prog_AR="$AR" # Let the user override the test.
32116else
32117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32118for as_dir in $PATH
32119do
32120  IFS=$as_save_IFS
32121  test -z "$as_dir" && as_dir=.
32122    for ac_exec_ext in '' $ac_executable_extensions; do
32123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32124    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32126    break 2
32127  fi
32128done
32129  done
32130IFS=$as_save_IFS
32131
32132fi
32133fi
32134AR=$ac_cv_prog_AR
32135if test -n "$AR"; then
32136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32137$as_echo "$AR" >&6; }
32138else
32139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32140$as_echo "no" >&6; }
32141fi
32142
32143
32144    test -n "$AR" && break
32145  done
32146fi
32147if test -z "$AR"; then
32148  ac_ct_AR=$AR
32149  for ac_prog in ar
32150do
32151  # Extract the first word of "$ac_prog", so it can be a program name with args.
32152set dummy $ac_prog; ac_word=$2
32153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32154$as_echo_n "checking for $ac_word... " >&6; }
32155if ${ac_cv_prog_ac_ct_AR+:} false; then :
32156  $as_echo_n "(cached) " >&6
32157else
32158  if test -n "$ac_ct_AR"; then
32159  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32160else
32161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32162for as_dir in $PATH
32163do
32164  IFS=$as_save_IFS
32165  test -z "$as_dir" && as_dir=.
32166    for ac_exec_ext in '' $ac_executable_extensions; do
32167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32168    ac_cv_prog_ac_ct_AR="$ac_prog"
32169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32170    break 2
32171  fi
32172done
32173  done
32174IFS=$as_save_IFS
32175
32176fi
32177fi
32178ac_ct_AR=$ac_cv_prog_ac_ct_AR
32179if test -n "$ac_ct_AR"; then
32180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32181$as_echo "$ac_ct_AR" >&6; }
32182else
32183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32184$as_echo "no" >&6; }
32185fi
32186
32187
32188  test -n "$ac_ct_AR" && break
32189done
32190
32191  if test "x$ac_ct_AR" = x; then
32192    AR=""
32193  else
32194    case $cross_compiling:$ac_tool_warned in
32195yes:)
32196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32198ac_tool_warned=yes ;;
32199esac
32200    AR=$ac_ct_AR
32201  fi
32202fi
32203
32204  else
32205    # The variable is set, but is it from the command line or the environment?
32206
32207    # Try to remove the string !AR! from our list.
32208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32210      # If it failed, the variable was not from the command line. Ignore it,
32211      # but warn the user (except for BASH, which is always set by the calling BASH).
32212      if test "xAR" != xBASH; then
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32214$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32215      fi
32216      # Try to locate tool using the code snippet
32217      if test -n "$ac_tool_prefix"; then
32218  for ac_prog in ar
32219  do
32220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32223$as_echo_n "checking for $ac_word... " >&6; }
32224if ${ac_cv_prog_AR+:} false; then :
32225  $as_echo_n "(cached) " >&6
32226else
32227  if test -n "$AR"; then
32228  ac_cv_prog_AR="$AR" # Let the user override the test.
32229else
32230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32231for as_dir in $PATH
32232do
32233  IFS=$as_save_IFS
32234  test -z "$as_dir" && as_dir=.
32235    for ac_exec_ext in '' $ac_executable_extensions; do
32236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32237    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32239    break 2
32240  fi
32241done
32242  done
32243IFS=$as_save_IFS
32244
32245fi
32246fi
32247AR=$ac_cv_prog_AR
32248if test -n "$AR"; then
32249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32250$as_echo "$AR" >&6; }
32251else
32252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32253$as_echo "no" >&6; }
32254fi
32255
32256
32257    test -n "$AR" && break
32258  done
32259fi
32260if test -z "$AR"; then
32261  ac_ct_AR=$AR
32262  for ac_prog in ar
32263do
32264  # Extract the first word of "$ac_prog", so it can be a program name with args.
32265set dummy $ac_prog; ac_word=$2
32266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32267$as_echo_n "checking for $ac_word... " >&6; }
32268if ${ac_cv_prog_ac_ct_AR+:} false; then :
32269  $as_echo_n "(cached) " >&6
32270else
32271  if test -n "$ac_ct_AR"; then
32272  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32273else
32274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32275for as_dir in $PATH
32276do
32277  IFS=$as_save_IFS
32278  test -z "$as_dir" && as_dir=.
32279    for ac_exec_ext in '' $ac_executable_extensions; do
32280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32281    ac_cv_prog_ac_ct_AR="$ac_prog"
32282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32283    break 2
32284  fi
32285done
32286  done
32287IFS=$as_save_IFS
32288
32289fi
32290fi
32291ac_ct_AR=$ac_cv_prog_ac_ct_AR
32292if test -n "$ac_ct_AR"; then
32293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32294$as_echo "$ac_ct_AR" >&6; }
32295else
32296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32297$as_echo "no" >&6; }
32298fi
32299
32300
32301  test -n "$ac_ct_AR" && break
32302done
32303
32304  if test "x$ac_ct_AR" = x; then
32305    AR=""
32306  else
32307    case $cross_compiling:$ac_tool_warned in
32308yes:)
32309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32311ac_tool_warned=yes ;;
32312esac
32313    AR=$ac_ct_AR
32314  fi
32315fi
32316
32317    else
32318      # If it succeeded, then it was overridden by the user. We will use it
32319      # for the tool.
32320
32321      # First remove it from the list of overridden variables, so we can test
32322      # for unknown variables in the end.
32323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32324
32325      # Check if the provided tool contains a complete path.
32326      tool_specified="$AR"
32327      tool_basename="${tool_specified##*/}"
32328      if test "x$tool_basename" = "x$tool_specified"; then
32329        # A command without a complete path is provided, search $PATH.
32330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32331$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32332        # Extract the first word of "$tool_basename", so it can be a program name with args.
32333set dummy $tool_basename; ac_word=$2
32334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32335$as_echo_n "checking for $ac_word... " >&6; }
32336if ${ac_cv_path_AR+:} false; then :
32337  $as_echo_n "(cached) " >&6
32338else
32339  case $AR in
32340  [\\/]* | ?:[\\/]*)
32341  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32342  ;;
32343  *)
32344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32345for as_dir in $PATH
32346do
32347  IFS=$as_save_IFS
32348  test -z "$as_dir" && as_dir=.
32349    for ac_exec_ext in '' $ac_executable_extensions; do
32350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32351    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32353    break 2
32354  fi
32355done
32356  done
32357IFS=$as_save_IFS
32358
32359  ;;
32360esac
32361fi
32362AR=$ac_cv_path_AR
32363if test -n "$AR"; then
32364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32365$as_echo "$AR" >&6; }
32366else
32367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32368$as_echo "no" >&6; }
32369fi
32370
32371
32372        if test "x$AR" = x; then
32373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32374        fi
32375      else
32376        # Otherwise we believe it is a complete path. Use it as it is.
32377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32378$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32380$as_echo_n "checking for AR... " >&6; }
32381        if test ! -x "$tool_specified"; then
32382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32383$as_echo "not found" >&6; }
32384          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32385        fi
32386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32387$as_echo "$tool_specified" >&6; }
32388      fi
32389    fi
32390  fi
32391
32392
32393  fi
32394
32395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32396
32397  # First separate the path from the arguments. This will split at the first
32398  # space.
32399  complete="$AR"
32400  path="${complete%% *}"
32401  tmp="$complete EOL"
32402  arguments="${tmp#* }"
32403
32404  # Input might be given as Windows format, start by converting to
32405  # unix format.
32406  new_path=`$CYGPATH -u "$path"`
32407
32408  # Now try to locate executable using which
32409  new_path=`$WHICH "$new_path" 2> /dev/null`
32410  # bat and cmd files are not always considered executable in cygwin causing which
32411  # to not find them
32412  if test "x$new_path" = x \
32413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32415    new_path=`$CYGPATH -u "$path"`
32416  fi
32417  if test "x$new_path" = x; then
32418    # Oops. Which didn't find the executable.
32419    # The splitting of arguments from the executable at a space might have been incorrect,
32420    # since paths with space are more likely in Windows. Give it another try with the whole
32421    # argument.
32422    path="$complete"
32423    arguments="EOL"
32424    new_path=`$CYGPATH -u "$path"`
32425    new_path=`$WHICH "$new_path" 2> /dev/null`
32426    # bat and cmd files are not always considered executable in cygwin causing which
32427    # to not find them
32428    if test "x$new_path" = x \
32429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32431      new_path=`$CYGPATH -u "$path"`
32432    fi
32433    if test "x$new_path" = x; then
32434      # It's still not found. Now this is an unrecoverable error.
32435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32436$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32437      has_space=`$ECHO "$complete" | $GREP " "`
32438      if test "x$has_space" != x; then
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32441      fi
32442      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32443    fi
32444  fi
32445
32446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32449  # "foo.exe" is OK but "foo" is an error.
32450  #
32451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32452  # It is also a way to make sure we got the proper file name for the real test later on.
32453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32454  if test "x$test_shortpath" = x; then
32455    # Short path failed, file does not exist as specified.
32456    # Try adding .exe or .cmd
32457    if test -f "${new_path}.exe"; then
32458      input_to_shortpath="${new_path}.exe"
32459    elif test -f "${new_path}.cmd"; then
32460      input_to_shortpath="${new_path}.cmd"
32461    else
32462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32463$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32466      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32467    fi
32468  else
32469    input_to_shortpath="$new_path"
32470  fi
32471
32472  # Call helper function which possibly converts this using DOS-style short mode.
32473  # If so, the updated path is stored in $new_path.
32474  new_path="$input_to_shortpath"
32475
32476  input_path="$input_to_shortpath"
32477  # Check if we need to convert this using DOS-style short mode. If the path
32478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32479  # take no chances and rewrite it.
32480  # Note: m4 eats our [], so we need to use [ and ] instead.
32481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32482  if test "x$has_forbidden_chars" != x; then
32483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32487      # Going to short mode and back again did indeed matter. Since short mode is
32488      # case insensitive, let's make it lowercase to improve readability.
32489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32490      # Now convert it back to Unix-stile (cygpath)
32491      input_path=`$CYGPATH -u "$shortmode_path"`
32492      new_path="$input_path"
32493    fi
32494  fi
32495
32496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32497  if test "x$test_cygdrive_prefix" = x; then
32498    # As a simple fix, exclude /usr/bin since it's not a real path.
32499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32501      # a path prefixed by /cygdrive for fixpath to work.
32502      new_path="$CYGWIN_ROOT_PATH$input_path"
32503    fi
32504  fi
32505
32506  # remove trailing .exe if any
32507  new_path="${new_path/%.exe/}"
32508
32509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32510
32511  # First separate the path from the arguments. This will split at the first
32512  # space.
32513  complete="$AR"
32514  path="${complete%% *}"
32515  tmp="$complete EOL"
32516  arguments="${tmp#* }"
32517
32518  # Input might be given as Windows format, start by converting to
32519  # unix format.
32520  new_path="$path"
32521
32522  windows_path="$new_path"
32523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32524    unix_path=`$CYGPATH -u "$windows_path"`
32525    new_path="$unix_path"
32526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32528    new_path="$unix_path"
32529  fi
32530
32531
32532  # Now try to locate executable using which
32533  new_path=`$WHICH "$new_path" 2> /dev/null`
32534
32535  if test "x$new_path" = x; then
32536    # Oops. Which didn't find the executable.
32537    # The splitting of arguments from the executable at a space might have been incorrect,
32538    # since paths with space are more likely in Windows. Give it another try with the whole
32539    # argument.
32540    path="$complete"
32541    arguments="EOL"
32542    new_path="$path"
32543
32544  windows_path="$new_path"
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546    unix_path=`$CYGPATH -u "$windows_path"`
32547    new_path="$unix_path"
32548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32550    new_path="$unix_path"
32551  fi
32552
32553
32554    new_path=`$WHICH "$new_path" 2> /dev/null`
32555
32556    if test "x$new_path" = x; then
32557      # It's still not found. Now this is an unrecoverable error.
32558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32559$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32560      has_space=`$ECHO "$complete" | $GREP " "`
32561      if test "x$has_space" != x; then
32562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32564      fi
32565      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32566    fi
32567  fi
32568
32569  # Now new_path has a complete unix path to the binary
32570  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32571    # Keep paths in /bin as-is, but remove trailing .exe if any
32572    new_path="${new_path/%.exe/}"
32573    # Do not save /bin paths to all_fixpath_prefixes!
32574  else
32575    # Not in mixed or Windows style, start by that.
32576    new_path=`cmd //c echo $new_path`
32577
32578  input_path="$new_path"
32579  # Check if we need to convert this using DOS-style short mode. If the path
32580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32581  # take no chances and rewrite it.
32582  # Note: m4 eats our [], so we need to use [ and ] instead.
32583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32584  if test "x$has_forbidden_chars" != x; then
32585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32587  fi
32588
32589    # Output is in $new_path
32590
32591  windows_path="$new_path"
32592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32593    unix_path=`$CYGPATH -u "$windows_path"`
32594    new_path="$unix_path"
32595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32597    new_path="$unix_path"
32598  fi
32599
32600    # remove trailing .exe if any
32601    new_path="${new_path/%.exe/}"
32602
32603    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32604    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32605  fi
32606
32607  else
32608    # We're on a posix platform. Hooray! :)
32609    # First separate the path from the arguments. This will split at the first
32610    # space.
32611    complete="$AR"
32612    path="${complete%% *}"
32613    tmp="$complete EOL"
32614    arguments="${tmp#* }"
32615
32616    # Cannot rely on the command "which" here since it doesn't always work.
32617    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32618    if test -z "$is_absolute_path"; then
32619      # Path to executable is not absolute. Find it.
32620      IFS_save="$IFS"
32621      IFS=:
32622      for p in $PATH; do
32623        if test -f "$p/$path" && test -x "$p/$path"; then
32624          new_path="$p/$path"
32625          break
32626        fi
32627      done
32628      IFS="$IFS_save"
32629    else
32630      # This is an absolute path, we can use it without further modifications.
32631      new_path="$path"
32632    fi
32633
32634    if test "x$new_path" = x; then
32635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32636$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32637      has_space=`$ECHO "$complete" | $GREP " "`
32638      if test "x$has_space" != x; then
32639        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32641      fi
32642      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32643    fi
32644  fi
32645
32646  # Now join together the path and the arguments once again
32647  if test "x$arguments" != xEOL; then
32648    new_complete="$new_path ${arguments% *}"
32649  else
32650    new_complete="$new_path"
32651  fi
32652
32653  if test "x$complete" != "x$new_complete"; then
32654    AR="$new_complete"
32655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32656$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32657  fi
32658
32659
32660
32661  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32662    ac_ext=m
32663ac_cpp='$OBJCPP $CPPFLAGS'
32664ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32665ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32666ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32667if test -n "$ac_tool_prefix"; then
32668  for ac_prog in gcc objcc objc cc CC
32669  do
32670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32673$as_echo_n "checking for $ac_word... " >&6; }
32674if ${ac_cv_prog_OBJC+:} false; then :
32675  $as_echo_n "(cached) " >&6
32676else
32677  if test -n "$OBJC"; then
32678  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32679else
32680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32681for as_dir in $PATH
32682do
32683  IFS=$as_save_IFS
32684  test -z "$as_dir" && as_dir=.
32685    for ac_exec_ext in '' $ac_executable_extensions; do
32686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32687    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32689    break 2
32690  fi
32691done
32692  done
32693IFS=$as_save_IFS
32694
32695fi
32696fi
32697OBJC=$ac_cv_prog_OBJC
32698if test -n "$OBJC"; then
32699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32700$as_echo "$OBJC" >&6; }
32701else
32702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32703$as_echo "no" >&6; }
32704fi
32705
32706
32707    test -n "$OBJC" && break
32708  done
32709fi
32710if test -z "$OBJC"; then
32711  ac_ct_OBJC=$OBJC
32712  for ac_prog in gcc objcc objc cc CC
32713do
32714  # Extract the first word of "$ac_prog", so it can be a program name with args.
32715set dummy $ac_prog; ac_word=$2
32716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32717$as_echo_n "checking for $ac_word... " >&6; }
32718if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32719  $as_echo_n "(cached) " >&6
32720else
32721  if test -n "$ac_ct_OBJC"; then
32722  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32723else
32724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32725for as_dir in $PATH
32726do
32727  IFS=$as_save_IFS
32728  test -z "$as_dir" && as_dir=.
32729    for ac_exec_ext in '' $ac_executable_extensions; do
32730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32731    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32733    break 2
32734  fi
32735done
32736  done
32737IFS=$as_save_IFS
32738
32739fi
32740fi
32741ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32742if test -n "$ac_ct_OBJC"; then
32743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32744$as_echo "$ac_ct_OBJC" >&6; }
32745else
32746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32747$as_echo "no" >&6; }
32748fi
32749
32750
32751  test -n "$ac_ct_OBJC" && break
32752done
32753
32754  if test "x$ac_ct_OBJC" = x; then
32755    OBJC="gcc"
32756  else
32757    case $cross_compiling:$ac_tool_warned in
32758yes:)
32759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32761ac_tool_warned=yes ;;
32762esac
32763    OBJC=$ac_ct_OBJC
32764  fi
32765fi
32766
32767# Provide some information about the compiler.
32768$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32769set X $ac_compile
32770ac_compiler=$2
32771for ac_option in --version -v -V -qversion; do
32772  { { ac_try="$ac_compiler $ac_option >&5"
32773case "(($ac_try" in
32774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32775  *) ac_try_echo=$ac_try;;
32776esac
32777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32778$as_echo "$ac_try_echo"; } >&5
32779  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32780  ac_status=$?
32781  if test -s conftest.err; then
32782    sed '10a\
32783... rest of stderr output deleted ...
32784         10q' conftest.err >conftest.er1
32785    cat conftest.er1 >&5
32786  fi
32787  rm -f conftest.er1 conftest.err
32788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32789  test $ac_status = 0; }
32790done
32791
32792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32793$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32794if ${ac_cv_objc_compiler_gnu+:} false; then :
32795  $as_echo_n "(cached) " >&6
32796else
32797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32798/* end confdefs.h.  */
32799
32800int
32801main ()
32802{
32803#ifndef __GNUC__
32804       choke me
32805#endif
32806
32807  ;
32808  return 0;
32809}
32810_ACEOF
32811if ac_fn_objc_try_compile "$LINENO"; then :
32812  ac_compiler_gnu=yes
32813else
32814  ac_compiler_gnu=no
32815fi
32816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32817ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32818
32819fi
32820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32821$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32822if test $ac_compiler_gnu = yes; then
32823  GOBJC=yes
32824else
32825  GOBJC=
32826fi
32827ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32828ac_save_OBJCFLAGS=$OBJCFLAGS
32829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32830$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32831if ${ac_cv_prog_objc_g+:} false; then :
32832  $as_echo_n "(cached) " >&6
32833else
32834  ac_save_objc_werror_flag=$ac_objc_werror_flag
32835   ac_objc_werror_flag=yes
32836   ac_cv_prog_objc_g=no
32837   OBJCFLAGS="-g"
32838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32839/* end confdefs.h.  */
32840
32841int
32842main ()
32843{
32844
32845  ;
32846  return 0;
32847}
32848_ACEOF
32849if ac_fn_objc_try_compile "$LINENO"; then :
32850  ac_cv_prog_objc_g=yes
32851else
32852  OBJCFLAGS=""
32853      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32854/* end confdefs.h.  */
32855
32856int
32857main ()
32858{
32859
32860  ;
32861  return 0;
32862}
32863_ACEOF
32864if ac_fn_objc_try_compile "$LINENO"; then :
32865
32866else
32867  ac_objc_werror_flag=$ac_save_objc_werror_flag
32868	 OBJCFLAGS="-g"
32869	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32870/* end confdefs.h.  */
32871
32872int
32873main ()
32874{
32875
32876  ;
32877  return 0;
32878}
32879_ACEOF
32880if ac_fn_objc_try_compile "$LINENO"; then :
32881  ac_cv_prog_objc_g=yes
32882fi
32883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32884fi
32885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32886fi
32887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32888   ac_objc_werror_flag=$ac_save_objc_werror_flag
32889fi
32890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32891$as_echo "$ac_cv_prog_objc_g" >&6; }
32892if test "$ac_test_OBJCFLAGS" = set; then
32893  OBJCFLAGS=$ac_save_OBJCFLAGS
32894elif test $ac_cv_prog_objc_g = yes; then
32895  if test "$GOBJC" = yes; then
32896    OBJCFLAGS="-g -O2"
32897  else
32898    OBJCFLAGS="-g"
32899  fi
32900else
32901  if test "$GOBJC" = yes; then
32902    OBJCFLAGS="-O2"
32903  else
32904    OBJCFLAGS=
32905  fi
32906fi
32907ac_ext=cpp
32908ac_cpp='$CXXCPP $CPPFLAGS'
32909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32912
32913
32914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32915
32916  # First separate the path from the arguments. This will split at the first
32917  # space.
32918  complete="$OBJC"
32919  path="${complete%% *}"
32920  tmp="$complete EOL"
32921  arguments="${tmp#* }"
32922
32923  # Input might be given as Windows format, start by converting to
32924  # unix format.
32925  new_path=`$CYGPATH -u "$path"`
32926
32927  # Now try to locate executable using which
32928  new_path=`$WHICH "$new_path" 2> /dev/null`
32929  # bat and cmd files are not always considered executable in cygwin causing which
32930  # to not find them
32931  if test "x$new_path" = x \
32932      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32933      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32934    new_path=`$CYGPATH -u "$path"`
32935  fi
32936  if test "x$new_path" = x; then
32937    # Oops. Which didn't find the executable.
32938    # The splitting of arguments from the executable at a space might have been incorrect,
32939    # since paths with space are more likely in Windows. Give it another try with the whole
32940    # argument.
32941    path="$complete"
32942    arguments="EOL"
32943    new_path=`$CYGPATH -u "$path"`
32944    new_path=`$WHICH "$new_path" 2> /dev/null`
32945    # bat and cmd files are not always considered executable in cygwin causing which
32946    # to not find them
32947    if test "x$new_path" = x \
32948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32950      new_path=`$CYGPATH -u "$path"`
32951    fi
32952    if test "x$new_path" = x; then
32953      # It's still not found. Now this is an unrecoverable error.
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32955$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32956      has_space=`$ECHO "$complete" | $GREP " "`
32957      if test "x$has_space" != x; then
32958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32960      fi
32961      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32962    fi
32963  fi
32964
32965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32968  # "foo.exe" is OK but "foo" is an error.
32969  #
32970  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32971  # It is also a way to make sure we got the proper file name for the real test later on.
32972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32973  if test "x$test_shortpath" = x; then
32974    # Short path failed, file does not exist as specified.
32975    # Try adding .exe or .cmd
32976    if test -f "${new_path}.exe"; then
32977      input_to_shortpath="${new_path}.exe"
32978    elif test -f "${new_path}.cmd"; then
32979      input_to_shortpath="${new_path}.cmd"
32980    else
32981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32982$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32985      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32986    fi
32987  else
32988    input_to_shortpath="$new_path"
32989  fi
32990
32991  # Call helper function which possibly converts this using DOS-style short mode.
32992  # If so, the updated path is stored in $new_path.
32993  new_path="$input_to_shortpath"
32994
32995  input_path="$input_to_shortpath"
32996  # Check if we need to convert this using DOS-style short mode. If the path
32997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32998  # take no chances and rewrite it.
32999  # Note: m4 eats our [], so we need to use [ and ] instead.
33000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33001  if test "x$has_forbidden_chars" != x; then
33002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33006      # Going to short mode and back again did indeed matter. Since short mode is
33007      # case insensitive, let's make it lowercase to improve readability.
33008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33009      # Now convert it back to Unix-stile (cygpath)
33010      input_path=`$CYGPATH -u "$shortmode_path"`
33011      new_path="$input_path"
33012    fi
33013  fi
33014
33015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33016  if test "x$test_cygdrive_prefix" = x; then
33017    # As a simple fix, exclude /usr/bin since it's not a real path.
33018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33020      # a path prefixed by /cygdrive for fixpath to work.
33021      new_path="$CYGWIN_ROOT_PATH$input_path"
33022    fi
33023  fi
33024
33025  # remove trailing .exe if any
33026  new_path="${new_path/%.exe/}"
33027
33028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33029
33030  # First separate the path from the arguments. This will split at the first
33031  # space.
33032  complete="$OBJC"
33033  path="${complete%% *}"
33034  tmp="$complete EOL"
33035  arguments="${tmp#* }"
33036
33037  # Input might be given as Windows format, start by converting to
33038  # unix format.
33039  new_path="$path"
33040
33041  windows_path="$new_path"
33042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33043    unix_path=`$CYGPATH -u "$windows_path"`
33044    new_path="$unix_path"
33045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33047    new_path="$unix_path"
33048  fi
33049
33050
33051  # Now try to locate executable using which
33052  new_path=`$WHICH "$new_path" 2> /dev/null`
33053
33054  if test "x$new_path" = x; then
33055    # Oops. Which didn't find the executable.
33056    # The splitting of arguments from the executable at a space might have been incorrect,
33057    # since paths with space are more likely in Windows. Give it another try with the whole
33058    # argument.
33059    path="$complete"
33060    arguments="EOL"
33061    new_path="$path"
33062
33063  windows_path="$new_path"
33064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33065    unix_path=`$CYGPATH -u "$windows_path"`
33066    new_path="$unix_path"
33067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33069    new_path="$unix_path"
33070  fi
33071
33072
33073    new_path=`$WHICH "$new_path" 2> /dev/null`
33074
33075    if test "x$new_path" = x; then
33076      # It's still not found. Now this is an unrecoverable error.
33077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33078$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33079      has_space=`$ECHO "$complete" | $GREP " "`
33080      if test "x$has_space" != x; then
33081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33083      fi
33084      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33085    fi
33086  fi
33087
33088  # Now new_path has a complete unix path to the binary
33089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33090    # Keep paths in /bin as-is, but remove trailing .exe if any
33091    new_path="${new_path/%.exe/}"
33092    # Do not save /bin paths to all_fixpath_prefixes!
33093  else
33094    # Not in mixed or Windows style, start by that.
33095    new_path=`cmd //c echo $new_path`
33096
33097  input_path="$new_path"
33098  # Check if we need to convert this using DOS-style short mode. If the path
33099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33100  # take no chances and rewrite it.
33101  # Note: m4 eats our [], so we need to use [ and ] instead.
33102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33103  if test "x$has_forbidden_chars" != x; then
33104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33106  fi
33107
33108    # Output is in $new_path
33109
33110  windows_path="$new_path"
33111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33112    unix_path=`$CYGPATH -u "$windows_path"`
33113    new_path="$unix_path"
33114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33116    new_path="$unix_path"
33117  fi
33118
33119    # remove trailing .exe if any
33120    new_path="${new_path/%.exe/}"
33121
33122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33124  fi
33125
33126  else
33127    # We're on a posix platform. Hooray! :)
33128    # First separate the path from the arguments. This will split at the first
33129    # space.
33130    complete="$OBJC"
33131    path="${complete%% *}"
33132    tmp="$complete EOL"
33133    arguments="${tmp#* }"
33134
33135    # Cannot rely on the command "which" here since it doesn't always work.
33136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33137    if test -z "$is_absolute_path"; then
33138      # Path to executable is not absolute. Find it.
33139      IFS_save="$IFS"
33140      IFS=:
33141      for p in $PATH; do
33142        if test -f "$p/$path" && test -x "$p/$path"; then
33143          new_path="$p/$path"
33144          break
33145        fi
33146      done
33147      IFS="$IFS_save"
33148    else
33149      # This is an absolute path, we can use it without further modifications.
33150      new_path="$path"
33151    fi
33152
33153    if test "x$new_path" = x; then
33154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33155$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33156      has_space=`$ECHO "$complete" | $GREP " "`
33157      if test "x$has_space" != x; then
33158        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33159$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33160      fi
33161      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33162    fi
33163  fi
33164
33165  # Now join together the path and the arguments once again
33166  if test "x$arguments" != xEOL; then
33167    new_complete="$new_path ${arguments% *}"
33168  else
33169    new_complete="$new_path"
33170  fi
33171
33172  if test "x$complete" != "x$new_complete"; then
33173    OBJC="$new_complete"
33174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33175$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33176  fi
33177
33178
33179
33180  # Publish this variable in the help.
33181
33182
33183  if test "x$LIPO" = x; then
33184    # The variable is not set by user, try to locate tool using the code snippet
33185    for ac_prog in lipo
33186do
33187  # Extract the first word of "$ac_prog", so it can be a program name with args.
33188set dummy $ac_prog; ac_word=$2
33189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33190$as_echo_n "checking for $ac_word... " >&6; }
33191if ${ac_cv_path_LIPO+:} false; then :
33192  $as_echo_n "(cached) " >&6
33193else
33194  case $LIPO in
33195  [\\/]* | ?:[\\/]*)
33196  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33197  ;;
33198  *)
33199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33200for as_dir in $PATH
33201do
33202  IFS=$as_save_IFS
33203  test -z "$as_dir" && as_dir=.
33204    for ac_exec_ext in '' $ac_executable_extensions; do
33205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33206    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33208    break 2
33209  fi
33210done
33211  done
33212IFS=$as_save_IFS
33213
33214  ;;
33215esac
33216fi
33217LIPO=$ac_cv_path_LIPO
33218if test -n "$LIPO"; then
33219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33220$as_echo "$LIPO" >&6; }
33221else
33222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33223$as_echo "no" >&6; }
33224fi
33225
33226
33227  test -n "$LIPO" && break
33228done
33229
33230  else
33231    # The variable is set, but is it from the command line or the environment?
33232
33233    # Try to remove the string !LIPO! from our list.
33234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33236      # If it failed, the variable was not from the command line. Ignore it,
33237      # but warn the user (except for BASH, which is always set by the calling BASH).
33238      if test "xLIPO" != xBASH; then
33239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33240$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33241      fi
33242      # Try to locate tool using the code snippet
33243      for ac_prog in lipo
33244do
33245  # Extract the first word of "$ac_prog", so it can be a program name with args.
33246set dummy $ac_prog; ac_word=$2
33247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33248$as_echo_n "checking for $ac_word... " >&6; }
33249if ${ac_cv_path_LIPO+:} false; then :
33250  $as_echo_n "(cached) " >&6
33251else
33252  case $LIPO in
33253  [\\/]* | ?:[\\/]*)
33254  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33255  ;;
33256  *)
33257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33258for as_dir in $PATH
33259do
33260  IFS=$as_save_IFS
33261  test -z "$as_dir" && as_dir=.
33262    for ac_exec_ext in '' $ac_executable_extensions; do
33263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33264    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33266    break 2
33267  fi
33268done
33269  done
33270IFS=$as_save_IFS
33271
33272  ;;
33273esac
33274fi
33275LIPO=$ac_cv_path_LIPO
33276if test -n "$LIPO"; then
33277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33278$as_echo "$LIPO" >&6; }
33279else
33280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33281$as_echo "no" >&6; }
33282fi
33283
33284
33285  test -n "$LIPO" && break
33286done
33287
33288    else
33289      # If it succeeded, then it was overridden by the user. We will use it
33290      # for the tool.
33291
33292      # First remove it from the list of overridden variables, so we can test
33293      # for unknown variables in the end.
33294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33295
33296      # Check if the provided tool contains a complete path.
33297      tool_specified="$LIPO"
33298      tool_basename="${tool_specified##*/}"
33299      if test "x$tool_basename" = "x$tool_specified"; then
33300        # A command without a complete path is provided, search $PATH.
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33302$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33303        # Extract the first word of "$tool_basename", so it can be a program name with args.
33304set dummy $tool_basename; ac_word=$2
33305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33306$as_echo_n "checking for $ac_word... " >&6; }
33307if ${ac_cv_path_LIPO+:} false; then :
33308  $as_echo_n "(cached) " >&6
33309else
33310  case $LIPO in
33311  [\\/]* | ?:[\\/]*)
33312  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33313  ;;
33314  *)
33315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33316for as_dir in $PATH
33317do
33318  IFS=$as_save_IFS
33319  test -z "$as_dir" && as_dir=.
33320    for ac_exec_ext in '' $ac_executable_extensions; do
33321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33322    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33324    break 2
33325  fi
33326done
33327  done
33328IFS=$as_save_IFS
33329
33330  ;;
33331esac
33332fi
33333LIPO=$ac_cv_path_LIPO
33334if test -n "$LIPO"; then
33335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33336$as_echo "$LIPO" >&6; }
33337else
33338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33339$as_echo "no" >&6; }
33340fi
33341
33342
33343        if test "x$LIPO" = x; then
33344          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33345        fi
33346      else
33347        # Otherwise we believe it is a complete path. Use it as it is.
33348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33349$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33351$as_echo_n "checking for LIPO... " >&6; }
33352        if test ! -x "$tool_specified"; then
33353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33354$as_echo "not found" >&6; }
33355          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33356        fi
33357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33358$as_echo "$tool_specified" >&6; }
33359      fi
33360    fi
33361  fi
33362
33363
33364
33365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33366
33367  # First separate the path from the arguments. This will split at the first
33368  # space.
33369  complete="$LIPO"
33370  path="${complete%% *}"
33371  tmp="$complete EOL"
33372  arguments="${tmp#* }"
33373
33374  # Input might be given as Windows format, start by converting to
33375  # unix format.
33376  new_path=`$CYGPATH -u "$path"`
33377
33378  # Now try to locate executable using which
33379  new_path=`$WHICH "$new_path" 2> /dev/null`
33380  # bat and cmd files are not always considered executable in cygwin causing which
33381  # to not find them
33382  if test "x$new_path" = x \
33383      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33384      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33385    new_path=`$CYGPATH -u "$path"`
33386  fi
33387  if test "x$new_path" = x; then
33388    # Oops. Which didn't find the executable.
33389    # The splitting of arguments from the executable at a space might have been incorrect,
33390    # since paths with space are more likely in Windows. Give it another try with the whole
33391    # argument.
33392    path="$complete"
33393    arguments="EOL"
33394    new_path=`$CYGPATH -u "$path"`
33395    new_path=`$WHICH "$new_path" 2> /dev/null`
33396    # bat and cmd files are not always considered executable in cygwin causing which
33397    # to not find them
33398    if test "x$new_path" = x \
33399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33401      new_path=`$CYGPATH -u "$path"`
33402    fi
33403    if test "x$new_path" = x; then
33404      # It's still not found. Now this is an unrecoverable error.
33405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33406$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33407      has_space=`$ECHO "$complete" | $GREP " "`
33408      if test "x$has_space" != x; then
33409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33411      fi
33412      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33413    fi
33414  fi
33415
33416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33419  # "foo.exe" is OK but "foo" is an error.
33420  #
33421  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33422  # It is also a way to make sure we got the proper file name for the real test later on.
33423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33424  if test "x$test_shortpath" = x; then
33425    # Short path failed, file does not exist as specified.
33426    # Try adding .exe or .cmd
33427    if test -f "${new_path}.exe"; then
33428      input_to_shortpath="${new_path}.exe"
33429    elif test -f "${new_path}.cmd"; then
33430      input_to_shortpath="${new_path}.cmd"
33431    else
33432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33433$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33436      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33437    fi
33438  else
33439    input_to_shortpath="$new_path"
33440  fi
33441
33442  # Call helper function which possibly converts this using DOS-style short mode.
33443  # If so, the updated path is stored in $new_path.
33444  new_path="$input_to_shortpath"
33445
33446  input_path="$input_to_shortpath"
33447  # Check if we need to convert this using DOS-style short mode. If the path
33448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33449  # take no chances and rewrite it.
33450  # Note: m4 eats our [], so we need to use [ and ] instead.
33451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33452  if test "x$has_forbidden_chars" != x; then
33453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33457      # Going to short mode and back again did indeed matter. Since short mode is
33458      # case insensitive, let's make it lowercase to improve readability.
33459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33460      # Now convert it back to Unix-stile (cygpath)
33461      input_path=`$CYGPATH -u "$shortmode_path"`
33462      new_path="$input_path"
33463    fi
33464  fi
33465
33466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33467  if test "x$test_cygdrive_prefix" = x; then
33468    # As a simple fix, exclude /usr/bin since it's not a real path.
33469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33471      # a path prefixed by /cygdrive for fixpath to work.
33472      new_path="$CYGWIN_ROOT_PATH$input_path"
33473    fi
33474  fi
33475
33476  # remove trailing .exe if any
33477  new_path="${new_path/%.exe/}"
33478
33479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33480
33481  # First separate the path from the arguments. This will split at the first
33482  # space.
33483  complete="$LIPO"
33484  path="${complete%% *}"
33485  tmp="$complete EOL"
33486  arguments="${tmp#* }"
33487
33488  # Input might be given as Windows format, start by converting to
33489  # unix format.
33490  new_path="$path"
33491
33492  windows_path="$new_path"
33493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33494    unix_path=`$CYGPATH -u "$windows_path"`
33495    new_path="$unix_path"
33496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33498    new_path="$unix_path"
33499  fi
33500
33501
33502  # Now try to locate executable using which
33503  new_path=`$WHICH "$new_path" 2> /dev/null`
33504
33505  if test "x$new_path" = x; then
33506    # Oops. Which didn't find the executable.
33507    # The splitting of arguments from the executable at a space might have been incorrect,
33508    # since paths with space are more likely in Windows. Give it another try with the whole
33509    # argument.
33510    path="$complete"
33511    arguments="EOL"
33512    new_path="$path"
33513
33514  windows_path="$new_path"
33515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33516    unix_path=`$CYGPATH -u "$windows_path"`
33517    new_path="$unix_path"
33518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33520    new_path="$unix_path"
33521  fi
33522
33523
33524    new_path=`$WHICH "$new_path" 2> /dev/null`
33525
33526    if test "x$new_path" = x; then
33527      # It's still not found. Now this is an unrecoverable error.
33528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33529$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33530      has_space=`$ECHO "$complete" | $GREP " "`
33531      if test "x$has_space" != x; then
33532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33534      fi
33535      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33536    fi
33537  fi
33538
33539  # Now new_path has a complete unix path to the binary
33540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33541    # Keep paths in /bin as-is, but remove trailing .exe if any
33542    new_path="${new_path/%.exe/}"
33543    # Do not save /bin paths to all_fixpath_prefixes!
33544  else
33545    # Not in mixed or Windows style, start by that.
33546    new_path=`cmd //c echo $new_path`
33547
33548  input_path="$new_path"
33549  # Check if we need to convert this using DOS-style short mode. If the path
33550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33551  # take no chances and rewrite it.
33552  # Note: m4 eats our [], so we need to use [ and ] instead.
33553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33554  if test "x$has_forbidden_chars" != x; then
33555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33557  fi
33558
33559    # Output is in $new_path
33560
33561  windows_path="$new_path"
33562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33563    unix_path=`$CYGPATH -u "$windows_path"`
33564    new_path="$unix_path"
33565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33567    new_path="$unix_path"
33568  fi
33569
33570    # remove trailing .exe if any
33571    new_path="${new_path/%.exe/}"
33572
33573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33575  fi
33576
33577  else
33578    # We're on a posix platform. Hooray! :)
33579    # First separate the path from the arguments. This will split at the first
33580    # space.
33581    complete="$LIPO"
33582    path="${complete%% *}"
33583    tmp="$complete EOL"
33584    arguments="${tmp#* }"
33585
33586    # Cannot rely on the command "which" here since it doesn't always work.
33587    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33588    if test -z "$is_absolute_path"; then
33589      # Path to executable is not absolute. Find it.
33590      IFS_save="$IFS"
33591      IFS=:
33592      for p in $PATH; do
33593        if test -f "$p/$path" && test -x "$p/$path"; then
33594          new_path="$p/$path"
33595          break
33596        fi
33597      done
33598      IFS="$IFS_save"
33599    else
33600      # This is an absolute path, we can use it without further modifications.
33601      new_path="$path"
33602    fi
33603
33604    if test "x$new_path" = x; then
33605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33606$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33607      has_space=`$ECHO "$complete" | $GREP " "`
33608      if test "x$has_space" != x; then
33609        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33611      fi
33612      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33613    fi
33614  fi
33615
33616  # Now join together the path and the arguments once again
33617  if test "x$arguments" != xEOL; then
33618    new_complete="$new_path ${arguments% *}"
33619  else
33620    new_complete="$new_path"
33621  fi
33622
33623  if test "x$complete" != "x$new_complete"; then
33624    LIPO="$new_complete"
33625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33626$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33627  fi
33628
33629  else
33630    OBJC=
33631  fi
33632
33633  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33634    # Extract the first word of "mt", so it can be a program name with args.
33635set dummy mt; ac_word=$2
33636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33637$as_echo_n "checking for $ac_word... " >&6; }
33638if ${ac_cv_prog_MT+:} false; then :
33639  $as_echo_n "(cached) " >&6
33640else
33641  if test -n "$MT"; then
33642  ac_cv_prog_MT="$MT" # Let the user override the test.
33643else
33644  ac_prog_rejected=no
33645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33646for as_dir in $PATH
33647do
33648  IFS=$as_save_IFS
33649  test -z "$as_dir" && as_dir=.
33650    for ac_exec_ext in '' $ac_executable_extensions; do
33651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33652    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33653       ac_prog_rejected=yes
33654       continue
33655     fi
33656    ac_cv_prog_MT="mt"
33657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33658    break 2
33659  fi
33660done
33661  done
33662IFS=$as_save_IFS
33663
33664if test $ac_prog_rejected = yes; then
33665  # We found a bogon in the path, so make sure we never use it.
33666  set dummy $ac_cv_prog_MT
33667  shift
33668  if test $# != 0; then
33669    # We chose a different compiler from the bogus one.
33670    # However, it has the same basename, so the bogon will be chosen
33671    # first if we set MT to just the basename; use the full file name.
33672    shift
33673    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33674  fi
33675fi
33676fi
33677fi
33678MT=$ac_cv_prog_MT
33679if test -n "$MT"; then
33680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33681$as_echo "$MT" >&6; }
33682else
33683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33684$as_echo "no" >&6; }
33685fi
33686
33687
33688
33689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33690
33691  # First separate the path from the arguments. This will split at the first
33692  # space.
33693  complete="$MT"
33694  path="${complete%% *}"
33695  tmp="$complete EOL"
33696  arguments="${tmp#* }"
33697
33698  # Input might be given as Windows format, start by converting to
33699  # unix format.
33700  new_path=`$CYGPATH -u "$path"`
33701
33702  # Now try to locate executable using which
33703  new_path=`$WHICH "$new_path" 2> /dev/null`
33704  # bat and cmd files are not always considered executable in cygwin causing which
33705  # to not find them
33706  if test "x$new_path" = x \
33707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33709    new_path=`$CYGPATH -u "$path"`
33710  fi
33711  if test "x$new_path" = x; then
33712    # Oops. Which didn't find the executable.
33713    # The splitting of arguments from the executable at a space might have been incorrect,
33714    # since paths with space are more likely in Windows. Give it another try with the whole
33715    # argument.
33716    path="$complete"
33717    arguments="EOL"
33718    new_path=`$CYGPATH -u "$path"`
33719    new_path=`$WHICH "$new_path" 2> /dev/null`
33720    # bat and cmd files are not always considered executable in cygwin causing which
33721    # to not find them
33722    if test "x$new_path" = x \
33723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33725      new_path=`$CYGPATH -u "$path"`
33726    fi
33727    if test "x$new_path" = x; then
33728      # It's still not found. Now this is an unrecoverable error.
33729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33730$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33731      has_space=`$ECHO "$complete" | $GREP " "`
33732      if test "x$has_space" != x; then
33733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33735      fi
33736      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33737    fi
33738  fi
33739
33740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33743  # "foo.exe" is OK but "foo" is an error.
33744  #
33745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33746  # It is also a way to make sure we got the proper file name for the real test later on.
33747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33748  if test "x$test_shortpath" = x; then
33749    # Short path failed, file does not exist as specified.
33750    # Try adding .exe or .cmd
33751    if test -f "${new_path}.exe"; then
33752      input_to_shortpath="${new_path}.exe"
33753    elif test -f "${new_path}.cmd"; then
33754      input_to_shortpath="${new_path}.cmd"
33755    else
33756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33757$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33760      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33761    fi
33762  else
33763    input_to_shortpath="$new_path"
33764  fi
33765
33766  # Call helper function which possibly converts this using DOS-style short mode.
33767  # If so, the updated path is stored in $new_path.
33768  new_path="$input_to_shortpath"
33769
33770  input_path="$input_to_shortpath"
33771  # Check if we need to convert this using DOS-style short mode. If the path
33772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33773  # take no chances and rewrite it.
33774  # Note: m4 eats our [], so we need to use [ and ] instead.
33775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33776  if test "x$has_forbidden_chars" != x; then
33777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33781      # Going to short mode and back again did indeed matter. Since short mode is
33782      # case insensitive, let's make it lowercase to improve readability.
33783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33784      # Now convert it back to Unix-stile (cygpath)
33785      input_path=`$CYGPATH -u "$shortmode_path"`
33786      new_path="$input_path"
33787    fi
33788  fi
33789
33790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33791  if test "x$test_cygdrive_prefix" = x; then
33792    # As a simple fix, exclude /usr/bin since it's not a real path.
33793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33795      # a path prefixed by /cygdrive for fixpath to work.
33796      new_path="$CYGWIN_ROOT_PATH$input_path"
33797    fi
33798  fi
33799
33800  # remove trailing .exe if any
33801  new_path="${new_path/%.exe/}"
33802
33803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33804
33805  # First separate the path from the arguments. This will split at the first
33806  # space.
33807  complete="$MT"
33808  path="${complete%% *}"
33809  tmp="$complete EOL"
33810  arguments="${tmp#* }"
33811
33812  # Input might be given as Windows format, start by converting to
33813  # unix format.
33814  new_path="$path"
33815
33816  windows_path="$new_path"
33817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33818    unix_path=`$CYGPATH -u "$windows_path"`
33819    new_path="$unix_path"
33820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33822    new_path="$unix_path"
33823  fi
33824
33825
33826  # Now try to locate executable using which
33827  new_path=`$WHICH "$new_path" 2> /dev/null`
33828
33829  if test "x$new_path" = x; then
33830    # Oops. Which didn't find the executable.
33831    # The splitting of arguments from the executable at a space might have been incorrect,
33832    # since paths with space are more likely in Windows. Give it another try with the whole
33833    # argument.
33834    path="$complete"
33835    arguments="EOL"
33836    new_path="$path"
33837
33838  windows_path="$new_path"
33839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840    unix_path=`$CYGPATH -u "$windows_path"`
33841    new_path="$unix_path"
33842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33844    new_path="$unix_path"
33845  fi
33846
33847
33848    new_path=`$WHICH "$new_path" 2> /dev/null`
33849
33850    if test "x$new_path" = x; then
33851      # It's still not found. Now this is an unrecoverable error.
33852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33853$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33854      has_space=`$ECHO "$complete" | $GREP " "`
33855      if test "x$has_space" != x; then
33856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33858      fi
33859      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33860    fi
33861  fi
33862
33863  # Now new_path has a complete unix path to the binary
33864  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33865    # Keep paths in /bin as-is, but remove trailing .exe if any
33866    new_path="${new_path/%.exe/}"
33867    # Do not save /bin paths to all_fixpath_prefixes!
33868  else
33869    # Not in mixed or Windows style, start by that.
33870    new_path=`cmd //c echo $new_path`
33871
33872  input_path="$new_path"
33873  # Check if we need to convert this using DOS-style short mode. If the path
33874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33875  # take no chances and rewrite it.
33876  # Note: m4 eats our [], so we need to use [ and ] instead.
33877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33878  if test "x$has_forbidden_chars" != x; then
33879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33881  fi
33882
33883    # Output is in $new_path
33884
33885  windows_path="$new_path"
33886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33887    unix_path=`$CYGPATH -u "$windows_path"`
33888    new_path="$unix_path"
33889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33891    new_path="$unix_path"
33892  fi
33893
33894    # remove trailing .exe if any
33895    new_path="${new_path/%.exe/}"
33896
33897    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33898    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33899  fi
33900
33901  else
33902    # We're on a posix platform. Hooray! :)
33903    # First separate the path from the arguments. This will split at the first
33904    # space.
33905    complete="$MT"
33906    path="${complete%% *}"
33907    tmp="$complete EOL"
33908    arguments="${tmp#* }"
33909
33910    # Cannot rely on the command "which" here since it doesn't always work.
33911    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33912    if test -z "$is_absolute_path"; then
33913      # Path to executable is not absolute. Find it.
33914      IFS_save="$IFS"
33915      IFS=:
33916      for p in $PATH; do
33917        if test -f "$p/$path" && test -x "$p/$path"; then
33918          new_path="$p/$path"
33919          break
33920        fi
33921      done
33922      IFS="$IFS_save"
33923    else
33924      # This is an absolute path, we can use it without further modifications.
33925      new_path="$path"
33926    fi
33927
33928    if test "x$new_path" = x; then
33929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33930$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33931      has_space=`$ECHO "$complete" | $GREP " "`
33932      if test "x$has_space" != x; then
33933        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33934$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33935      fi
33936      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33937    fi
33938  fi
33939
33940  # Now join together the path and the arguments once again
33941  if test "x$arguments" != xEOL; then
33942    new_complete="$new_path ${arguments% *}"
33943  else
33944    new_complete="$new_path"
33945  fi
33946
33947  if test "x$complete" != "x$new_complete"; then
33948    MT="$new_complete"
33949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33950$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33951  fi
33952
33953    # Setup the resource compiler (RC)
33954    # Extract the first word of "rc", so it can be a program name with args.
33955set dummy rc; ac_word=$2
33956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33957$as_echo_n "checking for $ac_word... " >&6; }
33958if ${ac_cv_prog_RC+:} false; then :
33959  $as_echo_n "(cached) " >&6
33960else
33961  if test -n "$RC"; then
33962  ac_cv_prog_RC="$RC" # Let the user override the test.
33963else
33964  ac_prog_rejected=no
33965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33966for as_dir in $PATH
33967do
33968  IFS=$as_save_IFS
33969  test -z "$as_dir" && as_dir=.
33970    for ac_exec_ext in '' $ac_executable_extensions; do
33971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33972    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33973       ac_prog_rejected=yes
33974       continue
33975     fi
33976    ac_cv_prog_RC="rc"
33977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33978    break 2
33979  fi
33980done
33981  done
33982IFS=$as_save_IFS
33983
33984if test $ac_prog_rejected = yes; then
33985  # We found a bogon in the path, so make sure we never use it.
33986  set dummy $ac_cv_prog_RC
33987  shift
33988  if test $# != 0; then
33989    # We chose a different compiler from the bogus one.
33990    # However, it has the same basename, so the bogon will be chosen
33991    # first if we set RC to just the basename; use the full file name.
33992    shift
33993    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33994  fi
33995fi
33996fi
33997fi
33998RC=$ac_cv_prog_RC
33999if test -n "$RC"; then
34000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34001$as_echo "$RC" >&6; }
34002else
34003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34004$as_echo "no" >&6; }
34005fi
34006
34007
34008
34009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34010
34011  # First separate the path from the arguments. This will split at the first
34012  # space.
34013  complete="$RC"
34014  path="${complete%% *}"
34015  tmp="$complete EOL"
34016  arguments="${tmp#* }"
34017
34018  # Input might be given as Windows format, start by converting to
34019  # unix format.
34020  new_path=`$CYGPATH -u "$path"`
34021
34022  # Now try to locate executable using which
34023  new_path=`$WHICH "$new_path" 2> /dev/null`
34024  # bat and cmd files are not always considered executable in cygwin causing which
34025  # to not find them
34026  if test "x$new_path" = x \
34027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34029    new_path=`$CYGPATH -u "$path"`
34030  fi
34031  if test "x$new_path" = x; then
34032    # Oops. Which didn't find the executable.
34033    # The splitting of arguments from the executable at a space might have been incorrect,
34034    # since paths with space are more likely in Windows. Give it another try with the whole
34035    # argument.
34036    path="$complete"
34037    arguments="EOL"
34038    new_path=`$CYGPATH -u "$path"`
34039    new_path=`$WHICH "$new_path" 2> /dev/null`
34040    # bat and cmd files are not always considered executable in cygwin causing which
34041    # to not find them
34042    if test "x$new_path" = x \
34043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34045      new_path=`$CYGPATH -u "$path"`
34046    fi
34047    if test "x$new_path" = x; then
34048      # It's still not found. Now this is an unrecoverable error.
34049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34050$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34051      has_space=`$ECHO "$complete" | $GREP " "`
34052      if test "x$has_space" != x; then
34053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34055      fi
34056      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34057    fi
34058  fi
34059
34060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34063  # "foo.exe" is OK but "foo" is an error.
34064  #
34065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34066  # It is also a way to make sure we got the proper file name for the real test later on.
34067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34068  if test "x$test_shortpath" = x; then
34069    # Short path failed, file does not exist as specified.
34070    # Try adding .exe or .cmd
34071    if test -f "${new_path}.exe"; then
34072      input_to_shortpath="${new_path}.exe"
34073    elif test -f "${new_path}.cmd"; then
34074      input_to_shortpath="${new_path}.cmd"
34075    else
34076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34077$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34080      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34081    fi
34082  else
34083    input_to_shortpath="$new_path"
34084  fi
34085
34086  # Call helper function which possibly converts this using DOS-style short mode.
34087  # If so, the updated path is stored in $new_path.
34088  new_path="$input_to_shortpath"
34089
34090  input_path="$input_to_shortpath"
34091  # Check if we need to convert this using DOS-style short mode. If the path
34092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34093  # take no chances and rewrite it.
34094  # Note: m4 eats our [], so we need to use [ and ] instead.
34095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34096  if test "x$has_forbidden_chars" != x; then
34097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34101      # Going to short mode and back again did indeed matter. Since short mode is
34102      # case insensitive, let's make it lowercase to improve readability.
34103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34104      # Now convert it back to Unix-stile (cygpath)
34105      input_path=`$CYGPATH -u "$shortmode_path"`
34106      new_path="$input_path"
34107    fi
34108  fi
34109
34110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34111  if test "x$test_cygdrive_prefix" = x; then
34112    # As a simple fix, exclude /usr/bin since it's not a real path.
34113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34115      # a path prefixed by /cygdrive for fixpath to work.
34116      new_path="$CYGWIN_ROOT_PATH$input_path"
34117    fi
34118  fi
34119
34120  # remove trailing .exe if any
34121  new_path="${new_path/%.exe/}"
34122
34123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34124
34125  # First separate the path from the arguments. This will split at the first
34126  # space.
34127  complete="$RC"
34128  path="${complete%% *}"
34129  tmp="$complete EOL"
34130  arguments="${tmp#* }"
34131
34132  # Input might be given as Windows format, start by converting to
34133  # unix format.
34134  new_path="$path"
34135
34136  windows_path="$new_path"
34137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34138    unix_path=`$CYGPATH -u "$windows_path"`
34139    new_path="$unix_path"
34140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34142    new_path="$unix_path"
34143  fi
34144
34145
34146  # Now try to locate executable using which
34147  new_path=`$WHICH "$new_path" 2> /dev/null`
34148
34149  if test "x$new_path" = x; then
34150    # Oops. Which didn't find the executable.
34151    # The splitting of arguments from the executable at a space might have been incorrect,
34152    # since paths with space are more likely in Windows. Give it another try with the whole
34153    # argument.
34154    path="$complete"
34155    arguments="EOL"
34156    new_path="$path"
34157
34158  windows_path="$new_path"
34159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34160    unix_path=`$CYGPATH -u "$windows_path"`
34161    new_path="$unix_path"
34162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34164    new_path="$unix_path"
34165  fi
34166
34167
34168    new_path=`$WHICH "$new_path" 2> /dev/null`
34169
34170    if test "x$new_path" = x; then
34171      # It's still not found. Now this is an unrecoverable error.
34172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34173$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34174      has_space=`$ECHO "$complete" | $GREP " "`
34175      if test "x$has_space" != x; then
34176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34178      fi
34179      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34180    fi
34181  fi
34182
34183  # Now new_path has a complete unix path to the binary
34184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34185    # Keep paths in /bin as-is, but remove trailing .exe if any
34186    new_path="${new_path/%.exe/}"
34187    # Do not save /bin paths to all_fixpath_prefixes!
34188  else
34189    # Not in mixed or Windows style, start by that.
34190    new_path=`cmd //c echo $new_path`
34191
34192  input_path="$new_path"
34193  # Check if we need to convert this using DOS-style short mode. If the path
34194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34195  # take no chances and rewrite it.
34196  # Note: m4 eats our [], so we need to use [ and ] instead.
34197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34198  if test "x$has_forbidden_chars" != x; then
34199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34201  fi
34202
34203    # Output is in $new_path
34204
34205  windows_path="$new_path"
34206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34207    unix_path=`$CYGPATH -u "$windows_path"`
34208    new_path="$unix_path"
34209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34211    new_path="$unix_path"
34212  fi
34213
34214    # remove trailing .exe if any
34215    new_path="${new_path/%.exe/}"
34216
34217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34219  fi
34220
34221  else
34222    # We're on a posix platform. Hooray! :)
34223    # First separate the path from the arguments. This will split at the first
34224    # space.
34225    complete="$RC"
34226    path="${complete%% *}"
34227    tmp="$complete EOL"
34228    arguments="${tmp#* }"
34229
34230    # Cannot rely on the command "which" here since it doesn't always work.
34231    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34232    if test -z "$is_absolute_path"; then
34233      # Path to executable is not absolute. Find it.
34234      IFS_save="$IFS"
34235      IFS=:
34236      for p in $PATH; do
34237        if test -f "$p/$path" && test -x "$p/$path"; then
34238          new_path="$p/$path"
34239          break
34240        fi
34241      done
34242      IFS="$IFS_save"
34243    else
34244      # This is an absolute path, we can use it without further modifications.
34245      new_path="$path"
34246    fi
34247
34248    if test "x$new_path" = x; then
34249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34250$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34251      has_space=`$ECHO "$complete" | $GREP " "`
34252      if test "x$has_space" != x; then
34253        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34255      fi
34256      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34257    fi
34258  fi
34259
34260  # Now join together the path and the arguments once again
34261  if test "x$arguments" != xEOL; then
34262    new_complete="$new_path ${arguments% *}"
34263  else
34264    new_complete="$new_path"
34265  fi
34266
34267  if test "x$complete" != "x$new_complete"; then
34268    RC="$new_complete"
34269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34270$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34271  fi
34272
34273    # Extract the first word of "dumpbin", so it can be a program name with args.
34274set dummy dumpbin; ac_word=$2
34275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34276$as_echo_n "checking for $ac_word... " >&6; }
34277if ${ac_cv_prog_DUMPBIN+:} false; then :
34278  $as_echo_n "(cached) " >&6
34279else
34280  if test -n "$DUMPBIN"; then
34281  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34282else
34283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34284for as_dir in $PATH
34285do
34286  IFS=$as_save_IFS
34287  test -z "$as_dir" && as_dir=.
34288    for ac_exec_ext in '' $ac_executable_extensions; do
34289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34290    ac_cv_prog_DUMPBIN="dumpbin"
34291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34292    break 2
34293  fi
34294done
34295  done
34296IFS=$as_save_IFS
34297
34298fi
34299fi
34300DUMPBIN=$ac_cv_prog_DUMPBIN
34301if test -n "$DUMPBIN"; then
34302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34303$as_echo "$DUMPBIN" >&6; }
34304else
34305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34306$as_echo "no" >&6; }
34307fi
34308
34309
34310
34311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34312
34313  # First separate the path from the arguments. This will split at the first
34314  # space.
34315  complete="$DUMPBIN"
34316  path="${complete%% *}"
34317  tmp="$complete EOL"
34318  arguments="${tmp#* }"
34319
34320  # Input might be given as Windows format, start by converting to
34321  # unix format.
34322  new_path=`$CYGPATH -u "$path"`
34323
34324  # Now try to locate executable using which
34325  new_path=`$WHICH "$new_path" 2> /dev/null`
34326  # bat and cmd files are not always considered executable in cygwin causing which
34327  # to not find them
34328  if test "x$new_path" = x \
34329      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34330      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34331    new_path=`$CYGPATH -u "$path"`
34332  fi
34333  if test "x$new_path" = x; then
34334    # Oops. Which didn't find the executable.
34335    # The splitting of arguments from the executable at a space might have been incorrect,
34336    # since paths with space are more likely in Windows. Give it another try with the whole
34337    # argument.
34338    path="$complete"
34339    arguments="EOL"
34340    new_path=`$CYGPATH -u "$path"`
34341    new_path=`$WHICH "$new_path" 2> /dev/null`
34342    # bat and cmd files are not always considered executable in cygwin causing which
34343    # to not find them
34344    if test "x$new_path" = x \
34345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34347      new_path=`$CYGPATH -u "$path"`
34348    fi
34349    if test "x$new_path" = x; then
34350      # It's still not found. Now this is an unrecoverable error.
34351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34352$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34353      has_space=`$ECHO "$complete" | $GREP " "`
34354      if test "x$has_space" != x; then
34355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34357      fi
34358      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34359    fi
34360  fi
34361
34362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34365  # "foo.exe" is OK but "foo" is an error.
34366  #
34367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34368  # It is also a way to make sure we got the proper file name for the real test later on.
34369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34370  if test "x$test_shortpath" = x; then
34371    # Short path failed, file does not exist as specified.
34372    # Try adding .exe or .cmd
34373    if test -f "${new_path}.exe"; then
34374      input_to_shortpath="${new_path}.exe"
34375    elif test -f "${new_path}.cmd"; then
34376      input_to_shortpath="${new_path}.cmd"
34377    else
34378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34379$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34382      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34383    fi
34384  else
34385    input_to_shortpath="$new_path"
34386  fi
34387
34388  # Call helper function which possibly converts this using DOS-style short mode.
34389  # If so, the updated path is stored in $new_path.
34390  new_path="$input_to_shortpath"
34391
34392  input_path="$input_to_shortpath"
34393  # Check if we need to convert this using DOS-style short mode. If the path
34394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34395  # take no chances and rewrite it.
34396  # Note: m4 eats our [], so we need to use [ and ] instead.
34397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34398  if test "x$has_forbidden_chars" != x; then
34399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34403      # Going to short mode and back again did indeed matter. Since short mode is
34404      # case insensitive, let's make it lowercase to improve readability.
34405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34406      # Now convert it back to Unix-stile (cygpath)
34407      input_path=`$CYGPATH -u "$shortmode_path"`
34408      new_path="$input_path"
34409    fi
34410  fi
34411
34412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34413  if test "x$test_cygdrive_prefix" = x; then
34414    # As a simple fix, exclude /usr/bin since it's not a real path.
34415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34417      # a path prefixed by /cygdrive for fixpath to work.
34418      new_path="$CYGWIN_ROOT_PATH$input_path"
34419    fi
34420  fi
34421
34422  # remove trailing .exe if any
34423  new_path="${new_path/%.exe/}"
34424
34425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34426
34427  # First separate the path from the arguments. This will split at the first
34428  # space.
34429  complete="$DUMPBIN"
34430  path="${complete%% *}"
34431  tmp="$complete EOL"
34432  arguments="${tmp#* }"
34433
34434  # Input might be given as Windows format, start by converting to
34435  # unix format.
34436  new_path="$path"
34437
34438  windows_path="$new_path"
34439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34440    unix_path=`$CYGPATH -u "$windows_path"`
34441    new_path="$unix_path"
34442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34444    new_path="$unix_path"
34445  fi
34446
34447
34448  # Now try to locate executable using which
34449  new_path=`$WHICH "$new_path" 2> /dev/null`
34450
34451  if test "x$new_path" = x; then
34452    # Oops. Which didn't find the executable.
34453    # The splitting of arguments from the executable at a space might have been incorrect,
34454    # since paths with space are more likely in Windows. Give it another try with the whole
34455    # argument.
34456    path="$complete"
34457    arguments="EOL"
34458    new_path="$path"
34459
34460  windows_path="$new_path"
34461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34462    unix_path=`$CYGPATH -u "$windows_path"`
34463    new_path="$unix_path"
34464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34466    new_path="$unix_path"
34467  fi
34468
34469
34470    new_path=`$WHICH "$new_path" 2> /dev/null`
34471
34472    if test "x$new_path" = x; then
34473      # It's still not found. Now this is an unrecoverable error.
34474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34475$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34476      has_space=`$ECHO "$complete" | $GREP " "`
34477      if test "x$has_space" != x; then
34478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34480      fi
34481      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34482    fi
34483  fi
34484
34485  # Now new_path has a complete unix path to the binary
34486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34487    # Keep paths in /bin as-is, but remove trailing .exe if any
34488    new_path="${new_path/%.exe/}"
34489    # Do not save /bin paths to all_fixpath_prefixes!
34490  else
34491    # Not in mixed or Windows style, start by that.
34492    new_path=`cmd //c echo $new_path`
34493
34494  input_path="$new_path"
34495  # Check if we need to convert this using DOS-style short mode. If the path
34496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34497  # take no chances and rewrite it.
34498  # Note: m4 eats our [], so we need to use [ and ] instead.
34499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34500  if test "x$has_forbidden_chars" != x; then
34501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34503  fi
34504
34505    # Output is in $new_path
34506
34507  windows_path="$new_path"
34508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34509    unix_path=`$CYGPATH -u "$windows_path"`
34510    new_path="$unix_path"
34511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34513    new_path="$unix_path"
34514  fi
34515
34516    # remove trailing .exe if any
34517    new_path="${new_path/%.exe/}"
34518
34519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34521  fi
34522
34523  else
34524    # We're on a posix platform. Hooray! :)
34525    # First separate the path from the arguments. This will split at the first
34526    # space.
34527    complete="$DUMPBIN"
34528    path="${complete%% *}"
34529    tmp="$complete EOL"
34530    arguments="${tmp#* }"
34531
34532    # Cannot rely on the command "which" here since it doesn't always work.
34533    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34534    if test -z "$is_absolute_path"; then
34535      # Path to executable is not absolute. Find it.
34536      IFS_save="$IFS"
34537      IFS=:
34538      for p in $PATH; do
34539        if test -f "$p/$path" && test -x "$p/$path"; then
34540          new_path="$p/$path"
34541          break
34542        fi
34543      done
34544      IFS="$IFS_save"
34545    else
34546      # This is an absolute path, we can use it without further modifications.
34547      new_path="$path"
34548    fi
34549
34550    if test "x$new_path" = x; then
34551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34552$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34553      has_space=`$ECHO "$complete" | $GREP " "`
34554      if test "x$has_space" != x; then
34555        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34557      fi
34558      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34559    fi
34560  fi
34561
34562  # Now join together the path and the arguments once again
34563  if test "x$arguments" != xEOL; then
34564    new_complete="$new_path ${arguments% *}"
34565  else
34566    new_complete="$new_path"
34567  fi
34568
34569  if test "x$complete" != "x$new_complete"; then
34570    DUMPBIN="$new_complete"
34571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34572$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34573  fi
34574
34575  fi
34576
34577  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34578
34579
34580  # Publish this variable in the help.
34581
34582
34583  if test "x$STRIP" = x; then
34584    # The variable is not set by user, try to locate tool using the code snippet
34585    for ac_prog in strip
34586do
34587  # Extract the first word of "$ac_prog", so it can be a program name with args.
34588set dummy $ac_prog; ac_word=$2
34589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34590$as_echo_n "checking for $ac_word... " >&6; }
34591if ${ac_cv_path_STRIP+:} false; then :
34592  $as_echo_n "(cached) " >&6
34593else
34594  case $STRIP in
34595  [\\/]* | ?:[\\/]*)
34596  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34597  ;;
34598  *)
34599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34600for as_dir in $PATH
34601do
34602  IFS=$as_save_IFS
34603  test -z "$as_dir" && as_dir=.
34604    for ac_exec_ext in '' $ac_executable_extensions; do
34605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34606    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34608    break 2
34609  fi
34610done
34611  done
34612IFS=$as_save_IFS
34613
34614  ;;
34615esac
34616fi
34617STRIP=$ac_cv_path_STRIP
34618if test -n "$STRIP"; then
34619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34620$as_echo "$STRIP" >&6; }
34621else
34622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34623$as_echo "no" >&6; }
34624fi
34625
34626
34627  test -n "$STRIP" && break
34628done
34629
34630  else
34631    # The variable is set, but is it from the command line or the environment?
34632
34633    # Try to remove the string !STRIP! from our list.
34634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34636      # If it failed, the variable was not from the command line. Ignore it,
34637      # but warn the user (except for BASH, which is always set by the calling BASH).
34638      if test "xSTRIP" != xBASH; then
34639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34640$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34641      fi
34642      # Try to locate tool using the code snippet
34643      for ac_prog in strip
34644do
34645  # Extract the first word of "$ac_prog", so it can be a program name with args.
34646set dummy $ac_prog; ac_word=$2
34647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34648$as_echo_n "checking for $ac_word... " >&6; }
34649if ${ac_cv_path_STRIP+:} false; then :
34650  $as_echo_n "(cached) " >&6
34651else
34652  case $STRIP in
34653  [\\/]* | ?:[\\/]*)
34654  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34655  ;;
34656  *)
34657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34658for as_dir in $PATH
34659do
34660  IFS=$as_save_IFS
34661  test -z "$as_dir" && as_dir=.
34662    for ac_exec_ext in '' $ac_executable_extensions; do
34663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34664    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34666    break 2
34667  fi
34668done
34669  done
34670IFS=$as_save_IFS
34671
34672  ;;
34673esac
34674fi
34675STRIP=$ac_cv_path_STRIP
34676if test -n "$STRIP"; then
34677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34678$as_echo "$STRIP" >&6; }
34679else
34680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34681$as_echo "no" >&6; }
34682fi
34683
34684
34685  test -n "$STRIP" && break
34686done
34687
34688    else
34689      # If it succeeded, then it was overridden by the user. We will use it
34690      # for the tool.
34691
34692      # First remove it from the list of overridden variables, so we can test
34693      # for unknown variables in the end.
34694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34695
34696      # Check if the provided tool contains a complete path.
34697      tool_specified="$STRIP"
34698      tool_basename="${tool_specified##*/}"
34699      if test "x$tool_basename" = "x$tool_specified"; then
34700        # A command without a complete path is provided, search $PATH.
34701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34702$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34703        # Extract the first word of "$tool_basename", so it can be a program name with args.
34704set dummy $tool_basename; ac_word=$2
34705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34706$as_echo_n "checking for $ac_word... " >&6; }
34707if ${ac_cv_path_STRIP+:} false; then :
34708  $as_echo_n "(cached) " >&6
34709else
34710  case $STRIP in
34711  [\\/]* | ?:[\\/]*)
34712  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34713  ;;
34714  *)
34715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34716for as_dir in $PATH
34717do
34718  IFS=$as_save_IFS
34719  test -z "$as_dir" && as_dir=.
34720    for ac_exec_ext in '' $ac_executable_extensions; do
34721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34722    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34724    break 2
34725  fi
34726done
34727  done
34728IFS=$as_save_IFS
34729
34730  ;;
34731esac
34732fi
34733STRIP=$ac_cv_path_STRIP
34734if test -n "$STRIP"; then
34735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34736$as_echo "$STRIP" >&6; }
34737else
34738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34739$as_echo "no" >&6; }
34740fi
34741
34742
34743        if test "x$STRIP" = x; then
34744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34745        fi
34746      else
34747        # Otherwise we believe it is a complete path. Use it as it is.
34748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34749$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34751$as_echo_n "checking for STRIP... " >&6; }
34752        if test ! -x "$tool_specified"; then
34753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34754$as_echo "not found" >&6; }
34755          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34756        fi
34757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34758$as_echo "$tool_specified" >&6; }
34759      fi
34760    fi
34761  fi
34762
34763
34764
34765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34766
34767  # First separate the path from the arguments. This will split at the first
34768  # space.
34769  complete="$STRIP"
34770  path="${complete%% *}"
34771  tmp="$complete EOL"
34772  arguments="${tmp#* }"
34773
34774  # Input might be given as Windows format, start by converting to
34775  # unix format.
34776  new_path=`$CYGPATH -u "$path"`
34777
34778  # Now try to locate executable using which
34779  new_path=`$WHICH "$new_path" 2> /dev/null`
34780  # bat and cmd files are not always considered executable in cygwin causing which
34781  # to not find them
34782  if test "x$new_path" = x \
34783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34785    new_path=`$CYGPATH -u "$path"`
34786  fi
34787  if test "x$new_path" = x; then
34788    # Oops. Which didn't find the executable.
34789    # The splitting of arguments from the executable at a space might have been incorrect,
34790    # since paths with space are more likely in Windows. Give it another try with the whole
34791    # argument.
34792    path="$complete"
34793    arguments="EOL"
34794    new_path=`$CYGPATH -u "$path"`
34795    new_path=`$WHICH "$new_path" 2> /dev/null`
34796    # bat and cmd files are not always considered executable in cygwin causing which
34797    # to not find them
34798    if test "x$new_path" = x \
34799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34801      new_path=`$CYGPATH -u "$path"`
34802    fi
34803    if test "x$new_path" = x; then
34804      # It's still not found. Now this is an unrecoverable error.
34805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34806$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34807      has_space=`$ECHO "$complete" | $GREP " "`
34808      if test "x$has_space" != x; then
34809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34811      fi
34812      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34813    fi
34814  fi
34815
34816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34819  # "foo.exe" is OK but "foo" is an error.
34820  #
34821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34822  # It is also a way to make sure we got the proper file name for the real test later on.
34823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34824  if test "x$test_shortpath" = x; then
34825    # Short path failed, file does not exist as specified.
34826    # Try adding .exe or .cmd
34827    if test -f "${new_path}.exe"; then
34828      input_to_shortpath="${new_path}.exe"
34829    elif test -f "${new_path}.cmd"; then
34830      input_to_shortpath="${new_path}.cmd"
34831    else
34832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34833$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34836      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34837    fi
34838  else
34839    input_to_shortpath="$new_path"
34840  fi
34841
34842  # Call helper function which possibly converts this using DOS-style short mode.
34843  # If so, the updated path is stored in $new_path.
34844  new_path="$input_to_shortpath"
34845
34846  input_path="$input_to_shortpath"
34847  # Check if we need to convert this using DOS-style short mode. If the path
34848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34849  # take no chances and rewrite it.
34850  # Note: m4 eats our [], so we need to use [ and ] instead.
34851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34852  if test "x$has_forbidden_chars" != x; then
34853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34857      # Going to short mode and back again did indeed matter. Since short mode is
34858      # case insensitive, let's make it lowercase to improve readability.
34859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34860      # Now convert it back to Unix-stile (cygpath)
34861      input_path=`$CYGPATH -u "$shortmode_path"`
34862      new_path="$input_path"
34863    fi
34864  fi
34865
34866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34867  if test "x$test_cygdrive_prefix" = x; then
34868    # As a simple fix, exclude /usr/bin since it's not a real path.
34869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34871      # a path prefixed by /cygdrive for fixpath to work.
34872      new_path="$CYGWIN_ROOT_PATH$input_path"
34873    fi
34874  fi
34875
34876  # remove trailing .exe if any
34877  new_path="${new_path/%.exe/}"
34878
34879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34880
34881  # First separate the path from the arguments. This will split at the first
34882  # space.
34883  complete="$STRIP"
34884  path="${complete%% *}"
34885  tmp="$complete EOL"
34886  arguments="${tmp#* }"
34887
34888  # Input might be given as Windows format, start by converting to
34889  # unix format.
34890  new_path="$path"
34891
34892  windows_path="$new_path"
34893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34894    unix_path=`$CYGPATH -u "$windows_path"`
34895    new_path="$unix_path"
34896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34898    new_path="$unix_path"
34899  fi
34900
34901
34902  # Now try to locate executable using which
34903  new_path=`$WHICH "$new_path" 2> /dev/null`
34904
34905  if test "x$new_path" = x; then
34906    # Oops. Which didn't find the executable.
34907    # The splitting of arguments from the executable at a space might have been incorrect,
34908    # since paths with space are more likely in Windows. Give it another try with the whole
34909    # argument.
34910    path="$complete"
34911    arguments="EOL"
34912    new_path="$path"
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923
34924    new_path=`$WHICH "$new_path" 2> /dev/null`
34925
34926    if test "x$new_path" = x; then
34927      # It's still not found. Now this is an unrecoverable error.
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34929$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34930      has_space=`$ECHO "$complete" | $GREP " "`
34931      if test "x$has_space" != x; then
34932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34934      fi
34935      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34936    fi
34937  fi
34938
34939  # Now new_path has a complete unix path to the binary
34940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34941    # Keep paths in /bin as-is, but remove trailing .exe if any
34942    new_path="${new_path/%.exe/}"
34943    # Do not save /bin paths to all_fixpath_prefixes!
34944  else
34945    # Not in mixed or Windows style, start by that.
34946    new_path=`cmd //c echo $new_path`
34947
34948  input_path="$new_path"
34949  # Check if we need to convert this using DOS-style short mode. If the path
34950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34951  # take no chances and rewrite it.
34952  # Note: m4 eats our [], so we need to use [ and ] instead.
34953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34954  if test "x$has_forbidden_chars" != x; then
34955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34957  fi
34958
34959    # Output is in $new_path
34960
34961  windows_path="$new_path"
34962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34963    unix_path=`$CYGPATH -u "$windows_path"`
34964    new_path="$unix_path"
34965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34967    new_path="$unix_path"
34968  fi
34969
34970    # remove trailing .exe if any
34971    new_path="${new_path/%.exe/}"
34972
34973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34975  fi
34976
34977  else
34978    # We're on a posix platform. Hooray! :)
34979    # First separate the path from the arguments. This will split at the first
34980    # space.
34981    complete="$STRIP"
34982    path="${complete%% *}"
34983    tmp="$complete EOL"
34984    arguments="${tmp#* }"
34985
34986    # Cannot rely on the command "which" here since it doesn't always work.
34987    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34988    if test -z "$is_absolute_path"; then
34989      # Path to executable is not absolute. Find it.
34990      IFS_save="$IFS"
34991      IFS=:
34992      for p in $PATH; do
34993        if test -f "$p/$path" && test -x "$p/$path"; then
34994          new_path="$p/$path"
34995          break
34996        fi
34997      done
34998      IFS="$IFS_save"
34999    else
35000      # This is an absolute path, we can use it without further modifications.
35001      new_path="$path"
35002    fi
35003
35004    if test "x$new_path" = x; then
35005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35006$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35007      has_space=`$ECHO "$complete" | $GREP " "`
35008      if test "x$has_space" != x; then
35009        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35011      fi
35012      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35013    fi
35014  fi
35015
35016  # Now join together the path and the arguments once again
35017  if test "x$arguments" != xEOL; then
35018    new_complete="$new_path ${arguments% *}"
35019  else
35020    new_complete="$new_path"
35021  fi
35022
35023  if test "x$complete" != "x$new_complete"; then
35024    STRIP="$new_complete"
35025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35026$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35027  fi
35028
35029
35030
35031  # Publish this variable in the help.
35032
35033
35034  if test "x$NM" = x; then
35035    # The variable is not set by user, try to locate tool using the code snippet
35036    for ac_prog in nm
35037do
35038  # Extract the first word of "$ac_prog", so it can be a program name with args.
35039set dummy $ac_prog; ac_word=$2
35040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35041$as_echo_n "checking for $ac_word... " >&6; }
35042if ${ac_cv_path_NM+:} false; then :
35043  $as_echo_n "(cached) " >&6
35044else
35045  case $NM in
35046  [\\/]* | ?:[\\/]*)
35047  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35048  ;;
35049  *)
35050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35051for as_dir in $PATH
35052do
35053  IFS=$as_save_IFS
35054  test -z "$as_dir" && as_dir=.
35055    for ac_exec_ext in '' $ac_executable_extensions; do
35056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35057    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35059    break 2
35060  fi
35061done
35062  done
35063IFS=$as_save_IFS
35064
35065  ;;
35066esac
35067fi
35068NM=$ac_cv_path_NM
35069if test -n "$NM"; then
35070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35071$as_echo "$NM" >&6; }
35072else
35073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35074$as_echo "no" >&6; }
35075fi
35076
35077
35078  test -n "$NM" && break
35079done
35080
35081  else
35082    # The variable is set, but is it from the command line or the environment?
35083
35084    # Try to remove the string !NM! from our list.
35085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35087      # If it failed, the variable was not from the command line. Ignore it,
35088      # but warn the user (except for BASH, which is always set by the calling BASH).
35089      if test "xNM" != xBASH; then
35090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35091$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35092      fi
35093      # Try to locate tool using the code snippet
35094      for ac_prog in nm
35095do
35096  # Extract the first word of "$ac_prog", so it can be a program name with args.
35097set dummy $ac_prog; ac_word=$2
35098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35099$as_echo_n "checking for $ac_word... " >&6; }
35100if ${ac_cv_path_NM+:} false; then :
35101  $as_echo_n "(cached) " >&6
35102else
35103  case $NM in
35104  [\\/]* | ?:[\\/]*)
35105  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35106  ;;
35107  *)
35108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35109for as_dir in $PATH
35110do
35111  IFS=$as_save_IFS
35112  test -z "$as_dir" && as_dir=.
35113    for ac_exec_ext in '' $ac_executable_extensions; do
35114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35115    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35117    break 2
35118  fi
35119done
35120  done
35121IFS=$as_save_IFS
35122
35123  ;;
35124esac
35125fi
35126NM=$ac_cv_path_NM
35127if test -n "$NM"; then
35128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35129$as_echo "$NM" >&6; }
35130else
35131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35132$as_echo "no" >&6; }
35133fi
35134
35135
35136  test -n "$NM" && break
35137done
35138
35139    else
35140      # If it succeeded, then it was overridden by the user. We will use it
35141      # for the tool.
35142
35143      # First remove it from the list of overridden variables, so we can test
35144      # for unknown variables in the end.
35145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35146
35147      # Check if the provided tool contains a complete path.
35148      tool_specified="$NM"
35149      tool_basename="${tool_specified##*/}"
35150      if test "x$tool_basename" = "x$tool_specified"; then
35151        # A command without a complete path is provided, search $PATH.
35152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35153$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35154        # Extract the first word of "$tool_basename", so it can be a program name with args.
35155set dummy $tool_basename; ac_word=$2
35156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35157$as_echo_n "checking for $ac_word... " >&6; }
35158if ${ac_cv_path_NM+:} false; then :
35159  $as_echo_n "(cached) " >&6
35160else
35161  case $NM in
35162  [\\/]* | ?:[\\/]*)
35163  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35164  ;;
35165  *)
35166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35167for as_dir in $PATH
35168do
35169  IFS=$as_save_IFS
35170  test -z "$as_dir" && as_dir=.
35171    for ac_exec_ext in '' $ac_executable_extensions; do
35172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35173    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35175    break 2
35176  fi
35177done
35178  done
35179IFS=$as_save_IFS
35180
35181  ;;
35182esac
35183fi
35184NM=$ac_cv_path_NM
35185if test -n "$NM"; then
35186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35187$as_echo "$NM" >&6; }
35188else
35189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35190$as_echo "no" >&6; }
35191fi
35192
35193
35194        if test "x$NM" = x; then
35195          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35196        fi
35197      else
35198        # Otherwise we believe it is a complete path. Use it as it is.
35199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35200$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35202$as_echo_n "checking for NM... " >&6; }
35203        if test ! -x "$tool_specified"; then
35204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35205$as_echo "not found" >&6; }
35206          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35207        fi
35208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35209$as_echo "$tool_specified" >&6; }
35210      fi
35211    fi
35212  fi
35213
35214
35215
35216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35217
35218  # First separate the path from the arguments. This will split at the first
35219  # space.
35220  complete="$NM"
35221  path="${complete%% *}"
35222  tmp="$complete EOL"
35223  arguments="${tmp#* }"
35224
35225  # Input might be given as Windows format, start by converting to
35226  # unix format.
35227  new_path=`$CYGPATH -u "$path"`
35228
35229  # Now try to locate executable using which
35230  new_path=`$WHICH "$new_path" 2> /dev/null`
35231  # bat and cmd files are not always considered executable in cygwin causing which
35232  # to not find them
35233  if test "x$new_path" = x \
35234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35236    new_path=`$CYGPATH -u "$path"`
35237  fi
35238  if test "x$new_path" = x; then
35239    # Oops. Which didn't find the executable.
35240    # The splitting of arguments from the executable at a space might have been incorrect,
35241    # since paths with space are more likely in Windows. Give it another try with the whole
35242    # argument.
35243    path="$complete"
35244    arguments="EOL"
35245    new_path=`$CYGPATH -u "$path"`
35246    new_path=`$WHICH "$new_path" 2> /dev/null`
35247    # bat and cmd files are not always considered executable in cygwin causing which
35248    # to not find them
35249    if test "x$new_path" = x \
35250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35252      new_path=`$CYGPATH -u "$path"`
35253    fi
35254    if test "x$new_path" = x; then
35255      # It's still not found. Now this is an unrecoverable error.
35256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35257$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35258      has_space=`$ECHO "$complete" | $GREP " "`
35259      if test "x$has_space" != x; then
35260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35262      fi
35263      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35264    fi
35265  fi
35266
35267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35270  # "foo.exe" is OK but "foo" is an error.
35271  #
35272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35273  # It is also a way to make sure we got the proper file name for the real test later on.
35274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35275  if test "x$test_shortpath" = x; then
35276    # Short path failed, file does not exist as specified.
35277    # Try adding .exe or .cmd
35278    if test -f "${new_path}.exe"; then
35279      input_to_shortpath="${new_path}.exe"
35280    elif test -f "${new_path}.cmd"; then
35281      input_to_shortpath="${new_path}.cmd"
35282    else
35283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35284$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35287      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35288    fi
35289  else
35290    input_to_shortpath="$new_path"
35291  fi
35292
35293  # Call helper function which possibly converts this using DOS-style short mode.
35294  # If so, the updated path is stored in $new_path.
35295  new_path="$input_to_shortpath"
35296
35297  input_path="$input_to_shortpath"
35298  # Check if we need to convert this using DOS-style short mode. If the path
35299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35300  # take no chances and rewrite it.
35301  # Note: m4 eats our [], so we need to use [ and ] instead.
35302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35303  if test "x$has_forbidden_chars" != x; then
35304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35308      # Going to short mode and back again did indeed matter. Since short mode is
35309      # case insensitive, let's make it lowercase to improve readability.
35310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35311      # Now convert it back to Unix-stile (cygpath)
35312      input_path=`$CYGPATH -u "$shortmode_path"`
35313      new_path="$input_path"
35314    fi
35315  fi
35316
35317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35318  if test "x$test_cygdrive_prefix" = x; then
35319    # As a simple fix, exclude /usr/bin since it's not a real path.
35320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35322      # a path prefixed by /cygdrive for fixpath to work.
35323      new_path="$CYGWIN_ROOT_PATH$input_path"
35324    fi
35325  fi
35326
35327  # remove trailing .exe if any
35328  new_path="${new_path/%.exe/}"
35329
35330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35331
35332  # First separate the path from the arguments. This will split at the first
35333  # space.
35334  complete="$NM"
35335  path="${complete%% *}"
35336  tmp="$complete EOL"
35337  arguments="${tmp#* }"
35338
35339  # Input might be given as Windows format, start by converting to
35340  # unix format.
35341  new_path="$path"
35342
35343  windows_path="$new_path"
35344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35345    unix_path=`$CYGPATH -u "$windows_path"`
35346    new_path="$unix_path"
35347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35349    new_path="$unix_path"
35350  fi
35351
35352
35353  # Now try to locate executable using which
35354  new_path=`$WHICH "$new_path" 2> /dev/null`
35355
35356  if test "x$new_path" = x; then
35357    # Oops. Which didn't find the executable.
35358    # The splitting of arguments from the executable at a space might have been incorrect,
35359    # since paths with space are more likely in Windows. Give it another try with the whole
35360    # argument.
35361    path="$complete"
35362    arguments="EOL"
35363    new_path="$path"
35364
35365  windows_path="$new_path"
35366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35367    unix_path=`$CYGPATH -u "$windows_path"`
35368    new_path="$unix_path"
35369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35371    new_path="$unix_path"
35372  fi
35373
35374
35375    new_path=`$WHICH "$new_path" 2> /dev/null`
35376
35377    if test "x$new_path" = x; then
35378      # It's still not found. Now this is an unrecoverable error.
35379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35380$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35381      has_space=`$ECHO "$complete" | $GREP " "`
35382      if test "x$has_space" != x; then
35383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35385      fi
35386      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35387    fi
35388  fi
35389
35390  # Now new_path has a complete unix path to the binary
35391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35392    # Keep paths in /bin as-is, but remove trailing .exe if any
35393    new_path="${new_path/%.exe/}"
35394    # Do not save /bin paths to all_fixpath_prefixes!
35395  else
35396    # Not in mixed or Windows style, start by that.
35397    new_path=`cmd //c echo $new_path`
35398
35399  input_path="$new_path"
35400  # Check if we need to convert this using DOS-style short mode. If the path
35401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35402  # take no chances and rewrite it.
35403  # Note: m4 eats our [], so we need to use [ and ] instead.
35404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35405  if test "x$has_forbidden_chars" != x; then
35406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35408  fi
35409
35410    # Output is in $new_path
35411
35412  windows_path="$new_path"
35413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35414    unix_path=`$CYGPATH -u "$windows_path"`
35415    new_path="$unix_path"
35416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35418    new_path="$unix_path"
35419  fi
35420
35421    # remove trailing .exe if any
35422    new_path="${new_path/%.exe/}"
35423
35424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35426  fi
35427
35428  else
35429    # We're on a posix platform. Hooray! :)
35430    # First separate the path from the arguments. This will split at the first
35431    # space.
35432    complete="$NM"
35433    path="${complete%% *}"
35434    tmp="$complete EOL"
35435    arguments="${tmp#* }"
35436
35437    # Cannot rely on the command "which" here since it doesn't always work.
35438    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35439    if test -z "$is_absolute_path"; then
35440      # Path to executable is not absolute. Find it.
35441      IFS_save="$IFS"
35442      IFS=:
35443      for p in $PATH; do
35444        if test -f "$p/$path" && test -x "$p/$path"; then
35445          new_path="$p/$path"
35446          break
35447        fi
35448      done
35449      IFS="$IFS_save"
35450    else
35451      # This is an absolute path, we can use it without further modifications.
35452      new_path="$path"
35453    fi
35454
35455    if test "x$new_path" = x; then
35456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35457$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35458      has_space=`$ECHO "$complete" | $GREP " "`
35459      if test "x$has_space" != x; then
35460        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35461$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35462      fi
35463      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35464    fi
35465  fi
35466
35467  # Now join together the path and the arguments once again
35468  if test "x$arguments" != xEOL; then
35469    new_complete="$new_path ${arguments% *}"
35470  else
35471    new_complete="$new_path"
35472  fi
35473
35474  if test "x$complete" != "x$new_complete"; then
35475    NM="$new_complete"
35476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35477$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35478  fi
35479
35480
35481
35482  # Publish this variable in the help.
35483
35484
35485  if test "x$GNM" = x; then
35486    # The variable is not set by user, try to locate tool using the code snippet
35487    for ac_prog in gnm
35488do
35489  # Extract the first word of "$ac_prog", so it can be a program name with args.
35490set dummy $ac_prog; ac_word=$2
35491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35492$as_echo_n "checking for $ac_word... " >&6; }
35493if ${ac_cv_path_GNM+:} false; then :
35494  $as_echo_n "(cached) " >&6
35495else
35496  case $GNM in
35497  [\\/]* | ?:[\\/]*)
35498  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35499  ;;
35500  *)
35501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35502for as_dir in $PATH
35503do
35504  IFS=$as_save_IFS
35505  test -z "$as_dir" && as_dir=.
35506    for ac_exec_ext in '' $ac_executable_extensions; do
35507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35508    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35510    break 2
35511  fi
35512done
35513  done
35514IFS=$as_save_IFS
35515
35516  ;;
35517esac
35518fi
35519GNM=$ac_cv_path_GNM
35520if test -n "$GNM"; then
35521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35522$as_echo "$GNM" >&6; }
35523else
35524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35525$as_echo "no" >&6; }
35526fi
35527
35528
35529  test -n "$GNM" && break
35530done
35531
35532  else
35533    # The variable is set, but is it from the command line or the environment?
35534
35535    # Try to remove the string !GNM! from our list.
35536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35538      # If it failed, the variable was not from the command line. Ignore it,
35539      # but warn the user (except for BASH, which is always set by the calling BASH).
35540      if test "xGNM" != xBASH; then
35541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35542$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35543      fi
35544      # Try to locate tool using the code snippet
35545      for ac_prog in gnm
35546do
35547  # Extract the first word of "$ac_prog", so it can be a program name with args.
35548set dummy $ac_prog; ac_word=$2
35549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35550$as_echo_n "checking for $ac_word... " >&6; }
35551if ${ac_cv_path_GNM+:} false; then :
35552  $as_echo_n "(cached) " >&6
35553else
35554  case $GNM in
35555  [\\/]* | ?:[\\/]*)
35556  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35557  ;;
35558  *)
35559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35560for as_dir in $PATH
35561do
35562  IFS=$as_save_IFS
35563  test -z "$as_dir" && as_dir=.
35564    for ac_exec_ext in '' $ac_executable_extensions; do
35565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35566    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35568    break 2
35569  fi
35570done
35571  done
35572IFS=$as_save_IFS
35573
35574  ;;
35575esac
35576fi
35577GNM=$ac_cv_path_GNM
35578if test -n "$GNM"; then
35579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35580$as_echo "$GNM" >&6; }
35581else
35582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35583$as_echo "no" >&6; }
35584fi
35585
35586
35587  test -n "$GNM" && break
35588done
35589
35590    else
35591      # If it succeeded, then it was overridden by the user. We will use it
35592      # for the tool.
35593
35594      # First remove it from the list of overridden variables, so we can test
35595      # for unknown variables in the end.
35596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35597
35598      # Check if the provided tool contains a complete path.
35599      tool_specified="$GNM"
35600      tool_basename="${tool_specified##*/}"
35601      if test "x$tool_basename" = "x$tool_specified"; then
35602        # A command without a complete path is provided, search $PATH.
35603        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35604$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35605        # Extract the first word of "$tool_basename", so it can be a program name with args.
35606set dummy $tool_basename; ac_word=$2
35607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35608$as_echo_n "checking for $ac_word... " >&6; }
35609if ${ac_cv_path_GNM+:} false; then :
35610  $as_echo_n "(cached) " >&6
35611else
35612  case $GNM in
35613  [\\/]* | ?:[\\/]*)
35614  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35615  ;;
35616  *)
35617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35618for as_dir in $PATH
35619do
35620  IFS=$as_save_IFS
35621  test -z "$as_dir" && as_dir=.
35622    for ac_exec_ext in '' $ac_executable_extensions; do
35623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35624    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35626    break 2
35627  fi
35628done
35629  done
35630IFS=$as_save_IFS
35631
35632  ;;
35633esac
35634fi
35635GNM=$ac_cv_path_GNM
35636if test -n "$GNM"; then
35637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35638$as_echo "$GNM" >&6; }
35639else
35640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35641$as_echo "no" >&6; }
35642fi
35643
35644
35645        if test "x$GNM" = x; then
35646          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35647        fi
35648      else
35649        # Otherwise we believe it is a complete path. Use it as it is.
35650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35651$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35653$as_echo_n "checking for GNM... " >&6; }
35654        if test ! -x "$tool_specified"; then
35655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35656$as_echo "not found" >&6; }
35657          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35658        fi
35659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35660$as_echo "$tool_specified" >&6; }
35661      fi
35662    fi
35663  fi
35664
35665
35666
35667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35668
35669  # First separate the path from the arguments. This will split at the first
35670  # space.
35671  complete="$GNM"
35672  path="${complete%% *}"
35673  tmp="$complete EOL"
35674  arguments="${tmp#* }"
35675
35676  # Input might be given as Windows format, start by converting to
35677  # unix format.
35678  new_path=`$CYGPATH -u "$path"`
35679
35680  # Now try to locate executable using which
35681  new_path=`$WHICH "$new_path" 2> /dev/null`
35682  # bat and cmd files are not always considered executable in cygwin causing which
35683  # to not find them
35684  if test "x$new_path" = x \
35685      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35686      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35687    new_path=`$CYGPATH -u "$path"`
35688  fi
35689  if test "x$new_path" = x; then
35690    # Oops. Which didn't find the executable.
35691    # The splitting of arguments from the executable at a space might have been incorrect,
35692    # since paths with space are more likely in Windows. Give it another try with the whole
35693    # argument.
35694    path="$complete"
35695    arguments="EOL"
35696    new_path=`$CYGPATH -u "$path"`
35697    new_path=`$WHICH "$new_path" 2> /dev/null`
35698    # bat and cmd files are not always considered executable in cygwin causing which
35699    # to not find them
35700    if test "x$new_path" = x \
35701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35703      new_path=`$CYGPATH -u "$path"`
35704    fi
35705    if test "x$new_path" = x; then
35706      # It's still not found. Now this is an unrecoverable error.
35707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35708$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35709      has_space=`$ECHO "$complete" | $GREP " "`
35710      if test "x$has_space" != x; then
35711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35713      fi
35714      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35715    fi
35716  fi
35717
35718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35721  # "foo.exe" is OK but "foo" is an error.
35722  #
35723  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35724  # It is also a way to make sure we got the proper file name for the real test later on.
35725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35726  if test "x$test_shortpath" = x; then
35727    # Short path failed, file does not exist as specified.
35728    # Try adding .exe or .cmd
35729    if test -f "${new_path}.exe"; then
35730      input_to_shortpath="${new_path}.exe"
35731    elif test -f "${new_path}.cmd"; then
35732      input_to_shortpath="${new_path}.cmd"
35733    else
35734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35735$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35738      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35739    fi
35740  else
35741    input_to_shortpath="$new_path"
35742  fi
35743
35744  # Call helper function which possibly converts this using DOS-style short mode.
35745  # If so, the updated path is stored in $new_path.
35746  new_path="$input_to_shortpath"
35747
35748  input_path="$input_to_shortpath"
35749  # Check if we need to convert this using DOS-style short mode. If the path
35750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35751  # take no chances and rewrite it.
35752  # Note: m4 eats our [], so we need to use [ and ] instead.
35753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35754  if test "x$has_forbidden_chars" != x; then
35755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35759      # Going to short mode and back again did indeed matter. Since short mode is
35760      # case insensitive, let's make it lowercase to improve readability.
35761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35762      # Now convert it back to Unix-stile (cygpath)
35763      input_path=`$CYGPATH -u "$shortmode_path"`
35764      new_path="$input_path"
35765    fi
35766  fi
35767
35768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35769  if test "x$test_cygdrive_prefix" = x; then
35770    # As a simple fix, exclude /usr/bin since it's not a real path.
35771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35773      # a path prefixed by /cygdrive for fixpath to work.
35774      new_path="$CYGWIN_ROOT_PATH$input_path"
35775    fi
35776  fi
35777
35778  # remove trailing .exe if any
35779  new_path="${new_path/%.exe/}"
35780
35781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35782
35783  # First separate the path from the arguments. This will split at the first
35784  # space.
35785  complete="$GNM"
35786  path="${complete%% *}"
35787  tmp="$complete EOL"
35788  arguments="${tmp#* }"
35789
35790  # Input might be given as Windows format, start by converting to
35791  # unix format.
35792  new_path="$path"
35793
35794  windows_path="$new_path"
35795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35796    unix_path=`$CYGPATH -u "$windows_path"`
35797    new_path="$unix_path"
35798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35800    new_path="$unix_path"
35801  fi
35802
35803
35804  # Now try to locate executable using which
35805  new_path=`$WHICH "$new_path" 2> /dev/null`
35806
35807  if test "x$new_path" = x; then
35808    # Oops. Which didn't find the executable.
35809    # The splitting of arguments from the executable at a space might have been incorrect,
35810    # since paths with space are more likely in Windows. Give it another try with the whole
35811    # argument.
35812    path="$complete"
35813    arguments="EOL"
35814    new_path="$path"
35815
35816  windows_path="$new_path"
35817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35818    unix_path=`$CYGPATH -u "$windows_path"`
35819    new_path="$unix_path"
35820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35822    new_path="$unix_path"
35823  fi
35824
35825
35826    new_path=`$WHICH "$new_path" 2> /dev/null`
35827
35828    if test "x$new_path" = x; then
35829      # It's still not found. Now this is an unrecoverable error.
35830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35831$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35832      has_space=`$ECHO "$complete" | $GREP " "`
35833      if test "x$has_space" != x; then
35834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35836      fi
35837      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35838    fi
35839  fi
35840
35841  # Now new_path has a complete unix path to the binary
35842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35843    # Keep paths in /bin as-is, but remove trailing .exe if any
35844    new_path="${new_path/%.exe/}"
35845    # Do not save /bin paths to all_fixpath_prefixes!
35846  else
35847    # Not in mixed or Windows style, start by that.
35848    new_path=`cmd //c echo $new_path`
35849
35850  input_path="$new_path"
35851  # Check if we need to convert this using DOS-style short mode. If the path
35852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35853  # take no chances and rewrite it.
35854  # Note: m4 eats our [], so we need to use [ and ] instead.
35855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35856  if test "x$has_forbidden_chars" != x; then
35857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35859  fi
35860
35861    # Output is in $new_path
35862
35863  windows_path="$new_path"
35864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35865    unix_path=`$CYGPATH -u "$windows_path"`
35866    new_path="$unix_path"
35867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35869    new_path="$unix_path"
35870  fi
35871
35872    # remove trailing .exe if any
35873    new_path="${new_path/%.exe/}"
35874
35875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35877  fi
35878
35879  else
35880    # We're on a posix platform. Hooray! :)
35881    # First separate the path from the arguments. This will split at the first
35882    # space.
35883    complete="$GNM"
35884    path="${complete%% *}"
35885    tmp="$complete EOL"
35886    arguments="${tmp#* }"
35887
35888    # Cannot rely on the command "which" here since it doesn't always work.
35889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35890    if test -z "$is_absolute_path"; then
35891      # Path to executable is not absolute. Find it.
35892      IFS_save="$IFS"
35893      IFS=:
35894      for p in $PATH; do
35895        if test -f "$p/$path" && test -x "$p/$path"; then
35896          new_path="$p/$path"
35897          break
35898        fi
35899      done
35900      IFS="$IFS_save"
35901    else
35902      # This is an absolute path, we can use it without further modifications.
35903      new_path="$path"
35904    fi
35905
35906    if test "x$new_path" = x; then
35907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35908$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35909      has_space=`$ECHO "$complete" | $GREP " "`
35910      if test "x$has_space" != x; then
35911        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35913      fi
35914      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35915    fi
35916  fi
35917
35918  # Now join together the path and the arguments once again
35919  if test "x$arguments" != xEOL; then
35920    new_complete="$new_path ${arguments% *}"
35921  else
35922    new_complete="$new_path"
35923  fi
35924
35925  if test "x$complete" != "x$new_complete"; then
35926    GNM="$new_complete"
35927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35928$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35929  fi
35930
35931
35932
35933
35934  # Publish this variable in the help.
35935
35936
35937  if test "x$MCS" = x; then
35938    # The variable is not set by user, try to locate tool using the code snippet
35939    for ac_prog in mcs
35940do
35941  # Extract the first word of "$ac_prog", so it can be a program name with args.
35942set dummy $ac_prog; ac_word=$2
35943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35944$as_echo_n "checking for $ac_word... " >&6; }
35945if ${ac_cv_path_MCS+:} false; then :
35946  $as_echo_n "(cached) " >&6
35947else
35948  case $MCS in
35949  [\\/]* | ?:[\\/]*)
35950  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35951  ;;
35952  *)
35953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35954for as_dir in $PATH
35955do
35956  IFS=$as_save_IFS
35957  test -z "$as_dir" && as_dir=.
35958    for ac_exec_ext in '' $ac_executable_extensions; do
35959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35960    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35962    break 2
35963  fi
35964done
35965  done
35966IFS=$as_save_IFS
35967
35968  ;;
35969esac
35970fi
35971MCS=$ac_cv_path_MCS
35972if test -n "$MCS"; then
35973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35974$as_echo "$MCS" >&6; }
35975else
35976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35977$as_echo "no" >&6; }
35978fi
35979
35980
35981  test -n "$MCS" && break
35982done
35983
35984  else
35985    # The variable is set, but is it from the command line or the environment?
35986
35987    # Try to remove the string !MCS! from our list.
35988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35990      # If it failed, the variable was not from the command line. Ignore it,
35991      # but warn the user (except for BASH, which is always set by the calling BASH).
35992      if test "xMCS" != xBASH; then
35993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35994$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35995      fi
35996      # Try to locate tool using the code snippet
35997      for ac_prog in mcs
35998do
35999  # Extract the first word of "$ac_prog", so it can be a program name with args.
36000set dummy $ac_prog; ac_word=$2
36001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36002$as_echo_n "checking for $ac_word... " >&6; }
36003if ${ac_cv_path_MCS+:} false; then :
36004  $as_echo_n "(cached) " >&6
36005else
36006  case $MCS in
36007  [\\/]* | ?:[\\/]*)
36008  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36009  ;;
36010  *)
36011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36012for as_dir in $PATH
36013do
36014  IFS=$as_save_IFS
36015  test -z "$as_dir" && as_dir=.
36016    for ac_exec_ext in '' $ac_executable_extensions; do
36017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36018    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36020    break 2
36021  fi
36022done
36023  done
36024IFS=$as_save_IFS
36025
36026  ;;
36027esac
36028fi
36029MCS=$ac_cv_path_MCS
36030if test -n "$MCS"; then
36031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36032$as_echo "$MCS" >&6; }
36033else
36034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36035$as_echo "no" >&6; }
36036fi
36037
36038
36039  test -n "$MCS" && break
36040done
36041
36042    else
36043      # If it succeeded, then it was overridden by the user. We will use it
36044      # for the tool.
36045
36046      # First remove it from the list of overridden variables, so we can test
36047      # for unknown variables in the end.
36048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36049
36050      # Check if the provided tool contains a complete path.
36051      tool_specified="$MCS"
36052      tool_basename="${tool_specified##*/}"
36053      if test "x$tool_basename" = "x$tool_specified"; then
36054        # A command without a complete path is provided, search $PATH.
36055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36056$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36057        # Extract the first word of "$tool_basename", so it can be a program name with args.
36058set dummy $tool_basename; ac_word=$2
36059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36060$as_echo_n "checking for $ac_word... " >&6; }
36061if ${ac_cv_path_MCS+:} false; then :
36062  $as_echo_n "(cached) " >&6
36063else
36064  case $MCS in
36065  [\\/]* | ?:[\\/]*)
36066  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36067  ;;
36068  *)
36069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36070for as_dir in $PATH
36071do
36072  IFS=$as_save_IFS
36073  test -z "$as_dir" && as_dir=.
36074    for ac_exec_ext in '' $ac_executable_extensions; do
36075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36076    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36078    break 2
36079  fi
36080done
36081  done
36082IFS=$as_save_IFS
36083
36084  ;;
36085esac
36086fi
36087MCS=$ac_cv_path_MCS
36088if test -n "$MCS"; then
36089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36090$as_echo "$MCS" >&6; }
36091else
36092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36093$as_echo "no" >&6; }
36094fi
36095
36096
36097        if test "x$MCS" = x; then
36098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36099        fi
36100      else
36101        # Otherwise we believe it is a complete path. Use it as it is.
36102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36103$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36105$as_echo_n "checking for MCS... " >&6; }
36106        if test ! -x "$tool_specified"; then
36107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36108$as_echo "not found" >&6; }
36109          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36110        fi
36111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36112$as_echo "$tool_specified" >&6; }
36113      fi
36114    fi
36115  fi
36116
36117
36118
36119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36120
36121  # First separate the path from the arguments. This will split at the first
36122  # space.
36123  complete="$MCS"
36124  path="${complete%% *}"
36125  tmp="$complete EOL"
36126  arguments="${tmp#* }"
36127
36128  # Input might be given as Windows format, start by converting to
36129  # unix format.
36130  new_path=`$CYGPATH -u "$path"`
36131
36132  # Now try to locate executable using which
36133  new_path=`$WHICH "$new_path" 2> /dev/null`
36134  # bat and cmd files are not always considered executable in cygwin causing which
36135  # to not find them
36136  if test "x$new_path" = x \
36137      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36138      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36139    new_path=`$CYGPATH -u "$path"`
36140  fi
36141  if test "x$new_path" = x; then
36142    # Oops. Which didn't find the executable.
36143    # The splitting of arguments from the executable at a space might have been incorrect,
36144    # since paths with space are more likely in Windows. Give it another try with the whole
36145    # argument.
36146    path="$complete"
36147    arguments="EOL"
36148    new_path=`$CYGPATH -u "$path"`
36149    new_path=`$WHICH "$new_path" 2> /dev/null`
36150    # bat and cmd files are not always considered executable in cygwin causing which
36151    # to not find them
36152    if test "x$new_path" = x \
36153        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36154        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36155      new_path=`$CYGPATH -u "$path"`
36156    fi
36157    if test "x$new_path" = x; then
36158      # It's still not found. Now this is an unrecoverable error.
36159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36160$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36161      has_space=`$ECHO "$complete" | $GREP " "`
36162      if test "x$has_space" != x; then
36163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36165      fi
36166      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36167    fi
36168  fi
36169
36170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36173  # "foo.exe" is OK but "foo" is an error.
36174  #
36175  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36176  # It is also a way to make sure we got the proper file name for the real test later on.
36177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36178  if test "x$test_shortpath" = x; then
36179    # Short path failed, file does not exist as specified.
36180    # Try adding .exe or .cmd
36181    if test -f "${new_path}.exe"; then
36182      input_to_shortpath="${new_path}.exe"
36183    elif test -f "${new_path}.cmd"; then
36184      input_to_shortpath="${new_path}.cmd"
36185    else
36186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36187$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36188      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36189$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36190      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36191    fi
36192  else
36193    input_to_shortpath="$new_path"
36194  fi
36195
36196  # Call helper function which possibly converts this using DOS-style short mode.
36197  # If so, the updated path is stored in $new_path.
36198  new_path="$input_to_shortpath"
36199
36200  input_path="$input_to_shortpath"
36201  # Check if we need to convert this using DOS-style short mode. If the path
36202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36203  # take no chances and rewrite it.
36204  # Note: m4 eats our [], so we need to use [ and ] instead.
36205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36206  if test "x$has_forbidden_chars" != x; then
36207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36211      # Going to short mode and back again did indeed matter. Since short mode is
36212      # case insensitive, let's make it lowercase to improve readability.
36213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36214      # Now convert it back to Unix-stile (cygpath)
36215      input_path=`$CYGPATH -u "$shortmode_path"`
36216      new_path="$input_path"
36217    fi
36218  fi
36219
36220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36221  if test "x$test_cygdrive_prefix" = x; then
36222    # As a simple fix, exclude /usr/bin since it's not a real path.
36223    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36225      # a path prefixed by /cygdrive for fixpath to work.
36226      new_path="$CYGWIN_ROOT_PATH$input_path"
36227    fi
36228  fi
36229
36230  # remove trailing .exe if any
36231  new_path="${new_path/%.exe/}"
36232
36233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36234
36235  # First separate the path from the arguments. This will split at the first
36236  # space.
36237  complete="$MCS"
36238  path="${complete%% *}"
36239  tmp="$complete EOL"
36240  arguments="${tmp#* }"
36241
36242  # Input might be given as Windows format, start by converting to
36243  # unix format.
36244  new_path="$path"
36245
36246  windows_path="$new_path"
36247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36248    unix_path=`$CYGPATH -u "$windows_path"`
36249    new_path="$unix_path"
36250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36252    new_path="$unix_path"
36253  fi
36254
36255
36256  # Now try to locate executable using which
36257  new_path=`$WHICH "$new_path" 2> /dev/null`
36258
36259  if test "x$new_path" = x; then
36260    # Oops. Which didn't find the executable.
36261    # The splitting of arguments from the executable at a space might have been incorrect,
36262    # since paths with space are more likely in Windows. Give it another try with the whole
36263    # argument.
36264    path="$complete"
36265    arguments="EOL"
36266    new_path="$path"
36267
36268  windows_path="$new_path"
36269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36270    unix_path=`$CYGPATH -u "$windows_path"`
36271    new_path="$unix_path"
36272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36274    new_path="$unix_path"
36275  fi
36276
36277
36278    new_path=`$WHICH "$new_path" 2> /dev/null`
36279
36280    if test "x$new_path" = x; then
36281      # It's still not found. Now this is an unrecoverable error.
36282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36283$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36284      has_space=`$ECHO "$complete" | $GREP " "`
36285      if test "x$has_space" != x; then
36286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36288      fi
36289      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36290    fi
36291  fi
36292
36293  # Now new_path has a complete unix path to the binary
36294  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36295    # Keep paths in /bin as-is, but remove trailing .exe if any
36296    new_path="${new_path/%.exe/}"
36297    # Do not save /bin paths to all_fixpath_prefixes!
36298  else
36299    # Not in mixed or Windows style, start by that.
36300    new_path=`cmd //c echo $new_path`
36301
36302  input_path="$new_path"
36303  # Check if we need to convert this using DOS-style short mode. If the path
36304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36305  # take no chances and rewrite it.
36306  # Note: m4 eats our [], so we need to use [ and ] instead.
36307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36308  if test "x$has_forbidden_chars" != x; then
36309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36311  fi
36312
36313    # Output is in $new_path
36314
36315  windows_path="$new_path"
36316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36317    unix_path=`$CYGPATH -u "$windows_path"`
36318    new_path="$unix_path"
36319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36321    new_path="$unix_path"
36322  fi
36323
36324    # remove trailing .exe if any
36325    new_path="${new_path/%.exe/}"
36326
36327    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36328    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36329  fi
36330
36331  else
36332    # We're on a posix platform. Hooray! :)
36333    # First separate the path from the arguments. This will split at the first
36334    # space.
36335    complete="$MCS"
36336    path="${complete%% *}"
36337    tmp="$complete EOL"
36338    arguments="${tmp#* }"
36339
36340    # Cannot rely on the command "which" here since it doesn't always work.
36341    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36342    if test -z "$is_absolute_path"; then
36343      # Path to executable is not absolute. Find it.
36344      IFS_save="$IFS"
36345      IFS=:
36346      for p in $PATH; do
36347        if test -f "$p/$path" && test -x "$p/$path"; then
36348          new_path="$p/$path"
36349          break
36350        fi
36351      done
36352      IFS="$IFS_save"
36353    else
36354      # This is an absolute path, we can use it without further modifications.
36355      new_path="$path"
36356    fi
36357
36358    if test "x$new_path" = x; then
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36360$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36361      has_space=`$ECHO "$complete" | $GREP " "`
36362      if test "x$has_space" != x; then
36363        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36364$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36365      fi
36366      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36367    fi
36368  fi
36369
36370  # Now join together the path and the arguments once again
36371  if test "x$arguments" != xEOL; then
36372    new_complete="$new_path ${arguments% *}"
36373  else
36374    new_complete="$new_path"
36375  fi
36376
36377  if test "x$complete" != "x$new_complete"; then
36378    MCS="$new_complete"
36379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36380$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36381  fi
36382
36383  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36384    # FIXME: we should unify this with the solaris case above.
36385
36386
36387  # Publish this variable in the help.
36388
36389
36390  if test "x$STRIP" = x; then
36391    # The variable is not set by user, try to locate tool using the code snippet
36392    if test -n "$ac_tool_prefix"; then
36393  for ac_prog in strip
36394  do
36395    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36396set dummy $ac_tool_prefix$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_prog_STRIP+:} false; then :
36400  $as_echo_n "(cached) " >&6
36401else
36402  if test -n "$STRIP"; then
36403  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36404else
36405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36406for as_dir in $PATH
36407do
36408  IFS=$as_save_IFS
36409  test -z "$as_dir" && as_dir=.
36410    for ac_exec_ext in '' $ac_executable_extensions; do
36411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36412    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36414    break 2
36415  fi
36416done
36417  done
36418IFS=$as_save_IFS
36419
36420fi
36421fi
36422STRIP=$ac_cv_prog_STRIP
36423if test -n "$STRIP"; then
36424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36425$as_echo "$STRIP" >&6; }
36426else
36427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36428$as_echo "no" >&6; }
36429fi
36430
36431
36432    test -n "$STRIP" && break
36433  done
36434fi
36435if test -z "$STRIP"; then
36436  ac_ct_STRIP=$STRIP
36437  for ac_prog in strip
36438do
36439  # Extract the first word of "$ac_prog", so it can be a program name with args.
36440set dummy $ac_prog; ac_word=$2
36441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36442$as_echo_n "checking for $ac_word... " >&6; }
36443if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36444  $as_echo_n "(cached) " >&6
36445else
36446  if test -n "$ac_ct_STRIP"; then
36447  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36448else
36449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36450for as_dir in $PATH
36451do
36452  IFS=$as_save_IFS
36453  test -z "$as_dir" && as_dir=.
36454    for ac_exec_ext in '' $ac_executable_extensions; do
36455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36456    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36458    break 2
36459  fi
36460done
36461  done
36462IFS=$as_save_IFS
36463
36464fi
36465fi
36466ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36467if test -n "$ac_ct_STRIP"; then
36468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36469$as_echo "$ac_ct_STRIP" >&6; }
36470else
36471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36472$as_echo "no" >&6; }
36473fi
36474
36475
36476  test -n "$ac_ct_STRIP" && break
36477done
36478
36479  if test "x$ac_ct_STRIP" = x; then
36480    STRIP=""
36481  else
36482    case $cross_compiling:$ac_tool_warned in
36483yes:)
36484{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36485$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36486ac_tool_warned=yes ;;
36487esac
36488    STRIP=$ac_ct_STRIP
36489  fi
36490fi
36491
36492  else
36493    # The variable is set, but is it from the command line or the environment?
36494
36495    # Try to remove the string !STRIP! from our list.
36496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36498      # If it failed, the variable was not from the command line. Ignore it,
36499      # but warn the user (except for BASH, which is always set by the calling BASH).
36500      if test "xSTRIP" != xBASH; then
36501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36502$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36503      fi
36504      # Try to locate tool using the code snippet
36505      if test -n "$ac_tool_prefix"; then
36506  for ac_prog in strip
36507  do
36508    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36509set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36511$as_echo_n "checking for $ac_word... " >&6; }
36512if ${ac_cv_prog_STRIP+:} false; then :
36513  $as_echo_n "(cached) " >&6
36514else
36515  if test -n "$STRIP"; then
36516  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36517else
36518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36519for as_dir in $PATH
36520do
36521  IFS=$as_save_IFS
36522  test -z "$as_dir" && as_dir=.
36523    for ac_exec_ext in '' $ac_executable_extensions; do
36524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36525    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36527    break 2
36528  fi
36529done
36530  done
36531IFS=$as_save_IFS
36532
36533fi
36534fi
36535STRIP=$ac_cv_prog_STRIP
36536if test -n "$STRIP"; then
36537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36538$as_echo "$STRIP" >&6; }
36539else
36540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36541$as_echo "no" >&6; }
36542fi
36543
36544
36545    test -n "$STRIP" && break
36546  done
36547fi
36548if test -z "$STRIP"; then
36549  ac_ct_STRIP=$STRIP
36550  for ac_prog in strip
36551do
36552  # Extract the first word of "$ac_prog", so it can be a program name with args.
36553set dummy $ac_prog; ac_word=$2
36554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36555$as_echo_n "checking for $ac_word... " >&6; }
36556if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36557  $as_echo_n "(cached) " >&6
36558else
36559  if test -n "$ac_ct_STRIP"; then
36560  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36561else
36562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36563for as_dir in $PATH
36564do
36565  IFS=$as_save_IFS
36566  test -z "$as_dir" && as_dir=.
36567    for ac_exec_ext in '' $ac_executable_extensions; do
36568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36569    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36571    break 2
36572  fi
36573done
36574  done
36575IFS=$as_save_IFS
36576
36577fi
36578fi
36579ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36580if test -n "$ac_ct_STRIP"; then
36581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36582$as_echo "$ac_ct_STRIP" >&6; }
36583else
36584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36585$as_echo "no" >&6; }
36586fi
36587
36588
36589  test -n "$ac_ct_STRIP" && break
36590done
36591
36592  if test "x$ac_ct_STRIP" = x; then
36593    STRIP=""
36594  else
36595    case $cross_compiling:$ac_tool_warned in
36596yes:)
36597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36599ac_tool_warned=yes ;;
36600esac
36601    STRIP=$ac_ct_STRIP
36602  fi
36603fi
36604
36605    else
36606      # If it succeeded, then it was overridden by the user. We will use it
36607      # for the tool.
36608
36609      # First remove it from the list of overridden variables, so we can test
36610      # for unknown variables in the end.
36611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36612
36613      # Check if the provided tool contains a complete path.
36614      tool_specified="$STRIP"
36615      tool_basename="${tool_specified##*/}"
36616      if test "x$tool_basename" = "x$tool_specified"; then
36617        # A command without a complete path is provided, search $PATH.
36618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36619$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36620        # Extract the first word of "$tool_basename", so it can be a program name with args.
36621set dummy $tool_basename; ac_word=$2
36622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36623$as_echo_n "checking for $ac_word... " >&6; }
36624if ${ac_cv_path_STRIP+:} false; then :
36625  $as_echo_n "(cached) " >&6
36626else
36627  case $STRIP in
36628  [\\/]* | ?:[\\/]*)
36629  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36630  ;;
36631  *)
36632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36633for as_dir in $PATH
36634do
36635  IFS=$as_save_IFS
36636  test -z "$as_dir" && as_dir=.
36637    for ac_exec_ext in '' $ac_executable_extensions; do
36638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36639    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36641    break 2
36642  fi
36643done
36644  done
36645IFS=$as_save_IFS
36646
36647  ;;
36648esac
36649fi
36650STRIP=$ac_cv_path_STRIP
36651if test -n "$STRIP"; then
36652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36653$as_echo "$STRIP" >&6; }
36654else
36655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36656$as_echo "no" >&6; }
36657fi
36658
36659
36660        if test "x$STRIP" = x; then
36661          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36662        fi
36663      else
36664        # Otherwise we believe it is a complete path. Use it as it is.
36665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36666$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36668$as_echo_n "checking for STRIP... " >&6; }
36669        if test ! -x "$tool_specified"; then
36670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36671$as_echo "not found" >&6; }
36672          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36673        fi
36674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36675$as_echo "$tool_specified" >&6; }
36676      fi
36677    fi
36678  fi
36679
36680
36681
36682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36683
36684  # First separate the path from the arguments. This will split at the first
36685  # space.
36686  complete="$STRIP"
36687  path="${complete%% *}"
36688  tmp="$complete EOL"
36689  arguments="${tmp#* }"
36690
36691  # Input might be given as Windows format, start by converting to
36692  # unix format.
36693  new_path=`$CYGPATH -u "$path"`
36694
36695  # Now try to locate executable using which
36696  new_path=`$WHICH "$new_path" 2> /dev/null`
36697  # bat and cmd files are not always considered executable in cygwin causing which
36698  # to not find them
36699  if test "x$new_path" = x \
36700      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36701      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36702    new_path=`$CYGPATH -u "$path"`
36703  fi
36704  if test "x$new_path" = x; then
36705    # Oops. Which didn't find the executable.
36706    # The splitting of arguments from the executable at a space might have been incorrect,
36707    # since paths with space are more likely in Windows. Give it another try with the whole
36708    # argument.
36709    path="$complete"
36710    arguments="EOL"
36711    new_path=`$CYGPATH -u "$path"`
36712    new_path=`$WHICH "$new_path" 2> /dev/null`
36713    # bat and cmd files are not always considered executable in cygwin causing which
36714    # to not find them
36715    if test "x$new_path" = x \
36716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36718      new_path=`$CYGPATH -u "$path"`
36719    fi
36720    if test "x$new_path" = x; then
36721      # It's still not found. Now this is an unrecoverable error.
36722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36723$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36724      has_space=`$ECHO "$complete" | $GREP " "`
36725      if test "x$has_space" != x; then
36726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36728      fi
36729      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36730    fi
36731  fi
36732
36733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36736  # "foo.exe" is OK but "foo" is an error.
36737  #
36738  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36739  # It is also a way to make sure we got the proper file name for the real test later on.
36740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36741  if test "x$test_shortpath" = x; then
36742    # Short path failed, file does not exist as specified.
36743    # Try adding .exe or .cmd
36744    if test -f "${new_path}.exe"; then
36745      input_to_shortpath="${new_path}.exe"
36746    elif test -f "${new_path}.cmd"; then
36747      input_to_shortpath="${new_path}.cmd"
36748    else
36749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36750$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36751      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36752$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36753      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36754    fi
36755  else
36756    input_to_shortpath="$new_path"
36757  fi
36758
36759  # Call helper function which possibly converts this using DOS-style short mode.
36760  # If so, the updated path is stored in $new_path.
36761  new_path="$input_to_shortpath"
36762
36763  input_path="$input_to_shortpath"
36764  # Check if we need to convert this using DOS-style short mode. If the path
36765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36766  # take no chances and rewrite it.
36767  # Note: m4 eats our [], so we need to use [ and ] instead.
36768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36769  if test "x$has_forbidden_chars" != x; then
36770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36774      # Going to short mode and back again did indeed matter. Since short mode is
36775      # case insensitive, let's make it lowercase to improve readability.
36776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36777      # Now convert it back to Unix-stile (cygpath)
36778      input_path=`$CYGPATH -u "$shortmode_path"`
36779      new_path="$input_path"
36780    fi
36781  fi
36782
36783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36784  if test "x$test_cygdrive_prefix" = x; then
36785    # As a simple fix, exclude /usr/bin since it's not a real path.
36786    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36788      # a path prefixed by /cygdrive for fixpath to work.
36789      new_path="$CYGWIN_ROOT_PATH$input_path"
36790    fi
36791  fi
36792
36793  # remove trailing .exe if any
36794  new_path="${new_path/%.exe/}"
36795
36796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36797
36798  # First separate the path from the arguments. This will split at the first
36799  # space.
36800  complete="$STRIP"
36801  path="${complete%% *}"
36802  tmp="$complete EOL"
36803  arguments="${tmp#* }"
36804
36805  # Input might be given as Windows format, start by converting to
36806  # unix format.
36807  new_path="$path"
36808
36809  windows_path="$new_path"
36810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36811    unix_path=`$CYGPATH -u "$windows_path"`
36812    new_path="$unix_path"
36813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36815    new_path="$unix_path"
36816  fi
36817
36818
36819  # Now try to locate executable using which
36820  new_path=`$WHICH "$new_path" 2> /dev/null`
36821
36822  if test "x$new_path" = x; then
36823    # Oops. Which didn't find the executable.
36824    # The splitting of arguments from the executable at a space might have been incorrect,
36825    # since paths with space are more likely in Windows. Give it another try with the whole
36826    # argument.
36827    path="$complete"
36828    arguments="EOL"
36829    new_path="$path"
36830
36831  windows_path="$new_path"
36832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36833    unix_path=`$CYGPATH -u "$windows_path"`
36834    new_path="$unix_path"
36835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36837    new_path="$unix_path"
36838  fi
36839
36840
36841    new_path=`$WHICH "$new_path" 2> /dev/null`
36842
36843    if test "x$new_path" = x; then
36844      # It's still not found. Now this is an unrecoverable error.
36845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36846$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36847      has_space=`$ECHO "$complete" | $GREP " "`
36848      if test "x$has_space" != x; then
36849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36851      fi
36852      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36853    fi
36854  fi
36855
36856  # Now new_path has a complete unix path to the binary
36857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36858    # Keep paths in /bin as-is, but remove trailing .exe if any
36859    new_path="${new_path/%.exe/}"
36860    # Do not save /bin paths to all_fixpath_prefixes!
36861  else
36862    # Not in mixed or Windows style, start by that.
36863    new_path=`cmd //c echo $new_path`
36864
36865  input_path="$new_path"
36866  # Check if we need to convert this using DOS-style short mode. If the path
36867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36868  # take no chances and rewrite it.
36869  # Note: m4 eats our [], so we need to use [ and ] instead.
36870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36871  if test "x$has_forbidden_chars" != x; then
36872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36874  fi
36875
36876    # Output is in $new_path
36877
36878  windows_path="$new_path"
36879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36880    unix_path=`$CYGPATH -u "$windows_path"`
36881    new_path="$unix_path"
36882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36884    new_path="$unix_path"
36885  fi
36886
36887    # remove trailing .exe if any
36888    new_path="${new_path/%.exe/}"
36889
36890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36892  fi
36893
36894  else
36895    # We're on a posix platform. Hooray! :)
36896    # First separate the path from the arguments. This will split at the first
36897    # space.
36898    complete="$STRIP"
36899    path="${complete%% *}"
36900    tmp="$complete EOL"
36901    arguments="${tmp#* }"
36902
36903    # Cannot rely on the command "which" here since it doesn't always work.
36904    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36905    if test -z "$is_absolute_path"; then
36906      # Path to executable is not absolute. Find it.
36907      IFS_save="$IFS"
36908      IFS=:
36909      for p in $PATH; do
36910        if test -f "$p/$path" && test -x "$p/$path"; then
36911          new_path="$p/$path"
36912          break
36913        fi
36914      done
36915      IFS="$IFS_save"
36916    else
36917      # This is an absolute path, we can use it without further modifications.
36918      new_path="$path"
36919    fi
36920
36921    if test "x$new_path" = x; then
36922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36923$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36924      has_space=`$ECHO "$complete" | $GREP " "`
36925      if test "x$has_space" != x; then
36926        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36928      fi
36929      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36930    fi
36931  fi
36932
36933  # Now join together the path and the arguments once again
36934  if test "x$arguments" != xEOL; then
36935    new_complete="$new_path ${arguments% *}"
36936  else
36937    new_complete="$new_path"
36938  fi
36939
36940  if test "x$complete" != "x$new_complete"; then
36941    STRIP="$new_complete"
36942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36943$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36944  fi
36945
36946
36947
36948  # Publish this variable in the help.
36949
36950
36951  if test "x$NM" = x; then
36952    # The variable is not set by user, try to locate tool using the code snippet
36953    if test -n "$ac_tool_prefix"; then
36954  for ac_prog in nm
36955  do
36956    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36959$as_echo_n "checking for $ac_word... " >&6; }
36960if ${ac_cv_prog_NM+:} false; then :
36961  $as_echo_n "(cached) " >&6
36962else
36963  if test -n "$NM"; then
36964  ac_cv_prog_NM="$NM" # Let the user override the test.
36965else
36966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36967for as_dir in $PATH
36968do
36969  IFS=$as_save_IFS
36970  test -z "$as_dir" && as_dir=.
36971    for ac_exec_ext in '' $ac_executable_extensions; do
36972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36973    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36975    break 2
36976  fi
36977done
36978  done
36979IFS=$as_save_IFS
36980
36981fi
36982fi
36983NM=$ac_cv_prog_NM
36984if test -n "$NM"; then
36985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36986$as_echo "$NM" >&6; }
36987else
36988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36989$as_echo "no" >&6; }
36990fi
36991
36992
36993    test -n "$NM" && break
36994  done
36995fi
36996if test -z "$NM"; then
36997  ac_ct_NM=$NM
36998  for ac_prog in nm
36999do
37000  # Extract the first word of "$ac_prog", so it can be a program name with args.
37001set dummy $ac_prog; ac_word=$2
37002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37003$as_echo_n "checking for $ac_word... " >&6; }
37004if ${ac_cv_prog_ac_ct_NM+:} false; then :
37005  $as_echo_n "(cached) " >&6
37006else
37007  if test -n "$ac_ct_NM"; then
37008  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37009else
37010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37011for as_dir in $PATH
37012do
37013  IFS=$as_save_IFS
37014  test -z "$as_dir" && as_dir=.
37015    for ac_exec_ext in '' $ac_executable_extensions; do
37016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37017    ac_cv_prog_ac_ct_NM="$ac_prog"
37018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37019    break 2
37020  fi
37021done
37022  done
37023IFS=$as_save_IFS
37024
37025fi
37026fi
37027ac_ct_NM=$ac_cv_prog_ac_ct_NM
37028if test -n "$ac_ct_NM"; then
37029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37030$as_echo "$ac_ct_NM" >&6; }
37031else
37032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37033$as_echo "no" >&6; }
37034fi
37035
37036
37037  test -n "$ac_ct_NM" && break
37038done
37039
37040  if test "x$ac_ct_NM" = x; then
37041    NM=""
37042  else
37043    case $cross_compiling:$ac_tool_warned in
37044yes:)
37045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37047ac_tool_warned=yes ;;
37048esac
37049    NM=$ac_ct_NM
37050  fi
37051fi
37052
37053  else
37054    # The variable is set, but is it from the command line or the environment?
37055
37056    # Try to remove the string !NM! from our list.
37057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37059      # If it failed, the variable was not from the command line. Ignore it,
37060      # but warn the user (except for BASH, which is always set by the calling BASH).
37061      if test "xNM" != xBASH; then
37062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37063$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37064      fi
37065      # Try to locate tool using the code snippet
37066      if test -n "$ac_tool_prefix"; then
37067  for ac_prog in nm
37068  do
37069    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37072$as_echo_n "checking for $ac_word... " >&6; }
37073if ${ac_cv_prog_NM+:} false; then :
37074  $as_echo_n "(cached) " >&6
37075else
37076  if test -n "$NM"; then
37077  ac_cv_prog_NM="$NM" # Let the user override the test.
37078else
37079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37080for as_dir in $PATH
37081do
37082  IFS=$as_save_IFS
37083  test -z "$as_dir" && as_dir=.
37084    for ac_exec_ext in '' $ac_executable_extensions; do
37085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37086    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37088    break 2
37089  fi
37090done
37091  done
37092IFS=$as_save_IFS
37093
37094fi
37095fi
37096NM=$ac_cv_prog_NM
37097if test -n "$NM"; then
37098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37099$as_echo "$NM" >&6; }
37100else
37101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37102$as_echo "no" >&6; }
37103fi
37104
37105
37106    test -n "$NM" && break
37107  done
37108fi
37109if test -z "$NM"; then
37110  ac_ct_NM=$NM
37111  for ac_prog in nm
37112do
37113  # Extract the first word of "$ac_prog", so it can be a program name with args.
37114set dummy $ac_prog; ac_word=$2
37115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37116$as_echo_n "checking for $ac_word... " >&6; }
37117if ${ac_cv_prog_ac_ct_NM+:} false; then :
37118  $as_echo_n "(cached) " >&6
37119else
37120  if test -n "$ac_ct_NM"; then
37121  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37122else
37123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37124for as_dir in $PATH
37125do
37126  IFS=$as_save_IFS
37127  test -z "$as_dir" && as_dir=.
37128    for ac_exec_ext in '' $ac_executable_extensions; do
37129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37130    ac_cv_prog_ac_ct_NM="$ac_prog"
37131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37132    break 2
37133  fi
37134done
37135  done
37136IFS=$as_save_IFS
37137
37138fi
37139fi
37140ac_ct_NM=$ac_cv_prog_ac_ct_NM
37141if test -n "$ac_ct_NM"; then
37142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37143$as_echo "$ac_ct_NM" >&6; }
37144else
37145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37146$as_echo "no" >&6; }
37147fi
37148
37149
37150  test -n "$ac_ct_NM" && break
37151done
37152
37153  if test "x$ac_ct_NM" = x; then
37154    NM=""
37155  else
37156    case $cross_compiling:$ac_tool_warned in
37157yes:)
37158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37160ac_tool_warned=yes ;;
37161esac
37162    NM=$ac_ct_NM
37163  fi
37164fi
37165
37166    else
37167      # If it succeeded, then it was overridden by the user. We will use it
37168      # for the tool.
37169
37170      # First remove it from the list of overridden variables, so we can test
37171      # for unknown variables in the end.
37172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37173
37174      # Check if the provided tool contains a complete path.
37175      tool_specified="$NM"
37176      tool_basename="${tool_specified##*/}"
37177      if test "x$tool_basename" = "x$tool_specified"; then
37178        # A command without a complete path is provided, search $PATH.
37179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37180$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37181        # Extract the first word of "$tool_basename", so it can be a program name with args.
37182set dummy $tool_basename; ac_word=$2
37183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37184$as_echo_n "checking for $ac_word... " >&6; }
37185if ${ac_cv_path_NM+:} false; then :
37186  $as_echo_n "(cached) " >&6
37187else
37188  case $NM in
37189  [\\/]* | ?:[\\/]*)
37190  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37191  ;;
37192  *)
37193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37194for as_dir in $PATH
37195do
37196  IFS=$as_save_IFS
37197  test -z "$as_dir" && as_dir=.
37198    for ac_exec_ext in '' $ac_executable_extensions; do
37199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37200    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37202    break 2
37203  fi
37204done
37205  done
37206IFS=$as_save_IFS
37207
37208  ;;
37209esac
37210fi
37211NM=$ac_cv_path_NM
37212if test -n "$NM"; then
37213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37214$as_echo "$NM" >&6; }
37215else
37216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37217$as_echo "no" >&6; }
37218fi
37219
37220
37221        if test "x$NM" = x; then
37222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37223        fi
37224      else
37225        # Otherwise we believe it is a complete path. Use it as it is.
37226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37227$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37229$as_echo_n "checking for NM... " >&6; }
37230        if test ! -x "$tool_specified"; then
37231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37232$as_echo "not found" >&6; }
37233          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37234        fi
37235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37236$as_echo "$tool_specified" >&6; }
37237      fi
37238    fi
37239  fi
37240
37241
37242
37243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37244
37245  # First separate the path from the arguments. This will split at the first
37246  # space.
37247  complete="$NM"
37248  path="${complete%% *}"
37249  tmp="$complete EOL"
37250  arguments="${tmp#* }"
37251
37252  # Input might be given as Windows format, start by converting to
37253  # unix format.
37254  new_path=`$CYGPATH -u "$path"`
37255
37256  # Now try to locate executable using which
37257  new_path=`$WHICH "$new_path" 2> /dev/null`
37258  # bat and cmd files are not always considered executable in cygwin causing which
37259  # to not find them
37260  if test "x$new_path" = x \
37261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37263    new_path=`$CYGPATH -u "$path"`
37264  fi
37265  if test "x$new_path" = x; then
37266    # Oops. Which didn't find the executable.
37267    # The splitting of arguments from the executable at a space might have been incorrect,
37268    # since paths with space are more likely in Windows. Give it another try with the whole
37269    # argument.
37270    path="$complete"
37271    arguments="EOL"
37272    new_path=`$CYGPATH -u "$path"`
37273    new_path=`$WHICH "$new_path" 2> /dev/null`
37274    # bat and cmd files are not always considered executable in cygwin causing which
37275    # to not find them
37276    if test "x$new_path" = x \
37277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37279      new_path=`$CYGPATH -u "$path"`
37280    fi
37281    if test "x$new_path" = x; then
37282      # It's still not found. Now this is an unrecoverable error.
37283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37284$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37285      has_space=`$ECHO "$complete" | $GREP " "`
37286      if test "x$has_space" != x; then
37287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37289      fi
37290      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37291    fi
37292  fi
37293
37294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37297  # "foo.exe" is OK but "foo" is an error.
37298  #
37299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37300  # It is also a way to make sure we got the proper file name for the real test later on.
37301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37302  if test "x$test_shortpath" = x; then
37303    # Short path failed, file does not exist as specified.
37304    # Try adding .exe or .cmd
37305    if test -f "${new_path}.exe"; then
37306      input_to_shortpath="${new_path}.exe"
37307    elif test -f "${new_path}.cmd"; then
37308      input_to_shortpath="${new_path}.cmd"
37309    else
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37311$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37314      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37315    fi
37316  else
37317    input_to_shortpath="$new_path"
37318  fi
37319
37320  # Call helper function which possibly converts this using DOS-style short mode.
37321  # If so, the updated path is stored in $new_path.
37322  new_path="$input_to_shortpath"
37323
37324  input_path="$input_to_shortpath"
37325  # Check if we need to convert this using DOS-style short mode. If the path
37326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37327  # take no chances and rewrite it.
37328  # Note: m4 eats our [], so we need to use [ and ] instead.
37329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37330  if test "x$has_forbidden_chars" != x; then
37331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37335      # Going to short mode and back again did indeed matter. Since short mode is
37336      # case insensitive, let's make it lowercase to improve readability.
37337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37338      # Now convert it back to Unix-stile (cygpath)
37339      input_path=`$CYGPATH -u "$shortmode_path"`
37340      new_path="$input_path"
37341    fi
37342  fi
37343
37344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37345  if test "x$test_cygdrive_prefix" = x; then
37346    # As a simple fix, exclude /usr/bin since it's not a real path.
37347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37349      # a path prefixed by /cygdrive for fixpath to work.
37350      new_path="$CYGWIN_ROOT_PATH$input_path"
37351    fi
37352  fi
37353
37354  # remove trailing .exe if any
37355  new_path="${new_path/%.exe/}"
37356
37357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37358
37359  # First separate the path from the arguments. This will split at the first
37360  # space.
37361  complete="$NM"
37362  path="${complete%% *}"
37363  tmp="$complete EOL"
37364  arguments="${tmp#* }"
37365
37366  # Input might be given as Windows format, start by converting to
37367  # unix format.
37368  new_path="$path"
37369
37370  windows_path="$new_path"
37371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37372    unix_path=`$CYGPATH -u "$windows_path"`
37373    new_path="$unix_path"
37374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37376    new_path="$unix_path"
37377  fi
37378
37379
37380  # Now try to locate executable using which
37381  new_path=`$WHICH "$new_path" 2> /dev/null`
37382
37383  if test "x$new_path" = x; then
37384    # Oops. Which didn't find the executable.
37385    # The splitting of arguments from the executable at a space might have been incorrect,
37386    # since paths with space are more likely in Windows. Give it another try with the whole
37387    # argument.
37388    path="$complete"
37389    arguments="EOL"
37390    new_path="$path"
37391
37392  windows_path="$new_path"
37393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37394    unix_path=`$CYGPATH -u "$windows_path"`
37395    new_path="$unix_path"
37396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37398    new_path="$unix_path"
37399  fi
37400
37401
37402    new_path=`$WHICH "$new_path" 2> /dev/null`
37403
37404    if test "x$new_path" = x; then
37405      # It's still not found. Now this is an unrecoverable error.
37406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37407$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37408      has_space=`$ECHO "$complete" | $GREP " "`
37409      if test "x$has_space" != x; then
37410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37412      fi
37413      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37414    fi
37415  fi
37416
37417  # Now new_path has a complete unix path to the binary
37418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37419    # Keep paths in /bin as-is, but remove trailing .exe if any
37420    new_path="${new_path/%.exe/}"
37421    # Do not save /bin paths to all_fixpath_prefixes!
37422  else
37423    # Not in mixed or Windows style, start by that.
37424    new_path=`cmd //c echo $new_path`
37425
37426  input_path="$new_path"
37427  # Check if we need to convert this using DOS-style short mode. If the path
37428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37429  # take no chances and rewrite it.
37430  # Note: m4 eats our [], so we need to use [ and ] instead.
37431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37432  if test "x$has_forbidden_chars" != x; then
37433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37435  fi
37436
37437    # Output is in $new_path
37438
37439  windows_path="$new_path"
37440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37441    unix_path=`$CYGPATH -u "$windows_path"`
37442    new_path="$unix_path"
37443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37445    new_path="$unix_path"
37446  fi
37447
37448    # remove trailing .exe if any
37449    new_path="${new_path/%.exe/}"
37450
37451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37453  fi
37454
37455  else
37456    # We're on a posix platform. Hooray! :)
37457    # First separate the path from the arguments. This will split at the first
37458    # space.
37459    complete="$NM"
37460    path="${complete%% *}"
37461    tmp="$complete EOL"
37462    arguments="${tmp#* }"
37463
37464    # Cannot rely on the command "which" here since it doesn't always work.
37465    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37466    if test -z "$is_absolute_path"; then
37467      # Path to executable is not absolute. Find it.
37468      IFS_save="$IFS"
37469      IFS=:
37470      for p in $PATH; do
37471        if test -f "$p/$path" && test -x "$p/$path"; then
37472          new_path="$p/$path"
37473          break
37474        fi
37475      done
37476      IFS="$IFS_save"
37477    else
37478      # This is an absolute path, we can use it without further modifications.
37479      new_path="$path"
37480    fi
37481
37482    if test "x$new_path" = x; then
37483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37484$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37485      has_space=`$ECHO "$complete" | $GREP " "`
37486      if test "x$has_space" != x; then
37487        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37489      fi
37490      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37491    fi
37492  fi
37493
37494  # Now join together the path and the arguments once again
37495  if test "x$arguments" != xEOL; then
37496    new_complete="$new_path ${arguments% *}"
37497  else
37498    new_complete="$new_path"
37499  fi
37500
37501  if test "x$complete" != "x$new_complete"; then
37502    NM="$new_complete"
37503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37504$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37505  fi
37506
37507    GNM="$NM"
37508
37509  fi
37510
37511  # objcopy is used for moving debug symbols to separate files when
37512  # full debug symbols are enabled.
37513  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37514
37515
37516  # Publish this variable in the help.
37517
37518
37519  if test "x$OBJCOPY" = x; then
37520    # The variable is not set by user, try to locate tool using the code snippet
37521    if test -n "$ac_tool_prefix"; then
37522  for ac_prog in gobjcopy objcopy
37523  do
37524    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37525set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37527$as_echo_n "checking for $ac_word... " >&6; }
37528if ${ac_cv_prog_OBJCOPY+:} false; then :
37529  $as_echo_n "(cached) " >&6
37530else
37531  if test -n "$OBJCOPY"; then
37532  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37533else
37534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37535for as_dir in $PATH
37536do
37537  IFS=$as_save_IFS
37538  test -z "$as_dir" && as_dir=.
37539    for ac_exec_ext in '' $ac_executable_extensions; do
37540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37541    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37543    break 2
37544  fi
37545done
37546  done
37547IFS=$as_save_IFS
37548
37549fi
37550fi
37551OBJCOPY=$ac_cv_prog_OBJCOPY
37552if test -n "$OBJCOPY"; then
37553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37554$as_echo "$OBJCOPY" >&6; }
37555else
37556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37557$as_echo "no" >&6; }
37558fi
37559
37560
37561    test -n "$OBJCOPY" && break
37562  done
37563fi
37564if test -z "$OBJCOPY"; then
37565  ac_ct_OBJCOPY=$OBJCOPY
37566  for ac_prog in gobjcopy objcopy
37567do
37568  # Extract the first word of "$ac_prog", so it can be a program name with args.
37569set dummy $ac_prog; ac_word=$2
37570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37571$as_echo_n "checking for $ac_word... " >&6; }
37572if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37573  $as_echo_n "(cached) " >&6
37574else
37575  if test -n "$ac_ct_OBJCOPY"; then
37576  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37577else
37578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37579for as_dir in $PATH
37580do
37581  IFS=$as_save_IFS
37582  test -z "$as_dir" && as_dir=.
37583    for ac_exec_ext in '' $ac_executable_extensions; do
37584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37585    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37587    break 2
37588  fi
37589done
37590  done
37591IFS=$as_save_IFS
37592
37593fi
37594fi
37595ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37596if test -n "$ac_ct_OBJCOPY"; then
37597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37598$as_echo "$ac_ct_OBJCOPY" >&6; }
37599else
37600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37601$as_echo "no" >&6; }
37602fi
37603
37604
37605  test -n "$ac_ct_OBJCOPY" && break
37606done
37607
37608  if test "x$ac_ct_OBJCOPY" = x; then
37609    OBJCOPY=""
37610  else
37611    case $cross_compiling:$ac_tool_warned in
37612yes:)
37613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37615ac_tool_warned=yes ;;
37616esac
37617    OBJCOPY=$ac_ct_OBJCOPY
37618  fi
37619fi
37620
37621  else
37622    # The variable is set, but is it from the command line or the environment?
37623
37624    # Try to remove the string !OBJCOPY! from our list.
37625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37627      # If it failed, the variable was not from the command line. Ignore it,
37628      # but warn the user (except for BASH, which is always set by the calling BASH).
37629      if test "xOBJCOPY" != xBASH; then
37630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37631$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37632      fi
37633      # Try to locate tool using the code snippet
37634      if test -n "$ac_tool_prefix"; then
37635  for ac_prog in gobjcopy objcopy
37636  do
37637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37640$as_echo_n "checking for $ac_word... " >&6; }
37641if ${ac_cv_prog_OBJCOPY+:} false; then :
37642  $as_echo_n "(cached) " >&6
37643else
37644  if test -n "$OBJCOPY"; then
37645  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37646else
37647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37648for as_dir in $PATH
37649do
37650  IFS=$as_save_IFS
37651  test -z "$as_dir" && as_dir=.
37652    for ac_exec_ext in '' $ac_executable_extensions; do
37653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37654    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37656    break 2
37657  fi
37658done
37659  done
37660IFS=$as_save_IFS
37661
37662fi
37663fi
37664OBJCOPY=$ac_cv_prog_OBJCOPY
37665if test -n "$OBJCOPY"; then
37666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37667$as_echo "$OBJCOPY" >&6; }
37668else
37669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37670$as_echo "no" >&6; }
37671fi
37672
37673
37674    test -n "$OBJCOPY" && break
37675  done
37676fi
37677if test -z "$OBJCOPY"; then
37678  ac_ct_OBJCOPY=$OBJCOPY
37679  for ac_prog in gobjcopy objcopy
37680do
37681  # Extract the first word of "$ac_prog", so it can be a program name with args.
37682set dummy $ac_prog; ac_word=$2
37683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37684$as_echo_n "checking for $ac_word... " >&6; }
37685if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37686  $as_echo_n "(cached) " >&6
37687else
37688  if test -n "$ac_ct_OBJCOPY"; then
37689  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37690else
37691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37692for as_dir in $PATH
37693do
37694  IFS=$as_save_IFS
37695  test -z "$as_dir" && as_dir=.
37696    for ac_exec_ext in '' $ac_executable_extensions; do
37697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37698    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37700    break 2
37701  fi
37702done
37703  done
37704IFS=$as_save_IFS
37705
37706fi
37707fi
37708ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37709if test -n "$ac_ct_OBJCOPY"; then
37710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37711$as_echo "$ac_ct_OBJCOPY" >&6; }
37712else
37713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37714$as_echo "no" >&6; }
37715fi
37716
37717
37718  test -n "$ac_ct_OBJCOPY" && break
37719done
37720
37721  if test "x$ac_ct_OBJCOPY" = x; then
37722    OBJCOPY=""
37723  else
37724    case $cross_compiling:$ac_tool_warned in
37725yes:)
37726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37728ac_tool_warned=yes ;;
37729esac
37730    OBJCOPY=$ac_ct_OBJCOPY
37731  fi
37732fi
37733
37734    else
37735      # If it succeeded, then it was overridden by the user. We will use it
37736      # for the tool.
37737
37738      # First remove it from the list of overridden variables, so we can test
37739      # for unknown variables in the end.
37740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37741
37742      # Check if the provided tool contains a complete path.
37743      tool_specified="$OBJCOPY"
37744      tool_basename="${tool_specified##*/}"
37745      if test "x$tool_basename" = "x$tool_specified"; then
37746        # A command without a complete path is provided, search $PATH.
37747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37748$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37749        # Extract the first word of "$tool_basename", so it can be a program name with args.
37750set dummy $tool_basename; ac_word=$2
37751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37752$as_echo_n "checking for $ac_word... " >&6; }
37753if ${ac_cv_path_OBJCOPY+:} false; then :
37754  $as_echo_n "(cached) " >&6
37755else
37756  case $OBJCOPY in
37757  [\\/]* | ?:[\\/]*)
37758  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37759  ;;
37760  *)
37761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37762for as_dir in $PATH
37763do
37764  IFS=$as_save_IFS
37765  test -z "$as_dir" && as_dir=.
37766    for ac_exec_ext in '' $ac_executable_extensions; do
37767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37768    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37770    break 2
37771  fi
37772done
37773  done
37774IFS=$as_save_IFS
37775
37776  ;;
37777esac
37778fi
37779OBJCOPY=$ac_cv_path_OBJCOPY
37780if test -n "$OBJCOPY"; then
37781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37782$as_echo "$OBJCOPY" >&6; }
37783else
37784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37785$as_echo "no" >&6; }
37786fi
37787
37788
37789        if test "x$OBJCOPY" = x; then
37790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37791        fi
37792      else
37793        # Otherwise we believe it is a complete path. Use it as it is.
37794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37795$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37797$as_echo_n "checking for OBJCOPY... " >&6; }
37798        if test ! -x "$tool_specified"; then
37799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37800$as_echo "not found" >&6; }
37801          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37802        fi
37803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37804$as_echo "$tool_specified" >&6; }
37805      fi
37806    fi
37807  fi
37808
37809
37810    # Only call fixup if objcopy was found.
37811    if test -n "$OBJCOPY"; then
37812
37813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37814
37815  # First separate the path from the arguments. This will split at the first
37816  # space.
37817  complete="$OBJCOPY"
37818  path="${complete%% *}"
37819  tmp="$complete EOL"
37820  arguments="${tmp#* }"
37821
37822  # Input might be given as Windows format, start by converting to
37823  # unix format.
37824  new_path=`$CYGPATH -u "$path"`
37825
37826  # Now try to locate executable using which
37827  new_path=`$WHICH "$new_path" 2> /dev/null`
37828  # bat and cmd files are not always considered executable in cygwin causing which
37829  # to not find them
37830  if test "x$new_path" = x \
37831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37833    new_path=`$CYGPATH -u "$path"`
37834  fi
37835  if test "x$new_path" = x; then
37836    # Oops. Which didn't find the executable.
37837    # The splitting of arguments from the executable at a space might have been incorrect,
37838    # since paths with space are more likely in Windows. Give it another try with the whole
37839    # argument.
37840    path="$complete"
37841    arguments="EOL"
37842    new_path=`$CYGPATH -u "$path"`
37843    new_path=`$WHICH "$new_path" 2> /dev/null`
37844    # bat and cmd files are not always considered executable in cygwin causing which
37845    # to not find them
37846    if test "x$new_path" = x \
37847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37849      new_path=`$CYGPATH -u "$path"`
37850    fi
37851    if test "x$new_path" = x; then
37852      # It's still not found. Now this is an unrecoverable error.
37853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37854$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37855      has_space=`$ECHO "$complete" | $GREP " "`
37856      if test "x$has_space" != x; then
37857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37859      fi
37860      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37861    fi
37862  fi
37863
37864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37867  # "foo.exe" is OK but "foo" is an error.
37868  #
37869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37870  # It is also a way to make sure we got the proper file name for the real test later on.
37871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37872  if test "x$test_shortpath" = x; then
37873    # Short path failed, file does not exist as specified.
37874    # Try adding .exe or .cmd
37875    if test -f "${new_path}.exe"; then
37876      input_to_shortpath="${new_path}.exe"
37877    elif test -f "${new_path}.cmd"; then
37878      input_to_shortpath="${new_path}.cmd"
37879    else
37880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37881$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37884      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37885    fi
37886  else
37887    input_to_shortpath="$new_path"
37888  fi
37889
37890  # Call helper function which possibly converts this using DOS-style short mode.
37891  # If so, the updated path is stored in $new_path.
37892  new_path="$input_to_shortpath"
37893
37894  input_path="$input_to_shortpath"
37895  # Check if we need to convert this using DOS-style short mode. If the path
37896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37897  # take no chances and rewrite it.
37898  # Note: m4 eats our [], so we need to use [ and ] instead.
37899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37900  if test "x$has_forbidden_chars" != x; then
37901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37905      # Going to short mode and back again did indeed matter. Since short mode is
37906      # case insensitive, let's make it lowercase to improve readability.
37907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37908      # Now convert it back to Unix-stile (cygpath)
37909      input_path=`$CYGPATH -u "$shortmode_path"`
37910      new_path="$input_path"
37911    fi
37912  fi
37913
37914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37915  if test "x$test_cygdrive_prefix" = x; then
37916    # As a simple fix, exclude /usr/bin since it's not a real path.
37917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37919      # a path prefixed by /cygdrive for fixpath to work.
37920      new_path="$CYGWIN_ROOT_PATH$input_path"
37921    fi
37922  fi
37923
37924  # remove trailing .exe if any
37925  new_path="${new_path/%.exe/}"
37926
37927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37928
37929  # First separate the path from the arguments. This will split at the first
37930  # space.
37931  complete="$OBJCOPY"
37932  path="${complete%% *}"
37933  tmp="$complete EOL"
37934  arguments="${tmp#* }"
37935
37936  # Input might be given as Windows format, start by converting to
37937  # unix format.
37938  new_path="$path"
37939
37940  windows_path="$new_path"
37941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37942    unix_path=`$CYGPATH -u "$windows_path"`
37943    new_path="$unix_path"
37944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37946    new_path="$unix_path"
37947  fi
37948
37949
37950  # Now try to locate executable using which
37951  new_path=`$WHICH "$new_path" 2> /dev/null`
37952
37953  if test "x$new_path" = x; then
37954    # Oops. Which didn't find the executable.
37955    # The splitting of arguments from the executable at a space might have been incorrect,
37956    # since paths with space are more likely in Windows. Give it another try with the whole
37957    # argument.
37958    path="$complete"
37959    arguments="EOL"
37960    new_path="$path"
37961
37962  windows_path="$new_path"
37963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37964    unix_path=`$CYGPATH -u "$windows_path"`
37965    new_path="$unix_path"
37966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37968    new_path="$unix_path"
37969  fi
37970
37971
37972    new_path=`$WHICH "$new_path" 2> /dev/null`
37973
37974    if test "x$new_path" = x; then
37975      # It's still not found. Now this is an unrecoverable error.
37976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37977$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37978      has_space=`$ECHO "$complete" | $GREP " "`
37979      if test "x$has_space" != x; then
37980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37982      fi
37983      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37984    fi
37985  fi
37986
37987  # Now new_path has a complete unix path to the binary
37988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37989    # Keep paths in /bin as-is, but remove trailing .exe if any
37990    new_path="${new_path/%.exe/}"
37991    # Do not save /bin paths to all_fixpath_prefixes!
37992  else
37993    # Not in mixed or Windows style, start by that.
37994    new_path=`cmd //c echo $new_path`
37995
37996  input_path="$new_path"
37997  # Check if we need to convert this using DOS-style short mode. If the path
37998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37999  # take no chances and rewrite it.
38000  # Note: m4 eats our [], so we need to use [ and ] instead.
38001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38002  if test "x$has_forbidden_chars" != x; then
38003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38005  fi
38006
38007    # Output is in $new_path
38008
38009  windows_path="$new_path"
38010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38011    unix_path=`$CYGPATH -u "$windows_path"`
38012    new_path="$unix_path"
38013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38015    new_path="$unix_path"
38016  fi
38017
38018    # remove trailing .exe if any
38019    new_path="${new_path/%.exe/}"
38020
38021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38023  fi
38024
38025  else
38026    # We're on a posix platform. Hooray! :)
38027    # First separate the path from the arguments. This will split at the first
38028    # space.
38029    complete="$OBJCOPY"
38030    path="${complete%% *}"
38031    tmp="$complete EOL"
38032    arguments="${tmp#* }"
38033
38034    # Cannot rely on the command "which" here since it doesn't always work.
38035    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38036    if test -z "$is_absolute_path"; then
38037      # Path to executable is not absolute. Find it.
38038      IFS_save="$IFS"
38039      IFS=:
38040      for p in $PATH; do
38041        if test -f "$p/$path" && test -x "$p/$path"; then
38042          new_path="$p/$path"
38043          break
38044        fi
38045      done
38046      IFS="$IFS_save"
38047    else
38048      # This is an absolute path, we can use it without further modifications.
38049      new_path="$path"
38050    fi
38051
38052    if test "x$new_path" = x; then
38053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38054$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38055      has_space=`$ECHO "$complete" | $GREP " "`
38056      if test "x$has_space" != x; then
38057        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38059      fi
38060      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38061    fi
38062  fi
38063
38064  # Now join together the path and the arguments once again
38065  if test "x$arguments" != xEOL; then
38066    new_complete="$new_path ${arguments% *}"
38067  else
38068    new_complete="$new_path"
38069  fi
38070
38071  if test "x$complete" != "x$new_complete"; then
38072    OBJCOPY="$new_complete"
38073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38074$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38075  fi
38076
38077    fi
38078  fi
38079
38080
38081
38082  # Publish this variable in the help.
38083
38084
38085  if test "x$OBJDUMP" = x; then
38086    # The variable is not set by user, try to locate tool using the code snippet
38087    if test -n "$ac_tool_prefix"; then
38088  for ac_prog in gobjdump objdump
38089  do
38090    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38091set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38093$as_echo_n "checking for $ac_word... " >&6; }
38094if ${ac_cv_prog_OBJDUMP+:} false; then :
38095  $as_echo_n "(cached) " >&6
38096else
38097  if test -n "$OBJDUMP"; then
38098  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38099else
38100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38101for as_dir in $PATH
38102do
38103  IFS=$as_save_IFS
38104  test -z "$as_dir" && as_dir=.
38105    for ac_exec_ext in '' $ac_executable_extensions; do
38106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38107    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38109    break 2
38110  fi
38111done
38112  done
38113IFS=$as_save_IFS
38114
38115fi
38116fi
38117OBJDUMP=$ac_cv_prog_OBJDUMP
38118if test -n "$OBJDUMP"; then
38119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38120$as_echo "$OBJDUMP" >&6; }
38121else
38122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38123$as_echo "no" >&6; }
38124fi
38125
38126
38127    test -n "$OBJDUMP" && break
38128  done
38129fi
38130if test -z "$OBJDUMP"; then
38131  ac_ct_OBJDUMP=$OBJDUMP
38132  for ac_prog in gobjdump objdump
38133do
38134  # Extract the first word of "$ac_prog", so it can be a program name with args.
38135set dummy $ac_prog; ac_word=$2
38136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38137$as_echo_n "checking for $ac_word... " >&6; }
38138if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38139  $as_echo_n "(cached) " >&6
38140else
38141  if test -n "$ac_ct_OBJDUMP"; then
38142  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38143else
38144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38145for as_dir in $PATH
38146do
38147  IFS=$as_save_IFS
38148  test -z "$as_dir" && as_dir=.
38149    for ac_exec_ext in '' $ac_executable_extensions; do
38150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38151    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38153    break 2
38154  fi
38155done
38156  done
38157IFS=$as_save_IFS
38158
38159fi
38160fi
38161ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38162if test -n "$ac_ct_OBJDUMP"; then
38163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38164$as_echo "$ac_ct_OBJDUMP" >&6; }
38165else
38166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38167$as_echo "no" >&6; }
38168fi
38169
38170
38171  test -n "$ac_ct_OBJDUMP" && break
38172done
38173
38174  if test "x$ac_ct_OBJDUMP" = x; then
38175    OBJDUMP=""
38176  else
38177    case $cross_compiling:$ac_tool_warned in
38178yes:)
38179{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38180$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38181ac_tool_warned=yes ;;
38182esac
38183    OBJDUMP=$ac_ct_OBJDUMP
38184  fi
38185fi
38186
38187  else
38188    # The variable is set, but is it from the command line or the environment?
38189
38190    # Try to remove the string !OBJDUMP! from our list.
38191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38193      # If it failed, the variable was not from the command line. Ignore it,
38194      # but warn the user (except for BASH, which is always set by the calling BASH).
38195      if test "xOBJDUMP" != xBASH; then
38196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38197$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38198      fi
38199      # Try to locate tool using the code snippet
38200      if test -n "$ac_tool_prefix"; then
38201  for ac_prog in gobjdump objdump
38202  do
38203    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38204set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38206$as_echo_n "checking for $ac_word... " >&6; }
38207if ${ac_cv_prog_OBJDUMP+:} false; then :
38208  $as_echo_n "(cached) " >&6
38209else
38210  if test -n "$OBJDUMP"; then
38211  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38212else
38213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38214for as_dir in $PATH
38215do
38216  IFS=$as_save_IFS
38217  test -z "$as_dir" && as_dir=.
38218    for ac_exec_ext in '' $ac_executable_extensions; do
38219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38220    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38222    break 2
38223  fi
38224done
38225  done
38226IFS=$as_save_IFS
38227
38228fi
38229fi
38230OBJDUMP=$ac_cv_prog_OBJDUMP
38231if test -n "$OBJDUMP"; then
38232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38233$as_echo "$OBJDUMP" >&6; }
38234else
38235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38236$as_echo "no" >&6; }
38237fi
38238
38239
38240    test -n "$OBJDUMP" && break
38241  done
38242fi
38243if test -z "$OBJDUMP"; then
38244  ac_ct_OBJDUMP=$OBJDUMP
38245  for ac_prog in gobjdump objdump
38246do
38247  # Extract the first word of "$ac_prog", so it can be a program name with args.
38248set dummy $ac_prog; ac_word=$2
38249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38250$as_echo_n "checking for $ac_word... " >&6; }
38251if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38252  $as_echo_n "(cached) " >&6
38253else
38254  if test -n "$ac_ct_OBJDUMP"; then
38255  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38256else
38257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38258for as_dir in $PATH
38259do
38260  IFS=$as_save_IFS
38261  test -z "$as_dir" && as_dir=.
38262    for ac_exec_ext in '' $ac_executable_extensions; do
38263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38264    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38266    break 2
38267  fi
38268done
38269  done
38270IFS=$as_save_IFS
38271
38272fi
38273fi
38274ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38275if test -n "$ac_ct_OBJDUMP"; then
38276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38277$as_echo "$ac_ct_OBJDUMP" >&6; }
38278else
38279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38280$as_echo "no" >&6; }
38281fi
38282
38283
38284  test -n "$ac_ct_OBJDUMP" && break
38285done
38286
38287  if test "x$ac_ct_OBJDUMP" = x; then
38288    OBJDUMP=""
38289  else
38290    case $cross_compiling:$ac_tool_warned in
38291yes:)
38292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38294ac_tool_warned=yes ;;
38295esac
38296    OBJDUMP=$ac_ct_OBJDUMP
38297  fi
38298fi
38299
38300    else
38301      # If it succeeded, then it was overridden by the user. We will use it
38302      # for the tool.
38303
38304      # First remove it from the list of overridden variables, so we can test
38305      # for unknown variables in the end.
38306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38307
38308      # Check if the provided tool contains a complete path.
38309      tool_specified="$OBJDUMP"
38310      tool_basename="${tool_specified##*/}"
38311      if test "x$tool_basename" = "x$tool_specified"; then
38312        # A command without a complete path is provided, search $PATH.
38313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38314$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38315        # Extract the first word of "$tool_basename", so it can be a program name with args.
38316set dummy $tool_basename; ac_word=$2
38317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38318$as_echo_n "checking for $ac_word... " >&6; }
38319if ${ac_cv_path_OBJDUMP+:} false; then :
38320  $as_echo_n "(cached) " >&6
38321else
38322  case $OBJDUMP in
38323  [\\/]* | ?:[\\/]*)
38324  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38325  ;;
38326  *)
38327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38328for as_dir in $PATH
38329do
38330  IFS=$as_save_IFS
38331  test -z "$as_dir" && as_dir=.
38332    for ac_exec_ext in '' $ac_executable_extensions; do
38333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38334    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38336    break 2
38337  fi
38338done
38339  done
38340IFS=$as_save_IFS
38341
38342  ;;
38343esac
38344fi
38345OBJDUMP=$ac_cv_path_OBJDUMP
38346if test -n "$OBJDUMP"; then
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38348$as_echo "$OBJDUMP" >&6; }
38349else
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351$as_echo "no" >&6; }
38352fi
38353
38354
38355        if test "x$OBJDUMP" = x; then
38356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38357        fi
38358      else
38359        # Otherwise we believe it is a complete path. Use it as it is.
38360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38361$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38363$as_echo_n "checking for OBJDUMP... " >&6; }
38364        if test ! -x "$tool_specified"; then
38365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38366$as_echo "not found" >&6; }
38367          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38368        fi
38369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38370$as_echo "$tool_specified" >&6; }
38371      fi
38372    fi
38373  fi
38374
38375
38376  if test "x$OBJDUMP" != x; then
38377    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38378    # bails if argument is missing.
38379
38380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38381
38382  # First separate the path from the arguments. This will split at the first
38383  # space.
38384  complete="$OBJDUMP"
38385  path="${complete%% *}"
38386  tmp="$complete EOL"
38387  arguments="${tmp#* }"
38388
38389  # Input might be given as Windows format, start by converting to
38390  # unix format.
38391  new_path=`$CYGPATH -u "$path"`
38392
38393  # Now try to locate executable using which
38394  new_path=`$WHICH "$new_path" 2> /dev/null`
38395  # bat and cmd files are not always considered executable in cygwin causing which
38396  # to not find them
38397  if test "x$new_path" = x \
38398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38400    new_path=`$CYGPATH -u "$path"`
38401  fi
38402  if test "x$new_path" = x; then
38403    # Oops. Which didn't find the executable.
38404    # The splitting of arguments from the executable at a space might have been incorrect,
38405    # since paths with space are more likely in Windows. Give it another try with the whole
38406    # argument.
38407    path="$complete"
38408    arguments="EOL"
38409    new_path=`$CYGPATH -u "$path"`
38410    new_path=`$WHICH "$new_path" 2> /dev/null`
38411    # bat and cmd files are not always considered executable in cygwin causing which
38412    # to not find them
38413    if test "x$new_path" = x \
38414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38416      new_path=`$CYGPATH -u "$path"`
38417    fi
38418    if test "x$new_path" = x; then
38419      # It's still not found. Now this is an unrecoverable error.
38420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38421$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38422      has_space=`$ECHO "$complete" | $GREP " "`
38423      if test "x$has_space" != x; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38426      fi
38427      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38428    fi
38429  fi
38430
38431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38434  # "foo.exe" is OK but "foo" is an error.
38435  #
38436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38437  # It is also a way to make sure we got the proper file name for the real test later on.
38438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38439  if test "x$test_shortpath" = x; then
38440    # Short path failed, file does not exist as specified.
38441    # Try adding .exe or .cmd
38442    if test -f "${new_path}.exe"; then
38443      input_to_shortpath="${new_path}.exe"
38444    elif test -f "${new_path}.cmd"; then
38445      input_to_shortpath="${new_path}.cmd"
38446    else
38447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38448$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38451      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38452    fi
38453  else
38454    input_to_shortpath="$new_path"
38455  fi
38456
38457  # Call helper function which possibly converts this using DOS-style short mode.
38458  # If so, the updated path is stored in $new_path.
38459  new_path="$input_to_shortpath"
38460
38461  input_path="$input_to_shortpath"
38462  # Check if we need to convert this using DOS-style short mode. If the path
38463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38464  # take no chances and rewrite it.
38465  # Note: m4 eats our [], so we need to use [ and ] instead.
38466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38467  if test "x$has_forbidden_chars" != x; then
38468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38472      # Going to short mode and back again did indeed matter. Since short mode is
38473      # case insensitive, let's make it lowercase to improve readability.
38474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38475      # Now convert it back to Unix-stile (cygpath)
38476      input_path=`$CYGPATH -u "$shortmode_path"`
38477      new_path="$input_path"
38478    fi
38479  fi
38480
38481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38482  if test "x$test_cygdrive_prefix" = x; then
38483    # As a simple fix, exclude /usr/bin since it's not a real path.
38484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38486      # a path prefixed by /cygdrive for fixpath to work.
38487      new_path="$CYGWIN_ROOT_PATH$input_path"
38488    fi
38489  fi
38490
38491  # remove trailing .exe if any
38492  new_path="${new_path/%.exe/}"
38493
38494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38495
38496  # First separate the path from the arguments. This will split at the first
38497  # space.
38498  complete="$OBJDUMP"
38499  path="${complete%% *}"
38500  tmp="$complete EOL"
38501  arguments="${tmp#* }"
38502
38503  # Input might be given as Windows format, start by converting to
38504  # unix format.
38505  new_path="$path"
38506
38507  windows_path="$new_path"
38508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38509    unix_path=`$CYGPATH -u "$windows_path"`
38510    new_path="$unix_path"
38511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38513    new_path="$unix_path"
38514  fi
38515
38516
38517  # Now try to locate executable using which
38518  new_path=`$WHICH "$new_path" 2> /dev/null`
38519
38520  if test "x$new_path" = x; then
38521    # Oops. Which didn't find the executable.
38522    # The splitting of arguments from the executable at a space might have been incorrect,
38523    # since paths with space are more likely in Windows. Give it another try with the whole
38524    # argument.
38525    path="$complete"
38526    arguments="EOL"
38527    new_path="$path"
38528
38529  windows_path="$new_path"
38530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38531    unix_path=`$CYGPATH -u "$windows_path"`
38532    new_path="$unix_path"
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38535    new_path="$unix_path"
38536  fi
38537
38538
38539    new_path=`$WHICH "$new_path" 2> /dev/null`
38540
38541    if test "x$new_path" = x; then
38542      # It's still not found. Now this is an unrecoverable error.
38543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38544$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38545      has_space=`$ECHO "$complete" | $GREP " "`
38546      if test "x$has_space" != x; then
38547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38549      fi
38550      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38551    fi
38552  fi
38553
38554  # Now new_path has a complete unix path to the binary
38555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38556    # Keep paths in /bin as-is, but remove trailing .exe if any
38557    new_path="${new_path/%.exe/}"
38558    # Do not save /bin paths to all_fixpath_prefixes!
38559  else
38560    # Not in mixed or Windows style, start by that.
38561    new_path=`cmd //c echo $new_path`
38562
38563  input_path="$new_path"
38564  # Check if we need to convert this using DOS-style short mode. If the path
38565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38566  # take no chances and rewrite it.
38567  # Note: m4 eats our [], so we need to use [ and ] instead.
38568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38569  if test "x$has_forbidden_chars" != x; then
38570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38572  fi
38573
38574    # Output is in $new_path
38575
38576  windows_path="$new_path"
38577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38578    unix_path=`$CYGPATH -u "$windows_path"`
38579    new_path="$unix_path"
38580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38582    new_path="$unix_path"
38583  fi
38584
38585    # remove trailing .exe if any
38586    new_path="${new_path/%.exe/}"
38587
38588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38590  fi
38591
38592  else
38593    # We're on a posix platform. Hooray! :)
38594    # First separate the path from the arguments. This will split at the first
38595    # space.
38596    complete="$OBJDUMP"
38597    path="${complete%% *}"
38598    tmp="$complete EOL"
38599    arguments="${tmp#* }"
38600
38601    # Cannot rely on the command "which" here since it doesn't always work.
38602    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38603    if test -z "$is_absolute_path"; then
38604      # Path to executable is not absolute. Find it.
38605      IFS_save="$IFS"
38606      IFS=:
38607      for p in $PATH; do
38608        if test -f "$p/$path" && test -x "$p/$path"; then
38609          new_path="$p/$path"
38610          break
38611        fi
38612      done
38613      IFS="$IFS_save"
38614    else
38615      # This is an absolute path, we can use it without further modifications.
38616      new_path="$path"
38617    fi
38618
38619    if test "x$new_path" = x; then
38620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38621$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38622      has_space=`$ECHO "$complete" | $GREP " "`
38623      if test "x$has_space" != x; then
38624        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38626      fi
38627      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38628    fi
38629  fi
38630
38631  # Now join together the path and the arguments once again
38632  if test "x$arguments" != xEOL; then
38633    new_complete="$new_path ${arguments% *}"
38634  else
38635    new_complete="$new_path"
38636  fi
38637
38638  if test "x$complete" != "x$new_complete"; then
38639    OBJDUMP="$new_complete"
38640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38641$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38642  fi
38643
38644  fi
38645
38646
38647  # Restore old path.
38648  PATH="$OLD_PATH"
38649
38650  # Restore the flags to the user specified values.
38651  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38652  CFLAGS="$ORG_CFLAGS"
38653  CXXFLAGS="$ORG_CXXFLAGS"
38654  OBJCFLAGS="$ORG_OBJCFLAGS"
38655
38656
38657# Finally do some processing after the detection phase
38658
38659  if test "x$COMPILE_TYPE" = "xcross"; then
38660    # Now we need to find a C/C++ compiler that can build executables for the
38661    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38662    # used once. Also, we need to do this without adding a tools dir to the
38663    # path, otherwise we might pick up cross-compilers which don't use standard
38664    # naming.
38665
38666    # FIXME: we should list the discovered compilers as an exclude pattern!
38667    # If we do that, we can do this detection before POST_DETECTION, and still
38668    # find the build compilers in the tools dir, if needed.
38669
38670
38671  # Publish this variable in the help.
38672
38673
38674  if test "x$BUILD_CC" = x; then
38675    # The variable is not set by user, try to locate tool using the code snippet
38676    for ac_prog in cl cc gcc
38677do
38678  # Extract the first word of "$ac_prog", so it can be a program name with args.
38679set dummy $ac_prog; ac_word=$2
38680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38681$as_echo_n "checking for $ac_word... " >&6; }
38682if ${ac_cv_path_BUILD_CC+:} false; then :
38683  $as_echo_n "(cached) " >&6
38684else
38685  case $BUILD_CC in
38686  [\\/]* | ?:[\\/]*)
38687  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38688  ;;
38689  *)
38690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38691for as_dir in $PATH
38692do
38693  IFS=$as_save_IFS
38694  test -z "$as_dir" && as_dir=.
38695    for ac_exec_ext in '' $ac_executable_extensions; do
38696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38697    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38699    break 2
38700  fi
38701done
38702  done
38703IFS=$as_save_IFS
38704
38705  ;;
38706esac
38707fi
38708BUILD_CC=$ac_cv_path_BUILD_CC
38709if test -n "$BUILD_CC"; then
38710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38711$as_echo "$BUILD_CC" >&6; }
38712else
38713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38714$as_echo "no" >&6; }
38715fi
38716
38717
38718  test -n "$BUILD_CC" && break
38719done
38720
38721  else
38722    # The variable is set, but is it from the command line or the environment?
38723
38724    # Try to remove the string !BUILD_CC! from our list.
38725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38727      # If it failed, the variable was not from the command line. Ignore it,
38728      # but warn the user (except for BASH, which is always set by the calling BASH).
38729      if test "xBUILD_CC" != xBASH; then
38730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38731$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38732      fi
38733      # Try to locate tool using the code snippet
38734      for ac_prog in cl cc gcc
38735do
38736  # Extract the first word of "$ac_prog", so it can be a program name with args.
38737set dummy $ac_prog; ac_word=$2
38738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38739$as_echo_n "checking for $ac_word... " >&6; }
38740if ${ac_cv_path_BUILD_CC+:} false; then :
38741  $as_echo_n "(cached) " >&6
38742else
38743  case $BUILD_CC in
38744  [\\/]* | ?:[\\/]*)
38745  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38746  ;;
38747  *)
38748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38749for as_dir in $PATH
38750do
38751  IFS=$as_save_IFS
38752  test -z "$as_dir" && as_dir=.
38753    for ac_exec_ext in '' $ac_executable_extensions; do
38754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38755    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38757    break 2
38758  fi
38759done
38760  done
38761IFS=$as_save_IFS
38762
38763  ;;
38764esac
38765fi
38766BUILD_CC=$ac_cv_path_BUILD_CC
38767if test -n "$BUILD_CC"; then
38768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38769$as_echo "$BUILD_CC" >&6; }
38770else
38771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38772$as_echo "no" >&6; }
38773fi
38774
38775
38776  test -n "$BUILD_CC" && break
38777done
38778
38779    else
38780      # If it succeeded, then it was overridden by the user. We will use it
38781      # for the tool.
38782
38783      # First remove it from the list of overridden variables, so we can test
38784      # for unknown variables in the end.
38785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38786
38787      # Check if the provided tool contains a complete path.
38788      tool_specified="$BUILD_CC"
38789      tool_basename="${tool_specified##*/}"
38790      if test "x$tool_basename" = "x$tool_specified"; then
38791        # A command without a complete path is provided, search $PATH.
38792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38793$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38794        # Extract the first word of "$tool_basename", so it can be a program name with args.
38795set dummy $tool_basename; ac_word=$2
38796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38797$as_echo_n "checking for $ac_word... " >&6; }
38798if ${ac_cv_path_BUILD_CC+:} false; then :
38799  $as_echo_n "(cached) " >&6
38800else
38801  case $BUILD_CC in
38802  [\\/]* | ?:[\\/]*)
38803  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38804  ;;
38805  *)
38806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38807for as_dir in $PATH
38808do
38809  IFS=$as_save_IFS
38810  test -z "$as_dir" && as_dir=.
38811    for ac_exec_ext in '' $ac_executable_extensions; do
38812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38813    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38815    break 2
38816  fi
38817done
38818  done
38819IFS=$as_save_IFS
38820
38821  ;;
38822esac
38823fi
38824BUILD_CC=$ac_cv_path_BUILD_CC
38825if test -n "$BUILD_CC"; then
38826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38827$as_echo "$BUILD_CC" >&6; }
38828else
38829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38830$as_echo "no" >&6; }
38831fi
38832
38833
38834        if test "x$BUILD_CC" = x; then
38835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38836        fi
38837      else
38838        # Otherwise we believe it is a complete path. Use it as it is.
38839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38840$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38842$as_echo_n "checking for BUILD_CC... " >&6; }
38843        if test ! -x "$tool_specified"; then
38844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38845$as_echo "not found" >&6; }
38846          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38847        fi
38848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38849$as_echo "$tool_specified" >&6; }
38850      fi
38851    fi
38852  fi
38853
38854
38855
38856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38857
38858  # First separate the path from the arguments. This will split at the first
38859  # space.
38860  complete="$BUILD_CC"
38861  path="${complete%% *}"
38862  tmp="$complete EOL"
38863  arguments="${tmp#* }"
38864
38865  # Input might be given as Windows format, start by converting to
38866  # unix format.
38867  new_path=`$CYGPATH -u "$path"`
38868
38869  # Now try to locate executable using which
38870  new_path=`$WHICH "$new_path" 2> /dev/null`
38871  # bat and cmd files are not always considered executable in cygwin causing which
38872  # to not find them
38873  if test "x$new_path" = x \
38874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38876    new_path=`$CYGPATH -u "$path"`
38877  fi
38878  if test "x$new_path" = x; then
38879    # Oops. Which didn't find the executable.
38880    # The splitting of arguments from the executable at a space might have been incorrect,
38881    # since paths with space are more likely in Windows. Give it another try with the whole
38882    # argument.
38883    path="$complete"
38884    arguments="EOL"
38885    new_path=`$CYGPATH -u "$path"`
38886    new_path=`$WHICH "$new_path" 2> /dev/null`
38887    # bat and cmd files are not always considered executable in cygwin causing which
38888    # to not find them
38889    if test "x$new_path" = x \
38890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38892      new_path=`$CYGPATH -u "$path"`
38893    fi
38894    if test "x$new_path" = x; then
38895      # It's still not found. Now this is an unrecoverable error.
38896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38897$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38898      has_space=`$ECHO "$complete" | $GREP " "`
38899      if test "x$has_space" != x; then
38900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38902      fi
38903      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38904    fi
38905  fi
38906
38907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38910  # "foo.exe" is OK but "foo" is an error.
38911  #
38912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38913  # It is also a way to make sure we got the proper file name for the real test later on.
38914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38915  if test "x$test_shortpath" = x; then
38916    # Short path failed, file does not exist as specified.
38917    # Try adding .exe or .cmd
38918    if test -f "${new_path}.exe"; then
38919      input_to_shortpath="${new_path}.exe"
38920    elif test -f "${new_path}.cmd"; then
38921      input_to_shortpath="${new_path}.cmd"
38922    else
38923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38924$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38927      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38928    fi
38929  else
38930    input_to_shortpath="$new_path"
38931  fi
38932
38933  # Call helper function which possibly converts this using DOS-style short mode.
38934  # If so, the updated path is stored in $new_path.
38935  new_path="$input_to_shortpath"
38936
38937  input_path="$input_to_shortpath"
38938  # Check if we need to convert this using DOS-style short mode. If the path
38939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38940  # take no chances and rewrite it.
38941  # Note: m4 eats our [], so we need to use [ and ] instead.
38942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38943  if test "x$has_forbidden_chars" != x; then
38944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38948      # Going to short mode and back again did indeed matter. Since short mode is
38949      # case insensitive, let's make it lowercase to improve readability.
38950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38951      # Now convert it back to Unix-stile (cygpath)
38952      input_path=`$CYGPATH -u "$shortmode_path"`
38953      new_path="$input_path"
38954    fi
38955  fi
38956
38957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38958  if test "x$test_cygdrive_prefix" = x; then
38959    # As a simple fix, exclude /usr/bin since it's not a real path.
38960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38962      # a path prefixed by /cygdrive for fixpath to work.
38963      new_path="$CYGWIN_ROOT_PATH$input_path"
38964    fi
38965  fi
38966
38967  # remove trailing .exe if any
38968  new_path="${new_path/%.exe/}"
38969
38970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38971
38972  # First separate the path from the arguments. This will split at the first
38973  # space.
38974  complete="$BUILD_CC"
38975  path="${complete%% *}"
38976  tmp="$complete EOL"
38977  arguments="${tmp#* }"
38978
38979  # Input might be given as Windows format, start by converting to
38980  # unix format.
38981  new_path="$path"
38982
38983  windows_path="$new_path"
38984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38985    unix_path=`$CYGPATH -u "$windows_path"`
38986    new_path="$unix_path"
38987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38989    new_path="$unix_path"
38990  fi
38991
38992
38993  # Now try to locate executable using which
38994  new_path=`$WHICH "$new_path" 2> /dev/null`
38995
38996  if test "x$new_path" = x; then
38997    # Oops. Which didn't find the executable.
38998    # The splitting of arguments from the executable at a space might have been incorrect,
38999    # since paths with space are more likely in Windows. Give it another try with the whole
39000    # argument.
39001    path="$complete"
39002    arguments="EOL"
39003    new_path="$path"
39004
39005  windows_path="$new_path"
39006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39007    unix_path=`$CYGPATH -u "$windows_path"`
39008    new_path="$unix_path"
39009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39011    new_path="$unix_path"
39012  fi
39013
39014
39015    new_path=`$WHICH "$new_path" 2> /dev/null`
39016
39017    if test "x$new_path" = x; then
39018      # It's still not found. Now this is an unrecoverable error.
39019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39020$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39021      has_space=`$ECHO "$complete" | $GREP " "`
39022      if test "x$has_space" != x; then
39023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39025      fi
39026      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39027    fi
39028  fi
39029
39030  # Now new_path has a complete unix path to the binary
39031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39032    # Keep paths in /bin as-is, but remove trailing .exe if any
39033    new_path="${new_path/%.exe/}"
39034    # Do not save /bin paths to all_fixpath_prefixes!
39035  else
39036    # Not in mixed or Windows style, start by that.
39037    new_path=`cmd //c echo $new_path`
39038
39039  input_path="$new_path"
39040  # Check if we need to convert this using DOS-style short mode. If the path
39041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39042  # take no chances and rewrite it.
39043  # Note: m4 eats our [], so we need to use [ and ] instead.
39044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39045  if test "x$has_forbidden_chars" != x; then
39046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39048  fi
39049
39050    # Output is in $new_path
39051
39052  windows_path="$new_path"
39053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39054    unix_path=`$CYGPATH -u "$windows_path"`
39055    new_path="$unix_path"
39056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39058    new_path="$unix_path"
39059  fi
39060
39061    # remove trailing .exe if any
39062    new_path="${new_path/%.exe/}"
39063
39064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39066  fi
39067
39068  else
39069    # We're on a posix platform. Hooray! :)
39070    # First separate the path from the arguments. This will split at the first
39071    # space.
39072    complete="$BUILD_CC"
39073    path="${complete%% *}"
39074    tmp="$complete EOL"
39075    arguments="${tmp#* }"
39076
39077    # Cannot rely on the command "which" here since it doesn't always work.
39078    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39079    if test -z "$is_absolute_path"; then
39080      # Path to executable is not absolute. Find it.
39081      IFS_save="$IFS"
39082      IFS=:
39083      for p in $PATH; do
39084        if test -f "$p/$path" && test -x "$p/$path"; then
39085          new_path="$p/$path"
39086          break
39087        fi
39088      done
39089      IFS="$IFS_save"
39090    else
39091      # This is an absolute path, we can use it without further modifications.
39092      new_path="$path"
39093    fi
39094
39095    if test "x$new_path" = x; then
39096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39097$as_echo "$as_me: The path of BUILD_CC, 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}: This might be caused by spaces in the path, which is not allowed." >&5
39101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39102      fi
39103      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39104    fi
39105  fi
39106
39107  # Now join together the path and the arguments once again
39108  if test "x$arguments" != xEOL; then
39109    new_complete="$new_path ${arguments% *}"
39110  else
39111    new_complete="$new_path"
39112  fi
39113
39114  if test "x$complete" != "x$new_complete"; then
39115    BUILD_CC="$new_complete"
39116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39117$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39118  fi
39119
39120
39121
39122  # Publish this variable in the help.
39123
39124
39125  if test "x$BUILD_CXX" = x; then
39126    # The variable is not set by user, try to locate tool using the code snippet
39127    for ac_prog in cl CC g++
39128do
39129  # Extract the first word of "$ac_prog", so it can be a program name with args.
39130set dummy $ac_prog; ac_word=$2
39131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39132$as_echo_n "checking for $ac_word... " >&6; }
39133if ${ac_cv_path_BUILD_CXX+:} false; then :
39134  $as_echo_n "(cached) " >&6
39135else
39136  case $BUILD_CXX in
39137  [\\/]* | ?:[\\/]*)
39138  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39139  ;;
39140  *)
39141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39142for as_dir in $PATH
39143do
39144  IFS=$as_save_IFS
39145  test -z "$as_dir" && as_dir=.
39146    for ac_exec_ext in '' $ac_executable_extensions; do
39147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39148    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39150    break 2
39151  fi
39152done
39153  done
39154IFS=$as_save_IFS
39155
39156  ;;
39157esac
39158fi
39159BUILD_CXX=$ac_cv_path_BUILD_CXX
39160if test -n "$BUILD_CXX"; then
39161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39162$as_echo "$BUILD_CXX" >&6; }
39163else
39164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39165$as_echo "no" >&6; }
39166fi
39167
39168
39169  test -n "$BUILD_CXX" && break
39170done
39171
39172  else
39173    # The variable is set, but is it from the command line or the environment?
39174
39175    # Try to remove the string !BUILD_CXX! from our list.
39176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39178      # If it failed, the variable was not from the command line. Ignore it,
39179      # but warn the user (except for BASH, which is always set by the calling BASH).
39180      if test "xBUILD_CXX" != xBASH; then
39181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39182$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39183      fi
39184      # Try to locate tool using the code snippet
39185      for ac_prog in cl CC g++
39186do
39187  # Extract the first word of "$ac_prog", so it can be a program name with args.
39188set dummy $ac_prog; ac_word=$2
39189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39190$as_echo_n "checking for $ac_word... " >&6; }
39191if ${ac_cv_path_BUILD_CXX+:} false; then :
39192  $as_echo_n "(cached) " >&6
39193else
39194  case $BUILD_CXX in
39195  [\\/]* | ?:[\\/]*)
39196  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39197  ;;
39198  *)
39199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39200for as_dir in $PATH
39201do
39202  IFS=$as_save_IFS
39203  test -z "$as_dir" && as_dir=.
39204    for ac_exec_ext in '' $ac_executable_extensions; do
39205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39206    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39208    break 2
39209  fi
39210done
39211  done
39212IFS=$as_save_IFS
39213
39214  ;;
39215esac
39216fi
39217BUILD_CXX=$ac_cv_path_BUILD_CXX
39218if test -n "$BUILD_CXX"; then
39219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39220$as_echo "$BUILD_CXX" >&6; }
39221else
39222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39223$as_echo "no" >&6; }
39224fi
39225
39226
39227  test -n "$BUILD_CXX" && break
39228done
39229
39230    else
39231      # If it succeeded, then it was overridden by the user. We will use it
39232      # for the tool.
39233
39234      # First remove it from the list of overridden variables, so we can test
39235      # for unknown variables in the end.
39236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39237
39238      # Check if the provided tool contains a complete path.
39239      tool_specified="$BUILD_CXX"
39240      tool_basename="${tool_specified##*/}"
39241      if test "x$tool_basename" = "x$tool_specified"; then
39242        # A command without a complete path is provided, search $PATH.
39243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39244$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39245        # Extract the first word of "$tool_basename", so it can be a program name with args.
39246set dummy $tool_basename; ac_word=$2
39247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39248$as_echo_n "checking for $ac_word... " >&6; }
39249if ${ac_cv_path_BUILD_CXX+:} false; then :
39250  $as_echo_n "(cached) " >&6
39251else
39252  case $BUILD_CXX in
39253  [\\/]* | ?:[\\/]*)
39254  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39255  ;;
39256  *)
39257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39258for as_dir in $PATH
39259do
39260  IFS=$as_save_IFS
39261  test -z "$as_dir" && as_dir=.
39262    for ac_exec_ext in '' $ac_executable_extensions; do
39263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39264    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39266    break 2
39267  fi
39268done
39269  done
39270IFS=$as_save_IFS
39271
39272  ;;
39273esac
39274fi
39275BUILD_CXX=$ac_cv_path_BUILD_CXX
39276if test -n "$BUILD_CXX"; then
39277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39278$as_echo "$BUILD_CXX" >&6; }
39279else
39280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39281$as_echo "no" >&6; }
39282fi
39283
39284
39285        if test "x$BUILD_CXX" = x; then
39286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39287        fi
39288      else
39289        # Otherwise we believe it is a complete path. Use it as it is.
39290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39291$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39293$as_echo_n "checking for BUILD_CXX... " >&6; }
39294        if test ! -x "$tool_specified"; then
39295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39296$as_echo "not found" >&6; }
39297          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39298        fi
39299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39300$as_echo "$tool_specified" >&6; }
39301      fi
39302    fi
39303  fi
39304
39305
39306
39307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39308
39309  # First separate the path from the arguments. This will split at the first
39310  # space.
39311  complete="$BUILD_CXX"
39312  path="${complete%% *}"
39313  tmp="$complete EOL"
39314  arguments="${tmp#* }"
39315
39316  # Input might be given as Windows format, start by converting to
39317  # unix format.
39318  new_path=`$CYGPATH -u "$path"`
39319
39320  # Now try to locate executable using which
39321  new_path=`$WHICH "$new_path" 2> /dev/null`
39322  # bat and cmd files are not always considered executable in cygwin causing which
39323  # to not find them
39324  if test "x$new_path" = x \
39325      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39326      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39327    new_path=`$CYGPATH -u "$path"`
39328  fi
39329  if test "x$new_path" = x; then
39330    # Oops. Which didn't find the executable.
39331    # The splitting of arguments from the executable at a space might have been incorrect,
39332    # since paths with space are more likely in Windows. Give it another try with the whole
39333    # argument.
39334    path="$complete"
39335    arguments="EOL"
39336    new_path=`$CYGPATH -u "$path"`
39337    new_path=`$WHICH "$new_path" 2> /dev/null`
39338    # bat and cmd files are not always considered executable in cygwin causing which
39339    # to not find them
39340    if test "x$new_path" = x \
39341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39343      new_path=`$CYGPATH -u "$path"`
39344    fi
39345    if test "x$new_path" = x; then
39346      # It's still not found. Now this is an unrecoverable error.
39347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39348$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39349      has_space=`$ECHO "$complete" | $GREP " "`
39350      if test "x$has_space" != x; then
39351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39353      fi
39354      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39355    fi
39356  fi
39357
39358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39361  # "foo.exe" is OK but "foo" is an error.
39362  #
39363  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39364  # It is also a way to make sure we got the proper file name for the real test later on.
39365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39366  if test "x$test_shortpath" = x; then
39367    # Short path failed, file does not exist as specified.
39368    # Try adding .exe or .cmd
39369    if test -f "${new_path}.exe"; then
39370      input_to_shortpath="${new_path}.exe"
39371    elif test -f "${new_path}.cmd"; then
39372      input_to_shortpath="${new_path}.cmd"
39373    else
39374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39375$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39376      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39377$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39378      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39379    fi
39380  else
39381    input_to_shortpath="$new_path"
39382  fi
39383
39384  # Call helper function which possibly converts this using DOS-style short mode.
39385  # If so, the updated path is stored in $new_path.
39386  new_path="$input_to_shortpath"
39387
39388  input_path="$input_to_shortpath"
39389  # Check if we need to convert this using DOS-style short mode. If the path
39390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39391  # take no chances and rewrite it.
39392  # Note: m4 eats our [], so we need to use [ and ] instead.
39393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39394  if test "x$has_forbidden_chars" != x; then
39395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39399      # Going to short mode and back again did indeed matter. Since short mode is
39400      # case insensitive, let's make it lowercase to improve readability.
39401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39402      # Now convert it back to Unix-stile (cygpath)
39403      input_path=`$CYGPATH -u "$shortmode_path"`
39404      new_path="$input_path"
39405    fi
39406  fi
39407
39408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39409  if test "x$test_cygdrive_prefix" = x; then
39410    # As a simple fix, exclude /usr/bin since it's not a real path.
39411    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39413      # a path prefixed by /cygdrive for fixpath to work.
39414      new_path="$CYGWIN_ROOT_PATH$input_path"
39415    fi
39416  fi
39417
39418  # remove trailing .exe if any
39419  new_path="${new_path/%.exe/}"
39420
39421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39422
39423  # First separate the path from the arguments. This will split at the first
39424  # space.
39425  complete="$BUILD_CXX"
39426  path="${complete%% *}"
39427  tmp="$complete EOL"
39428  arguments="${tmp#* }"
39429
39430  # Input might be given as Windows format, start by converting to
39431  # unix format.
39432  new_path="$path"
39433
39434  windows_path="$new_path"
39435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39436    unix_path=`$CYGPATH -u "$windows_path"`
39437    new_path="$unix_path"
39438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39440    new_path="$unix_path"
39441  fi
39442
39443
39444  # Now try to locate executable using which
39445  new_path=`$WHICH "$new_path" 2> /dev/null`
39446
39447  if test "x$new_path" = x; then
39448    # Oops. Which didn't find the executable.
39449    # The splitting of arguments from the executable at a space might have been incorrect,
39450    # since paths with space are more likely in Windows. Give it another try with the whole
39451    # argument.
39452    path="$complete"
39453    arguments="EOL"
39454    new_path="$path"
39455
39456  windows_path="$new_path"
39457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39458    unix_path=`$CYGPATH -u "$windows_path"`
39459    new_path="$unix_path"
39460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39462    new_path="$unix_path"
39463  fi
39464
39465
39466    new_path=`$WHICH "$new_path" 2> /dev/null`
39467
39468    if test "x$new_path" = x; then
39469      # It's still not found. Now this is an unrecoverable error.
39470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39471$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39472      has_space=`$ECHO "$complete" | $GREP " "`
39473      if test "x$has_space" != x; then
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39476      fi
39477      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39478    fi
39479  fi
39480
39481  # Now new_path has a complete unix path to the binary
39482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39483    # Keep paths in /bin as-is, but remove trailing .exe if any
39484    new_path="${new_path/%.exe/}"
39485    # Do not save /bin paths to all_fixpath_prefixes!
39486  else
39487    # Not in mixed or Windows style, start by that.
39488    new_path=`cmd //c echo $new_path`
39489
39490  input_path="$new_path"
39491  # Check if we need to convert this using DOS-style short mode. If the path
39492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39493  # take no chances and rewrite it.
39494  # Note: m4 eats our [], so we need to use [ and ] instead.
39495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39496  if test "x$has_forbidden_chars" != x; then
39497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39499  fi
39500
39501    # Output is in $new_path
39502
39503  windows_path="$new_path"
39504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39505    unix_path=`$CYGPATH -u "$windows_path"`
39506    new_path="$unix_path"
39507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39509    new_path="$unix_path"
39510  fi
39511
39512    # remove trailing .exe if any
39513    new_path="${new_path/%.exe/}"
39514
39515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39517  fi
39518
39519  else
39520    # We're on a posix platform. Hooray! :)
39521    # First separate the path from the arguments. This will split at the first
39522    # space.
39523    complete="$BUILD_CXX"
39524    path="${complete%% *}"
39525    tmp="$complete EOL"
39526    arguments="${tmp#* }"
39527
39528    # Cannot rely on the command "which" here since it doesn't always work.
39529    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39530    if test -z "$is_absolute_path"; then
39531      # Path to executable is not absolute. Find it.
39532      IFS_save="$IFS"
39533      IFS=:
39534      for p in $PATH; do
39535        if test -f "$p/$path" && test -x "$p/$path"; then
39536          new_path="$p/$path"
39537          break
39538        fi
39539      done
39540      IFS="$IFS_save"
39541    else
39542      # This is an absolute path, we can use it without further modifications.
39543      new_path="$path"
39544    fi
39545
39546    if test "x$new_path" = x; then
39547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39548$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39549      has_space=`$ECHO "$complete" | $GREP " "`
39550      if test "x$has_space" != x; then
39551        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39553      fi
39554      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39555    fi
39556  fi
39557
39558  # Now join together the path and the arguments once again
39559  if test "x$arguments" != xEOL; then
39560    new_complete="$new_path ${arguments% *}"
39561  else
39562    new_complete="$new_path"
39563  fi
39564
39565  if test "x$complete" != "x$new_complete"; then
39566    BUILD_CXX="$new_complete"
39567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39568$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39569  fi
39570
39571
39572
39573  # Publish this variable in the help.
39574
39575
39576  if test "x$BUILD_LD" = x; then
39577    # The variable is not set by user, try to locate tool using the code snippet
39578    for ac_prog in ld
39579do
39580  # Extract the first word of "$ac_prog", so it can be a program name with args.
39581set dummy $ac_prog; ac_word=$2
39582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39583$as_echo_n "checking for $ac_word... " >&6; }
39584if ${ac_cv_path_BUILD_LD+:} false; then :
39585  $as_echo_n "(cached) " >&6
39586else
39587  case $BUILD_LD in
39588  [\\/]* | ?:[\\/]*)
39589  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39590  ;;
39591  *)
39592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39593for as_dir in $PATH
39594do
39595  IFS=$as_save_IFS
39596  test -z "$as_dir" && as_dir=.
39597    for ac_exec_ext in '' $ac_executable_extensions; do
39598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39599    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39601    break 2
39602  fi
39603done
39604  done
39605IFS=$as_save_IFS
39606
39607  ;;
39608esac
39609fi
39610BUILD_LD=$ac_cv_path_BUILD_LD
39611if test -n "$BUILD_LD"; then
39612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39613$as_echo "$BUILD_LD" >&6; }
39614else
39615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39616$as_echo "no" >&6; }
39617fi
39618
39619
39620  test -n "$BUILD_LD" && break
39621done
39622
39623  else
39624    # The variable is set, but is it from the command line or the environment?
39625
39626    # Try to remove the string !BUILD_LD! from our list.
39627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39629      # If it failed, the variable was not from the command line. Ignore it,
39630      # but warn the user (except for BASH, which is always set by the calling BASH).
39631      if test "xBUILD_LD" != xBASH; then
39632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39633$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39634      fi
39635      # Try to locate tool using the code snippet
39636      for ac_prog in ld
39637do
39638  # Extract the first word of "$ac_prog", so it can be a program name with args.
39639set dummy $ac_prog; ac_word=$2
39640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39641$as_echo_n "checking for $ac_word... " >&6; }
39642if ${ac_cv_path_BUILD_LD+:} false; then :
39643  $as_echo_n "(cached) " >&6
39644else
39645  case $BUILD_LD in
39646  [\\/]* | ?:[\\/]*)
39647  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39648  ;;
39649  *)
39650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39651for as_dir in $PATH
39652do
39653  IFS=$as_save_IFS
39654  test -z "$as_dir" && as_dir=.
39655    for ac_exec_ext in '' $ac_executable_extensions; do
39656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39657    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39659    break 2
39660  fi
39661done
39662  done
39663IFS=$as_save_IFS
39664
39665  ;;
39666esac
39667fi
39668BUILD_LD=$ac_cv_path_BUILD_LD
39669if test -n "$BUILD_LD"; then
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39671$as_echo "$BUILD_LD" >&6; }
39672else
39673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39674$as_echo "no" >&6; }
39675fi
39676
39677
39678  test -n "$BUILD_LD" && break
39679done
39680
39681    else
39682      # If it succeeded, then it was overridden by the user. We will use it
39683      # for the tool.
39684
39685      # First remove it from the list of overridden variables, so we can test
39686      # for unknown variables in the end.
39687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39688
39689      # Check if the provided tool contains a complete path.
39690      tool_specified="$BUILD_LD"
39691      tool_basename="${tool_specified##*/}"
39692      if test "x$tool_basename" = "x$tool_specified"; then
39693        # A command without a complete path is provided, search $PATH.
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39695$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39696        # Extract the first word of "$tool_basename", so it can be a program name with args.
39697set dummy $tool_basename; ac_word=$2
39698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39699$as_echo_n "checking for $ac_word... " >&6; }
39700if ${ac_cv_path_BUILD_LD+:} false; then :
39701  $as_echo_n "(cached) " >&6
39702else
39703  case $BUILD_LD in
39704  [\\/]* | ?:[\\/]*)
39705  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39706  ;;
39707  *)
39708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39709for as_dir in $PATH
39710do
39711  IFS=$as_save_IFS
39712  test -z "$as_dir" && as_dir=.
39713    for ac_exec_ext in '' $ac_executable_extensions; do
39714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39715    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39717    break 2
39718  fi
39719done
39720  done
39721IFS=$as_save_IFS
39722
39723  ;;
39724esac
39725fi
39726BUILD_LD=$ac_cv_path_BUILD_LD
39727if test -n "$BUILD_LD"; then
39728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39729$as_echo "$BUILD_LD" >&6; }
39730else
39731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39732$as_echo "no" >&6; }
39733fi
39734
39735
39736        if test "x$BUILD_LD" = x; then
39737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39738        fi
39739      else
39740        # Otherwise we believe it is a complete path. Use it as it is.
39741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39742$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39744$as_echo_n "checking for BUILD_LD... " >&6; }
39745        if test ! -x "$tool_specified"; then
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39747$as_echo "not found" >&6; }
39748          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39749        fi
39750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39751$as_echo "$tool_specified" >&6; }
39752      fi
39753    fi
39754  fi
39755
39756
39757
39758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39759
39760  # First separate the path from the arguments. This will split at the first
39761  # space.
39762  complete="$BUILD_LD"
39763  path="${complete%% *}"
39764  tmp="$complete EOL"
39765  arguments="${tmp#* }"
39766
39767  # Input might be given as Windows format, start by converting to
39768  # unix format.
39769  new_path=`$CYGPATH -u "$path"`
39770
39771  # Now try to locate executable using which
39772  new_path=`$WHICH "$new_path" 2> /dev/null`
39773  # bat and cmd files are not always considered executable in cygwin causing which
39774  # to not find them
39775  if test "x$new_path" = x \
39776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39778    new_path=`$CYGPATH -u "$path"`
39779  fi
39780  if test "x$new_path" = x; then
39781    # Oops. Which didn't find the executable.
39782    # The splitting of arguments from the executable at a space might have been incorrect,
39783    # since paths with space are more likely in Windows. Give it another try with the whole
39784    # argument.
39785    path="$complete"
39786    arguments="EOL"
39787    new_path=`$CYGPATH -u "$path"`
39788    new_path=`$WHICH "$new_path" 2> /dev/null`
39789    # bat and cmd files are not always considered executable in cygwin causing which
39790    # to not find them
39791    if test "x$new_path" = x \
39792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39794      new_path=`$CYGPATH -u "$path"`
39795    fi
39796    if test "x$new_path" = x; then
39797      # It's still not found. Now this is an unrecoverable error.
39798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39799$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39800      has_space=`$ECHO "$complete" | $GREP " "`
39801      if test "x$has_space" != x; then
39802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39804      fi
39805      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39806    fi
39807  fi
39808
39809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39812  # "foo.exe" is OK but "foo" is an error.
39813  #
39814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39815  # It is also a way to make sure we got the proper file name for the real test later on.
39816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39817  if test "x$test_shortpath" = x; then
39818    # Short path failed, file does not exist as specified.
39819    # Try adding .exe or .cmd
39820    if test -f "${new_path}.exe"; then
39821      input_to_shortpath="${new_path}.exe"
39822    elif test -f "${new_path}.cmd"; then
39823      input_to_shortpath="${new_path}.cmd"
39824    else
39825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39826$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39829      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39830    fi
39831  else
39832    input_to_shortpath="$new_path"
39833  fi
39834
39835  # Call helper function which possibly converts this using DOS-style short mode.
39836  # If so, the updated path is stored in $new_path.
39837  new_path="$input_to_shortpath"
39838
39839  input_path="$input_to_shortpath"
39840  # Check if we need to convert this using DOS-style short mode. If the path
39841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39842  # take no chances and rewrite it.
39843  # Note: m4 eats our [], so we need to use [ and ] instead.
39844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39845  if test "x$has_forbidden_chars" != x; then
39846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39850      # Going to short mode and back again did indeed matter. Since short mode is
39851      # case insensitive, let's make it lowercase to improve readability.
39852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39853      # Now convert it back to Unix-stile (cygpath)
39854      input_path=`$CYGPATH -u "$shortmode_path"`
39855      new_path="$input_path"
39856    fi
39857  fi
39858
39859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39860  if test "x$test_cygdrive_prefix" = x; then
39861    # As a simple fix, exclude /usr/bin since it's not a real path.
39862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39864      # a path prefixed by /cygdrive for fixpath to work.
39865      new_path="$CYGWIN_ROOT_PATH$input_path"
39866    fi
39867  fi
39868
39869  # remove trailing .exe if any
39870  new_path="${new_path/%.exe/}"
39871
39872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39873
39874  # First separate the path from the arguments. This will split at the first
39875  # space.
39876  complete="$BUILD_LD"
39877  path="${complete%% *}"
39878  tmp="$complete EOL"
39879  arguments="${tmp#* }"
39880
39881  # Input might be given as Windows format, start by converting to
39882  # unix format.
39883  new_path="$path"
39884
39885  windows_path="$new_path"
39886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39887    unix_path=`$CYGPATH -u "$windows_path"`
39888    new_path="$unix_path"
39889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39891    new_path="$unix_path"
39892  fi
39893
39894
39895  # Now try to locate executable using which
39896  new_path=`$WHICH "$new_path" 2> /dev/null`
39897
39898  if test "x$new_path" = x; then
39899    # Oops. Which didn't find the executable.
39900    # The splitting of arguments from the executable at a space might have been incorrect,
39901    # since paths with space are more likely in Windows. Give it another try with the whole
39902    # argument.
39903    path="$complete"
39904    arguments="EOL"
39905    new_path="$path"
39906
39907  windows_path="$new_path"
39908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39909    unix_path=`$CYGPATH -u "$windows_path"`
39910    new_path="$unix_path"
39911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39913    new_path="$unix_path"
39914  fi
39915
39916
39917    new_path=`$WHICH "$new_path" 2> /dev/null`
39918
39919    if test "x$new_path" = x; then
39920      # It's still not found. Now this is an unrecoverable error.
39921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39922$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39923      has_space=`$ECHO "$complete" | $GREP " "`
39924      if test "x$has_space" != x; then
39925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39927      fi
39928      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39929    fi
39930  fi
39931
39932  # Now new_path has a complete unix path to the binary
39933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39934    # Keep paths in /bin as-is, but remove trailing .exe if any
39935    new_path="${new_path/%.exe/}"
39936    # Do not save /bin paths to all_fixpath_prefixes!
39937  else
39938    # Not in mixed or Windows style, start by that.
39939    new_path=`cmd //c echo $new_path`
39940
39941  input_path="$new_path"
39942  # Check if we need to convert this using DOS-style short mode. If the path
39943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39944  # take no chances and rewrite it.
39945  # Note: m4 eats our [], so we need to use [ and ] instead.
39946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39947  if test "x$has_forbidden_chars" != x; then
39948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39950  fi
39951
39952    # Output is in $new_path
39953
39954  windows_path="$new_path"
39955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39956    unix_path=`$CYGPATH -u "$windows_path"`
39957    new_path="$unix_path"
39958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39960    new_path="$unix_path"
39961  fi
39962
39963    # remove trailing .exe if any
39964    new_path="${new_path/%.exe/}"
39965
39966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39968  fi
39969
39970  else
39971    # We're on a posix platform. Hooray! :)
39972    # First separate the path from the arguments. This will split at the first
39973    # space.
39974    complete="$BUILD_LD"
39975    path="${complete%% *}"
39976    tmp="$complete EOL"
39977    arguments="${tmp#* }"
39978
39979    # Cannot rely on the command "which" here since it doesn't always work.
39980    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39981    if test -z "$is_absolute_path"; then
39982      # Path to executable is not absolute. Find it.
39983      IFS_save="$IFS"
39984      IFS=:
39985      for p in $PATH; do
39986        if test -f "$p/$path" && test -x "$p/$path"; then
39987          new_path="$p/$path"
39988          break
39989        fi
39990      done
39991      IFS="$IFS_save"
39992    else
39993      # This is an absolute path, we can use it without further modifications.
39994      new_path="$path"
39995    fi
39996
39997    if test "x$new_path" = x; then
39998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39999$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40000      has_space=`$ECHO "$complete" | $GREP " "`
40001      if test "x$has_space" != x; then
40002        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40004      fi
40005      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40006    fi
40007  fi
40008
40009  # Now join together the path and the arguments once again
40010  if test "x$arguments" != xEOL; then
40011    new_complete="$new_path ${arguments% *}"
40012  else
40013    new_complete="$new_path"
40014  fi
40015
40016  if test "x$complete" != "x$new_complete"; then
40017    BUILD_LD="$new_complete"
40018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40019$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40020  fi
40021
40022  else
40023    # If we are not cross compiling, use the normal target compilers for
40024    # building the build platform executables.
40025    BUILD_CC="$CC"
40026    BUILD_CXX="$CXX"
40027    BUILD_LD="$LD"
40028  fi
40029
40030
40031
40032
40033
40034
40035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40036    # For hotspot, we need these in Windows mixed path,
40037    # so rewrite them all. Need added .exe suffix.
40038    HOTSPOT_CXX="$CXX.exe"
40039    HOTSPOT_LD="$LD.exe"
40040    HOTSPOT_MT="$MT.exe"
40041    HOTSPOT_RC="$RC.exe"
40042
40043  unix_path="$HOTSPOT_CXX"
40044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40045    windows_path=`$CYGPATH -m "$unix_path"`
40046    HOTSPOT_CXX="$windows_path"
40047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40048    windows_path=`cmd //c echo $unix_path`
40049    HOTSPOT_CXX="$windows_path"
40050  fi
40051
40052
40053  unix_path="$HOTSPOT_LD"
40054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40055    windows_path=`$CYGPATH -m "$unix_path"`
40056    HOTSPOT_LD="$windows_path"
40057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40058    windows_path=`cmd //c echo $unix_path`
40059    HOTSPOT_LD="$windows_path"
40060  fi
40061
40062
40063  unix_path="$HOTSPOT_MT"
40064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40065    windows_path=`$CYGPATH -m "$unix_path"`
40066    HOTSPOT_MT="$windows_path"
40067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40068    windows_path=`cmd //c echo $unix_path`
40069    HOTSPOT_MT="$windows_path"
40070  fi
40071
40072
40073  unix_path="$HOTSPOT_RC"
40074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40075    windows_path=`$CYGPATH -m "$unix_path"`
40076    HOTSPOT_RC="$windows_path"
40077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40078    windows_path=`cmd //c echo $unix_path`
40079    HOTSPOT_RC="$windows_path"
40080  fi
40081
40082
40083
40084  else
40085    HOTSPOT_CXX="$CXX"
40086    HOTSPOT_LD="$LD"
40087  fi
40088
40089
40090
40091  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40092    USE_CLANG=true
40093  fi
40094
40095
40096  # LDEXE is the linker to use, when creating executables. Not really used.
40097  # FIXME: These should just be removed!
40098  LDEXE="$LD"
40099  LDEXECXX="$LDCXX"
40100
40101
40102
40103
40104  # The package path is used only on macosx?
40105  # FIXME: clean this up, and/or move it elsewhere.
40106  PACKAGE_PATH=/opt/local
40107
40108
40109  # Check for extra potential brokenness.
40110  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40111    # On Windows, double-check that we got the right compiler.
40112    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40113    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40114    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40115      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40116        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40117      fi
40118    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40119      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40120        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40121      fi
40122    fi
40123  fi
40124
40125  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40126    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40127    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40128    # This is later checked when setting flags.
40129  fi
40130
40131  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40132  # in executable.'
40133  USING_BROKEN_SUSE_LD=no
40134  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40136$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40137    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40138    echo "int main() { }" > main.c
40139    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40141$as_echo "no" >&6; }
40142      USING_BROKEN_SUSE_LD=no
40143    else
40144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40145$as_echo "yes" >&6; }
40146      USING_BROKEN_SUSE_LD=yes
40147    fi
40148    rm -rf version-script.map main.c a.out
40149  fi
40150
40151
40152
40153# Setup the JTReg Regression Test Harness.
40154
40155
40156# Check whether --with-jtreg was given.
40157if test "${with_jtreg+set}" = set; then :
40158  withval=$with_jtreg;
40159else
40160  with_jtreg=no
40161fi
40162
40163
40164  if test "x$with_jtreg" = xno; then
40165    # jtreg disabled
40166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40167$as_echo_n "checking for jtreg... " >&6; }
40168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40169$as_echo "no" >&6; }
40170  else
40171    if test "x$with_jtreg" != xyes; then
40172      # with path specified.
40173      JT_HOME="$with_jtreg"
40174    fi
40175
40176    if test "x$JT_HOME" != x; then
40177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40178$as_echo_n "checking for jtreg... " >&6; }
40179
40180      # use JT_HOME enviroment var.
40181
40182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40183
40184  # Input might be given as Windows format, start by converting to
40185  # unix format.
40186  path="$JT_HOME"
40187  new_path=`$CYGPATH -u "$path"`
40188
40189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40192  # "foo.exe" is OK but "foo" is an error.
40193  #
40194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40195  # It is also a way to make sure we got the proper file name for the real test later on.
40196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40197  if test "x$test_shortpath" = x; then
40198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40199$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40200    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40201  fi
40202
40203  # Call helper function which possibly converts this using DOS-style short mode.
40204  # If so, the updated path is stored in $new_path.
40205
40206  input_path="$new_path"
40207  # Check if we need to convert this using DOS-style short mode. If the path
40208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40209  # take no chances and rewrite it.
40210  # Note: m4 eats our [], so we need to use [ and ] instead.
40211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40212  if test "x$has_forbidden_chars" != x; then
40213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40217      # Going to short mode and back again did indeed matter. Since short mode is
40218      # case insensitive, let's make it lowercase to improve readability.
40219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40220      # Now convert it back to Unix-stile (cygpath)
40221      input_path=`$CYGPATH -u "$shortmode_path"`
40222      new_path="$input_path"
40223    fi
40224  fi
40225
40226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40227  if test "x$test_cygdrive_prefix" = x; then
40228    # As a simple fix, exclude /usr/bin since it's not a real path.
40229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40231      # a path prefixed by /cygdrive for fixpath to work.
40232      new_path="$CYGWIN_ROOT_PATH$input_path"
40233    fi
40234  fi
40235
40236
40237  if test "x$path" != "x$new_path"; then
40238    JT_HOME="$new_path"
40239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40240$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40241  fi
40242
40243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40244
40245  path="$JT_HOME"
40246  has_colon=`$ECHO $path | $GREP ^.:`
40247  new_path="$path"
40248  if test "x$has_colon" = x; then
40249    # Not in mixed or Windows style, start by that.
40250    new_path=`cmd //c echo $path`
40251  fi
40252
40253
40254  input_path="$new_path"
40255  # Check if we need to convert this using DOS-style short mode. If the path
40256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40257  # take no chances and rewrite it.
40258  # Note: m4 eats our [], so we need to use [ and ] instead.
40259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40260  if test "x$has_forbidden_chars" != x; then
40261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40263  fi
40264
40265
40266  windows_path="$new_path"
40267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40268    unix_path=`$CYGPATH -u "$windows_path"`
40269    new_path="$unix_path"
40270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40272    new_path="$unix_path"
40273  fi
40274
40275  if test "x$path" != "x$new_path"; then
40276    JT_HOME="$new_path"
40277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40278$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40279  fi
40280
40281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40283
40284  else
40285    # We're on a posix platform. Hooray! :)
40286    path="$JT_HOME"
40287    has_space=`$ECHO "$path" | $GREP " "`
40288    if test "x$has_space" != x; then
40289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40290$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40292    fi
40293
40294    # Use eval to expand a potential ~
40295    eval path="$path"
40296    if test ! -f "$path" && test ! -d "$path"; then
40297      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40298    fi
40299
40300    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40301  fi
40302
40303
40304      # jtreg win32 script works for everybody
40305      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40306
40307      if test ! -f "$JTREGEXE"; then
40308        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40309      fi
40310
40311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40312$as_echo "$JTREGEXE" >&6; }
40313    else
40314      # try to find jtreg on path
40315
40316
40317
40318  # Publish this variable in the help.
40319
40320
40321  if test "x$JTREGEXE" = x; then
40322    # The variable is not set by user, try to locate tool using the code snippet
40323    for ac_prog in jtreg
40324do
40325  # Extract the first word of "$ac_prog", so it can be a program name with args.
40326set dummy $ac_prog; ac_word=$2
40327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40328$as_echo_n "checking for $ac_word... " >&6; }
40329if ${ac_cv_path_JTREGEXE+:} false; then :
40330  $as_echo_n "(cached) " >&6
40331else
40332  case $JTREGEXE in
40333  [\\/]* | ?:[\\/]*)
40334  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40335  ;;
40336  *)
40337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40338for as_dir in $PATH
40339do
40340  IFS=$as_save_IFS
40341  test -z "$as_dir" && as_dir=.
40342    for ac_exec_ext in '' $ac_executable_extensions; do
40343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40344    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40346    break 2
40347  fi
40348done
40349  done
40350IFS=$as_save_IFS
40351
40352  ;;
40353esac
40354fi
40355JTREGEXE=$ac_cv_path_JTREGEXE
40356if test -n "$JTREGEXE"; then
40357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40358$as_echo "$JTREGEXE" >&6; }
40359else
40360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40361$as_echo "no" >&6; }
40362fi
40363
40364
40365  test -n "$JTREGEXE" && break
40366done
40367
40368  else
40369    # The variable is set, but is it from the command line or the environment?
40370
40371    # Try to remove the string !JTREGEXE! from our list.
40372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40374      # If it failed, the variable was not from the command line. Ignore it,
40375      # but warn the user (except for BASH, which is always set by the calling BASH).
40376      if test "xJTREGEXE" != xBASH; then
40377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40378$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40379      fi
40380      # Try to locate tool using the code snippet
40381      for ac_prog in jtreg
40382do
40383  # Extract the first word of "$ac_prog", so it can be a program name with args.
40384set dummy $ac_prog; ac_word=$2
40385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40386$as_echo_n "checking for $ac_word... " >&6; }
40387if ${ac_cv_path_JTREGEXE+:} false; then :
40388  $as_echo_n "(cached) " >&6
40389else
40390  case $JTREGEXE in
40391  [\\/]* | ?:[\\/]*)
40392  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40393  ;;
40394  *)
40395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40396for as_dir in $PATH
40397do
40398  IFS=$as_save_IFS
40399  test -z "$as_dir" && as_dir=.
40400    for ac_exec_ext in '' $ac_executable_extensions; do
40401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40402    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40404    break 2
40405  fi
40406done
40407  done
40408IFS=$as_save_IFS
40409
40410  ;;
40411esac
40412fi
40413JTREGEXE=$ac_cv_path_JTREGEXE
40414if test -n "$JTREGEXE"; then
40415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40416$as_echo "$JTREGEXE" >&6; }
40417else
40418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40419$as_echo "no" >&6; }
40420fi
40421
40422
40423  test -n "$JTREGEXE" && break
40424done
40425
40426    else
40427      # If it succeeded, then it was overridden by the user. We will use it
40428      # for the tool.
40429
40430      # First remove it from the list of overridden variables, so we can test
40431      # for unknown variables in the end.
40432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40433
40434      # Check if the provided tool contains a complete path.
40435      tool_specified="$JTREGEXE"
40436      tool_basename="${tool_specified##*/}"
40437      if test "x$tool_basename" = "x$tool_specified"; then
40438        # A command without a complete path is provided, search $PATH.
40439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40440$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40441        # Extract the first word of "$tool_basename", so it can be a program name with args.
40442set dummy $tool_basename; ac_word=$2
40443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40444$as_echo_n "checking for $ac_word... " >&6; }
40445if ${ac_cv_path_JTREGEXE+:} false; then :
40446  $as_echo_n "(cached) " >&6
40447else
40448  case $JTREGEXE in
40449  [\\/]* | ?:[\\/]*)
40450  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40451  ;;
40452  *)
40453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40454for as_dir in $PATH
40455do
40456  IFS=$as_save_IFS
40457  test -z "$as_dir" && as_dir=.
40458    for ac_exec_ext in '' $ac_executable_extensions; do
40459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40460    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40462    break 2
40463  fi
40464done
40465  done
40466IFS=$as_save_IFS
40467
40468  ;;
40469esac
40470fi
40471JTREGEXE=$ac_cv_path_JTREGEXE
40472if test -n "$JTREGEXE"; then
40473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40474$as_echo "$JTREGEXE" >&6; }
40475else
40476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40477$as_echo "no" >&6; }
40478fi
40479
40480
40481        if test "x$JTREGEXE" = x; then
40482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40483        fi
40484      else
40485        # Otherwise we believe it is a complete path. Use it as it is.
40486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40487$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40489$as_echo_n "checking for JTREGEXE... " >&6; }
40490        if test ! -x "$tool_specified"; then
40491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40492$as_echo "not found" >&6; }
40493          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40494        fi
40495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40496$as_echo "$tool_specified" >&6; }
40497      fi
40498    fi
40499  fi
40500
40501
40502
40503  if test "x$JTREGEXE" = x; then
40504    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40505  fi
40506
40507
40508      JT_HOME="`$DIRNAME $JTREGEXE`"
40509    fi
40510  fi
40511
40512
40513
40514
40515
40516
40517  # Option used to tell the compiler whether to create 32- or 64-bit executables
40518  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40519    COMPILER_TARGET_BITS_FLAG="-q"
40520  else
40521    COMPILER_TARGET_BITS_FLAG="-m"
40522  fi
40523
40524
40525  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40526  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40527    ARFLAGS="-r"
40528  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40529    ARFLAGS="-X64"
40530  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40531    # lib.exe is used as AR to create static libraries.
40532    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40533  else
40534    ARFLAGS=""
40535  fi
40536
40537
40538  ## Setup strip.
40539  # FIXME: should this really be per platform, or should it be per toolchain type?
40540  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40541  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40542  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40543    STRIPFLAGS="-g"
40544  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40545    STRIPFLAGS="-x"
40546  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40547    STRIPFLAGS="-S"
40548  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40549    STRIPFLAGS="-X32_64"
40550  fi
40551
40552  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40553    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40554  fi
40555
40556
40557  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40558    # FIXME: break out into MCSFLAGS
40559    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40560  fi
40561
40562
40563  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40564    CC_OUT_OPTION=-Fo
40565    EXE_OUT_OPTION=-out:
40566    LD_OUT_OPTION=-out:
40567    AR_OUT_OPTION=-out:
40568  else
40569    # The option used to specify the target .o,.a or .so file.
40570    # When compiling, how to specify the to be created object file.
40571    CC_OUT_OPTION='-o$(SPACE)'
40572    # When linking, how to specify the to be created executable.
40573    EXE_OUT_OPTION='-o$(SPACE)'
40574    # When linking, how to specify the to be created dynamically linkable library.
40575    LD_OUT_OPTION='-o$(SPACE)'
40576    # When archiving, how to specify the to be create static archive for object files.
40577    AR_OUT_OPTION='rcs$(SPACE)'
40578  fi
40579
40580
40581
40582
40583
40584  # On Windows, we need to set RC flags.
40585  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40586    RC_FLAGS="-nologo -l 0x409 -r"
40587    if test "x$VARIANT" = xOPT; then
40588      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40589    fi
40590
40591    # The version variables used to create RC_FLAGS may be overridden
40592    # in a custom configure script, or possibly the command line.
40593    # Let those variables be expanded at make time in spec.gmk.
40594    # The \$ are escaped to the shell, and the $(...) variables
40595    # are evaluated by make.
40596    RC_FLAGS="$RC_FLAGS \
40597        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40598        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40599        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40600        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40601        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40602        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40603        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40604  fi
40605
40606
40607  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40608    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40609    CCXXFLAGS="$CCXXFLAGS -nologo"
40610  fi
40611
40612
40613# FIXME: Currently we must test this after toolchain but before flags. Fix!
40614
40615# Now we can test some aspects on the target using configure macros.
40616
40617
40618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40619$as_echo_n "checking for ANSI C header files... " >&6; }
40620if ${ac_cv_header_stdc+:} false; then :
40621  $as_echo_n "(cached) " >&6
40622else
40623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40624/* end confdefs.h.  */
40625#include <stdlib.h>
40626#include <stdarg.h>
40627#include <string.h>
40628#include <float.h>
40629
40630int
40631main ()
40632{
40633
40634  ;
40635  return 0;
40636}
40637_ACEOF
40638if ac_fn_cxx_try_compile "$LINENO"; then :
40639  ac_cv_header_stdc=yes
40640else
40641  ac_cv_header_stdc=no
40642fi
40643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40644
40645if test $ac_cv_header_stdc = yes; then
40646  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40648/* end confdefs.h.  */
40649#include <string.h>
40650
40651_ACEOF
40652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40653  $EGREP "memchr" >/dev/null 2>&1; then :
40654
40655else
40656  ac_cv_header_stdc=no
40657fi
40658rm -f conftest*
40659
40660fi
40661
40662if test $ac_cv_header_stdc = yes; then
40663  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40665/* end confdefs.h.  */
40666#include <stdlib.h>
40667
40668_ACEOF
40669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40670  $EGREP "free" >/dev/null 2>&1; then :
40671
40672else
40673  ac_cv_header_stdc=no
40674fi
40675rm -f conftest*
40676
40677fi
40678
40679if test $ac_cv_header_stdc = yes; then
40680  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40681  if test "$cross_compiling" = yes; then :
40682  :
40683else
40684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40685/* end confdefs.h.  */
40686#include <ctype.h>
40687#include <stdlib.h>
40688#if ((' ' & 0x0FF) == 0x020)
40689# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40690# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40691#else
40692# define ISLOWER(c) \
40693		   (('a' <= (c) && (c) <= 'i') \
40694		     || ('j' <= (c) && (c) <= 'r') \
40695		     || ('s' <= (c) && (c) <= 'z'))
40696# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40697#endif
40698
40699#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40700int
40701main ()
40702{
40703  int i;
40704  for (i = 0; i < 256; i++)
40705    if (XOR (islower (i), ISLOWER (i))
40706	|| toupper (i) != TOUPPER (i))
40707      return 2;
40708  return 0;
40709}
40710_ACEOF
40711if ac_fn_cxx_try_run "$LINENO"; then :
40712
40713else
40714  ac_cv_header_stdc=no
40715fi
40716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40717  conftest.$ac_objext conftest.beam conftest.$ac_ext
40718fi
40719
40720fi
40721fi
40722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40723$as_echo "$ac_cv_header_stdc" >&6; }
40724if test $ac_cv_header_stdc = yes; then
40725
40726$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40727
40728fi
40729
40730# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40731for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40732		  inttypes.h stdint.h unistd.h
40733do :
40734  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40735ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40736"
40737if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40738  cat >>confdefs.h <<_ACEOF
40739#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40740_ACEOF
40741
40742fi
40743
40744done
40745
40746
40747
40748  ###############################################################################
40749  #
40750  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40751  # (The JVM can use 32 or 64 bit Java pointers but that decision
40752  # is made at runtime.)
40753  #
40754
40755  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40756    # Always specify -m flag on Solaris
40757    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40758
40759  # When we add flags to the "official" CFLAGS etc, we need to
40760  # keep track of these additions in ADDED_CFLAGS etc. These
40761  # will later be checked to make sure only controlled additions
40762  # have been made to CFLAGS etc.
40763  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40764  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40765  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40766
40767  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40768  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40769  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40770
40771  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40772  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40773  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40774
40775  elif test "x$COMPILE_TYPE" = xreduced; then
40776    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40777      # Specify -m if running reduced on other Posix platforms
40778
40779  # When we add flags to the "official" CFLAGS etc, we need to
40780  # keep track of these additions in ADDED_CFLAGS etc. These
40781  # will later be checked to make sure only controlled additions
40782  # have been made to CFLAGS etc.
40783  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40784  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40785  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40786
40787  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40788  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40789  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40790
40791  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40792  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40793  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40794
40795    fi
40796  fi
40797
40798  # Make compilation sanity check
40799  for ac_header in stdio.h
40800do :
40801  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40802if test "x$ac_cv_header_stdio_h" = xyes; then :
40803  cat >>confdefs.h <<_ACEOF
40804#define HAVE_STDIO_H 1
40805_ACEOF
40806
40807else
40808
40809    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40810$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40811    if test "x$COMPILE_TYPE" = xreduced; then
40812      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40813$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40814    elif test "x$COMPILE_TYPE" = xcross; then
40815      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40816$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40817    fi
40818    as_fn_error $? "Cannot continue." "$LINENO" 5
40819
40820fi
40821
40822done
40823
40824
40825  # The cast to long int works around a bug in the HP C Compiler
40826# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40827# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40828# This bug is HP SR number 8606223364.
40829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40830$as_echo_n "checking size of int *... " >&6; }
40831if ${ac_cv_sizeof_int_p+:} false; then :
40832  $as_echo_n "(cached) " >&6
40833else
40834  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40835
40836else
40837  if test "$ac_cv_type_int_p" = yes; then
40838     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40840as_fn_error 77 "cannot compute sizeof (int *)
40841See \`config.log' for more details" "$LINENO" 5; }
40842   else
40843     ac_cv_sizeof_int_p=0
40844   fi
40845fi
40846
40847fi
40848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40849$as_echo "$ac_cv_sizeof_int_p" >&6; }
40850
40851
40852
40853cat >>confdefs.h <<_ACEOF
40854#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40855_ACEOF
40856
40857
40858
40859  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40860  if test "x$ac_cv_sizeof_int_p" = x; then
40861    # The test failed, lets stick to the assumed value.
40862    { $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
40863$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40864  else
40865    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40866
40867    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40868      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40869      # Let's try to implicitely set the compilers target architecture and retry the test
40870      { $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
40871$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;}
40872      { $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
40873$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;}
40874
40875  # When we add flags to the "official" CFLAGS etc, we need to
40876  # keep track of these additions in ADDED_CFLAGS etc. These
40877  # will later be checked to make sure only controlled additions
40878  # have been made to CFLAGS etc.
40879  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40880  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40881  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40882
40883  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40884  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40885  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40886
40887  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40888  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40889  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40890
40891
40892      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40893      unset ac_cv_sizeof_int_p
40894      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40895      cat >>confdefs.h <<_ACEOF
40896#undef SIZEOF_INT_P
40897_ACEOF
40898
40899      # The cast to long int works around a bug in the HP C Compiler
40900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40902# This bug is HP SR number 8606223364.
40903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40904$as_echo_n "checking size of int *... " >&6; }
40905if ${ac_cv_sizeof_int_p+:} false; then :
40906  $as_echo_n "(cached) " >&6
40907else
40908  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40909
40910else
40911  if test "$ac_cv_type_int_p" = yes; then
40912     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40914as_fn_error 77 "cannot compute sizeof (int *)
40915See \`config.log' for more details" "$LINENO" 5; }
40916   else
40917     ac_cv_sizeof_int_p=0
40918   fi
40919fi
40920
40921fi
40922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40923$as_echo "$ac_cv_sizeof_int_p" >&6; }
40924
40925
40926
40927cat >>confdefs.h <<_ACEOF
40928#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40929_ACEOF
40930
40931
40932
40933      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40934
40935      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40936        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
40937      fi
40938    fi
40939  fi
40940
40941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40942$as_echo_n "checking for target address size... " >&6; }
40943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40944$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40945
40946
40947  ###############################################################################
40948  #
40949  # Is the target little of big endian?
40950  #
40951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40952$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40953if ${ac_cv_c_bigendian+:} false; then :
40954  $as_echo_n "(cached) " >&6
40955else
40956  ac_cv_c_bigendian=unknown
40957    # See if we're dealing with a universal compiler.
40958    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40959/* end confdefs.h.  */
40960#ifndef __APPLE_CC__
40961	       not a universal capable compiler
40962	     #endif
40963	     typedef int dummy;
40964
40965_ACEOF
40966if ac_fn_cxx_try_compile "$LINENO"; then :
40967
40968	# Check for potential -arch flags.  It is not universal unless
40969	# there are at least two -arch flags with different values.
40970	ac_arch=
40971	ac_prev=
40972	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40973	 if test -n "$ac_prev"; then
40974	   case $ac_word in
40975	     i?86 | x86_64 | ppc | ppc64)
40976	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40977		 ac_arch=$ac_word
40978	       else
40979		 ac_cv_c_bigendian=universal
40980		 break
40981	       fi
40982	       ;;
40983	   esac
40984	   ac_prev=
40985	 elif test "x$ac_word" = "x-arch"; then
40986	   ac_prev=arch
40987	 fi
40988       done
40989fi
40990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40991    if test $ac_cv_c_bigendian = unknown; then
40992      # See if sys/param.h defines the BYTE_ORDER macro.
40993      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40994/* end confdefs.h.  */
40995#include <sys/types.h>
40996	     #include <sys/param.h>
40997
40998int
40999main ()
41000{
41001#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41002		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41003		     && LITTLE_ENDIAN)
41004	      bogus endian macros
41005	     #endif
41006
41007  ;
41008  return 0;
41009}
41010_ACEOF
41011if ac_fn_cxx_try_compile "$LINENO"; then :
41012  # It does; now see whether it defined to BIG_ENDIAN or not.
41013	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41014/* end confdefs.h.  */
41015#include <sys/types.h>
41016		#include <sys/param.h>
41017
41018int
41019main ()
41020{
41021#if BYTE_ORDER != BIG_ENDIAN
41022		 not big endian
41023		#endif
41024
41025  ;
41026  return 0;
41027}
41028_ACEOF
41029if ac_fn_cxx_try_compile "$LINENO"; then :
41030  ac_cv_c_bigendian=yes
41031else
41032  ac_cv_c_bigendian=no
41033fi
41034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41035fi
41036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41037    fi
41038    if test $ac_cv_c_bigendian = unknown; then
41039      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41040      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41041/* end confdefs.h.  */
41042#include <limits.h>
41043
41044int
41045main ()
41046{
41047#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41048	      bogus endian macros
41049	     #endif
41050
41051  ;
41052  return 0;
41053}
41054_ACEOF
41055if ac_fn_cxx_try_compile "$LINENO"; then :
41056  # It does; now see whether it defined to _BIG_ENDIAN or not.
41057	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41058/* end confdefs.h.  */
41059#include <limits.h>
41060
41061int
41062main ()
41063{
41064#ifndef _BIG_ENDIAN
41065		 not big endian
41066		#endif
41067
41068  ;
41069  return 0;
41070}
41071_ACEOF
41072if ac_fn_cxx_try_compile "$LINENO"; then :
41073  ac_cv_c_bigendian=yes
41074else
41075  ac_cv_c_bigendian=no
41076fi
41077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41078fi
41079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41080    fi
41081    if test $ac_cv_c_bigendian = unknown; then
41082      # Compile a test program.
41083      if test "$cross_compiling" = yes; then :
41084  # Try to guess by grepping values from an object file.
41085	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41086/* end confdefs.h.  */
41087short int ascii_mm[] =
41088		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41089		short int ascii_ii[] =
41090		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41091		int use_ascii (int i) {
41092		  return ascii_mm[i] + ascii_ii[i];
41093		}
41094		short int ebcdic_ii[] =
41095		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41096		short int ebcdic_mm[] =
41097		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41098		int use_ebcdic (int i) {
41099		  return ebcdic_mm[i] + ebcdic_ii[i];
41100		}
41101		extern int foo;
41102
41103int
41104main ()
41105{
41106return use_ascii (foo) == use_ebcdic (foo);
41107  ;
41108  return 0;
41109}
41110_ACEOF
41111if ac_fn_cxx_try_compile "$LINENO"; then :
41112  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41113	      ac_cv_c_bigendian=yes
41114	    fi
41115	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41116	      if test "$ac_cv_c_bigendian" = unknown; then
41117		ac_cv_c_bigendian=no
41118	      else
41119		# finding both strings is unlikely to happen, but who knows?
41120		ac_cv_c_bigendian=unknown
41121	      fi
41122	    fi
41123fi
41124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41125else
41126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41127/* end confdefs.h.  */
41128$ac_includes_default
41129int
41130main ()
41131{
41132
41133	     /* Are we little or big endian?  From Harbison&Steele.  */
41134	     union
41135	     {
41136	       long int l;
41137	       char c[sizeof (long int)];
41138	     } u;
41139	     u.l = 1;
41140	     return u.c[sizeof (long int) - 1] == 1;
41141
41142  ;
41143  return 0;
41144}
41145_ACEOF
41146if ac_fn_cxx_try_run "$LINENO"; then :
41147  ac_cv_c_bigendian=no
41148else
41149  ac_cv_c_bigendian=yes
41150fi
41151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41152  conftest.$ac_objext conftest.beam conftest.$ac_ext
41153fi
41154
41155    fi
41156fi
41157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41158$as_echo "$ac_cv_c_bigendian" >&6; }
41159 case $ac_cv_c_bigendian in #(
41160   yes)
41161     ENDIAN="big";; #(
41162   no)
41163     ENDIAN="little" ;; #(
41164   universal)
41165     ENDIAN="universal_endianness"
41166     ;; #(
41167   *)
41168     ENDIAN="unknown" ;;
41169 esac
41170
41171
41172  if test "x$ENDIAN" = xuniversal_endianness; then
41173    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41174  fi
41175  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41176    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
41177  fi
41178
41179
41180# Configure flags for the tools
41181
41182  ###############################################################################
41183  #
41184  # How to compile shared libraries.
41185  #
41186
41187  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41188    PICFLAG="-fPIC"
41189    C_FLAG_REORDER=''
41190    CXX_FLAG_REORDER=''
41191
41192    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41193      # Linking is different on MacOSX
41194      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41195      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41196      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41197      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41198      SET_SHARED_LIBRARY_MAPFILE=''
41199    else
41200      # Default works for linux, might work on other platforms as well.
41201      SHARED_LIBRARY_FLAGS='-shared'
41202      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41203      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41204      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41205      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41206    fi
41207  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41208    PICFLAG="-KPIC"
41209    C_FLAG_REORDER='-xF'
41210    CXX_FLAG_REORDER='-xF'
41211    SHARED_LIBRARY_FLAGS="-G"
41212    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41213    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41214    SET_SHARED_LIBRARY_NAME=''
41215    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41216  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41217    PICFLAG="-qpic=large"
41218    C_FLAG_REORDER=''
41219    CXX_FLAG_REORDER=''
41220    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41221    SET_EXECUTABLE_ORIGIN=""
41222    SET_SHARED_LIBRARY_ORIGIN=''
41223    SET_SHARED_LIBRARY_NAME=''
41224    SET_SHARED_LIBRARY_MAPFILE=''
41225  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41226    PICFLAG=""
41227    C_FLAG_REORDER=''
41228    CXX_FLAG_REORDER=''
41229    SHARED_LIBRARY_FLAGS="-LD"
41230    SET_EXECUTABLE_ORIGIN=''
41231    SET_SHARED_LIBRARY_ORIGIN=''
41232    SET_SHARED_LIBRARY_NAME=''
41233    SET_SHARED_LIBRARY_MAPFILE=''
41234  fi
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41245    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41246    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41247    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41248  fi
41249  # The (cross) compiler is now configured, we can now test capabilities
41250  # of the target platform.
41251
41252
41253
41254  ###############################################################################
41255  #
41256  # Setup the opt flags for different compilers
41257  # and different operating systems.
41258  #
41259
41260  # FIXME: this was indirectly the old default, but just inherited.
41261  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41262  #   C_FLAG_DEPS="-MMD -MF"
41263  # fi
41264
41265  # Generate make dependency files
41266  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41267    C_FLAG_DEPS="-MMD -MF"
41268  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41269    C_FLAG_DEPS="-xMMD -xMF"
41270  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41271    C_FLAG_DEPS="-qmakedep=gcc -MF"
41272  fi
41273  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41274
41275
41276
41277  # Debug symbols
41278  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41279    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41280      CFLAGS_DEBUG_SYMBOLS="-g1"
41281      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41282    else
41283      CFLAGS_DEBUG_SYMBOLS="-g"
41284      CXXFLAGS_DEBUG_SYMBOLS="-g"
41285    fi
41286  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41287    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41288    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41289  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41290    CFLAGS_DEBUG_SYMBOLS="-g"
41291    CXXFLAGS_DEBUG_SYMBOLS="-g"
41292  fi
41293
41294
41295
41296  # Optimization levels
41297  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41298    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41299
41300    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41301      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41302      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41303      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41304      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41305      C_O_FLAG_NONE="-xregs=no%frameptr"
41306      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41307      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41308      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41309      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41310      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41311        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41312        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41313      fi
41314    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41315      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41316      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41317      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41318      C_O_FLAG_NONE=""
41319      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41320      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41321      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41322      CXX_O_FLAG_NONE=""
41323    fi
41324  else
41325    # The remaining toolchains share opt flags between CC and CXX;
41326    # setup for C and duplicate afterwards.
41327    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41328      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41329        # On MacOSX we optimize for size, something
41330        # we should do for all platforms?
41331        C_O_FLAG_HIGHEST="-Os"
41332        C_O_FLAG_HI="-Os"
41333        C_O_FLAG_NORM="-Os"
41334        C_O_FLAG_NONE=""
41335      else
41336        C_O_FLAG_HIGHEST="-O3"
41337        C_O_FLAG_HI="-O3"
41338        C_O_FLAG_NORM="-O2"
41339        C_O_FLAG_NONE="-O0"
41340      fi
41341    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41342      C_O_FLAG_HIGHEST="-O3"
41343      C_O_FLAG_HI="-O3 -qstrict"
41344      C_O_FLAG_NORM="-O2"
41345      C_O_FLAG_NONE=""
41346    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41347      C_O_FLAG_HIGHEST="-O2"
41348      C_O_FLAG_HI="-O1"
41349      C_O_FLAG_NORM="-O1"
41350      C_O_FLAG_NONE="-Od"
41351    fi
41352    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41353    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41354    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41355    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41356  fi
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368  # Special extras...
41369  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41370    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41371      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41372      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41373    fi
41374  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41375    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41376    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41377    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41378  fi
41379
41380  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41381    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41382$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41383  fi
41384
41385  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41387$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41388  fi
41389
41390  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41391    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41392$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41393  fi
41394
41395
41396# Check whether --with-extra-cflags was given.
41397if test "${with_extra_cflags+set}" = set; then :
41398  withval=$with_extra_cflags;
41399fi
41400
41401
41402
41403# Check whether --with-extra-cxxflags was given.
41404if test "${with_extra_cxxflags+set}" = set; then :
41405  withval=$with_extra_cxxflags;
41406fi
41407
41408
41409
41410# Check whether --with-extra-ldflags was given.
41411if test "${with_extra_ldflags+set}" = set; then :
41412  withval=$with_extra_ldflags;
41413fi
41414
41415
41416  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41417  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41418  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41419
41420  # Hotspot needs these set in their legacy form
41421  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41422  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41423  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41424
41425
41426
41427
41428
41429  ###############################################################################
41430  #
41431  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41432  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41433  #
41434
41435  # Setup compiler/platform specific flags to CFLAGS_JDK,
41436  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41437  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41438    # these options are used for both C and C++ compiles
41439    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41440        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41441    case $OPENJDK_TARGET_CPU_ARCH in
41442      arm )
41443        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41444        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41445        ;;
41446      ppc )
41447        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41448        ;;
41449      * )
41450        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41451        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41452        ;;
41453    esac
41454  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41455    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41456    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41457      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41458      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41459    fi
41460
41461    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41462    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41463  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41464    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41465    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41466  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41467    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41468    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41469    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41470    -DWIN32 -DIAL"
41471    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41472      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41473    else
41474      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41475    fi
41476  fi
41477
41478  ###############################################################################
41479
41480  # Adjust flags according to debug level.
41481  case $DEBUG_LEVEL in
41482    fastdebug )
41483      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41484      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41485      C_O_FLAG_HI="$C_O_FLAG_NORM"
41486      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41487      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41488      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41489      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41490      ;;
41491    slowdebug )
41492      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41493      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41494      C_O_FLAG_HI="$C_O_FLAG_NONE"
41495      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41496      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41497      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41498      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41499      ;;
41500  esac
41501
41502  # Setup LP64
41503  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41504
41505  # Set some common defines. These works for all compilers, but assume
41506  # -D is universally accepted.
41507
41508  # Setup endianness
41509  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41510    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41511    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41512    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41513    #   Note: -Dmacro         is the same as    #define macro 1
41514    #         -Dmacro=        is the same as    #define macro
41515    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41516      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41517    else
41518      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41519    fi
41520  else
41521    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41522  fi
41523
41524  # Setup target OS define. Use OS target name but in upper case.
41525  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41526  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41527
41528  # Setup target CPU
41529  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41530
41531  # Setup debug/release defines
41532  if test "x$DEBUG_LEVEL" = xrelease; then
41533    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41534    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41535      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41536    fi
41537  else
41538    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41539  fi
41540
41541  # Setup release name
41542  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41543
41544
41545  # Set some additional per-OS defines.
41546  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41547    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41548  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41549    # FIXME: PPC64 should not be here.
41550    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41551  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41552    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41553  fi
41554
41555  # Additional macosx handling
41556  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41557    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41558      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41559      # FIXME: clean this up, and/or move it elsewhere.
41560
41561      # Setting these parameters makes it an error to link to macosx APIs that are
41562      # newer than the given OS version and makes the linked binaries compatible
41563      # even if built on a newer version of the OS.
41564      # The expected format is X.Y.Z
41565      MACOSX_VERSION_MIN=10.7.0
41566
41567
41568      # The macro takes the version with no dots, ex: 1070
41569      # Let the flags variables get resolved in make for easier override on make
41570      # command line.
41571      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41572      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41573    fi
41574  fi
41575
41576  # Setup some hard coded includes
41577  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41578      -I${JDK_OUTPUTDIR}/include \
41579      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41580      -I${JDK_TOPDIR}/src/share/javavm/export \
41581      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41582      -I${JDK_TOPDIR}/src/share/native/common \
41583      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41584
41585  # The shared libraries are compiled using the picflag.
41586  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41587  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41588
41589  # Executable flags
41590  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41591  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41592
41593
41594
41595
41596
41597
41598  # Setup LDFLAGS et al.
41599  #
41600  # Now this is odd. The JDK native libraries have to link against libjvm.so
41601  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41602  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41603  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41604  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41605  # libraries will link to whatever is in memory. Yuck.
41606  #
41607  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41608  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41609    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41610    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41611      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41612    fi
41613    # TODO: make -debug optional "--disable-full-debug-symbols"
41614    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41615    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41616    LDFLAGS_JDKLIB_SUFFIX=""
41617    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41618      LDFLAGS_STACK_SIZE=1048576
41619    else
41620      LDFLAGS_STACK_SIZE=327680
41621    fi
41622    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41623  else
41624    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41625      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41626      # We have previously set HAS_GNU_HASH if this is the case
41627      if test -n "$HAS_GNU_HASH"; then
41628        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41629      fi
41630      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41631        # And since we now know that the linker is gnu, then add -z defs, to forbid
41632        # undefined symbols in object files.
41633        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41634        if test "x$DEBUG_LEVEL" = "xrelease"; then
41635          # When building release libraries, tell the linker optimize them.
41636          # Should this be supplied to the OSS linker as well?
41637          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41638        fi
41639      fi
41640    fi
41641
41642    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41643      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41644      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41645    fi
41646
41647    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41648        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41649
41650    # On some platforms (mac) the linker warns about non existing -L dirs.
41651    # Add server first if available. Linking aginst client does not always produce the same results.
41652    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41653    # Default to server for other variants.
41654    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41655      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41656    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41657      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41658    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41659      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41660    else
41661      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41662    fi
41663
41664    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41665    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41666      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41667    fi
41668
41669    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41670    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41671      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41672    fi
41673  fi
41674
41675
41676
41677
41678
41679
41680
41681
41682  # Some Zero and Shark settings.
41683  # ZERO_ARCHFLAG tells the compiler which mode to build for
41684  case "${OPENJDK_TARGET_CPU}" in
41685    s390)
41686      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41687      ;;
41688    *)
41689      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41690  esac
41691
41692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41693$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41694  supports=yes
41695
41696  saved_cflags="$CFLAGS"
41697  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41698  ac_ext=c
41699ac_cpp='$CPP $CPPFLAGS'
41700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41702ac_compiler_gnu=$ac_cv_c_compiler_gnu
41703
41704  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41705/* end confdefs.h.  */
41706int i;
41707_ACEOF
41708if ac_fn_c_try_compile "$LINENO"; then :
41709
41710else
41711  supports=no
41712fi
41713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41714  ac_ext=cpp
41715ac_cpp='$CXXCPP $CPPFLAGS'
41716ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41717ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41718ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41719
41720  CFLAGS="$saved_cflags"
41721
41722  saved_cxxflags="$CXXFLAGS"
41723  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41724  ac_ext=cpp
41725ac_cpp='$CXXCPP $CPPFLAGS'
41726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41729
41730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41731/* end confdefs.h.  */
41732int i;
41733_ACEOF
41734if ac_fn_cxx_try_compile "$LINENO"; then :
41735
41736else
41737  supports=no
41738fi
41739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41740  ac_ext=cpp
41741ac_cpp='$CXXCPP $CPPFLAGS'
41742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41745
41746  CXXFLAGS="$saved_cxxflags"
41747
41748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41749$as_echo "$supports" >&6; }
41750  if test "x$supports" = "xyes" ; then
41751    :
41752  else
41753    ZERO_ARCHFLAG=""
41754  fi
41755
41756
41757
41758  # Check that the compiler supports -mX (or -qX on AIX) flags
41759  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41760
41761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41762$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41763  supports=yes
41764
41765  saved_cflags="$CFLAGS"
41766  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41767  ac_ext=c
41768ac_cpp='$CPP $CPPFLAGS'
41769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41771ac_compiler_gnu=$ac_cv_c_compiler_gnu
41772
41773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41774/* end confdefs.h.  */
41775int i;
41776_ACEOF
41777if ac_fn_c_try_compile "$LINENO"; then :
41778
41779else
41780  supports=no
41781fi
41782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41783  ac_ext=cpp
41784ac_cpp='$CXXCPP $CPPFLAGS'
41785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41788
41789  CFLAGS="$saved_cflags"
41790
41791  saved_cxxflags="$CXXFLAGS"
41792  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41793  ac_ext=cpp
41794ac_cpp='$CXXCPP $CPPFLAGS'
41795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41798
41799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41800/* end confdefs.h.  */
41801int i;
41802_ACEOF
41803if ac_fn_cxx_try_compile "$LINENO"; then :
41804
41805else
41806  supports=no
41807fi
41808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41809  ac_ext=cpp
41810ac_cpp='$CXXCPP $CPPFLAGS'
41811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41814
41815  CXXFLAGS="$saved_cxxflags"
41816
41817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41818$as_echo "$supports" >&6; }
41819  if test "x$supports" = "xyes" ; then
41820    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41821  else
41822    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41823  fi
41824
41825
41826
41827
41828# Setup debug symbols (need objcopy from the toolchain for that)
41829
41830  #
41831  # ENABLE_DEBUG_SYMBOLS
41832  # This must be done after the toolchain is setup, since we're looking at objcopy.
41833  #
41834  # Check whether --enable-debug-symbols was given.
41835if test "${enable_debug_symbols+set}" = set; then :
41836  enableval=$enable_debug_symbols;
41837fi
41838
41839
41840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41841$as_echo_n "checking if we should generate debug symbols... " >&6; }
41842
41843  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41844    # explicit enabling of enable-debug-symbols and can't find objcopy
41845    #   this is an error
41846    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41847  fi
41848
41849  if test "x$enable_debug_symbols" = "xyes"; then
41850    ENABLE_DEBUG_SYMBOLS=true
41851  elif test "x$enable_debug_symbols" = "xno"; then
41852    ENABLE_DEBUG_SYMBOLS=false
41853  else
41854    # Default is on if objcopy is found
41855    if test "x$OBJCOPY" != x; then
41856      ENABLE_DEBUG_SYMBOLS=true
41857    # MacOS X and Windows don't use objcopy but default is on for those OSes
41858    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41859      ENABLE_DEBUG_SYMBOLS=true
41860    else
41861      ENABLE_DEBUG_SYMBOLS=false
41862    fi
41863  fi
41864
41865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41866$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41867
41868  #
41869  # ZIP_DEBUGINFO_FILES
41870  #
41871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41872$as_echo_n "checking if we should zip debug-info files... " >&6; }
41873  # Check whether --enable-zip-debug-info was given.
41874if test "${enable_zip_debug_info+set}" = set; then :
41875  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41876else
41877  enable_zip_debug_info="yes"
41878fi
41879
41880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41881$as_echo "${enable_zip_debug_info}" >&6; }
41882
41883  if test "x${enable_zip_debug_info}" = "xno"; then
41884    ZIP_DEBUGINFO_FILES=false
41885  else
41886    ZIP_DEBUGINFO_FILES=true
41887  fi
41888
41889
41890
41891
41892
41893###############################################################################
41894#
41895# Check dependencies for external and internal libraries.
41896#
41897###############################################################################
41898
41899# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41900
41901  # When using cygwin or msys, we need a wrapper binary that renames
41902  # /cygdrive/c/ arguments into c:/ arguments and peeks into
41903  # @files and rewrites these too! This wrapper binary is
41904  # called fixpath.
41905  FIXPATH=
41906  if test "x$OPENJDK_BUILD_OS" = xwindows; then
41907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41908$as_echo_n "checking if fixpath can be created... " >&6; }
41909    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
41910    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
41911    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
41912      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
41913      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
41914      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
41915      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
41916    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
41917      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
41918      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
41919
41920      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
41921      # @ was chosen as separator to minimize risk of other tools messing around with it
41922      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
41923      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
41924
41925      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
41926    fi
41927    rm -f $OUTPUT_ROOT/fixpath*
41928    cd $OUTPUT_ROOT
41929    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
41930    cd $CURDIR
41931
41932    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
41933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41934$as_echo "no" >&6; }
41935      cat $OUTPUT_ROOT/fixpath1.log
41936      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
41937    fi
41938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41939$as_echo "yes" >&6; }
41940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
41941$as_echo_n "checking if fixpath.exe works... " >&6; }
41942    cd $OUTPUT_ROOT
41943    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
41944    cd $CURDIR
41945    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
41946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41947$as_echo "no" >&6; }
41948      cat $OUTPUT_ROOT/fixpath2.log
41949      as_fn_error $? "fixpath did not work!" "$LINENO" 5
41950    fi
41951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41952$as_echo "yes" >&6; }
41953    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
41954  fi
41955
41956
41957
41958
41959
41960
41961  ###############################################################################
41962  #
41963  # OS specific settings that we never will need to probe.
41964  #
41965  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
41967$as_echo_n "checking what is not needed on Linux?... " >&6; }
41968    PULSE_NOT_NEEDED=yes
41969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
41970$as_echo "pulse" >&6; }
41971  fi
41972
41973  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
41975$as_echo_n "checking what is not needed on Solaris?... " >&6; }
41976    ALSA_NOT_NEEDED=yes
41977    PULSE_NOT_NEEDED=yes
41978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
41979$as_echo "alsa pulse" >&6; }
41980  fi
41981
41982  if test "x$OPENJDK_TARGET_OS" = xaix; then
41983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
41984$as_echo_n "checking what is not needed on AIX?... " >&6; }
41985    ALSA_NOT_NEEDED=yes
41986    PULSE_NOT_NEEDED=yes
41987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
41988$as_echo "alsa pulse" >&6; }
41989  fi
41990
41991
41992  if test "x$OPENJDK_TARGET_OS" = xwindows; then
41993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
41994$as_echo_n "checking what is not needed on Windows?... " >&6; }
41995    CUPS_NOT_NEEDED=yes
41996    ALSA_NOT_NEEDED=yes
41997    PULSE_NOT_NEEDED=yes
41998    X11_NOT_NEEDED=yes
41999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42000$as_echo "alsa cups pulse x11" >&6; }
42001  fi
42002
42003  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42005$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42006    ALSA_NOT_NEEDED=yes
42007    PULSE_NOT_NEEDED=yes
42008    X11_NOT_NEEDED=yes
42009    # If the java runtime framework is disabled, then we need X11.
42010    # This will be adjusted below.
42011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42012$as_echo "alsa pulse x11" >&6; }
42013  fi
42014
42015  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42017$as_echo_n "checking what is not needed on bsd?... " >&6; }
42018    ALSA_NOT_NEEDED=yes
42019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42020$as_echo "alsa" >&6; }
42021  fi
42022
42023  if test "x$OPENJDK" = "xfalse"; then
42024    FREETYPE_NOT_NEEDED=yes
42025  fi
42026
42027  if test "x$SUPPORT_HEADFUL" = xno; then
42028    X11_NOT_NEEDED=yes
42029  fi
42030
42031  ###############################################################################
42032  #
42033  # Check for MacOSX support for OpenJDK.
42034  #
42035
42036
42037  # Check whether --enable-macosx-runtime-support was given.
42038if test "${enable_macosx_runtime_support+set}" = set; then :
42039  enableval=$enable_macosx_runtime_support;
42040fi
42041
42042  if test "x$enable_macosx_runtime_support" != x; then
42043    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42044$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42045  fi
42046
42047
42048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42049$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42050  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42052$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42053  else
42054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42055$as_echo "no" >&6; }
42056  fi
42057
42058
42059
42060  ###############################################################################
42061  #
42062  # Check for X Windows
42063  #
42064
42065  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42066  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42067  # --x-libraries for the sysroot, if that seems to be correct.
42068  if test "x$SYS_ROOT" != "x/"; then
42069    if test "x$x_includes" = xNONE; then
42070      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42071        x_includes="$SYS_ROOT/usr/X11R6/include"
42072      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42073        x_includes="$SYS_ROOT/usr/include"
42074      fi
42075    fi
42076    if test "x$x_libraries" = xNONE; then
42077      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42078        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42079      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42080        x_libraries="$SYS_ROOT/usr/lib64"
42081      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42082        x_libraries="$SYS_ROOT/usr/lib"
42083      fi
42084    fi
42085  fi
42086
42087  # Now let autoconf do it's magic
42088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42089$as_echo_n "checking for X... " >&6; }
42090
42091
42092# Check whether --with-x was given.
42093if test "${with_x+set}" = set; then :
42094  withval=$with_x;
42095fi
42096
42097# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42098if test "x$with_x" = xno; then
42099  # The user explicitly disabled X.
42100  have_x=disabled
42101else
42102  case $x_includes,$x_libraries in #(
42103    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42104    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42105  $as_echo_n "(cached) " >&6
42106else
42107  # One or both of the vars are not set, and there is no cached value.
42108ac_x_includes=no ac_x_libraries=no
42109rm -f -r conftest.dir
42110if mkdir conftest.dir; then
42111  cd conftest.dir
42112  cat >Imakefile <<'_ACEOF'
42113incroot:
42114	@echo incroot='${INCROOT}'
42115usrlibdir:
42116	@echo usrlibdir='${USRLIBDIR}'
42117libdir:
42118	@echo libdir='${LIBDIR}'
42119_ACEOF
42120  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42121    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42122    for ac_var in incroot usrlibdir libdir; do
42123      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42124    done
42125    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42126    for ac_extension in a so sl dylib la dll; do
42127      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42128	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42129	ac_im_usrlibdir=$ac_im_libdir; break
42130      fi
42131    done
42132    # Screen out bogus values from the imake configuration.  They are
42133    # bogus both because they are the default anyway, and because
42134    # using them would break gcc on systems where it needs fixed includes.
42135    case $ac_im_incroot in
42136	/usr/include) ac_x_includes= ;;
42137	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42138    esac
42139    case $ac_im_usrlibdir in
42140	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42141	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42142    esac
42143  fi
42144  cd ..
42145  rm -f -r conftest.dir
42146fi
42147
42148# Standard set of common directories for X headers.
42149# Check X11 before X11Rn because it is often a symlink to the current release.
42150ac_x_header_dirs='
42151/usr/X11/include
42152/usr/X11R7/include
42153/usr/X11R6/include
42154/usr/X11R5/include
42155/usr/X11R4/include
42156
42157/usr/include/X11
42158/usr/include/X11R7
42159/usr/include/X11R6
42160/usr/include/X11R5
42161/usr/include/X11R4
42162
42163/usr/local/X11/include
42164/usr/local/X11R7/include
42165/usr/local/X11R6/include
42166/usr/local/X11R5/include
42167/usr/local/X11R4/include
42168
42169/usr/local/include/X11
42170/usr/local/include/X11R7
42171/usr/local/include/X11R6
42172/usr/local/include/X11R5
42173/usr/local/include/X11R4
42174
42175/usr/X386/include
42176/usr/x386/include
42177/usr/XFree86/include/X11
42178
42179/usr/include
42180/usr/local/include
42181/usr/unsupported/include
42182/usr/athena/include
42183/usr/local/x11r5/include
42184/usr/lpp/Xamples/include
42185
42186/usr/openwin/include
42187/usr/openwin/share/include'
42188
42189if test "$ac_x_includes" = no; then
42190  # Guess where to find include files, by looking for Xlib.h.
42191  # First, try using that file with no special directory specified.
42192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42193/* end confdefs.h.  */
42194#include <X11/Xlib.h>
42195_ACEOF
42196if ac_fn_cxx_try_cpp "$LINENO"; then :
42197  # We can compile using X headers with no special include directory.
42198ac_x_includes=
42199else
42200  for ac_dir in $ac_x_header_dirs; do
42201  if test -r "$ac_dir/X11/Xlib.h"; then
42202    ac_x_includes=$ac_dir
42203    break
42204  fi
42205done
42206fi
42207rm -f conftest.err conftest.i conftest.$ac_ext
42208fi # $ac_x_includes = no
42209
42210if test "$ac_x_libraries" = no; then
42211  # Check for the libraries.
42212  # See if we find them without any special options.
42213  # Don't add to $LIBS permanently.
42214  ac_save_LIBS=$LIBS
42215  LIBS="-lX11 $LIBS"
42216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42217/* end confdefs.h.  */
42218#include <X11/Xlib.h>
42219int
42220main ()
42221{
42222XrmInitialize ()
42223  ;
42224  return 0;
42225}
42226_ACEOF
42227if ac_fn_cxx_try_link "$LINENO"; then :
42228  LIBS=$ac_save_LIBS
42229# We can link X programs with no special library path.
42230ac_x_libraries=
42231else
42232  LIBS=$ac_save_LIBS
42233for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42234do
42235  # Don't even attempt the hair of trying to link an X program!
42236  for ac_extension in a so sl dylib la dll; do
42237    if test -r "$ac_dir/libX11.$ac_extension"; then
42238      ac_x_libraries=$ac_dir
42239      break 2
42240    fi
42241  done
42242done
42243fi
42244rm -f core conftest.err conftest.$ac_objext \
42245    conftest$ac_exeext conftest.$ac_ext
42246fi # $ac_x_libraries = no
42247
42248case $ac_x_includes,$ac_x_libraries in #(
42249  no,* | *,no | *\'*)
42250    # Didn't find X, or a directory has "'" in its name.
42251    ac_cv_have_x="have_x=no";; #(
42252  *)
42253    # Record where we found X for the cache.
42254    ac_cv_have_x="have_x=yes\
42255	ac_x_includes='$ac_x_includes'\
42256	ac_x_libraries='$ac_x_libraries'"
42257esac
42258fi
42259;; #(
42260    *) have_x=yes;;
42261  esac
42262  eval "$ac_cv_have_x"
42263fi # $with_x != no
42264
42265if test "$have_x" != yes; then
42266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42267$as_echo "$have_x" >&6; }
42268  no_x=yes
42269else
42270  # If each of the values was on the command line, it overrides each guess.
42271  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42272  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42273  # Update the cache value to reflect the command line values.
42274  ac_cv_have_x="have_x=yes\
42275	ac_x_includes='$x_includes'\
42276	ac_x_libraries='$x_libraries'"
42277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42278$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42279fi
42280
42281  if test "$no_x" = yes; then
42282  # Not all programs may use this symbol, but it does not hurt to define it.
42283
42284$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42285
42286  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42287else
42288  if test -n "$x_includes"; then
42289    X_CFLAGS="$X_CFLAGS -I$x_includes"
42290  fi
42291
42292  # It would also be nice to do this for all -L options, not just this one.
42293  if test -n "$x_libraries"; then
42294    X_LIBS="$X_LIBS -L$x_libraries"
42295    # For Solaris; some versions of Sun CC require a space after -R and
42296    # others require no space.  Words are not sufficient . . . .
42297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42298$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42299    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42300    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42301    ac_cxx_werror_flag=yes
42302    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42303/* end confdefs.h.  */
42304
42305int
42306main ()
42307{
42308
42309  ;
42310  return 0;
42311}
42312_ACEOF
42313if ac_fn_cxx_try_link "$LINENO"; then :
42314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42315$as_echo "no" >&6; }
42316       X_LIBS="$X_LIBS -R$x_libraries"
42317else
42318  LIBS="$ac_xsave_LIBS -R $x_libraries"
42319       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42320/* end confdefs.h.  */
42321
42322int
42323main ()
42324{
42325
42326  ;
42327  return 0;
42328}
42329_ACEOF
42330if ac_fn_cxx_try_link "$LINENO"; then :
42331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42332$as_echo "yes" >&6; }
42333	  X_LIBS="$X_LIBS -R $x_libraries"
42334else
42335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42336$as_echo "neither works" >&6; }
42337fi
42338rm -f core conftest.err conftest.$ac_objext \
42339    conftest$ac_exeext conftest.$ac_ext
42340fi
42341rm -f core conftest.err conftest.$ac_objext \
42342    conftest$ac_exeext conftest.$ac_ext
42343    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42344    LIBS=$ac_xsave_LIBS
42345  fi
42346
42347  # Check for system-dependent libraries X programs must link with.
42348  # Do this before checking for the system-independent R6 libraries
42349  # (-lICE), since we may need -lsocket or whatever for X linking.
42350
42351  if test "$ISC" = yes; then
42352    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42353  else
42354    # Martyn Johnson says this is needed for Ultrix, if the X
42355    # libraries were built with DECnet support.  And Karl Berry says
42356    # the Alpha needs dnet_stub (dnet does not exist).
42357    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42358    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42359/* end confdefs.h.  */
42360
42361/* Override any GCC internal prototype to avoid an error.
42362   Use char because int might match the return type of a GCC
42363   builtin and then its argument prototype would still apply.  */
42364#ifdef __cplusplus
42365extern "C"
42366#endif
42367char XOpenDisplay ();
42368int
42369main ()
42370{
42371return XOpenDisplay ();
42372  ;
42373  return 0;
42374}
42375_ACEOF
42376if ac_fn_cxx_try_link "$LINENO"; then :
42377
42378else
42379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42380$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42381if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42382  $as_echo_n "(cached) " >&6
42383else
42384  ac_check_lib_save_LIBS=$LIBS
42385LIBS="-ldnet  $LIBS"
42386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42387/* end confdefs.h.  */
42388
42389/* Override any GCC internal prototype to avoid an error.
42390   Use char because int might match the return type of a GCC
42391   builtin and then its argument prototype would still apply.  */
42392#ifdef __cplusplus
42393extern "C"
42394#endif
42395char dnet_ntoa ();
42396int
42397main ()
42398{
42399return dnet_ntoa ();
42400  ;
42401  return 0;
42402}
42403_ACEOF
42404if ac_fn_cxx_try_link "$LINENO"; then :
42405  ac_cv_lib_dnet_dnet_ntoa=yes
42406else
42407  ac_cv_lib_dnet_dnet_ntoa=no
42408fi
42409rm -f core conftest.err conftest.$ac_objext \
42410    conftest$ac_exeext conftest.$ac_ext
42411LIBS=$ac_check_lib_save_LIBS
42412fi
42413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42414$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42415if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42416  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42417fi
42418
42419    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42421$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42422if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42423  $as_echo_n "(cached) " >&6
42424else
42425  ac_check_lib_save_LIBS=$LIBS
42426LIBS="-ldnet_stub  $LIBS"
42427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42428/* end confdefs.h.  */
42429
42430/* Override any GCC internal prototype to avoid an error.
42431   Use char because int might match the return type of a GCC
42432   builtin and then its argument prototype would still apply.  */
42433#ifdef __cplusplus
42434extern "C"
42435#endif
42436char dnet_ntoa ();
42437int
42438main ()
42439{
42440return dnet_ntoa ();
42441  ;
42442  return 0;
42443}
42444_ACEOF
42445if ac_fn_cxx_try_link "$LINENO"; then :
42446  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42447else
42448  ac_cv_lib_dnet_stub_dnet_ntoa=no
42449fi
42450rm -f core conftest.err conftest.$ac_objext \
42451    conftest$ac_exeext conftest.$ac_ext
42452LIBS=$ac_check_lib_save_LIBS
42453fi
42454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42455$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42456if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42457  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42458fi
42459
42460    fi
42461fi
42462rm -f core conftest.err conftest.$ac_objext \
42463    conftest$ac_exeext conftest.$ac_ext
42464    LIBS="$ac_xsave_LIBS"
42465
42466    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42467    # to get the SysV transport functions.
42468    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42469    # needs -lnsl.
42470    # The nsl library prevents programs from opening the X display
42471    # on Irix 5.2, according to T.E. Dickey.
42472    # The functions gethostbyname, getservbyname, and inet_addr are
42473    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42474    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42475if test "x$ac_cv_func_gethostbyname" = xyes; then :
42476
42477fi
42478
42479    if test $ac_cv_func_gethostbyname = no; then
42480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42481$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42482if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42483  $as_echo_n "(cached) " >&6
42484else
42485  ac_check_lib_save_LIBS=$LIBS
42486LIBS="-lnsl  $LIBS"
42487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42488/* end confdefs.h.  */
42489
42490/* Override any GCC internal prototype to avoid an error.
42491   Use char because int might match the return type of a GCC
42492   builtin and then its argument prototype would still apply.  */
42493#ifdef __cplusplus
42494extern "C"
42495#endif
42496char gethostbyname ();
42497int
42498main ()
42499{
42500return gethostbyname ();
42501  ;
42502  return 0;
42503}
42504_ACEOF
42505if ac_fn_cxx_try_link "$LINENO"; then :
42506  ac_cv_lib_nsl_gethostbyname=yes
42507else
42508  ac_cv_lib_nsl_gethostbyname=no
42509fi
42510rm -f core conftest.err conftest.$ac_objext \
42511    conftest$ac_exeext conftest.$ac_ext
42512LIBS=$ac_check_lib_save_LIBS
42513fi
42514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42515$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42516if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42517  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42518fi
42519
42520      if test $ac_cv_lib_nsl_gethostbyname = no; then
42521	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42522$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42523if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42524  $as_echo_n "(cached) " >&6
42525else
42526  ac_check_lib_save_LIBS=$LIBS
42527LIBS="-lbsd  $LIBS"
42528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42529/* end confdefs.h.  */
42530
42531/* Override any GCC internal prototype to avoid an error.
42532   Use char because int might match the return type of a GCC
42533   builtin and then its argument prototype would still apply.  */
42534#ifdef __cplusplus
42535extern "C"
42536#endif
42537char gethostbyname ();
42538int
42539main ()
42540{
42541return gethostbyname ();
42542  ;
42543  return 0;
42544}
42545_ACEOF
42546if ac_fn_cxx_try_link "$LINENO"; then :
42547  ac_cv_lib_bsd_gethostbyname=yes
42548else
42549  ac_cv_lib_bsd_gethostbyname=no
42550fi
42551rm -f core conftest.err conftest.$ac_objext \
42552    conftest$ac_exeext conftest.$ac_ext
42553LIBS=$ac_check_lib_save_LIBS
42554fi
42555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42556$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42557if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42558  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42559fi
42560
42561      fi
42562    fi
42563
42564    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42565    # socket/setsockopt and other routines are undefined under SCO ODT
42566    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42567    # on later versions), says Simon Leinen: it contains gethostby*
42568    # variants that don't use the name server (or something).  -lsocket
42569    # must be given before -lnsl if both are needed.  We assume that
42570    # if connect needs -lnsl, so does gethostbyname.
42571    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42572if test "x$ac_cv_func_connect" = xyes; then :
42573
42574fi
42575
42576    if test $ac_cv_func_connect = no; then
42577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42578$as_echo_n "checking for connect in -lsocket... " >&6; }
42579if ${ac_cv_lib_socket_connect+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  ac_check_lib_save_LIBS=$LIBS
42583LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42585/* end confdefs.h.  */
42586
42587/* Override any GCC internal prototype to avoid an error.
42588   Use char because int might match the return type of a GCC
42589   builtin and then its argument prototype would still apply.  */
42590#ifdef __cplusplus
42591extern "C"
42592#endif
42593char connect ();
42594int
42595main ()
42596{
42597return connect ();
42598  ;
42599  return 0;
42600}
42601_ACEOF
42602if ac_fn_cxx_try_link "$LINENO"; then :
42603  ac_cv_lib_socket_connect=yes
42604else
42605  ac_cv_lib_socket_connect=no
42606fi
42607rm -f core conftest.err conftest.$ac_objext \
42608    conftest$ac_exeext conftest.$ac_ext
42609LIBS=$ac_check_lib_save_LIBS
42610fi
42611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42612$as_echo "$ac_cv_lib_socket_connect" >&6; }
42613if test "x$ac_cv_lib_socket_connect" = xyes; then :
42614  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42615fi
42616
42617    fi
42618
42619    # Guillermo Gomez says -lposix is necessary on A/UX.
42620    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42621if test "x$ac_cv_func_remove" = xyes; then :
42622
42623fi
42624
42625    if test $ac_cv_func_remove = no; then
42626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42627$as_echo_n "checking for remove in -lposix... " >&6; }
42628if ${ac_cv_lib_posix_remove+:} false; then :
42629  $as_echo_n "(cached) " >&6
42630else
42631  ac_check_lib_save_LIBS=$LIBS
42632LIBS="-lposix  $LIBS"
42633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42634/* end confdefs.h.  */
42635
42636/* Override any GCC internal prototype to avoid an error.
42637   Use char because int might match the return type of a GCC
42638   builtin and then its argument prototype would still apply.  */
42639#ifdef __cplusplus
42640extern "C"
42641#endif
42642char remove ();
42643int
42644main ()
42645{
42646return remove ();
42647  ;
42648  return 0;
42649}
42650_ACEOF
42651if ac_fn_cxx_try_link "$LINENO"; then :
42652  ac_cv_lib_posix_remove=yes
42653else
42654  ac_cv_lib_posix_remove=no
42655fi
42656rm -f core conftest.err conftest.$ac_objext \
42657    conftest$ac_exeext conftest.$ac_ext
42658LIBS=$ac_check_lib_save_LIBS
42659fi
42660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42661$as_echo "$ac_cv_lib_posix_remove" >&6; }
42662if test "x$ac_cv_lib_posix_remove" = xyes; then :
42663  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42664fi
42665
42666    fi
42667
42668    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42669    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42670if test "x$ac_cv_func_shmat" = xyes; then :
42671
42672fi
42673
42674    if test $ac_cv_func_shmat = no; then
42675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42676$as_echo_n "checking for shmat in -lipc... " >&6; }
42677if ${ac_cv_lib_ipc_shmat+:} false; then :
42678  $as_echo_n "(cached) " >&6
42679else
42680  ac_check_lib_save_LIBS=$LIBS
42681LIBS="-lipc  $LIBS"
42682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42683/* end confdefs.h.  */
42684
42685/* Override any GCC internal prototype to avoid an error.
42686   Use char because int might match the return type of a GCC
42687   builtin and then its argument prototype would still apply.  */
42688#ifdef __cplusplus
42689extern "C"
42690#endif
42691char shmat ();
42692int
42693main ()
42694{
42695return shmat ();
42696  ;
42697  return 0;
42698}
42699_ACEOF
42700if ac_fn_cxx_try_link "$LINENO"; then :
42701  ac_cv_lib_ipc_shmat=yes
42702else
42703  ac_cv_lib_ipc_shmat=no
42704fi
42705rm -f core conftest.err conftest.$ac_objext \
42706    conftest$ac_exeext conftest.$ac_ext
42707LIBS=$ac_check_lib_save_LIBS
42708fi
42709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42710$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42711if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42712  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42713fi
42714
42715    fi
42716  fi
42717
42718  # Check for libraries that X11R6 Xt/Xaw programs need.
42719  ac_save_LDFLAGS=$LDFLAGS
42720  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42721  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42722  # check for ICE first), but we must link in the order -lSM -lICE or
42723  # we get undefined symbols.  So assume we have SM if we have ICE.
42724  # These have to be linked with before -lX11, unlike the other
42725  # libraries we check for below, so use a different variable.
42726  # John Interrante, Karl Berry
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42728$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42729if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42730  $as_echo_n "(cached) " >&6
42731else
42732  ac_check_lib_save_LIBS=$LIBS
42733LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42735/* end confdefs.h.  */
42736
42737/* Override any GCC internal prototype to avoid an error.
42738   Use char because int might match the return type of a GCC
42739   builtin and then its argument prototype would still apply.  */
42740#ifdef __cplusplus
42741extern "C"
42742#endif
42743char IceConnectionNumber ();
42744int
42745main ()
42746{
42747return IceConnectionNumber ();
42748  ;
42749  return 0;
42750}
42751_ACEOF
42752if ac_fn_cxx_try_link "$LINENO"; then :
42753  ac_cv_lib_ICE_IceConnectionNumber=yes
42754else
42755  ac_cv_lib_ICE_IceConnectionNumber=no
42756fi
42757rm -f core conftest.err conftest.$ac_objext \
42758    conftest$ac_exeext conftest.$ac_ext
42759LIBS=$ac_check_lib_save_LIBS
42760fi
42761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42762$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42763if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42764  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42765fi
42766
42767  LDFLAGS=$ac_save_LDFLAGS
42768
42769fi
42770
42771
42772  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42773  # this doesn't make sense so we remove it.
42774  if test "x$COMPILE_TYPE" = xcross; then
42775    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42776  fi
42777
42778  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42779
42780  # Print a helpful message on how to acquire the necessary build dependency.
42781  # x11 is the help tag: freetype, cups, pulse, alsa etc
42782  MISSING_DEPENDENCY=x11
42783
42784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42785    cygwin_help $MISSING_DEPENDENCY
42786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42787    msys_help $MISSING_DEPENDENCY
42788  else
42789    PKGHANDLER_COMMAND=
42790
42791    case $PKGHANDLER in
42792      apt-get)
42793        apt_help     $MISSING_DEPENDENCY ;;
42794      yum)
42795        yum_help     $MISSING_DEPENDENCY ;;
42796      port)
42797        port_help    $MISSING_DEPENDENCY ;;
42798      pkgutil)
42799        pkgutil_help $MISSING_DEPENDENCY ;;
42800      pkgadd)
42801        pkgadd_help  $MISSING_DEPENDENCY ;;
42802    esac
42803
42804    if test "x$PKGHANDLER_COMMAND" != x; then
42805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42806    fi
42807  fi
42808
42809    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42810  fi
42811
42812  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42813    OPENWIN_HOME="/usr/openwin"
42814  fi
42815
42816
42817
42818  #
42819  # Weird Sol10 something check...TODO change to try compile
42820  #
42821  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42822    if test "`uname -r`" = "5.10"; then
42823      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42824        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42825      fi
42826    fi
42827  fi
42828
42829  ac_ext=c
42830ac_cpp='$CPP $CPPFLAGS'
42831ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42832ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42833ac_compiler_gnu=$ac_cv_c_compiler_gnu
42834
42835  OLD_CFLAGS="$CFLAGS"
42836  CFLAGS="$CFLAGS $X_CFLAGS"
42837
42838  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42839  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42840do :
42841  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42842ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42843        # include <X11/Xlib.h>
42844        # include <X11/Xutil.h>
42845
42846
42847"
42848if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42849  cat >>confdefs.h <<_ACEOF
42850#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42851_ACEOF
42852 X11_A_OK=yes
42853else
42854  X11_A_OK=no; break
42855fi
42856
42857done
42858
42859
42860  CFLAGS="$OLD_CFLAGS"
42861  ac_ext=cpp
42862ac_cpp='$CXXCPP $CPPFLAGS'
42863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42866
42867
42868  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42869
42870  # Print a helpful message on how to acquire the necessary build dependency.
42871  # x11 is the help tag: freetype, cups, pulse, alsa etc
42872  MISSING_DEPENDENCY=x11
42873
42874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42875    cygwin_help $MISSING_DEPENDENCY
42876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42877    msys_help $MISSING_DEPENDENCY
42878  else
42879    PKGHANDLER_COMMAND=
42880
42881    case $PKGHANDLER in
42882      apt-get)
42883        apt_help     $MISSING_DEPENDENCY ;;
42884      yum)
42885        yum_help     $MISSING_DEPENDENCY ;;
42886      port)
42887        port_help    $MISSING_DEPENDENCY ;;
42888      pkgutil)
42889        pkgutil_help $MISSING_DEPENDENCY ;;
42890      pkgadd)
42891        pkgadd_help  $MISSING_DEPENDENCY ;;
42892    esac
42893
42894    if test "x$PKGHANDLER_COMMAND" != x; then
42895      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42896    fi
42897  fi
42898
42899    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42900  fi
42901
42902
42903
42904
42905
42906
42907  ###############################################################################
42908  #
42909  # The common unix printing system cups is used to print from java.
42910  #
42911
42912# Check whether --with-cups was given.
42913if test "${with_cups+set}" = set; then :
42914  withval=$with_cups;
42915fi
42916
42917
42918# Check whether --with-cups-include was given.
42919if test "${with_cups_include+set}" = set; then :
42920  withval=$with_cups_include;
42921fi
42922
42923
42924  if test "x$CUPS_NOT_NEEDED" = xyes; then
42925    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
42926      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
42927$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
42928    fi
42929    CUPS_CFLAGS=
42930  else
42931    CUPS_FOUND=no
42932
42933    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
42934      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
42935    fi
42936
42937    if test "x${with_cups}" != x; then
42938      CUPS_CFLAGS="-I${with_cups}/include"
42939      CUPS_FOUND=yes
42940    fi
42941    if test "x${with_cups_include}" != x; then
42942      CUPS_CFLAGS="-I${with_cups_include}"
42943      CUPS_FOUND=yes
42944    fi
42945    if test "x$CUPS_FOUND" = xno; then
42946
42947
42948  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42949    # Source the builddeps file again, to make sure it uses the latest variables!
42950    . $builddepsfile
42951    # Look for a target and build machine specific resource!
42952    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42953    if test "x$resource" = x; then
42954      # Ok, lets instead look for a target specific resource
42955      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
42956    fi
42957    if test "x$resource" = x; then
42958      # Ok, lets instead look for a build specific resource
42959      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
42960    fi
42961    if test "x$resource" = x; then
42962      # Ok, lets instead look for a generic resource
42963      # (The cups comes from M4 and not the shell, thus no need for eval here.)
42964      resource=${builddep_cups}
42965    fi
42966    if test "x$resource" != x; then
42967      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
42968$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
42969      # If the resource in the builddeps.conf file is an existing directory,
42970      # for example /java/linux/cups
42971      if test -d ${resource}; then
42972        depdir=${resource}
42973      else
42974
42975  # cups is for example mymodule
42976  # $resource is for example libs/general/libmymod_1_2_3.zip
42977  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
42978  # $with_builddeps_dir is for example /localhome/builddeps
42979  # depdir is the name of the variable into which we store the depdir, eg MYMOD
42980  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
42981  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
42982  filename=`basename $resource`
42983  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
42984  filebase=${filename%%.*}
42985  extension=${filename#*.}
42986  installdir=$with_builddeps_dir/$filebase
42987  if test ! -f $installdir/$filename.unpacked; then
42988    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
42989$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
42990    if test ! -d $installdir; then
42991      mkdir -p $installdir
42992    fi
42993    if test ! -d $installdir; then
42994      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
42995    fi
42996    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
42997    touch $tmpfile
42998    if test ! -f $tmpfile; then
42999      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43000    fi
43001
43002  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43003  # $tmpfile is the local file name for the downloaded file.
43004  VALID_TOOL=no
43005  if test "x$BDEPS_FTP" = xwget; then
43006    VALID_TOOL=yes
43007    wget -O $tmpfile $with_builddeps_server/$resource
43008  fi
43009  if test "x$BDEPS_FTP" = xlftp; then
43010    VALID_TOOL=yes
43011    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43012  fi
43013  if test "x$BDEPS_FTP" = xftp; then
43014    VALID_TOOL=yes
43015    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43016    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43017    FTPUSERPWD=${FTPSERVER%%@*}
43018    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43019      FTPUSER=${userpwd%%:*}
43020      FTPPWD=${userpwd#*@}
43021      FTPSERVER=${FTPSERVER#*@}
43022    else
43023      FTPUSER=ftp
43024      FTPPWD=ftp
43025    fi
43026    # the "pass" command does not work on some
43027    # ftp clients (read ftp.exe) but if it works,
43028    # passive mode is better!
43029    ( \
43030        echo "user $FTPUSER $FTPPWD"        ; \
43031        echo "pass"                         ; \
43032        echo "bin"                          ; \
43033        echo "get $FTPPATH $tmpfile"              ; \
43034    ) | ftp -in $FTPSERVER
43035  fi
43036  if test "x$VALID_TOOL" != xyes; then
43037    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43038  fi
43039
43040    mv $tmpfile $installdir/$filename
43041    if test ! -s $installdir/$filename; then
43042      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43043    fi
43044    case "$extension" in
43045      zip)  echo "Unzipping $installdir/$filename..."
43046        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43047        ;;
43048      tar.gz) echo "Untaring $installdir/$filename..."
43049        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43050        ;;
43051      tgz) echo "Untaring $installdir/$filename..."
43052        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43053        ;;
43054      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43055        ;;
43056    esac
43057  fi
43058  if test -f $installdir/$filename.unpacked; then
43059    depdir=$installdir
43060  fi
43061
43062      fi
43063      # Source the builddeps file again, because in the previous command, the depdir
43064      # was updated to point at the current build dependency install directory.
43065      . $builddepsfile
43066      # Now extract variables from the builddeps.conf files.
43067      theroot=${builddep_cups_ROOT}
43068      thecflags=${builddep_cups_CFLAGS}
43069      thelibs=${builddep_cups_LIBS}
43070      if test "x$depdir" = x; then
43071        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43072      fi
43073      CUPS=$depdir
43074      if test "x$theroot" != x; then
43075        CUPS="$theroot"
43076      fi
43077      if test "x$thecflags" != x; then
43078        CUPS_CFLAGS="$thecflags"
43079      fi
43080      if test "x$thelibs" != x; then
43081        CUPS_LIBS="$thelibs"
43082      fi
43083      CUPS_FOUND=yes
43084
43085    fi
43086
43087  fi
43088
43089    fi
43090    if test "x$CUPS_FOUND" = xno; then
43091      # Are the cups headers installed in the default /usr/include location?
43092      for ac_header in cups/cups.h cups/ppd.h
43093do :
43094  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43095ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43096if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43097  cat >>confdefs.h <<_ACEOF
43098#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43099_ACEOF
43100
43101            CUPS_FOUND=yes
43102            CUPS_CFLAGS=
43103            DEFAULT_CUPS=yes
43104
43105
43106fi
43107
43108done
43109
43110    fi
43111    if test "x$CUPS_FOUND" = xno; then
43112      # Getting nervous now? Lets poke around for standard Solaris third-party
43113      # package installation locations.
43114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43115$as_echo_n "checking for cups headers... " >&6; }
43116      if test -s /opt/sfw/cups/include/cups/cups.h; then
43117        # An SFW package seems to be installed!
43118        CUPS_FOUND=yes
43119        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43120      elif test -s /opt/csw/include/cups/cups.h; then
43121        # A CSW package seems to be installed!
43122        CUPS_FOUND=yes
43123        CUPS_CFLAGS="-I/opt/csw/include"
43124      fi
43125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43126$as_echo "$CUPS_FOUND" >&6; }
43127    fi
43128    if test "x$CUPS_FOUND" = xno; then
43129
43130  # Print a helpful message on how to acquire the necessary build dependency.
43131  # cups is the help tag: freetype, cups, pulse, alsa etc
43132  MISSING_DEPENDENCY=cups
43133
43134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43135    cygwin_help $MISSING_DEPENDENCY
43136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43137    msys_help $MISSING_DEPENDENCY
43138  else
43139    PKGHANDLER_COMMAND=
43140
43141    case $PKGHANDLER in
43142      apt-get)
43143        apt_help     $MISSING_DEPENDENCY ;;
43144      yum)
43145        yum_help     $MISSING_DEPENDENCY ;;
43146      port)
43147        port_help    $MISSING_DEPENDENCY ;;
43148      pkgutil)
43149        pkgutil_help $MISSING_DEPENDENCY ;;
43150      pkgadd)
43151        pkgadd_help  $MISSING_DEPENDENCY ;;
43152    esac
43153
43154    if test "x$PKGHANDLER_COMMAND" != x; then
43155      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43156    fi
43157  fi
43158
43159      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43160    fi
43161  fi
43162
43163
43164
43165
43166
43167
43168  ###############################################################################
43169  #
43170  # The ubiquitous freetype library is used to render fonts.
43171  #
43172
43173# Check whether --with-freetype was given.
43174if test "${with_freetype+set}" = set; then :
43175  withval=$with_freetype;
43176fi
43177
43178
43179# Check whether --with-freetype-include was given.
43180if test "${with_freetype_include+set}" = set; then :
43181  withval=$with_freetype_include;
43182fi
43183
43184
43185# Check whether --with-freetype-lib was given.
43186if test "${with_freetype_lib+set}" = set; then :
43187  withval=$with_freetype_lib;
43188fi
43189
43190  # Check whether --enable-freetype-bundling was given.
43191if test "${enable_freetype_bundling+set}" = set; then :
43192  enableval=$enable_freetype_bundling;
43193fi
43194
43195
43196  FREETYPE_CFLAGS=
43197  FREETYPE_LIBS=
43198  FREETYPE_BUNDLE_LIB_PATH=
43199
43200  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43201    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43202      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43203$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43204    fi
43205    if test "x$enable_freetype_bundling" != x; then
43206      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43207$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43208    fi
43209  else
43210    # freetype is needed to build; go get it!
43211
43212    BUNDLE_FREETYPE="$enable_freetype_bundling"
43213
43214    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43215      # User has specified settings
43216
43217      if test "x$BUNDLE_FREETYPE" = x; then
43218        # If not specified, default is to bundle freetype
43219        BUNDLE_FREETYPE=yes
43220      fi
43221
43222      if test "x$with_freetype" != x; then
43223        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43224        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43225      fi
43226
43227      # Allow --with-freetype-lib and --with-freetype-include to override
43228      if test "x$with_freetype_include" != x; then
43229        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43230      fi
43231      if test "x$with_freetype_lib" != x; then
43232        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43233      fi
43234
43235      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43236        # Okay, we got it. Check that it works.
43237
43238  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43239  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43240  METHOD="--with-freetype"
43241
43242  # First check if the files exists.
43243  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43244    # We found an arbitrary include file. That's a good sign.
43245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43246$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43247    FOUND_FREETYPE=yes
43248
43249    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43250    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43251      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43252$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43253      FOUND_FREETYPE=no
43254    else
43255      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43256        # On Windows, we will need both .lib and .dll file.
43257        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43258          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43259$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43260          FOUND_FREETYPE=no
43261        fi
43262      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
43263        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43264        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43265      fi
43266    fi
43267  fi
43268
43269  if test "x$FOUND_FREETYPE" = xyes; then
43270
43271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43272
43273  # Input might be given as Windows format, start by converting to
43274  # unix format.
43275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43276  new_path=`$CYGPATH -u "$path"`
43277
43278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43281  # "foo.exe" is OK but "foo" is an error.
43282  #
43283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43284  # It is also a way to make sure we got the proper file name for the real test later on.
43285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43286  if test "x$test_shortpath" = x; then
43287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43289    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43290  fi
43291
43292  # Call helper function which possibly converts this using DOS-style short mode.
43293  # If so, the updated path is stored in $new_path.
43294
43295  input_path="$new_path"
43296  # Check if we need to convert this using DOS-style short mode. If the path
43297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43298  # take no chances and rewrite it.
43299  # Note: m4 eats our [], so we need to use [ and ] instead.
43300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43301  if test "x$has_forbidden_chars" != x; then
43302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43306      # Going to short mode and back again did indeed matter. Since short mode is
43307      # case insensitive, let's make it lowercase to improve readability.
43308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43309      # Now convert it back to Unix-stile (cygpath)
43310      input_path=`$CYGPATH -u "$shortmode_path"`
43311      new_path="$input_path"
43312    fi
43313  fi
43314
43315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43316  if test "x$test_cygdrive_prefix" = x; then
43317    # As a simple fix, exclude /usr/bin since it's not a real path.
43318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43320      # a path prefixed by /cygdrive for fixpath to work.
43321      new_path="$CYGWIN_ROOT_PATH$input_path"
43322    fi
43323  fi
43324
43325
43326  if test "x$path" != "x$new_path"; then
43327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43330  fi
43331
43332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43333
43334  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43335  has_colon=`$ECHO $path | $GREP ^.:`
43336  new_path="$path"
43337  if test "x$has_colon" = x; then
43338    # Not in mixed or Windows style, start by that.
43339    new_path=`cmd //c echo $path`
43340  fi
43341
43342
43343  input_path="$new_path"
43344  # Check if we need to convert this using DOS-style short mode. If the path
43345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43346  # take no chances and rewrite it.
43347  # Note: m4 eats our [], so we need to use [ and ] instead.
43348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43349  if test "x$has_forbidden_chars" != x; then
43350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43352  fi
43353
43354
43355  windows_path="$new_path"
43356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43357    unix_path=`$CYGPATH -u "$windows_path"`
43358    new_path="$unix_path"
43359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43361    new_path="$unix_path"
43362  fi
43363
43364  if test "x$path" != "x$new_path"; then
43365    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43368  fi
43369
43370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43372
43373  else
43374    # We're on a posix platform. Hooray! :)
43375    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43376    has_space=`$ECHO "$path" | $GREP " "`
43377    if test "x$has_space" != x; then
43378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43380      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43381    fi
43382
43383    # Use eval to expand a potential ~
43384    eval path="$path"
43385    if test ! -f "$path" && test ! -d "$path"; then
43386      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43387    fi
43388
43389    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43390  fi
43391
43392
43393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43394
43395  # Input might be given as Windows format, start by converting to
43396  # unix format.
43397  path="$POTENTIAL_FREETYPE_LIB_PATH"
43398  new_path=`$CYGPATH -u "$path"`
43399
43400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43403  # "foo.exe" is OK but "foo" is an error.
43404  #
43405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43406  # It is also a way to make sure we got the proper file name for the real test later on.
43407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43408  if test "x$test_shortpath" = x; then
43409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43411    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43412  fi
43413
43414  # Call helper function which possibly converts this using DOS-style short mode.
43415  # If so, the updated path is stored in $new_path.
43416
43417  input_path="$new_path"
43418  # Check if we need to convert this using DOS-style short mode. If the path
43419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43420  # take no chances and rewrite it.
43421  # Note: m4 eats our [], so we need to use [ and ] instead.
43422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43423  if test "x$has_forbidden_chars" != x; then
43424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43428      # Going to short mode and back again did indeed matter. Since short mode is
43429      # case insensitive, let's make it lowercase to improve readability.
43430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43431      # Now convert it back to Unix-stile (cygpath)
43432      input_path=`$CYGPATH -u "$shortmode_path"`
43433      new_path="$input_path"
43434    fi
43435  fi
43436
43437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43438  if test "x$test_cygdrive_prefix" = x; then
43439    # As a simple fix, exclude /usr/bin since it's not a real path.
43440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43442      # a path prefixed by /cygdrive for fixpath to work.
43443      new_path="$CYGWIN_ROOT_PATH$input_path"
43444    fi
43445  fi
43446
43447
43448  if test "x$path" != "x$new_path"; then
43449    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43451$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43452  fi
43453
43454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43455
43456  path="$POTENTIAL_FREETYPE_LIB_PATH"
43457  has_colon=`$ECHO $path | $GREP ^.:`
43458  new_path="$path"
43459  if test "x$has_colon" = x; then
43460    # Not in mixed or Windows style, start by that.
43461    new_path=`cmd //c echo $path`
43462  fi
43463
43464
43465  input_path="$new_path"
43466  # Check if we need to convert this using DOS-style short mode. If the path
43467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43468  # take no chances and rewrite it.
43469  # Note: m4 eats our [], so we need to use [ and ] instead.
43470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43471  if test "x$has_forbidden_chars" != x; then
43472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43474  fi
43475
43476
43477  windows_path="$new_path"
43478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43479    unix_path=`$CYGPATH -u "$windows_path"`
43480    new_path="$unix_path"
43481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43483    new_path="$unix_path"
43484  fi
43485
43486  if test "x$path" != "x$new_path"; then
43487    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43489$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43490  fi
43491
43492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43494
43495  else
43496    # We're on a posix platform. Hooray! :)
43497    path="$POTENTIAL_FREETYPE_LIB_PATH"
43498    has_space=`$ECHO "$path" | $GREP " "`
43499    if test "x$has_space" != x; then
43500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43501$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43503    fi
43504
43505    # Use eval to expand a potential ~
43506    eval path="$path"
43507    if test ! -f "$path" && test ! -d "$path"; then
43508      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43509    fi
43510
43511    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43512  fi
43513
43514
43515    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43517$as_echo_n "checking for freetype includes... " >&6; }
43518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43519$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43520    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43522$as_echo_n "checking for freetype libraries... " >&6; }
43523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43524$as_echo "$FREETYPE_LIB_PATH" >&6; }
43525  fi
43526
43527        if test "x$FOUND_FREETYPE" != xyes; then
43528          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43529        fi
43530      else
43531        # User specified only one of lib or include. This is an error.
43532        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43533          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43534$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43535          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43536        else
43537          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43538$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43539          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43540        fi
43541      fi
43542    else
43543      # User did not specify settings, but we need freetype. Try to locate it.
43544
43545      if test "x$BUNDLE_FREETYPE" = x; then
43546        # If not specified, default is to bundle freetype only on windows
43547        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43548          BUNDLE_FREETYPE=yes
43549        else
43550          BUNDLE_FREETYPE=no
43551        fi
43552      fi
43553
43554      if test "x$FOUND_FREETYPE" != xyes; then
43555        # Check builddeps
43556
43557
43558  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43559    # Source the builddeps file again, to make sure it uses the latest variables!
43560    . $builddepsfile
43561    # Look for a target and build machine specific resource!
43562    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43563    if test "x$resource" = x; then
43564      # Ok, lets instead look for a target specific resource
43565      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43566    fi
43567    if test "x$resource" = x; then
43568      # Ok, lets instead look for a build specific resource
43569      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43570    fi
43571    if test "x$resource" = x; then
43572      # Ok, lets instead look for a generic resource
43573      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43574      resource=${builddep_freetype2}
43575    fi
43576    if test "x$resource" != x; then
43577      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43578$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43579      # If the resource in the builddeps.conf file is an existing directory,
43580      # for example /java/linux/cups
43581      if test -d ${resource}; then
43582        depdir=${resource}
43583      else
43584
43585  # freetype2 is for example mymodule
43586  # $resource is for example libs/general/libmymod_1_2_3.zip
43587  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43588  # $with_builddeps_dir is for example /localhome/builddeps
43589  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43590  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43591  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43592  filename=`basename $resource`
43593  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43594  filebase=${filename%%.*}
43595  extension=${filename#*.}
43596  installdir=$with_builddeps_dir/$filebase
43597  if test ! -f $installdir/$filename.unpacked; then
43598    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43599$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43600    if test ! -d $installdir; then
43601      mkdir -p $installdir
43602    fi
43603    if test ! -d $installdir; then
43604      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43605    fi
43606    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43607    touch $tmpfile
43608    if test ! -f $tmpfile; then
43609      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43610    fi
43611
43612  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43613  # $tmpfile is the local file name for the downloaded file.
43614  VALID_TOOL=no
43615  if test "x$BDEPS_FTP" = xwget; then
43616    VALID_TOOL=yes
43617    wget -O $tmpfile $with_builddeps_server/$resource
43618  fi
43619  if test "x$BDEPS_FTP" = xlftp; then
43620    VALID_TOOL=yes
43621    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43622  fi
43623  if test "x$BDEPS_FTP" = xftp; then
43624    VALID_TOOL=yes
43625    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43626    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43627    FTPUSERPWD=${FTPSERVER%%@*}
43628    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43629      FTPUSER=${userpwd%%:*}
43630      FTPPWD=${userpwd#*@}
43631      FTPSERVER=${FTPSERVER#*@}
43632    else
43633      FTPUSER=ftp
43634      FTPPWD=ftp
43635    fi
43636    # the "pass" command does not work on some
43637    # ftp clients (read ftp.exe) but if it works,
43638    # passive mode is better!
43639    ( \
43640        echo "user $FTPUSER $FTPPWD"        ; \
43641        echo "pass"                         ; \
43642        echo "bin"                          ; \
43643        echo "get $FTPPATH $tmpfile"              ; \
43644    ) | ftp -in $FTPSERVER
43645  fi
43646  if test "x$VALID_TOOL" != xyes; then
43647    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43648  fi
43649
43650    mv $tmpfile $installdir/$filename
43651    if test ! -s $installdir/$filename; then
43652      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43653    fi
43654    case "$extension" in
43655      zip)  echo "Unzipping $installdir/$filename..."
43656        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43657        ;;
43658      tar.gz) echo "Untaring $installdir/$filename..."
43659        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43660        ;;
43661      tgz) echo "Untaring $installdir/$filename..."
43662        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43663        ;;
43664      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43665        ;;
43666    esac
43667  fi
43668  if test -f $installdir/$filename.unpacked; then
43669    depdir=$installdir
43670  fi
43671
43672      fi
43673      # Source the builddeps file again, because in the previous command, the depdir
43674      # was updated to point at the current build dependency install directory.
43675      . $builddepsfile
43676      # Now extract variables from the builddeps.conf files.
43677      theroot=${builddep_freetype2_ROOT}
43678      thecflags=${builddep_freetype2_CFLAGS}
43679      thelibs=${builddep_freetype2_LIBS}
43680      if test "x$depdir" = x; then
43681        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43682      fi
43683      FREETYPE=$depdir
43684      if test "x$theroot" != x; then
43685        FREETYPE="$theroot"
43686      fi
43687      if test "x$thecflags" != x; then
43688        FREETYPE_CFLAGS="$thecflags"
43689      fi
43690      if test "x$thelibs" != x; then
43691        FREETYPE_LIBS="$thelibs"
43692      fi
43693      FOUND_FREETYPE=yes
43694      else FOUND_FREETYPE=no
43695
43696    fi
43697    else FOUND_FREETYPE=no
43698
43699  fi
43700
43701        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43702        if test "x$FOUND_FREETYPE" = xyes; then
43703          if test "x$BUNDLE_FREETYPE" = xyes; then
43704            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43705$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43706            FOUND_FREETYPE=no
43707          else
43708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43709$as_echo_n "checking for freetype... " >&6; }
43710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43711$as_echo "yes (using builddeps)" >&6; }
43712          fi
43713        fi
43714      fi
43715
43716      if test "x$FOUND_FREETYPE" != xyes; then
43717        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43718        if test "x$PKG_CONFIG" != x; then
43719
43720pkg_failed=no
43721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43722$as_echo_n "checking for FREETYPE... " >&6; }
43723
43724if test -n "$FREETYPE_CFLAGS"; then
43725    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43726 elif test -n "$PKG_CONFIG"; then
43727    if test -n "$PKG_CONFIG" && \
43728    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43729  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43730  ac_status=$?
43731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43732  test $ac_status = 0; }; then
43733  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43734else
43735  pkg_failed=yes
43736fi
43737 else
43738    pkg_failed=untried
43739fi
43740if test -n "$FREETYPE_LIBS"; then
43741    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43742 elif test -n "$PKG_CONFIG"; then
43743    if test -n "$PKG_CONFIG" && \
43744    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43745  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43746  ac_status=$?
43747  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43748  test $ac_status = 0; }; then
43749  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43750else
43751  pkg_failed=yes
43752fi
43753 else
43754    pkg_failed=untried
43755fi
43756
43757
43758
43759if test $pkg_failed = yes; then
43760
43761if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43762        _pkg_short_errors_supported=yes
43763else
43764        _pkg_short_errors_supported=no
43765fi
43766        if test $_pkg_short_errors_supported = yes; then
43767	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43768        else
43769	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43770        fi
43771	# Put the nasty error message in config.log where it belongs
43772	echo "$FREETYPE_PKG_ERRORS" >&5
43773
43774	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43775$as_echo "no" >&6; }
43776                FOUND_FREETYPE=no
43777elif test $pkg_failed = untried; then
43778	FOUND_FREETYPE=no
43779else
43780	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43781	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43783$as_echo "yes" >&6; }
43784	FOUND_FREETYPE=yes
43785fi
43786          if test "x$FOUND_FREETYPE" = xyes; then
43787            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43788            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43789            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43790            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43791              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43792            fi
43793            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43794            if test "x$BUNDLE_FREETYPE" = xyes; then
43795              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43796$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43797              FOUND_FREETYPE=no
43798            else
43799              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43800$as_echo_n "checking for freetype... " >&6; }
43801              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43802$as_echo "yes (using pkg-config)" >&6; }
43803            fi
43804          fi
43805        fi
43806      fi
43807
43808      if test "x$FOUND_FREETYPE" != xyes; then
43809        # Check in well-known locations
43810        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43811          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43812
43813  windows_path="$FREETYPE_BASE_DIR"
43814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43815    unix_path=`$CYGPATH -u "$windows_path"`
43816    FREETYPE_BASE_DIR="$unix_path"
43817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43819    FREETYPE_BASE_DIR="$unix_path"
43820  fi
43821
43822
43823  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43824  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43825  METHOD="well-known location"
43826
43827  # First check if the files exists.
43828  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43829    # We found an arbitrary include file. That's a good sign.
43830    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43831$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43832    FOUND_FREETYPE=yes
43833
43834    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43835    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43836      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43837$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43838      FOUND_FREETYPE=no
43839    else
43840      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43841        # On Windows, we will need both .lib and .dll file.
43842        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43843          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43845          FOUND_FREETYPE=no
43846        fi
43847      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
43848        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43849        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43850      fi
43851    fi
43852  fi
43853
43854  if test "x$FOUND_FREETYPE" = xyes; then
43855
43856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43857
43858  # Input might be given as Windows format, start by converting to
43859  # unix format.
43860  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43861  new_path=`$CYGPATH -u "$path"`
43862
43863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43866  # "foo.exe" is OK but "foo" is an error.
43867  #
43868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43869  # It is also a way to make sure we got the proper file name for the real test later on.
43870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43871  if test "x$test_shortpath" = x; then
43872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43875  fi
43876
43877  # Call helper function which possibly converts this using DOS-style short mode.
43878  # If so, the updated path is stored in $new_path.
43879
43880  input_path="$new_path"
43881  # Check if we need to convert this using DOS-style short mode. If the path
43882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43883  # take no chances and rewrite it.
43884  # Note: m4 eats our [], so we need to use [ and ] instead.
43885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43886  if test "x$has_forbidden_chars" != x; then
43887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43891      # Going to short mode and back again did indeed matter. Since short mode is
43892      # case insensitive, let's make it lowercase to improve readability.
43893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43894      # Now convert it back to Unix-stile (cygpath)
43895      input_path=`$CYGPATH -u "$shortmode_path"`
43896      new_path="$input_path"
43897    fi
43898  fi
43899
43900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43901  if test "x$test_cygdrive_prefix" = x; then
43902    # As a simple fix, exclude /usr/bin since it's not a real path.
43903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43905      # a path prefixed by /cygdrive for fixpath to work.
43906      new_path="$CYGWIN_ROOT_PATH$input_path"
43907    fi
43908  fi
43909
43910
43911  if test "x$path" != "x$new_path"; then
43912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43915  fi
43916
43917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43918
43919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43920  has_colon=`$ECHO $path | $GREP ^.:`
43921  new_path="$path"
43922  if test "x$has_colon" = x; then
43923    # Not in mixed or Windows style, start by that.
43924    new_path=`cmd //c echo $path`
43925  fi
43926
43927
43928  input_path="$new_path"
43929  # Check if we need to convert this using DOS-style short mode. If the path
43930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43931  # take no chances and rewrite it.
43932  # Note: m4 eats our [], so we need to use [ and ] instead.
43933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43934  if test "x$has_forbidden_chars" != x; then
43935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43937  fi
43938
43939
43940  windows_path="$new_path"
43941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43942    unix_path=`$CYGPATH -u "$windows_path"`
43943    new_path="$unix_path"
43944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43946    new_path="$unix_path"
43947  fi
43948
43949  if test "x$path" != "x$new_path"; then
43950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43953  fi
43954
43955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43957
43958  else
43959    # We're on a posix platform. Hooray! :)
43960    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43961    has_space=`$ECHO "$path" | $GREP " "`
43962    if test "x$has_space" != x; then
43963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43965      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43966    fi
43967
43968    # Use eval to expand a potential ~
43969    eval path="$path"
43970    if test ! -f "$path" && test ! -d "$path"; then
43971      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43972    fi
43973
43974    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43975  fi
43976
43977
43978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43979
43980  # Input might be given as Windows format, start by converting to
43981  # unix format.
43982  path="$POTENTIAL_FREETYPE_LIB_PATH"
43983  new_path=`$CYGPATH -u "$path"`
43984
43985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43988  # "foo.exe" is OK but "foo" is an error.
43989  #
43990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43991  # It is also a way to make sure we got the proper file name for the real test later on.
43992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43993  if test "x$test_shortpath" = x; then
43994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43996    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43997  fi
43998
43999  # Call helper function which possibly converts this using DOS-style short mode.
44000  # If so, the updated path is stored in $new_path.
44001
44002  input_path="$new_path"
44003  # Check if we need to convert this using DOS-style short mode. If the path
44004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44005  # take no chances and rewrite it.
44006  # Note: m4 eats our [], so we need to use [ and ] instead.
44007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44008  if test "x$has_forbidden_chars" != x; then
44009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44013      # Going to short mode and back again did indeed matter. Since short mode is
44014      # case insensitive, let's make it lowercase to improve readability.
44015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44016      # Now convert it back to Unix-stile (cygpath)
44017      input_path=`$CYGPATH -u "$shortmode_path"`
44018      new_path="$input_path"
44019    fi
44020  fi
44021
44022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44023  if test "x$test_cygdrive_prefix" = x; then
44024    # As a simple fix, exclude /usr/bin since it's not a real path.
44025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44027      # a path prefixed by /cygdrive for fixpath to work.
44028      new_path="$CYGWIN_ROOT_PATH$input_path"
44029    fi
44030  fi
44031
44032
44033  if test "x$path" != "x$new_path"; then
44034    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44037  fi
44038
44039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44040
44041  path="$POTENTIAL_FREETYPE_LIB_PATH"
44042  has_colon=`$ECHO $path | $GREP ^.:`
44043  new_path="$path"
44044  if test "x$has_colon" = x; then
44045    # Not in mixed or Windows style, start by that.
44046    new_path=`cmd //c echo $path`
44047  fi
44048
44049
44050  input_path="$new_path"
44051  # Check if we need to convert this using DOS-style short mode. If the path
44052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44053  # take no chances and rewrite it.
44054  # Note: m4 eats our [], so we need to use [ and ] instead.
44055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44056  if test "x$has_forbidden_chars" != x; then
44057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44059  fi
44060
44061
44062  windows_path="$new_path"
44063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44064    unix_path=`$CYGPATH -u "$windows_path"`
44065    new_path="$unix_path"
44066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44068    new_path="$unix_path"
44069  fi
44070
44071  if test "x$path" != "x$new_path"; then
44072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44075  fi
44076
44077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44079
44080  else
44081    # We're on a posix platform. Hooray! :)
44082    path="$POTENTIAL_FREETYPE_LIB_PATH"
44083    has_space=`$ECHO "$path" | $GREP " "`
44084    if test "x$has_space" != x; then
44085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44088    fi
44089
44090    # Use eval to expand a potential ~
44091    eval path="$path"
44092    if test ! -f "$path" && test ! -d "$path"; then
44093      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44094    fi
44095
44096    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44097  fi
44098
44099
44100    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44102$as_echo_n "checking for freetype includes... " >&6; }
44103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44104$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44105    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44107$as_echo_n "checking for freetype libraries... " >&6; }
44108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44109$as_echo "$FREETYPE_LIB_PATH" >&6; }
44110  fi
44111
44112          if test "x$FOUND_FREETYPE" != xyes; then
44113            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44114
44115  windows_path="$FREETYPE_BASE_DIR"
44116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44117    unix_path=`$CYGPATH -u "$windows_path"`
44118    FREETYPE_BASE_DIR="$unix_path"
44119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44121    FREETYPE_BASE_DIR="$unix_path"
44122  fi
44123
44124
44125  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44126  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44127  METHOD="well-known location"
44128
44129  # First check if the files exists.
44130  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44131    # We found an arbitrary include file. That's a good sign.
44132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44133$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44134    FOUND_FREETYPE=yes
44135
44136    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44137    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44138      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44140      FOUND_FREETYPE=no
44141    else
44142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44143        # On Windows, we will need both .lib and .dll file.
44144        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44145          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44147          FOUND_FREETYPE=no
44148        fi
44149      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
44150        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44151        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44152      fi
44153    fi
44154  fi
44155
44156  if test "x$FOUND_FREETYPE" = xyes; then
44157
44158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44159
44160  # Input might be given as Windows format, start by converting to
44161  # unix format.
44162  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44163  new_path=`$CYGPATH -u "$path"`
44164
44165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44168  # "foo.exe" is OK but "foo" is an error.
44169  #
44170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44171  # It is also a way to make sure we got the proper file name for the real test later on.
44172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44173  if test "x$test_shortpath" = x; then
44174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44176    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44177  fi
44178
44179  # Call helper function which possibly converts this using DOS-style short mode.
44180  # If so, the updated path is stored in $new_path.
44181
44182  input_path="$new_path"
44183  # Check if we need to convert this using DOS-style short mode. If the path
44184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44185  # take no chances and rewrite it.
44186  # Note: m4 eats our [], so we need to use [ and ] instead.
44187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44188  if test "x$has_forbidden_chars" != x; then
44189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44193      # Going to short mode and back again did indeed matter. Since short mode is
44194      # case insensitive, let's make it lowercase to improve readability.
44195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44196      # Now convert it back to Unix-stile (cygpath)
44197      input_path=`$CYGPATH -u "$shortmode_path"`
44198      new_path="$input_path"
44199    fi
44200  fi
44201
44202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44203  if test "x$test_cygdrive_prefix" = x; then
44204    # As a simple fix, exclude /usr/bin since it's not a real path.
44205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44207      # a path prefixed by /cygdrive for fixpath to work.
44208      new_path="$CYGWIN_ROOT_PATH$input_path"
44209    fi
44210  fi
44211
44212
44213  if test "x$path" != "x$new_path"; then
44214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44217  fi
44218
44219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44220
44221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44222  has_colon=`$ECHO $path | $GREP ^.:`
44223  new_path="$path"
44224  if test "x$has_colon" = x; then
44225    # Not in mixed or Windows style, start by that.
44226    new_path=`cmd //c echo $path`
44227  fi
44228
44229
44230  input_path="$new_path"
44231  # Check if we need to convert this using DOS-style short mode. If the path
44232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44233  # take no chances and rewrite it.
44234  # Note: m4 eats our [], so we need to use [ and ] instead.
44235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44236  if test "x$has_forbidden_chars" != x; then
44237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44239  fi
44240
44241
44242  windows_path="$new_path"
44243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44244    unix_path=`$CYGPATH -u "$windows_path"`
44245    new_path="$unix_path"
44246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44248    new_path="$unix_path"
44249  fi
44250
44251  if test "x$path" != "x$new_path"; then
44252    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44255  fi
44256
44257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44259
44260  else
44261    # We're on a posix platform. Hooray! :)
44262    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44263    has_space=`$ECHO "$path" | $GREP " "`
44264    if test "x$has_space" != x; then
44265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44267      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44268    fi
44269
44270    # Use eval to expand a potential ~
44271    eval path="$path"
44272    if test ! -f "$path" && test ! -d "$path"; then
44273      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44274    fi
44275
44276    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44277  fi
44278
44279
44280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44281
44282  # Input might be given as Windows format, start by converting to
44283  # unix format.
44284  path="$POTENTIAL_FREETYPE_LIB_PATH"
44285  new_path=`$CYGPATH -u "$path"`
44286
44287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44290  # "foo.exe" is OK but "foo" is an error.
44291  #
44292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44293  # It is also a way to make sure we got the proper file name for the real test later on.
44294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44295  if test "x$test_shortpath" = x; then
44296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44298    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44299  fi
44300
44301  # Call helper function which possibly converts this using DOS-style short mode.
44302  # If so, the updated path is stored in $new_path.
44303
44304  input_path="$new_path"
44305  # Check if we need to convert this using DOS-style short mode. If the path
44306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44307  # take no chances and rewrite it.
44308  # Note: m4 eats our [], so we need to use [ and ] instead.
44309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44310  if test "x$has_forbidden_chars" != x; then
44311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44315      # Going to short mode and back again did indeed matter. Since short mode is
44316      # case insensitive, let's make it lowercase to improve readability.
44317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44318      # Now convert it back to Unix-stile (cygpath)
44319      input_path=`$CYGPATH -u "$shortmode_path"`
44320      new_path="$input_path"
44321    fi
44322  fi
44323
44324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44325  if test "x$test_cygdrive_prefix" = x; then
44326    # As a simple fix, exclude /usr/bin since it's not a real path.
44327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44329      # a path prefixed by /cygdrive for fixpath to work.
44330      new_path="$CYGWIN_ROOT_PATH$input_path"
44331    fi
44332  fi
44333
44334
44335  if test "x$path" != "x$new_path"; then
44336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44339  fi
44340
44341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44342
44343  path="$POTENTIAL_FREETYPE_LIB_PATH"
44344  has_colon=`$ECHO $path | $GREP ^.:`
44345  new_path="$path"
44346  if test "x$has_colon" = x; then
44347    # Not in mixed or Windows style, start by that.
44348    new_path=`cmd //c echo $path`
44349  fi
44350
44351
44352  input_path="$new_path"
44353  # Check if we need to convert this using DOS-style short mode. If the path
44354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44355  # take no chances and rewrite it.
44356  # Note: m4 eats our [], so we need to use [ and ] instead.
44357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44358  if test "x$has_forbidden_chars" != x; then
44359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44361  fi
44362
44363
44364  windows_path="$new_path"
44365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44366    unix_path=`$CYGPATH -u "$windows_path"`
44367    new_path="$unix_path"
44368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44370    new_path="$unix_path"
44371  fi
44372
44373  if test "x$path" != "x$new_path"; then
44374    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44377  fi
44378
44379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44381
44382  else
44383    # We're on a posix platform. Hooray! :)
44384    path="$POTENTIAL_FREETYPE_LIB_PATH"
44385    has_space=`$ECHO "$path" | $GREP " "`
44386    if test "x$has_space" != x; then
44387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44390    fi
44391
44392    # Use eval to expand a potential ~
44393    eval path="$path"
44394    if test ! -f "$path" && test ! -d "$path"; then
44395      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44396    fi
44397
44398    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44399  fi
44400
44401
44402    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44404$as_echo_n "checking for freetype includes... " >&6; }
44405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44406$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44407    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44409$as_echo_n "checking for freetype libraries... " >&6; }
44410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44411$as_echo "$FREETYPE_LIB_PATH" >&6; }
44412  fi
44413
44414          fi
44415        else
44416          if test "x$SYS_ROOT" = "x/"; then
44417            FREETYPE_ROOT=
44418          else
44419            FREETYPE_ROOT="$SYS_ROOT"
44420          fi
44421          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44422
44423  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44424  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44425  METHOD="well-known location"
44426
44427  # First check if the files exists.
44428  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44429    # We found an arbitrary include file. That's a good sign.
44430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44431$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44432    FOUND_FREETYPE=yes
44433
44434    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44435    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44436      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44437$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44438      FOUND_FREETYPE=no
44439    else
44440      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44441        # On Windows, we will need both .lib and .dll file.
44442        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44443          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44444$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44445          FOUND_FREETYPE=no
44446        fi
44447      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
44448        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44449        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44450      fi
44451    fi
44452  fi
44453
44454  if test "x$FOUND_FREETYPE" = xyes; then
44455
44456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44457
44458  # Input might be given as Windows format, start by converting to
44459  # unix format.
44460  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44461  new_path=`$CYGPATH -u "$path"`
44462
44463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44466  # "foo.exe" is OK but "foo" is an error.
44467  #
44468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44469  # It is also a way to make sure we got the proper file name for the real test later on.
44470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44471  if test "x$test_shortpath" = x; then
44472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44474    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44475  fi
44476
44477  # Call helper function which possibly converts this using DOS-style short mode.
44478  # If so, the updated path is stored in $new_path.
44479
44480  input_path="$new_path"
44481  # Check if we need to convert this using DOS-style short mode. If the path
44482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44483  # take no chances and rewrite it.
44484  # Note: m4 eats our [], so we need to use [ and ] instead.
44485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44486  if test "x$has_forbidden_chars" != x; then
44487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44491      # Going to short mode and back again did indeed matter. Since short mode is
44492      # case insensitive, let's make it lowercase to improve readability.
44493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44494      # Now convert it back to Unix-stile (cygpath)
44495      input_path=`$CYGPATH -u "$shortmode_path"`
44496      new_path="$input_path"
44497    fi
44498  fi
44499
44500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44501  if test "x$test_cygdrive_prefix" = x; then
44502    # As a simple fix, exclude /usr/bin since it's not a real path.
44503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44505      # a path prefixed by /cygdrive for fixpath to work.
44506      new_path="$CYGWIN_ROOT_PATH$input_path"
44507    fi
44508  fi
44509
44510
44511  if test "x$path" != "x$new_path"; then
44512    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44514$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44515  fi
44516
44517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44518
44519  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44520  has_colon=`$ECHO $path | $GREP ^.:`
44521  new_path="$path"
44522  if test "x$has_colon" = x; then
44523    # Not in mixed or Windows style, start by that.
44524    new_path=`cmd //c echo $path`
44525  fi
44526
44527
44528  input_path="$new_path"
44529  # Check if we need to convert this using DOS-style short mode. If the path
44530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44531  # take no chances and rewrite it.
44532  # Note: m4 eats our [], so we need to use [ and ] instead.
44533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44534  if test "x$has_forbidden_chars" != x; then
44535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44537  fi
44538
44539
44540  windows_path="$new_path"
44541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44542    unix_path=`$CYGPATH -u "$windows_path"`
44543    new_path="$unix_path"
44544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44546    new_path="$unix_path"
44547  fi
44548
44549  if test "x$path" != "x$new_path"; then
44550    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44553  fi
44554
44555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44557
44558  else
44559    # We're on a posix platform. Hooray! :)
44560    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44561    has_space=`$ECHO "$path" | $GREP " "`
44562    if test "x$has_space" != x; then
44563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44565      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44566    fi
44567
44568    # Use eval to expand a potential ~
44569    eval path="$path"
44570    if test ! -f "$path" && test ! -d "$path"; then
44571      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44572    fi
44573
44574    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44575  fi
44576
44577
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579
44580  # Input might be given as Windows format, start by converting to
44581  # unix format.
44582  path="$POTENTIAL_FREETYPE_LIB_PATH"
44583  new_path=`$CYGPATH -u "$path"`
44584
44585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44588  # "foo.exe" is OK but "foo" is an error.
44589  #
44590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44591  # It is also a way to make sure we got the proper file name for the real test later on.
44592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44593  if test "x$test_shortpath" = x; then
44594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44595$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44596    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44597  fi
44598
44599  # Call helper function which possibly converts this using DOS-style short mode.
44600  # If so, the updated path is stored in $new_path.
44601
44602  input_path="$new_path"
44603  # Check if we need to convert this using DOS-style short mode. If the path
44604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44605  # take no chances and rewrite it.
44606  # Note: m4 eats our [], so we need to use [ and ] instead.
44607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44608  if test "x$has_forbidden_chars" != x; then
44609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44613      # Going to short mode and back again did indeed matter. Since short mode is
44614      # case insensitive, let's make it lowercase to improve readability.
44615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44616      # Now convert it back to Unix-stile (cygpath)
44617      input_path=`$CYGPATH -u "$shortmode_path"`
44618      new_path="$input_path"
44619    fi
44620  fi
44621
44622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44623  if test "x$test_cygdrive_prefix" = x; then
44624    # As a simple fix, exclude /usr/bin since it's not a real path.
44625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44627      # a path prefixed by /cygdrive for fixpath to work.
44628      new_path="$CYGWIN_ROOT_PATH$input_path"
44629    fi
44630  fi
44631
44632
44633  if test "x$path" != "x$new_path"; then
44634    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44637  fi
44638
44639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44640
44641  path="$POTENTIAL_FREETYPE_LIB_PATH"
44642  has_colon=`$ECHO $path | $GREP ^.:`
44643  new_path="$path"
44644  if test "x$has_colon" = x; then
44645    # Not in mixed or Windows style, start by that.
44646    new_path=`cmd //c echo $path`
44647  fi
44648
44649
44650  input_path="$new_path"
44651  # Check if we need to convert this using DOS-style short mode. If the path
44652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44653  # take no chances and rewrite it.
44654  # Note: m4 eats our [], so we need to use [ and ] instead.
44655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44656  if test "x$has_forbidden_chars" != x; then
44657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44659  fi
44660
44661
44662  windows_path="$new_path"
44663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44664    unix_path=`$CYGPATH -u "$windows_path"`
44665    new_path="$unix_path"
44666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44668    new_path="$unix_path"
44669  fi
44670
44671  if test "x$path" != "x$new_path"; then
44672    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44675  fi
44676
44677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44679
44680  else
44681    # We're on a posix platform. Hooray! :)
44682    path="$POTENTIAL_FREETYPE_LIB_PATH"
44683    has_space=`$ECHO "$path" | $GREP " "`
44684    if test "x$has_space" != x; then
44685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44687      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44688    fi
44689
44690    # Use eval to expand a potential ~
44691    eval path="$path"
44692    if test ! -f "$path" && test ! -d "$path"; then
44693      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44694    fi
44695
44696    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44697  fi
44698
44699
44700    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44702$as_echo_n "checking for freetype includes... " >&6; }
44703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44704$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44705    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44707$as_echo_n "checking for freetype libraries... " >&6; }
44708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44709$as_echo "$FREETYPE_LIB_PATH" >&6; }
44710  fi
44711
44712
44713          if test "x$FOUND_FREETYPE" != xyes; then
44714            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44715
44716  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44717  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44718  METHOD="well-known location"
44719
44720  # First check if the files exists.
44721  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44722    # We found an arbitrary include file. That's a good sign.
44723    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44724$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44725    FOUND_FREETYPE=yes
44726
44727    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44728    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44729      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44730$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44731      FOUND_FREETYPE=no
44732    else
44733      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44734        # On Windows, we will need both .lib and .dll file.
44735        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44736          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44737$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44738          FOUND_FREETYPE=no
44739        fi
44740      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
44741        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44742        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44743      fi
44744    fi
44745  fi
44746
44747  if test "x$FOUND_FREETYPE" = xyes; then
44748
44749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44750
44751  # Input might be given as Windows format, start by converting to
44752  # unix format.
44753  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44754  new_path=`$CYGPATH -u "$path"`
44755
44756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44759  # "foo.exe" is OK but "foo" is an error.
44760  #
44761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44762  # It is also a way to make sure we got the proper file name for the real test later on.
44763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44764  if test "x$test_shortpath" = x; then
44765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44767    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44768  fi
44769
44770  # Call helper function which possibly converts this using DOS-style short mode.
44771  # If so, the updated path is stored in $new_path.
44772
44773  input_path="$new_path"
44774  # Check if we need to convert this using DOS-style short mode. If the path
44775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44776  # take no chances and rewrite it.
44777  # Note: m4 eats our [], so we need to use [ and ] instead.
44778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44779  if test "x$has_forbidden_chars" != x; then
44780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44784      # Going to short mode and back again did indeed matter. Since short mode is
44785      # case insensitive, let's make it lowercase to improve readability.
44786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44787      # Now convert it back to Unix-stile (cygpath)
44788      input_path=`$CYGPATH -u "$shortmode_path"`
44789      new_path="$input_path"
44790    fi
44791  fi
44792
44793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44794  if test "x$test_cygdrive_prefix" = x; then
44795    # As a simple fix, exclude /usr/bin since it's not a real path.
44796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44798      # a path prefixed by /cygdrive for fixpath to work.
44799      new_path="$CYGWIN_ROOT_PATH$input_path"
44800    fi
44801  fi
44802
44803
44804  if test "x$path" != "x$new_path"; then
44805    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44808  fi
44809
44810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44811
44812  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44813  has_colon=`$ECHO $path | $GREP ^.:`
44814  new_path="$path"
44815  if test "x$has_colon" = x; then
44816    # Not in mixed or Windows style, start by that.
44817    new_path=`cmd //c echo $path`
44818  fi
44819
44820
44821  input_path="$new_path"
44822  # Check if we need to convert this using DOS-style short mode. If the path
44823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44824  # take no chances and rewrite it.
44825  # Note: m4 eats our [], so we need to use [ and ] instead.
44826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44827  if test "x$has_forbidden_chars" != x; then
44828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44830  fi
44831
44832
44833  windows_path="$new_path"
44834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44835    unix_path=`$CYGPATH -u "$windows_path"`
44836    new_path="$unix_path"
44837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44839    new_path="$unix_path"
44840  fi
44841
44842  if test "x$path" != "x$new_path"; then
44843    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44846  fi
44847
44848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44850
44851  else
44852    # We're on a posix platform. Hooray! :)
44853    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44854    has_space=`$ECHO "$path" | $GREP " "`
44855    if test "x$has_space" != x; then
44856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44859    fi
44860
44861    # Use eval to expand a potential ~
44862    eval path="$path"
44863    if test ! -f "$path" && test ! -d "$path"; then
44864      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44865    fi
44866
44867    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44868  fi
44869
44870
44871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872
44873  # Input might be given as Windows format, start by converting to
44874  # unix format.
44875  path="$POTENTIAL_FREETYPE_LIB_PATH"
44876  new_path=`$CYGPATH -u "$path"`
44877
44878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44881  # "foo.exe" is OK but "foo" is an error.
44882  #
44883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44884  # It is also a way to make sure we got the proper file name for the real test later on.
44885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44886  if test "x$test_shortpath" = x; then
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44889    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44890  fi
44891
44892  # Call helper function which possibly converts this using DOS-style short mode.
44893  # If so, the updated path is stored in $new_path.
44894
44895  input_path="$new_path"
44896  # Check if we need to convert this using DOS-style short mode. If the path
44897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44898  # take no chances and rewrite it.
44899  # Note: m4 eats our [], so we need to use [ and ] instead.
44900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44901  if test "x$has_forbidden_chars" != x; then
44902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44906      # Going to short mode and back again did indeed matter. Since short mode is
44907      # case insensitive, let's make it lowercase to improve readability.
44908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44909      # Now convert it back to Unix-stile (cygpath)
44910      input_path=`$CYGPATH -u "$shortmode_path"`
44911      new_path="$input_path"
44912    fi
44913  fi
44914
44915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44916  if test "x$test_cygdrive_prefix" = x; then
44917    # As a simple fix, exclude /usr/bin since it's not a real path.
44918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44920      # a path prefixed by /cygdrive for fixpath to work.
44921      new_path="$CYGWIN_ROOT_PATH$input_path"
44922    fi
44923  fi
44924
44925
44926  if test "x$path" != "x$new_path"; then
44927    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44930  fi
44931
44932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44933
44934  path="$POTENTIAL_FREETYPE_LIB_PATH"
44935  has_colon=`$ECHO $path | $GREP ^.:`
44936  new_path="$path"
44937  if test "x$has_colon" = x; then
44938    # Not in mixed or Windows style, start by that.
44939    new_path=`cmd //c echo $path`
44940  fi
44941
44942
44943  input_path="$new_path"
44944  # Check if we need to convert this using DOS-style short mode. If the path
44945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44946  # take no chances and rewrite it.
44947  # Note: m4 eats our [], so we need to use [ and ] instead.
44948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44949  if test "x$has_forbidden_chars" != x; then
44950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952  fi
44953
44954
44955  windows_path="$new_path"
44956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44957    unix_path=`$CYGPATH -u "$windows_path"`
44958    new_path="$unix_path"
44959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44961    new_path="$unix_path"
44962  fi
44963
44964  if test "x$path" != "x$new_path"; then
44965    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44968  fi
44969
44970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44972
44973  else
44974    # We're on a posix platform. Hooray! :)
44975    path="$POTENTIAL_FREETYPE_LIB_PATH"
44976    has_space=`$ECHO "$path" | $GREP " "`
44977    if test "x$has_space" != x; then
44978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44980      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44981    fi
44982
44983    # Use eval to expand a potential ~
44984    eval path="$path"
44985    if test ! -f "$path" && test ! -d "$path"; then
44986      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44987    fi
44988
44989    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44990  fi
44991
44992
44993    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44995$as_echo_n "checking for freetype includes... " >&6; }
44996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44997$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44998    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45000$as_echo_n "checking for freetype libraries... " >&6; }
45001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45002$as_echo "$FREETYPE_LIB_PATH" >&6; }
45003  fi
45004
45005          fi
45006
45007          if test "x$FOUND_FREETYPE" != xyes; then
45008            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45009            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45010
45011  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45012  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45013  METHOD="well-known location"
45014
45015  # First check if the files exists.
45016  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45017    # We found an arbitrary include file. That's a good sign.
45018    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45019$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45020    FOUND_FREETYPE=yes
45021
45022    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45023    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45024      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45026      FOUND_FREETYPE=no
45027    else
45028      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45029        # On Windows, we will need both .lib and .dll file.
45030        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45031          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45032$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45033          FOUND_FREETYPE=no
45034        fi
45035      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
45036        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45037        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45038      fi
45039    fi
45040  fi
45041
45042  if test "x$FOUND_FREETYPE" = xyes; then
45043
45044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45045
45046  # Input might be given as Windows format, start by converting to
45047  # unix format.
45048  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45049  new_path=`$CYGPATH -u "$path"`
45050
45051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45054  # "foo.exe" is OK but "foo" is an error.
45055  #
45056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45057  # It is also a way to make sure we got the proper file name for the real test later on.
45058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45059  if test "x$test_shortpath" = x; then
45060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45063  fi
45064
45065  # Call helper function which possibly converts this using DOS-style short mode.
45066  # If so, the updated path is stored in $new_path.
45067
45068  input_path="$new_path"
45069  # Check if we need to convert this using DOS-style short mode. If the path
45070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45071  # take no chances and rewrite it.
45072  # Note: m4 eats our [], so we need to use [ and ] instead.
45073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45074  if test "x$has_forbidden_chars" != x; then
45075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45079      # Going to short mode and back again did indeed matter. Since short mode is
45080      # case insensitive, let's make it lowercase to improve readability.
45081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45082      # Now convert it back to Unix-stile (cygpath)
45083      input_path=`$CYGPATH -u "$shortmode_path"`
45084      new_path="$input_path"
45085    fi
45086  fi
45087
45088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45089  if test "x$test_cygdrive_prefix" = x; then
45090    # As a simple fix, exclude /usr/bin since it's not a real path.
45091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45093      # a path prefixed by /cygdrive for fixpath to work.
45094      new_path="$CYGWIN_ROOT_PATH$input_path"
45095    fi
45096  fi
45097
45098
45099  if test "x$path" != "x$new_path"; then
45100    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45103  fi
45104
45105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45106
45107  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45108  has_colon=`$ECHO $path | $GREP ^.:`
45109  new_path="$path"
45110  if test "x$has_colon" = x; then
45111    # Not in mixed or Windows style, start by that.
45112    new_path=`cmd //c echo $path`
45113  fi
45114
45115
45116  input_path="$new_path"
45117  # Check if we need to convert this using DOS-style short mode. If the path
45118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45119  # take no chances and rewrite it.
45120  # Note: m4 eats our [], so we need to use [ and ] instead.
45121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45122  if test "x$has_forbidden_chars" != x; then
45123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45125  fi
45126
45127
45128  windows_path="$new_path"
45129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130    unix_path=`$CYGPATH -u "$windows_path"`
45131    new_path="$unix_path"
45132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45134    new_path="$unix_path"
45135  fi
45136
45137  if test "x$path" != "x$new_path"; then
45138    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45141  fi
45142
45143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45145
45146  else
45147    # We're on a posix platform. Hooray! :)
45148    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45149    has_space=`$ECHO "$path" | $GREP " "`
45150    if test "x$has_space" != x; then
45151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45154    fi
45155
45156    # Use eval to expand a potential ~
45157    eval path="$path"
45158    if test ! -f "$path" && test ! -d "$path"; then
45159      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45160    fi
45161
45162    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45163  fi
45164
45165
45166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45167
45168  # Input might be given as Windows format, start by converting to
45169  # unix format.
45170  path="$POTENTIAL_FREETYPE_LIB_PATH"
45171  new_path=`$CYGPATH -u "$path"`
45172
45173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45176  # "foo.exe" is OK but "foo" is an error.
45177  #
45178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45179  # It is also a way to make sure we got the proper file name for the real test later on.
45180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45181  if test "x$test_shortpath" = x; then
45182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45184    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45185  fi
45186
45187  # Call helper function which possibly converts this using DOS-style short mode.
45188  # If so, the updated path is stored in $new_path.
45189
45190  input_path="$new_path"
45191  # Check if we need to convert this using DOS-style short mode. If the path
45192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45193  # take no chances and rewrite it.
45194  # Note: m4 eats our [], so we need to use [ and ] instead.
45195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45196  if test "x$has_forbidden_chars" != x; then
45197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45201      # Going to short mode and back again did indeed matter. Since short mode is
45202      # case insensitive, let's make it lowercase to improve readability.
45203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45204      # Now convert it back to Unix-stile (cygpath)
45205      input_path=`$CYGPATH -u "$shortmode_path"`
45206      new_path="$input_path"
45207    fi
45208  fi
45209
45210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45211  if test "x$test_cygdrive_prefix" = x; then
45212    # As a simple fix, exclude /usr/bin since it's not a real path.
45213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45215      # a path prefixed by /cygdrive for fixpath to work.
45216      new_path="$CYGWIN_ROOT_PATH$input_path"
45217    fi
45218  fi
45219
45220
45221  if test "x$path" != "x$new_path"; then
45222    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45225  fi
45226
45227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45228
45229  path="$POTENTIAL_FREETYPE_LIB_PATH"
45230  has_colon=`$ECHO $path | $GREP ^.:`
45231  new_path="$path"
45232  if test "x$has_colon" = x; then
45233    # Not in mixed or Windows style, start by that.
45234    new_path=`cmd //c echo $path`
45235  fi
45236
45237
45238  input_path="$new_path"
45239  # Check if we need to convert this using DOS-style short mode. If the path
45240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45241  # take no chances and rewrite it.
45242  # Note: m4 eats our [], so we need to use [ and ] instead.
45243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45244  if test "x$has_forbidden_chars" != x; then
45245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45247  fi
45248
45249
45250  windows_path="$new_path"
45251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45252    unix_path=`$CYGPATH -u "$windows_path"`
45253    new_path="$unix_path"
45254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45256    new_path="$unix_path"
45257  fi
45258
45259  if test "x$path" != "x$new_path"; then
45260    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45263  fi
45264
45265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45267
45268  else
45269    # We're on a posix platform. Hooray! :)
45270    path="$POTENTIAL_FREETYPE_LIB_PATH"
45271    has_space=`$ECHO "$path" | $GREP " "`
45272    if test "x$has_space" != x; then
45273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45275      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45276    fi
45277
45278    # Use eval to expand a potential ~
45279    eval path="$path"
45280    if test ! -f "$path" && test ! -d "$path"; then
45281      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45282    fi
45283
45284    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45285  fi
45286
45287
45288    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45290$as_echo_n "checking for freetype includes... " >&6; }
45291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45292$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45293    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45295$as_echo_n "checking for freetype libraries... " >&6; }
45296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45297$as_echo "$FREETYPE_LIB_PATH" >&6; }
45298  fi
45299
45300            else
45301
45302  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45303  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45304  METHOD="well-known location"
45305
45306  # First check if the files exists.
45307  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45308    # We found an arbitrary include file. That's a good sign.
45309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45310$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45311    FOUND_FREETYPE=yes
45312
45313    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45314    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45315      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45316$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45317      FOUND_FREETYPE=no
45318    else
45319      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45320        # On Windows, we will need both .lib and .dll file.
45321        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45322          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45323$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45324          FOUND_FREETYPE=no
45325        fi
45326      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
45327        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45328        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45329      fi
45330    fi
45331  fi
45332
45333  if test "x$FOUND_FREETYPE" = xyes; then
45334
45335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45336
45337  # Input might be given as Windows format, start by converting to
45338  # unix format.
45339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45340  new_path=`$CYGPATH -u "$path"`
45341
45342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45345  # "foo.exe" is OK but "foo" is an error.
45346  #
45347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45348  # It is also a way to make sure we got the proper file name for the real test later on.
45349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45350  if test "x$test_shortpath" = x; then
45351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45352$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45353    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45354  fi
45355
45356  # Call helper function which possibly converts this using DOS-style short mode.
45357  # If so, the updated path is stored in $new_path.
45358
45359  input_path="$new_path"
45360  # Check if we need to convert this using DOS-style short mode. If the path
45361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45362  # take no chances and rewrite it.
45363  # Note: m4 eats our [], so we need to use [ and ] instead.
45364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45365  if test "x$has_forbidden_chars" != x; then
45366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45370      # Going to short mode and back again did indeed matter. Since short mode is
45371      # case insensitive, let's make it lowercase to improve readability.
45372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45373      # Now convert it back to Unix-stile (cygpath)
45374      input_path=`$CYGPATH -u "$shortmode_path"`
45375      new_path="$input_path"
45376    fi
45377  fi
45378
45379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45380  if test "x$test_cygdrive_prefix" = x; then
45381    # As a simple fix, exclude /usr/bin since it's not a real path.
45382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45384      # a path prefixed by /cygdrive for fixpath to work.
45385      new_path="$CYGWIN_ROOT_PATH$input_path"
45386    fi
45387  fi
45388
45389
45390  if test "x$path" != "x$new_path"; then
45391    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45393$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45394  fi
45395
45396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45397
45398  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45399  has_colon=`$ECHO $path | $GREP ^.:`
45400  new_path="$path"
45401  if test "x$has_colon" = x; then
45402    # Not in mixed or Windows style, start by that.
45403    new_path=`cmd //c echo $path`
45404  fi
45405
45406
45407  input_path="$new_path"
45408  # Check if we need to convert this using DOS-style short mode. If the path
45409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45410  # take no chances and rewrite it.
45411  # Note: m4 eats our [], so we need to use [ and ] instead.
45412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45413  if test "x$has_forbidden_chars" != x; then
45414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45416  fi
45417
45418
45419  windows_path="$new_path"
45420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45421    unix_path=`$CYGPATH -u "$windows_path"`
45422    new_path="$unix_path"
45423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45425    new_path="$unix_path"
45426  fi
45427
45428  if test "x$path" != "x$new_path"; then
45429    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45431$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45432  fi
45433
45434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45436
45437  else
45438    # We're on a posix platform. Hooray! :)
45439    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45440    has_space=`$ECHO "$path" | $GREP " "`
45441    if test "x$has_space" != x; then
45442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45444      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45445    fi
45446
45447    # Use eval to expand a potential ~
45448    eval path="$path"
45449    if test ! -f "$path" && test ! -d "$path"; then
45450      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45451    fi
45452
45453    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45454  fi
45455
45456
45457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458
45459  # Input might be given as Windows format, start by converting to
45460  # unix format.
45461  path="$POTENTIAL_FREETYPE_LIB_PATH"
45462  new_path=`$CYGPATH -u "$path"`
45463
45464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45467  # "foo.exe" is OK but "foo" is an error.
45468  #
45469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45470  # It is also a way to make sure we got the proper file name for the real test later on.
45471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45472  if test "x$test_shortpath" = x; then
45473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45475    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45476  fi
45477
45478  # Call helper function which possibly converts this using DOS-style short mode.
45479  # If so, the updated path is stored in $new_path.
45480
45481  input_path="$new_path"
45482  # Check if we need to convert this using DOS-style short mode. If the path
45483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45484  # take no chances and rewrite it.
45485  # Note: m4 eats our [], so we need to use [ and ] instead.
45486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45487  if test "x$has_forbidden_chars" != x; then
45488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45492      # Going to short mode and back again did indeed matter. Since short mode is
45493      # case insensitive, let's make it lowercase to improve readability.
45494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45495      # Now convert it back to Unix-stile (cygpath)
45496      input_path=`$CYGPATH -u "$shortmode_path"`
45497      new_path="$input_path"
45498    fi
45499  fi
45500
45501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45502  if test "x$test_cygdrive_prefix" = x; then
45503    # As a simple fix, exclude /usr/bin since it's not a real path.
45504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45506      # a path prefixed by /cygdrive for fixpath to work.
45507      new_path="$CYGWIN_ROOT_PATH$input_path"
45508    fi
45509  fi
45510
45511
45512  if test "x$path" != "x$new_path"; then
45513    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45515$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45516  fi
45517
45518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45519
45520  path="$POTENTIAL_FREETYPE_LIB_PATH"
45521  has_colon=`$ECHO $path | $GREP ^.:`
45522  new_path="$path"
45523  if test "x$has_colon" = x; then
45524    # Not in mixed or Windows style, start by that.
45525    new_path=`cmd //c echo $path`
45526  fi
45527
45528
45529  input_path="$new_path"
45530  # Check if we need to convert this using DOS-style short mode. If the path
45531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45532  # take no chances and rewrite it.
45533  # Note: m4 eats our [], so we need to use [ and ] instead.
45534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45535  if test "x$has_forbidden_chars" != x; then
45536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45538  fi
45539
45540
45541  windows_path="$new_path"
45542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45543    unix_path=`$CYGPATH -u "$windows_path"`
45544    new_path="$unix_path"
45545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45547    new_path="$unix_path"
45548  fi
45549
45550  if test "x$path" != "x$new_path"; then
45551    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45554  fi
45555
45556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45558
45559  else
45560    # We're on a posix platform. Hooray! :)
45561    path="$POTENTIAL_FREETYPE_LIB_PATH"
45562    has_space=`$ECHO "$path" | $GREP " "`
45563    if test "x$has_space" != x; then
45564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45566      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45567    fi
45568
45569    # Use eval to expand a potential ~
45570    eval path="$path"
45571    if test ! -f "$path" && test ! -d "$path"; then
45572      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45573    fi
45574
45575    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45576  fi
45577
45578
45579    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45581$as_echo_n "checking for freetype includes... " >&6; }
45582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45583$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45584    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45586$as_echo_n "checking for freetype libraries... " >&6; }
45587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45588$as_echo "$FREETYPE_LIB_PATH" >&6; }
45589  fi
45590
45591              if test "x$FOUND_FREETYPE" != xyes; then
45592
45593  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45594  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45595  METHOD="well-known location"
45596
45597  # First check if the files exists.
45598  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45599    # We found an arbitrary include file. That's a good sign.
45600    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45601$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45602    FOUND_FREETYPE=yes
45603
45604    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45605    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45606      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45607$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45608      FOUND_FREETYPE=no
45609    else
45610      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45611        # On Windows, we will need both .lib and .dll file.
45612        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45613          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45614$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45615          FOUND_FREETYPE=no
45616        fi
45617      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
45618        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45619        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45620      fi
45621    fi
45622  fi
45623
45624  if test "x$FOUND_FREETYPE" = xyes; then
45625
45626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45627
45628  # Input might be given as Windows format, start by converting to
45629  # unix format.
45630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45631  new_path=`$CYGPATH -u "$path"`
45632
45633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45636  # "foo.exe" is OK but "foo" is an error.
45637  #
45638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45639  # It is also a way to make sure we got the proper file name for the real test later on.
45640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45641  if test "x$test_shortpath" = x; then
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45645  fi
45646
45647  # Call helper function which possibly converts this using DOS-style short mode.
45648  # If so, the updated path is stored in $new_path.
45649
45650  input_path="$new_path"
45651  # Check if we need to convert this using DOS-style short mode. If the path
45652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45653  # take no chances and rewrite it.
45654  # Note: m4 eats our [], so we need to use [ and ] instead.
45655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45656  if test "x$has_forbidden_chars" != x; then
45657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45661      # Going to short mode and back again did indeed matter. Since short mode is
45662      # case insensitive, let's make it lowercase to improve readability.
45663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45664      # Now convert it back to Unix-stile (cygpath)
45665      input_path=`$CYGPATH -u "$shortmode_path"`
45666      new_path="$input_path"
45667    fi
45668  fi
45669
45670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45671  if test "x$test_cygdrive_prefix" = x; then
45672    # As a simple fix, exclude /usr/bin since it's not a real path.
45673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45675      # a path prefixed by /cygdrive for fixpath to work.
45676      new_path="$CYGWIN_ROOT_PATH$input_path"
45677    fi
45678  fi
45679
45680
45681  if test "x$path" != "x$new_path"; then
45682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45685  fi
45686
45687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45688
45689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45690  has_colon=`$ECHO $path | $GREP ^.:`
45691  new_path="$path"
45692  if test "x$has_colon" = x; then
45693    # Not in mixed or Windows style, start by that.
45694    new_path=`cmd //c echo $path`
45695  fi
45696
45697
45698  input_path="$new_path"
45699  # Check if we need to convert this using DOS-style short mode. If the path
45700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45701  # take no chances and rewrite it.
45702  # Note: m4 eats our [], so we need to use [ and ] instead.
45703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45704  if test "x$has_forbidden_chars" != x; then
45705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45707  fi
45708
45709
45710  windows_path="$new_path"
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712    unix_path=`$CYGPATH -u "$windows_path"`
45713    new_path="$unix_path"
45714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45716    new_path="$unix_path"
45717  fi
45718
45719  if test "x$path" != "x$new_path"; then
45720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45723  fi
45724
45725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45727
45728  else
45729    # We're on a posix platform. Hooray! :)
45730    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45731    has_space=`$ECHO "$path" | $GREP " "`
45732    if test "x$has_space" != x; then
45733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45735      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45736    fi
45737
45738    # Use eval to expand a potential ~
45739    eval path="$path"
45740    if test ! -f "$path" && test ! -d "$path"; then
45741      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45742    fi
45743
45744    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45745  fi
45746
45747
45748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45749
45750  # Input might be given as Windows format, start by converting to
45751  # unix format.
45752  path="$POTENTIAL_FREETYPE_LIB_PATH"
45753  new_path=`$CYGPATH -u "$path"`
45754
45755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45758  # "foo.exe" is OK but "foo" is an error.
45759  #
45760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45761  # It is also a way to make sure we got the proper file name for the real test later on.
45762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45763  if test "x$test_shortpath" = x; then
45764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45766    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45767  fi
45768
45769  # Call helper function which possibly converts this using DOS-style short mode.
45770  # If so, the updated path is stored in $new_path.
45771
45772  input_path="$new_path"
45773  # Check if we need to convert this using DOS-style short mode. If the path
45774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45775  # take no chances and rewrite it.
45776  # Note: m4 eats our [], so we need to use [ and ] instead.
45777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45778  if test "x$has_forbidden_chars" != x; then
45779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45783      # Going to short mode and back again did indeed matter. Since short mode is
45784      # case insensitive, let's make it lowercase to improve readability.
45785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45786      # Now convert it back to Unix-stile (cygpath)
45787      input_path=`$CYGPATH -u "$shortmode_path"`
45788      new_path="$input_path"
45789    fi
45790  fi
45791
45792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45793  if test "x$test_cygdrive_prefix" = x; then
45794    # As a simple fix, exclude /usr/bin since it's not a real path.
45795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45797      # a path prefixed by /cygdrive for fixpath to work.
45798      new_path="$CYGWIN_ROOT_PATH$input_path"
45799    fi
45800  fi
45801
45802
45803  if test "x$path" != "x$new_path"; then
45804    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45806$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45807  fi
45808
45809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45810
45811  path="$POTENTIAL_FREETYPE_LIB_PATH"
45812  has_colon=`$ECHO $path | $GREP ^.:`
45813  new_path="$path"
45814  if test "x$has_colon" = x; then
45815    # Not in mixed or Windows style, start by that.
45816    new_path=`cmd //c echo $path`
45817  fi
45818
45819
45820  input_path="$new_path"
45821  # Check if we need to convert this using DOS-style short mode. If the path
45822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45823  # take no chances and rewrite it.
45824  # Note: m4 eats our [], so we need to use [ and ] instead.
45825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45826  if test "x$has_forbidden_chars" != x; then
45827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45829  fi
45830
45831
45832  windows_path="$new_path"
45833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45834    unix_path=`$CYGPATH -u "$windows_path"`
45835    new_path="$unix_path"
45836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45838    new_path="$unix_path"
45839  fi
45840
45841  if test "x$path" != "x$new_path"; then
45842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45845  fi
45846
45847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45849
45850  else
45851    # We're on a posix platform. Hooray! :)
45852    path="$POTENTIAL_FREETYPE_LIB_PATH"
45853    has_space=`$ECHO "$path" | $GREP " "`
45854    if test "x$has_space" != x; then
45855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45858    fi
45859
45860    # Use eval to expand a potential ~
45861    eval path="$path"
45862    if test ! -f "$path" && test ! -d "$path"; then
45863      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45864    fi
45865
45866    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45867  fi
45868
45869
45870    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45872$as_echo_n "checking for freetype includes... " >&6; }
45873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45874$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45875    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45877$as_echo_n "checking for freetype libraries... " >&6; }
45878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45879$as_echo "$FREETYPE_LIB_PATH" >&6; }
45880  fi
45881
45882              fi
45883            fi
45884          fi
45885        fi
45886      fi # end check in well-known locations
45887
45888      if test "x$FOUND_FREETYPE" != xyes; then
45889
45890  # Print a helpful message on how to acquire the necessary build dependency.
45891  # freetype is the help tag: freetype, cups, pulse, alsa etc
45892  MISSING_DEPENDENCY=freetype
45893
45894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895    cygwin_help $MISSING_DEPENDENCY
45896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45897    msys_help $MISSING_DEPENDENCY
45898  else
45899    PKGHANDLER_COMMAND=
45900
45901    case $PKGHANDLER in
45902      apt-get)
45903        apt_help     $MISSING_DEPENDENCY ;;
45904      yum)
45905        yum_help     $MISSING_DEPENDENCY ;;
45906      port)
45907        port_help    $MISSING_DEPENDENCY ;;
45908      pkgutil)
45909        pkgutil_help $MISSING_DEPENDENCY ;;
45910      pkgadd)
45911        pkgadd_help  $MISSING_DEPENDENCY ;;
45912    esac
45913
45914    if test "x$PKGHANDLER_COMMAND" != x; then
45915      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45916    fi
45917  fi
45918
45919        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
45920      fi
45921    fi # end user specified settings
45922
45923    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
45924    if test "x$FREETYPE_CFLAGS" = x; then
45925
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927
45928  # Input might be given as Windows format, start by converting to
45929  # unix format.
45930  path="$FREETYPE_INCLUDE_PATH"
45931  new_path=`$CYGPATH -u "$path"`
45932
45933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45936  # "foo.exe" is OK but "foo" is an error.
45937  #
45938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45939  # It is also a way to make sure we got the proper file name for the real test later on.
45940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45941  if test "x$test_shortpath" = x; then
45942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45943$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45944    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
45945  fi
45946
45947  # Call helper function which possibly converts this using DOS-style short mode.
45948  # If so, the updated path is stored in $new_path.
45949
45950  input_path="$new_path"
45951  # Check if we need to convert this using DOS-style short mode. If the path
45952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45953  # take no chances and rewrite it.
45954  # Note: m4 eats our [], so we need to use [ and ] instead.
45955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45956  if test "x$has_forbidden_chars" != x; then
45957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45961      # Going to short mode and back again did indeed matter. Since short mode is
45962      # case insensitive, let's make it lowercase to improve readability.
45963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45964      # Now convert it back to Unix-stile (cygpath)
45965      input_path=`$CYGPATH -u "$shortmode_path"`
45966      new_path="$input_path"
45967    fi
45968  fi
45969
45970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45971  if test "x$test_cygdrive_prefix" = x; then
45972    # As a simple fix, exclude /usr/bin since it's not a real path.
45973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45975      # a path prefixed by /cygdrive for fixpath to work.
45976      new_path="$CYGWIN_ROOT_PATH$input_path"
45977    fi
45978  fi
45979
45980
45981  if test "x$path" != "x$new_path"; then
45982    FREETYPE_INCLUDE_PATH="$new_path"
45983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45984$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45985  fi
45986
45987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45988
45989  path="$FREETYPE_INCLUDE_PATH"
45990  has_colon=`$ECHO $path | $GREP ^.:`
45991  new_path="$path"
45992  if test "x$has_colon" = x; then
45993    # Not in mixed or Windows style, start by that.
45994    new_path=`cmd //c echo $path`
45995  fi
45996
45997
45998  input_path="$new_path"
45999  # Check if we need to convert this using DOS-style short mode. If the path
46000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46001  # take no chances and rewrite it.
46002  # Note: m4 eats our [], so we need to use [ and ] instead.
46003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46004  if test "x$has_forbidden_chars" != x; then
46005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46007  fi
46008
46009
46010  windows_path="$new_path"
46011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46012    unix_path=`$CYGPATH -u "$windows_path"`
46013    new_path="$unix_path"
46014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46016    new_path="$unix_path"
46017  fi
46018
46019  if test "x$path" != "x$new_path"; then
46020    FREETYPE_INCLUDE_PATH="$new_path"
46021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46022$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46023  fi
46024
46025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46027
46028  else
46029    # We're on a posix platform. Hooray! :)
46030    path="$FREETYPE_INCLUDE_PATH"
46031    has_space=`$ECHO "$path" | $GREP " "`
46032    if test "x$has_space" != x; then
46033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46034$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46035      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46036    fi
46037
46038    # Use eval to expand a potential ~
46039    eval path="$path"
46040    if test ! -f "$path" && test ! -d "$path"; then
46041      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46042    fi
46043
46044    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46045  fi
46046
46047      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46048        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46049      else
46050        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46051      fi
46052    fi
46053
46054    if test "x$FREETYPE_LIBS" = x; then
46055
46056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46057
46058  # Input might be given as Windows format, start by converting to
46059  # unix format.
46060  path="$FREETYPE_LIB_PATH"
46061  new_path=`$CYGPATH -u "$path"`
46062
46063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46066  # "foo.exe" is OK but "foo" is an error.
46067  #
46068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46069  # It is also a way to make sure we got the proper file name for the real test later on.
46070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46071  if test "x$test_shortpath" = x; then
46072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46073$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46074    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46075  fi
46076
46077  # Call helper function which possibly converts this using DOS-style short mode.
46078  # If so, the updated path is stored in $new_path.
46079
46080  input_path="$new_path"
46081  # Check if we need to convert this using DOS-style short mode. If the path
46082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46083  # take no chances and rewrite it.
46084  # Note: m4 eats our [], so we need to use [ and ] instead.
46085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46086  if test "x$has_forbidden_chars" != x; then
46087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46091      # Going to short mode and back again did indeed matter. Since short mode is
46092      # case insensitive, let's make it lowercase to improve readability.
46093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46094      # Now convert it back to Unix-stile (cygpath)
46095      input_path=`$CYGPATH -u "$shortmode_path"`
46096      new_path="$input_path"
46097    fi
46098  fi
46099
46100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46101  if test "x$test_cygdrive_prefix" = x; then
46102    # As a simple fix, exclude /usr/bin since it's not a real path.
46103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46105      # a path prefixed by /cygdrive for fixpath to work.
46106      new_path="$CYGWIN_ROOT_PATH$input_path"
46107    fi
46108  fi
46109
46110
46111  if test "x$path" != "x$new_path"; then
46112    FREETYPE_LIB_PATH="$new_path"
46113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46114$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46115  fi
46116
46117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46118
46119  path="$FREETYPE_LIB_PATH"
46120  has_colon=`$ECHO $path | $GREP ^.:`
46121  new_path="$path"
46122  if test "x$has_colon" = x; then
46123    # Not in mixed or Windows style, start by that.
46124    new_path=`cmd //c echo $path`
46125  fi
46126
46127
46128  input_path="$new_path"
46129  # Check if we need to convert this using DOS-style short mode. If the path
46130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46131  # take no chances and rewrite it.
46132  # Note: m4 eats our [], so we need to use [ and ] instead.
46133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46134  if test "x$has_forbidden_chars" != x; then
46135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46137  fi
46138
46139
46140  windows_path="$new_path"
46141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46142    unix_path=`$CYGPATH -u "$windows_path"`
46143    new_path="$unix_path"
46144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46146    new_path="$unix_path"
46147  fi
46148
46149  if test "x$path" != "x$new_path"; then
46150    FREETYPE_LIB_PATH="$new_path"
46151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46152$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46153  fi
46154
46155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46157
46158  else
46159    # We're on a posix platform. Hooray! :)
46160    path="$FREETYPE_LIB_PATH"
46161    has_space=`$ECHO "$path" | $GREP " "`
46162    if test "x$has_space" != x; then
46163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46164$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46165      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46166    fi
46167
46168    # Use eval to expand a potential ~
46169    eval path="$path"
46170    if test ! -f "$path" && test ! -d "$path"; then
46171      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46172    fi
46173
46174    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46175  fi
46176
46177      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46178        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46179      else
46180        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46181      fi
46182    fi
46183
46184    # Try to compile it
46185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46186$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46187    ac_ext=cpp
46188ac_cpp='$CXXCPP $CPPFLAGS'
46189ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46190ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46191ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46192
46193    PREV_CXXCFLAGS="$CXXFLAGS"
46194    PREV_LIBS="$LIBS"
46195    PREV_CXX="$CXX"
46196    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46197    LIBS="$LIBS $FREETYPE_LIBS"
46198    CXX="$FIXPATH $CXX"
46199    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46200/* end confdefs.h.  */
46201
46202          #include<ft2build.h>
46203          #include FT_FREETYPE_H
46204          int main () {
46205            FT_Init_FreeType(NULL);
46206            return 0;
46207          }
46208
46209_ACEOF
46210if ac_fn_cxx_try_link "$LINENO"; then :
46211
46212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46213$as_echo "yes" >&6; }
46214
46215else
46216
46217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46218$as_echo "no" >&6; }
46219          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46220$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46221          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46222$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46223
46224
46225  # Print a helpful message on how to acquire the necessary build dependency.
46226  # freetype is the help tag: freetype, cups, pulse, alsa etc
46227  MISSING_DEPENDENCY=freetype
46228
46229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46230    cygwin_help $MISSING_DEPENDENCY
46231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46232    msys_help $MISSING_DEPENDENCY
46233  else
46234    PKGHANDLER_COMMAND=
46235
46236    case $PKGHANDLER in
46237      apt-get)
46238        apt_help     $MISSING_DEPENDENCY ;;
46239      yum)
46240        yum_help     $MISSING_DEPENDENCY ;;
46241      port)
46242        port_help    $MISSING_DEPENDENCY ;;
46243      pkgutil)
46244        pkgutil_help $MISSING_DEPENDENCY ;;
46245      pkgadd)
46246        pkgadd_help  $MISSING_DEPENDENCY ;;
46247    esac
46248
46249    if test "x$PKGHANDLER_COMMAND" != x; then
46250      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46251    fi
46252  fi
46253
46254
46255          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46256
46257
46258fi
46259rm -f core conftest.err conftest.$ac_objext \
46260    conftest$ac_exeext conftest.$ac_ext
46261    CXXCFLAGS="$PREV_CXXFLAGS"
46262    LIBS="$PREV_LIBS"
46263    CXX="$PREV_CXX"
46264    ac_ext=cpp
46265ac_cpp='$CXXCPP $CPPFLAGS'
46266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46269
46270
46271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46272$as_echo_n "checking if we should bundle freetype... " >&6; }
46273    if test "x$BUNDLE_FREETYPE" = xyes; then
46274      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46275    fi
46276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46277$as_echo "$BUNDLE_FREETYPE" >&6; }
46278
46279  fi # end freetype needed
46280
46281
46282
46283
46284
46285
46286
46287  ###############################################################################
46288  #
46289  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46290  #
46291
46292# Check whether --with-alsa was given.
46293if test "${with_alsa+set}" = set; then :
46294  withval=$with_alsa;
46295fi
46296
46297
46298# Check whether --with-alsa-include was given.
46299if test "${with_alsa_include+set}" = set; then :
46300  withval=$with_alsa_include;
46301fi
46302
46303
46304# Check whether --with-alsa-lib was given.
46305if test "${with_alsa_lib+set}" = set; then :
46306  withval=$with_alsa_lib;
46307fi
46308
46309
46310  if test "x$ALSA_NOT_NEEDED" = xyes; then
46311    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46312      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46313$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46314    fi
46315    ALSA_CFLAGS=
46316    ALSA_LIBS=
46317  else
46318    ALSA_FOUND=no
46319
46320    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46321      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46322    fi
46323
46324    if test "x${with_alsa}" != x; then
46325      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46326      ALSA_CFLAGS="-I${with_alsa}/include"
46327      ALSA_FOUND=yes
46328    fi
46329    if test "x${with_alsa_include}" != x; then
46330      ALSA_CFLAGS="-I${with_alsa_include}"
46331      ALSA_FOUND=yes
46332    fi
46333    if test "x${with_alsa_lib}" != x; then
46334      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46335      ALSA_FOUND=yes
46336    fi
46337    if test "x$ALSA_FOUND" = xno; then
46338
46339
46340  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46341    # Source the builddeps file again, to make sure it uses the latest variables!
46342    . $builddepsfile
46343    # Look for a target and build machine specific resource!
46344    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46345    if test "x$resource" = x; then
46346      # Ok, lets instead look for a target specific resource
46347      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46348    fi
46349    if test "x$resource" = x; then
46350      # Ok, lets instead look for a build specific resource
46351      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46352    fi
46353    if test "x$resource" = x; then
46354      # Ok, lets instead look for a generic resource
46355      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46356      resource=${builddep_alsa}
46357    fi
46358    if test "x$resource" != x; then
46359      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46360$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46361      # If the resource in the builddeps.conf file is an existing directory,
46362      # for example /java/linux/cups
46363      if test -d ${resource}; then
46364        depdir=${resource}
46365      else
46366
46367  # alsa is for example mymodule
46368  # $resource is for example libs/general/libmymod_1_2_3.zip
46369  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46370  # $with_builddeps_dir is for example /localhome/builddeps
46371  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46372  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46373  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46374  filename=`basename $resource`
46375  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46376  filebase=${filename%%.*}
46377  extension=${filename#*.}
46378  installdir=$with_builddeps_dir/$filebase
46379  if test ! -f $installdir/$filename.unpacked; then
46380    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46381$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46382    if test ! -d $installdir; then
46383      mkdir -p $installdir
46384    fi
46385    if test ! -d $installdir; then
46386      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46387    fi
46388    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46389    touch $tmpfile
46390    if test ! -f $tmpfile; then
46391      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46392    fi
46393
46394  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46395  # $tmpfile is the local file name for the downloaded file.
46396  VALID_TOOL=no
46397  if test "x$BDEPS_FTP" = xwget; then
46398    VALID_TOOL=yes
46399    wget -O $tmpfile $with_builddeps_server/$resource
46400  fi
46401  if test "x$BDEPS_FTP" = xlftp; then
46402    VALID_TOOL=yes
46403    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46404  fi
46405  if test "x$BDEPS_FTP" = xftp; then
46406    VALID_TOOL=yes
46407    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46408    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46409    FTPUSERPWD=${FTPSERVER%%@*}
46410    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46411      FTPUSER=${userpwd%%:*}
46412      FTPPWD=${userpwd#*@}
46413      FTPSERVER=${FTPSERVER#*@}
46414    else
46415      FTPUSER=ftp
46416      FTPPWD=ftp
46417    fi
46418    # the "pass" command does not work on some
46419    # ftp clients (read ftp.exe) but if it works,
46420    # passive mode is better!
46421    ( \
46422        echo "user $FTPUSER $FTPPWD"        ; \
46423        echo "pass"                         ; \
46424        echo "bin"                          ; \
46425        echo "get $FTPPATH $tmpfile"              ; \
46426    ) | ftp -in $FTPSERVER
46427  fi
46428  if test "x$VALID_TOOL" != xyes; then
46429    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46430  fi
46431
46432    mv $tmpfile $installdir/$filename
46433    if test ! -s $installdir/$filename; then
46434      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46435    fi
46436    case "$extension" in
46437      zip)  echo "Unzipping $installdir/$filename..."
46438        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46439        ;;
46440      tar.gz) echo "Untaring $installdir/$filename..."
46441        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46442        ;;
46443      tgz) echo "Untaring $installdir/$filename..."
46444        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46445        ;;
46446      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46447        ;;
46448    esac
46449  fi
46450  if test -f $installdir/$filename.unpacked; then
46451    depdir=$installdir
46452  fi
46453
46454      fi
46455      # Source the builddeps file again, because in the previous command, the depdir
46456      # was updated to point at the current build dependency install directory.
46457      . $builddepsfile
46458      # Now extract variables from the builddeps.conf files.
46459      theroot=${builddep_alsa_ROOT}
46460      thecflags=${builddep_alsa_CFLAGS}
46461      thelibs=${builddep_alsa_LIBS}
46462      if test "x$depdir" = x; then
46463        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46464      fi
46465      ALSA=$depdir
46466      if test "x$theroot" != x; then
46467        ALSA="$theroot"
46468      fi
46469      if test "x$thecflags" != x; then
46470        ALSA_CFLAGS="$thecflags"
46471      fi
46472      if test "x$thelibs" != x; then
46473        ALSA_LIBS="$thelibs"
46474      fi
46475      ALSA_FOUND=yes
46476      else ALSA_FOUND=no
46477
46478    fi
46479    else ALSA_FOUND=no
46480
46481  fi
46482
46483    fi
46484    if test "x$ALSA_FOUND" = xno; then
46485
46486pkg_failed=no
46487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46488$as_echo_n "checking for ALSA... " >&6; }
46489
46490if test -n "$ALSA_CFLAGS"; then
46491    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46492 elif test -n "$PKG_CONFIG"; then
46493    if test -n "$PKG_CONFIG" && \
46494    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46495  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46496  ac_status=$?
46497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46498  test $ac_status = 0; }; then
46499  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46500else
46501  pkg_failed=yes
46502fi
46503 else
46504    pkg_failed=untried
46505fi
46506if test -n "$ALSA_LIBS"; then
46507    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46508 elif test -n "$PKG_CONFIG"; then
46509    if test -n "$PKG_CONFIG" && \
46510    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46511  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46512  ac_status=$?
46513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46514  test $ac_status = 0; }; then
46515  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46516else
46517  pkg_failed=yes
46518fi
46519 else
46520    pkg_failed=untried
46521fi
46522
46523
46524
46525if test $pkg_failed = yes; then
46526
46527if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46528        _pkg_short_errors_supported=yes
46529else
46530        _pkg_short_errors_supported=no
46531fi
46532        if test $_pkg_short_errors_supported = yes; then
46533	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46534        else
46535	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46536        fi
46537	# Put the nasty error message in config.log where it belongs
46538	echo "$ALSA_PKG_ERRORS" >&5
46539
46540	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46541$as_echo "no" >&6; }
46542                ALSA_FOUND=no
46543elif test $pkg_failed = untried; then
46544	ALSA_FOUND=no
46545else
46546	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46547	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46549$as_echo "yes" >&6; }
46550	ALSA_FOUND=yes
46551fi
46552    fi
46553    if test "x$ALSA_FOUND" = xno; then
46554      for ac_header in alsa/asoundlib.h
46555do :
46556  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46557if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46558  cat >>confdefs.h <<_ACEOF
46559#define HAVE_ALSA_ASOUNDLIB_H 1
46560_ACEOF
46561
46562            ALSA_FOUND=yes
46563            ALSA_CFLAGS=-Iignoreme
46564            ALSA_LIBS=-lasound
46565            DEFAULT_ALSA=yes
46566
46567else
46568  ALSA_FOUND=no
46569fi
46570
46571done
46572
46573    fi
46574    if test "x$ALSA_FOUND" = xno; then
46575
46576  # Print a helpful message on how to acquire the necessary build dependency.
46577  # alsa is the help tag: freetype, cups, pulse, alsa etc
46578  MISSING_DEPENDENCY=alsa
46579
46580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46581    cygwin_help $MISSING_DEPENDENCY
46582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46583    msys_help $MISSING_DEPENDENCY
46584  else
46585    PKGHANDLER_COMMAND=
46586
46587    case $PKGHANDLER in
46588      apt-get)
46589        apt_help     $MISSING_DEPENDENCY ;;
46590      yum)
46591        yum_help     $MISSING_DEPENDENCY ;;
46592      port)
46593        port_help    $MISSING_DEPENDENCY ;;
46594      pkgutil)
46595        pkgutil_help $MISSING_DEPENDENCY ;;
46596      pkgadd)
46597        pkgadd_help  $MISSING_DEPENDENCY ;;
46598    esac
46599
46600    if test "x$PKGHANDLER_COMMAND" != x; then
46601      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46602    fi
46603  fi
46604
46605      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46606    fi
46607  fi
46608
46609
46610
46611
46612
46613
46614  ###############################################################################
46615  #
46616  # Check for the jpeg library
46617  #
46618
46619  USE_EXTERNAL_LIBJPEG=true
46620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46621$as_echo_n "checking for main in -ljpeg... " >&6; }
46622if ${ac_cv_lib_jpeg_main+:} false; then :
46623  $as_echo_n "(cached) " >&6
46624else
46625  ac_check_lib_save_LIBS=$LIBS
46626LIBS="-ljpeg  $LIBS"
46627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46628/* end confdefs.h.  */
46629
46630
46631int
46632main ()
46633{
46634return main ();
46635  ;
46636  return 0;
46637}
46638_ACEOF
46639if ac_fn_cxx_try_link "$LINENO"; then :
46640  ac_cv_lib_jpeg_main=yes
46641else
46642  ac_cv_lib_jpeg_main=no
46643fi
46644rm -f core conftest.err conftest.$ac_objext \
46645    conftest$ac_exeext conftest.$ac_ext
46646LIBS=$ac_check_lib_save_LIBS
46647fi
46648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46649$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46650if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46651  cat >>confdefs.h <<_ACEOF
46652#define HAVE_LIBJPEG 1
46653_ACEOF
46654
46655  LIBS="-ljpeg $LIBS"
46656
46657else
46658   USE_EXTERNAL_LIBJPEG=false
46659      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46660$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46661
46662fi
46663
46664
46665
46666  ###############################################################################
46667  #
46668  # Check for the gif library
46669  #
46670
46671
46672# Check whether --with-giflib was given.
46673if test "${with_giflib+set}" = set; then :
46674  withval=$with_giflib;
46675fi
46676
46677
46678
46679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46680$as_echo_n "checking for which giflib to use... " >&6; }
46681
46682  # default is bundled
46683  DEFAULT_GIFLIB=bundled
46684
46685  #
46686  # if user didn't specify, use DEFAULT_GIFLIB
46687  #
46688  if test "x${with_giflib}" = "x"; then
46689    with_giflib=${DEFAULT_GIFLIB}
46690  fi
46691
46692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46693$as_echo "${with_giflib}" >&6; }
46694
46695  if test "x${with_giflib}" = "xbundled"; then
46696    USE_EXTERNAL_LIBGIF=false
46697  elif test "x${with_giflib}" = "xsystem"; then
46698    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46699if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46700
46701else
46702   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46703fi
46704
46705
46706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46707$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46708if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46709  $as_echo_n "(cached) " >&6
46710else
46711  ac_check_lib_save_LIBS=$LIBS
46712LIBS="-lgif  $LIBS"
46713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46714/* end confdefs.h.  */
46715
46716/* Override any GCC internal prototype to avoid an error.
46717   Use char because int might match the return type of a GCC
46718   builtin and then its argument prototype would still apply.  */
46719#ifdef __cplusplus
46720extern "C"
46721#endif
46722char DGifGetCode ();
46723int
46724main ()
46725{
46726return DGifGetCode ();
46727  ;
46728  return 0;
46729}
46730_ACEOF
46731if ac_fn_cxx_try_link "$LINENO"; then :
46732  ac_cv_lib_gif_DGifGetCode=yes
46733else
46734  ac_cv_lib_gif_DGifGetCode=no
46735fi
46736rm -f core conftest.err conftest.$ac_objext \
46737    conftest$ac_exeext conftest.$ac_ext
46738LIBS=$ac_check_lib_save_LIBS
46739fi
46740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46741$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46742if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46743  cat >>confdefs.h <<_ACEOF
46744#define HAVE_LIBGIF 1
46745_ACEOF
46746
46747  LIBS="-lgif $LIBS"
46748
46749else
46750   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46751fi
46752
46753
46754    USE_EXTERNAL_LIBGIF=true
46755  else
46756    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46757  fi
46758
46759
46760  ###############################################################################
46761  #
46762  # Check for the zlib library
46763  #
46764
46765
46766# Check whether --with-zlib was given.
46767if test "${with_zlib+set}" = set; then :
46768  withval=$with_zlib;
46769fi
46770
46771
46772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46773$as_echo_n "checking for compress in -lz... " >&6; }
46774if ${ac_cv_lib_z_compress+:} false; then :
46775  $as_echo_n "(cached) " >&6
46776else
46777  ac_check_lib_save_LIBS=$LIBS
46778LIBS="-lz  $LIBS"
46779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46780/* end confdefs.h.  */
46781
46782/* Override any GCC internal prototype to avoid an error.
46783   Use char because int might match the return type of a GCC
46784   builtin and then its argument prototype would still apply.  */
46785#ifdef __cplusplus
46786extern "C"
46787#endif
46788char compress ();
46789int
46790main ()
46791{
46792return compress ();
46793  ;
46794  return 0;
46795}
46796_ACEOF
46797if ac_fn_cxx_try_link "$LINENO"; then :
46798  ac_cv_lib_z_compress=yes
46799else
46800  ac_cv_lib_z_compress=no
46801fi
46802rm -f core conftest.err conftest.$ac_objext \
46803    conftest$ac_exeext conftest.$ac_ext
46804LIBS=$ac_check_lib_save_LIBS
46805fi
46806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
46807$as_echo "$ac_cv_lib_z_compress" >&6; }
46808if test "x$ac_cv_lib_z_compress" = xyes; then :
46809   ZLIB_FOUND=yes
46810else
46811   ZLIB_FOUND=no
46812fi
46813
46814
46815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
46816$as_echo_n "checking for which zlib to use... " >&6; }
46817
46818  DEFAULT_ZLIB=bundled
46819  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46820    #
46821    # On macosx default is system...on others default is
46822    #
46823    DEFAULT_ZLIB=system
46824  fi
46825
46826  if test "x${ZLIB_FOUND}" != "xyes"; then
46827    #
46828    # If we don't find any system...set default to bundled
46829    #
46830    DEFAULT_ZLIB=bundled
46831  fi
46832
46833  #
46834  # If user didn't specify, use DEFAULT_ZLIB
46835  #
46836  if test "x${with_zlib}" = "x"; then
46837    with_zlib=${DEFAULT_ZLIB}
46838  fi
46839
46840  if test "x${with_zlib}" = "xbundled"; then
46841    USE_EXTERNAL_LIBZ=false
46842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46843$as_echo "bundled" >&6; }
46844  elif test "x${with_zlib}" = "xsystem"; then
46845    if test "x${ZLIB_FOUND}" = "xyes"; then
46846      USE_EXTERNAL_LIBZ=true
46847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46848$as_echo "system" >&6; }
46849    else
46850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46851$as_echo "system not found" >&6; }
46852      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
46853    fi
46854  else
46855    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
46856  fi
46857
46858
46859
46860  ###############################################################################
46861  LIBZIP_CAN_USE_MMAP=true
46862
46863
46864
46865  ###############################################################################
46866  #
46867  # Check if altzone exists in time.h
46868  #
46869
46870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46871/* end confdefs.h.  */
46872#include <time.h>
46873int
46874main ()
46875{
46876return (int)altzone;
46877  ;
46878  return 0;
46879}
46880_ACEOF
46881if ac_fn_cxx_try_link "$LINENO"; then :
46882  has_altzone=yes
46883else
46884  has_altzone=no
46885fi
46886rm -f core conftest.err conftest.$ac_objext \
46887    conftest$ac_exeext conftest.$ac_ext
46888  if test "x$has_altzone" = xyes; then
46889
46890$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
46891
46892  fi
46893
46894  ###############################################################################
46895  #
46896  # Check the maths library
46897  #
46898
46899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
46900$as_echo_n "checking for cos in -lm... " >&6; }
46901if ${ac_cv_lib_m_cos+:} false; then :
46902  $as_echo_n "(cached) " >&6
46903else
46904  ac_check_lib_save_LIBS=$LIBS
46905LIBS="-lm  $LIBS"
46906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46907/* end confdefs.h.  */
46908
46909/* Override any GCC internal prototype to avoid an error.
46910   Use char because int might match the return type of a GCC
46911   builtin and then its argument prototype would still apply.  */
46912#ifdef __cplusplus
46913extern "C"
46914#endif
46915char cos ();
46916int
46917main ()
46918{
46919return cos ();
46920  ;
46921  return 0;
46922}
46923_ACEOF
46924if ac_fn_cxx_try_link "$LINENO"; then :
46925  ac_cv_lib_m_cos=yes
46926else
46927  ac_cv_lib_m_cos=no
46928fi
46929rm -f core conftest.err conftest.$ac_objext \
46930    conftest$ac_exeext conftest.$ac_ext
46931LIBS=$ac_check_lib_save_LIBS
46932fi
46933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
46934$as_echo "$ac_cv_lib_m_cos" >&6; }
46935if test "x$ac_cv_lib_m_cos" = xyes; then :
46936  cat >>confdefs.h <<_ACEOF
46937#define HAVE_LIBM 1
46938_ACEOF
46939
46940  LIBS="-lm $LIBS"
46941
46942else
46943
46944        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
46945$as_echo "$as_me: Maths library was not found" >&6;}
46946
46947
46948fi
46949
46950
46951
46952  ###############################################################################
46953  #
46954  # Check for libdl.so
46955
46956  save_LIBS="$LIBS"
46957  LIBS=""
46958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
46959$as_echo_n "checking for dlopen in -ldl... " >&6; }
46960if ${ac_cv_lib_dl_dlopen+:} false; then :
46961  $as_echo_n "(cached) " >&6
46962else
46963  ac_check_lib_save_LIBS=$LIBS
46964LIBS="-ldl  $LIBS"
46965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46966/* end confdefs.h.  */
46967
46968/* Override any GCC internal prototype to avoid an error.
46969   Use char because int might match the return type of a GCC
46970   builtin and then its argument prototype would still apply.  */
46971#ifdef __cplusplus
46972extern "C"
46973#endif
46974char dlopen ();
46975int
46976main ()
46977{
46978return dlopen ();
46979  ;
46980  return 0;
46981}
46982_ACEOF
46983if ac_fn_cxx_try_link "$LINENO"; then :
46984  ac_cv_lib_dl_dlopen=yes
46985else
46986  ac_cv_lib_dl_dlopen=no
46987fi
46988rm -f core conftest.err conftest.$ac_objext \
46989    conftest$ac_exeext conftest.$ac_ext
46990LIBS=$ac_check_lib_save_LIBS
46991fi
46992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
46993$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
46994if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
46995  cat >>confdefs.h <<_ACEOF
46996#define HAVE_LIBDL 1
46997_ACEOF
46998
46999  LIBS="-ldl $LIBS"
47000
47001fi
47002
47003  LIBDL="$LIBS"
47004
47005  LIBS="$save_LIBS"
47006
47007
47008  ###############################################################################
47009  #
47010  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47011  # dynamic build is configured on command line.
47012  #
47013
47014# Check whether --with-stdc++lib was given.
47015if test "${with_stdc__lib+set}" = set; then :
47016  withval=$with_stdc__lib;
47017        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47018                && test "x$with_stdc__lib" != xdefault; then
47019          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47020        fi
47021
47022else
47023  with_stdc__lib=default
47024
47025fi
47026
47027
47028  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47029    # Test if -lstdc++ works.
47030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47031$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47032    ac_ext=cpp
47033ac_cpp='$CXXCPP $CPPFLAGS'
47034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47037
47038    OLD_CXXFLAGS="$CXXFLAGS"
47039    CXXFLAGS="$CXXFLAGS -lstdc++"
47040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47041/* end confdefs.h.  */
47042
47043int
47044main ()
47045{
47046return 0;
47047  ;
47048  return 0;
47049}
47050_ACEOF
47051if ac_fn_cxx_try_link "$LINENO"; then :
47052  has_dynamic_libstdcxx=yes
47053else
47054  has_dynamic_libstdcxx=no
47055fi
47056rm -f core conftest.err conftest.$ac_objext \
47057    conftest$ac_exeext conftest.$ac_ext
47058    CXXFLAGS="$OLD_CXXFLAGS"
47059    ac_ext=cpp
47060ac_cpp='$CXXCPP $CPPFLAGS'
47061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47064
47065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47066$as_echo "$has_dynamic_libstdcxx" >&6; }
47067
47068    # Test if stdc++ can be linked statically.
47069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47070$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47071    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47072    ac_ext=cpp
47073ac_cpp='$CXXCPP $CPPFLAGS'
47074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47077
47078    OLD_LIBS="$LIBS"
47079    OLD_CXX="$CXX"
47080    LIBS="$STATIC_STDCXX_FLAGS"
47081    CXX="$CC"
47082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47083/* end confdefs.h.  */
47084
47085int
47086main ()
47087{
47088return 0;
47089  ;
47090  return 0;
47091}
47092_ACEOF
47093if ac_fn_cxx_try_link "$LINENO"; then :
47094  has_static_libstdcxx=yes
47095else
47096  has_static_libstdcxx=no
47097fi
47098rm -f core conftest.err conftest.$ac_objext \
47099    conftest$ac_exeext conftest.$ac_ext
47100    LIBS="$OLD_LIBS"
47101    CXX="$OLD_CXX"
47102    ac_ext=cpp
47103ac_cpp='$CXXCPP $CPPFLAGS'
47104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47107
47108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47109$as_echo "$has_static_libstdcxx" >&6; }
47110
47111    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47112      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47113    fi
47114
47115    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47116      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47117    fi
47118
47119    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47120      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47121    fi
47122
47123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47124$as_echo_n "checking how to link with libstdc++... " >&6; }
47125    # If dynamic was requested, it's available since it would fail above otherwise.
47126    # If dynamic wasn't requested, go with static unless it isn't available.
47127    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47128      LIBCXX="$LIBCXX -lstdc++"
47129      LDCXX="$CXX"
47130      STATIC_CXX_SETTING="STATIC_CXX=false"
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47132$as_echo "dynamic" >&6; }
47133    else
47134      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47135      LDCXX="$CC"
47136      STATIC_CXX_SETTING="STATIC_CXX=true"
47137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47138$as_echo "static" >&6; }
47139    fi
47140  fi
47141
47142
47143  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47144    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47145
47146pkg_failed=no
47147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47148$as_echo_n "checking for LIBFFI... " >&6; }
47149
47150if test -n "$LIBFFI_CFLAGS"; then
47151    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47152 elif test -n "$PKG_CONFIG"; then
47153    if test -n "$PKG_CONFIG" && \
47154    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47155  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47156  ac_status=$?
47157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47158  test $ac_status = 0; }; then
47159  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47160else
47161  pkg_failed=yes
47162fi
47163 else
47164    pkg_failed=untried
47165fi
47166if test -n "$LIBFFI_LIBS"; then
47167    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47168 elif test -n "$PKG_CONFIG"; then
47169    if test -n "$PKG_CONFIG" && \
47170    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47171  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47172  ac_status=$?
47173  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47174  test $ac_status = 0; }; then
47175  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47176else
47177  pkg_failed=yes
47178fi
47179 else
47180    pkg_failed=untried
47181fi
47182
47183
47184
47185if test $pkg_failed = yes; then
47186
47187if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47188        _pkg_short_errors_supported=yes
47189else
47190        _pkg_short_errors_supported=no
47191fi
47192        if test $_pkg_short_errors_supported = yes; then
47193	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47194        else
47195	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47196        fi
47197	# Put the nasty error message in config.log where it belongs
47198	echo "$LIBFFI_PKG_ERRORS" >&5
47199
47200	as_fn_error $? "Package requirements (libffi) were not met:
47201
47202$LIBFFI_PKG_ERRORS
47203
47204Consider adjusting the PKG_CONFIG_PATH environment variable if you
47205installed software in a non-standard prefix.
47206
47207Alternatively, you may set the environment variables LIBFFI_CFLAGS
47208and LIBFFI_LIBS to avoid the need to call pkg-config.
47209See the pkg-config man page for more details.
47210" "$LINENO" 5
47211elif test $pkg_failed = untried; then
47212	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47214as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47215is in your PATH or set the PKG_CONFIG environment variable to the full
47216path to pkg-config.
47217
47218Alternatively, you may set the environment variables LIBFFI_CFLAGS
47219and LIBFFI_LIBS to avoid the need to call pkg-config.
47220See the pkg-config man page for more details.
47221
47222To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47223See \`config.log' for more details" "$LINENO" 5; }
47224else
47225	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47226	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47228$as_echo "yes" >&6; }
47229	:
47230fi
47231
47232  fi
47233
47234  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47235    # Extract the first word of "llvm-config", so it can be a program name with args.
47236set dummy llvm-config; ac_word=$2
47237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47238$as_echo_n "checking for $ac_word... " >&6; }
47239if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47240  $as_echo_n "(cached) " >&6
47241else
47242  if test -n "$LLVM_CONFIG"; then
47243  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47244else
47245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47246for as_dir in $PATH
47247do
47248  IFS=$as_save_IFS
47249  test -z "$as_dir" && as_dir=.
47250    for ac_exec_ext in '' $ac_executable_extensions; do
47251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47252    ac_cv_prog_LLVM_CONFIG="llvm-config"
47253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47254    break 2
47255  fi
47256done
47257  done
47258IFS=$as_save_IFS
47259
47260fi
47261fi
47262LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47263if test -n "$LLVM_CONFIG"; then
47264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47265$as_echo "$LLVM_CONFIG" >&6; }
47266else
47267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47268$as_echo "no" >&6; }
47269fi
47270
47271
47272
47273    if test "x$LLVM_CONFIG" != xllvm-config; then
47274      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47275    fi
47276
47277    llvm_components="jit mcjit engine nativecodegen native"
47278    unset LLVM_CFLAGS
47279    for flag in $("$LLVM_CONFIG" --cxxflags); do
47280      if echo "${flag}" | grep -q '^-[ID]'; then
47281        if test "${flag}" != "-D_DEBUG" ; then
47282          if test "${LLVM_CFLAGS}" != "" ; then
47283            LLVM_CFLAGS="${LLVM_CFLAGS} "
47284          fi
47285          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47286        fi
47287      fi
47288    done
47289    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47290    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47291
47292    unset LLVM_LDFLAGS
47293    for flag in $("${LLVM_CONFIG}" --ldflags); do
47294      if echo "${flag}" | grep -q '^-L'; then
47295        if test "${LLVM_LDFLAGS}" != ""; then
47296          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47297        fi
47298        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47299      fi
47300    done
47301
47302    unset LLVM_LIBS
47303    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47304      if echo "${flag}" | grep -q '^-l'; then
47305        if test "${LLVM_LIBS}" != ""; then
47306          LLVM_LIBS="${LLVM_LIBS} "
47307        fi
47308        LLVM_LIBS="${LLVM_LIBS}${flag}"
47309      fi
47310    done
47311
47312
47313
47314
47315  fi
47316
47317  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47318  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47319    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47320  fi
47321
47322  # TODO better (platform agnostic) test
47323  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47324    LIBCXX="-lstdc++"
47325  fi
47326
47327
47328
47329
47330  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47331
47332
47333# Check whether --with-msvcr-dll was given.
47334if test "${with_msvcr_dll+set}" = set; then :
47335  withval=$with_msvcr_dll;
47336fi
47337
47338
47339  if test "x$with_msvcr_dll" != x; then
47340    # If given explicitely by user, do not probe. If not present, fail directly.
47341
47342  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47343  METHOD="--with-msvcr-dll"
47344  if test -e "$POSSIBLE_MSVCR_DLL"; then
47345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47346$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47347
47348    # Need to check if the found msvcr is correct architecture
47349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47350$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47351    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47352    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47353      CORRECT_MSVCR_ARCH=386
47354    else
47355      CORRECT_MSVCR_ARCH=x86-64
47356    fi
47357    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47359$as_echo "ok" >&6; }
47360      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47362$as_echo_n "checking for msvcr100.dll... " >&6; }
47363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47364$as_echo "$MSVCR_DLL" >&6; }
47365    else
47366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47367$as_echo "incorrect, ignoring" >&6; }
47368      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47369$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47370    fi
47371  fi
47372
47373    if test "x$MSVCR_DLL" = x; then
47374      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47375    fi
47376  fi
47377
47378  if test "x$MSVCR_DLL" = x; then
47379    # Probe: Using well-known location from Visual Studio 10.0
47380    if test "x$VCINSTALLDIR" != x; then
47381      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47382
47383  windows_path="$CYGWIN_VC_INSTALL_DIR"
47384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47385    unix_path=`$CYGPATH -u "$windows_path"`
47386    CYGWIN_VC_INSTALL_DIR="$unix_path"
47387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47389    CYGWIN_VC_INSTALL_DIR="$unix_path"
47390  fi
47391
47392      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47393        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47394      else
47395        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47396      fi
47397
47398  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47399  METHOD="well-known location in VCINSTALLDIR"
47400  if test -e "$POSSIBLE_MSVCR_DLL"; then
47401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47402$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47403
47404    # Need to check if the found msvcr is correct architecture
47405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47406$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47407    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47408    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47409      CORRECT_MSVCR_ARCH=386
47410    else
47411      CORRECT_MSVCR_ARCH=x86-64
47412    fi
47413    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47415$as_echo "ok" >&6; }
47416      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47418$as_echo_n "checking for msvcr100.dll... " >&6; }
47419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47420$as_echo "$MSVCR_DLL" >&6; }
47421    else
47422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47423$as_echo "incorrect, ignoring" >&6; }
47424      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47425$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47426    fi
47427  fi
47428
47429    fi
47430  fi
47431
47432  if test "x$MSVCR_DLL" = x; then
47433    # Probe: Check in the Boot JDK directory.
47434    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47435
47436  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47437  METHOD="well-known location in Boot JDK"
47438  if test -e "$POSSIBLE_MSVCR_DLL"; then
47439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47440$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47441
47442    # Need to check if the found msvcr is correct architecture
47443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47444$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47445    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47446    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47447      CORRECT_MSVCR_ARCH=386
47448    else
47449      CORRECT_MSVCR_ARCH=x86-64
47450    fi
47451    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47453$as_echo "ok" >&6; }
47454      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47456$as_echo_n "checking for msvcr100.dll... " >&6; }
47457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47458$as_echo "$MSVCR_DLL" >&6; }
47459    else
47460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47461$as_echo "incorrect, ignoring" >&6; }
47462      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47463$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47464    fi
47465  fi
47466
47467  fi
47468
47469  if test "x$MSVCR_DLL" = x; then
47470    # Probe: Look in the Windows system32 directory
47471    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47472
47473  windows_path="$CYGWIN_SYSTEMROOT"
47474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47475    unix_path=`$CYGPATH -u "$windows_path"`
47476    CYGWIN_SYSTEMROOT="$unix_path"
47477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47479    CYGWIN_SYSTEMROOT="$unix_path"
47480  fi
47481
47482    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47483
47484  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47485  METHOD="well-known location in SYSTEMROOT"
47486  if test -e "$POSSIBLE_MSVCR_DLL"; then
47487    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47488$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47489
47490    # Need to check if the found msvcr is correct architecture
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47492$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47493    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47494    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47495      CORRECT_MSVCR_ARCH=386
47496    else
47497      CORRECT_MSVCR_ARCH=x86-64
47498    fi
47499    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47501$as_echo "ok" >&6; }
47502      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47504$as_echo_n "checking for msvcr100.dll... " >&6; }
47505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47506$as_echo "$MSVCR_DLL" >&6; }
47507    else
47508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47509$as_echo "incorrect, ignoring" >&6; }
47510      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47511$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47512    fi
47513  fi
47514
47515  fi
47516
47517  if test "x$MSVCR_DLL" = x; then
47518    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47519    if test "x$VS100COMNTOOLS" != x; then
47520      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47521
47522  windows_path="$CYGWIN_VS_TOOLS_DIR"
47523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47524    unix_path=`$CYGPATH -u "$windows_path"`
47525    CYGWIN_VS_TOOLS_DIR="$unix_path"
47526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47528    CYGWIN_VS_TOOLS_DIR="$unix_path"
47529  fi
47530
47531      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47532        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47533      else
47534        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47535      fi
47536
47537  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47538  METHOD="search of VS100COMNTOOLS"
47539  if test -e "$POSSIBLE_MSVCR_DLL"; then
47540    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47541$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47542
47543    # Need to check if the found msvcr is correct architecture
47544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47545$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47546    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47547    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47548      CORRECT_MSVCR_ARCH=386
47549    else
47550      CORRECT_MSVCR_ARCH=x86-64
47551    fi
47552    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47554$as_echo "ok" >&6; }
47555      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47557$as_echo_n "checking for msvcr100.dll... " >&6; }
47558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47559$as_echo "$MSVCR_DLL" >&6; }
47560    else
47561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47562$as_echo "incorrect, ignoring" >&6; }
47563      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47564$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47565    fi
47566  fi
47567
47568    fi
47569  fi
47570
47571  if test "x$MSVCR_DLL" = x; then
47572    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47573    # (This was the original behaviour; kept since it might turn up something)
47574    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47575      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47576        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47577      else
47578        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47579        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47580          # We're grasping at straws now...
47581          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47582        fi
47583      fi
47584
47585
47586  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47587  METHOD="search of VCINSTALLDIR"
47588  if test -e "$POSSIBLE_MSVCR_DLL"; then
47589    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47590$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47591
47592    # Need to check if the found msvcr is correct architecture
47593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47594$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47595    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47596    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47597      CORRECT_MSVCR_ARCH=386
47598    else
47599      CORRECT_MSVCR_ARCH=x86-64
47600    fi
47601    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47603$as_echo "ok" >&6; }
47604      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47606$as_echo_n "checking for msvcr100.dll... " >&6; }
47607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47608$as_echo "$MSVCR_DLL" >&6; }
47609    else
47610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47611$as_echo "incorrect, ignoring" >&6; }
47612      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47613$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47614    fi
47615  fi
47616
47617    fi
47618  fi
47619
47620  if test "x$MSVCR_DLL" = x; then
47621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47622$as_echo_n "checking for msvcr100.dll... " >&6; }
47623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47624$as_echo "no" >&6; }
47625    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47626  fi
47627
47628
47629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47630
47631  # Input might be given as Windows format, start by converting to
47632  # unix format.
47633  path="$MSVCR_DLL"
47634  new_path=`$CYGPATH -u "$path"`
47635
47636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47639  # "foo.exe" is OK but "foo" is an error.
47640  #
47641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47642  # It is also a way to make sure we got the proper file name for the real test later on.
47643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47644  if test "x$test_shortpath" = x; then
47645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47646$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47647    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47648  fi
47649
47650  # Call helper function which possibly converts this using DOS-style short mode.
47651  # If so, the updated path is stored in $new_path.
47652
47653  input_path="$new_path"
47654  # Check if we need to convert this using DOS-style short mode. If the path
47655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47656  # take no chances and rewrite it.
47657  # Note: m4 eats our [], so we need to use [ and ] instead.
47658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47659  if test "x$has_forbidden_chars" != x; then
47660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47664      # Going to short mode and back again did indeed matter. Since short mode is
47665      # case insensitive, let's make it lowercase to improve readability.
47666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47667      # Now convert it back to Unix-stile (cygpath)
47668      input_path=`$CYGPATH -u "$shortmode_path"`
47669      new_path="$input_path"
47670    fi
47671  fi
47672
47673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47674  if test "x$test_cygdrive_prefix" = x; then
47675    # As a simple fix, exclude /usr/bin since it's not a real path.
47676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47678      # a path prefixed by /cygdrive for fixpath to work.
47679      new_path="$CYGWIN_ROOT_PATH$input_path"
47680    fi
47681  fi
47682
47683
47684  if test "x$path" != "x$new_path"; then
47685    MSVCR_DLL="$new_path"
47686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47687$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47688  fi
47689
47690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47691
47692  path="$MSVCR_DLL"
47693  has_colon=`$ECHO $path | $GREP ^.:`
47694  new_path="$path"
47695  if test "x$has_colon" = x; then
47696    # Not in mixed or Windows style, start by that.
47697    new_path=`cmd //c echo $path`
47698  fi
47699
47700
47701  input_path="$new_path"
47702  # Check if we need to convert this using DOS-style short mode. If the path
47703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47704  # take no chances and rewrite it.
47705  # Note: m4 eats our [], so we need to use [ and ] instead.
47706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47707  if test "x$has_forbidden_chars" != x; then
47708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47710  fi
47711
47712
47713  windows_path="$new_path"
47714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47715    unix_path=`$CYGPATH -u "$windows_path"`
47716    new_path="$unix_path"
47717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47719    new_path="$unix_path"
47720  fi
47721
47722  if test "x$path" != "x$new_path"; then
47723    MSVCR_DLL="$new_path"
47724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47725$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47726  fi
47727
47728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47730
47731  else
47732    # We're on a posix platform. Hooray! :)
47733    path="$MSVCR_DLL"
47734    has_space=`$ECHO "$path" | $GREP " "`
47735    if test "x$has_space" != x; then
47736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47737$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47739    fi
47740
47741    # Use eval to expand a potential ~
47742    eval path="$path"
47743    if test ! -f "$path" && test ! -d "$path"; then
47744      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47745    fi
47746
47747    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47748  fi
47749
47750
47751
47752
47753# Check whether --with-dxsdk was given.
47754if test "${with_dxsdk+set}" = set; then :
47755  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47756$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47757fi
47758
47759
47760
47761
47762# Check whether --with-dxsdk-lib was given.
47763if test "${with_dxsdk_lib+set}" = set; then :
47764  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47765$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47766fi
47767
47768
47769
47770
47771# Check whether --with-dxsdk-include was given.
47772if test "${with_dxsdk_include+set}" = set; then :
47773  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47774$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47775fi
47776
47777
47778  fi
47779
47780
47781
47782###############################################################################
47783#
47784# We need to do some final tweaking, when everything else is done.
47785#
47786###############################################################################
47787
47788
47789  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47790
47791
47792  # The name of the Service Agent jar.
47793  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47794  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47795    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47796  fi
47797
47798
47799
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47801$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47802
47803    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47804      ENABLE_INTREE_EC=yes
47805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47806$as_echo "yes" >&6; }
47807    else
47808      ENABLE_INTREE_EC=no
47809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47810$as_echo "no" >&6; }
47811    fi
47812
47813
47814
47815
47816###############################################################################
47817#
47818# Configure parts of the build that only affect the build performance,
47819# not the result.
47820#
47821###############################################################################
47822
47823
47824  # How many cores do we have on this build system?
47825
47826# Check whether --with-num-cores was given.
47827if test "${with_num_cores+set}" = set; then :
47828  withval=$with_num_cores;
47829fi
47830
47831  if test "x$with_num_cores" = x; then
47832    # The number of cores were not specified, try to probe them.
47833
47834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47835$as_echo_n "checking for number of cores... " >&6; }
47836  NUM_CORES=1
47837  FOUND_CORES=no
47838
47839  if test -f /proc/cpuinfo; then
47840    # Looks like a Linux (or cygwin) system
47841    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47842    FOUND_CORES=yes
47843  elif test -x /usr/sbin/psrinfo; then
47844    # Looks like a Solaris system
47845    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47846    FOUND_CORES=yes
47847  elif test -x /usr/sbin/system_profiler; then
47848    # Looks like a MacOSX system
47849    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47850    FOUND_CORES=yes
47851  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47852    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47853    FOUND_CORES=yes
47854  elif test -n "$NUMBER_OF_PROCESSORS"; then
47855    # On windows, look in the env
47856    NUM_CORES=$NUMBER_OF_PROCESSORS
47857    FOUND_CORES=yes
47858  fi
47859
47860  if test "x$FOUND_CORES" = xyes; then
47861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47862$as_echo "$NUM_CORES" >&6; }
47863  else
47864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47865$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47866    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47867$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47868  fi
47869
47870  else
47871    NUM_CORES=$with_num_cores
47872  fi
47873
47874
47875
47876  # How much memory do we have on this build system?
47877
47878# Check whether --with-memory-size was given.
47879if test "${with_memory_size+set}" = set; then :
47880  withval=$with_memory_size;
47881fi
47882
47883  if test "x$with_memory_size" = x; then
47884    # The memory size was not specified, try to probe it.
47885
47886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47887$as_echo_n "checking for memory size... " >&6; }
47888  # Default to 1024 MB
47889  MEMORY_SIZE=1024
47890  FOUND_MEM=no
47891
47892  if test -f /proc/meminfo; then
47893    # Looks like a Linux (or cygwin) system
47894    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47895    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47896    FOUND_MEM=yes
47897  elif test -x /usr/sbin/prtconf; then
47898    # Looks like a Solaris or AIX system
47899    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47900    FOUND_MEM=yes
47901  elif test -x /usr/sbin/system_profiler; then
47902    # Looks like a MacOSX system
47903    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47904    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47905    FOUND_MEM=yes
47906  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47907    # Windows, but without cygwin
47908    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47909    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47910    FOUND_MEM=yes
47911  fi
47912
47913  if test "x$FOUND_MEM" = xyes; then
47914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47915$as_echo "$MEMORY_SIZE MB" >&6; }
47916  else
47917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47918$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47920$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47921  fi
47922
47923  else
47924    MEMORY_SIZE=$with_memory_size
47925  fi
47926
47927
47928
47929  # Provide a decent default number of parallel jobs for make depending on
47930  # number of cores, amount of memory and machine architecture.
47931
47932# Check whether --with-jobs was given.
47933if test "${with_jobs+set}" = set; then :
47934  withval=$with_jobs;
47935fi
47936
47937  if test "x$with_jobs" = x; then
47938    # Number of jobs was not specified, calculate.
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47940$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47941    # Approximate memory in GB, rounding up a bit.
47942    memory_gb=`expr $MEMORY_SIZE / 1100`
47943    # Pick the lowest of memory in gb and number of cores.
47944    if test "$memory_gb" -lt "$NUM_CORES"; then
47945      JOBS="$memory_gb"
47946    else
47947      JOBS="$NUM_CORES"
47948      # On bigger machines, leave some room for other processes to run
47949      if test "$JOBS" -gt "4"; then
47950        JOBS=`expr $JOBS '*' 90 / 100`
47951      fi
47952    fi
47953    # Cap number of jobs to 16
47954    if test "$JOBS" -gt "16"; then
47955      JOBS=16
47956    fi
47957    if test "$JOBS" -eq "0"; then
47958      JOBS=1
47959    fi
47960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47961$as_echo "$JOBS" >&6; }
47962  else
47963    JOBS=$with_jobs
47964  fi
47965
47966
47967
47968# Setup smart javac (after cores and memory have been setup)
47969
47970
47971# Check whether --with-sjavac-server-java was given.
47972if test "${with_sjavac_server_java+set}" = set; then :
47973  withval=$with_sjavac_server_java;
47974fi
47975
47976
47977  if test "x$with_sjavac_server_java" != x; then
47978    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
47979    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
47980    if test "x$FOUND_VERSION" = x; then
47981      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
47982    fi
47983  else
47984    SJAVAC_SERVER_JAVA=""
47985    # Hotspot specific options.
47986
47987  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
47988  $ECHO "Command: $JAVA -verbosegc -version" >&5
47989  OUTPUT=`$JAVA -verbosegc -version 2>&1`
47990  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
47991  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
47992  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
47993    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
47994    JVM_ARG_OK=true
47995  else
47996    $ECHO "Arg failed:" >&5
47997    $ECHO "$OUTPUT" >&5
47998    JVM_ARG_OK=false
47999  fi
48000
48001    # JRockit specific options.
48002
48003  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48004  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48005  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48006  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48007  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48008  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48009    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48010    JVM_ARG_OK=true
48011  else
48012    $ECHO "Arg failed:" >&5
48013    $ECHO "$OUTPUT" >&5
48014    JVM_ARG_OK=false
48015  fi
48016
48017    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48018  fi
48019
48020
48021  if test "$MEMORY_SIZE" -gt "2500"; then
48022
48023  $ECHO "Check if jvm arg is ok: -d64" >&5
48024  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48025  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48026  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48027  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48028  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48029    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48030    JVM_ARG_OK=true
48031  else
48032    $ECHO "Arg failed:" >&5
48033    $ECHO "$OUTPUT" >&5
48034    JVM_ARG_OK=false
48035  fi
48036
48037    if test "$JVM_ARG_OK" = true; then
48038      JVM_64BIT=true
48039      JVM_ARG_OK=false
48040    fi
48041  fi
48042
48043  if test "$JVM_64BIT" = true; then
48044    if test "$MEMORY_SIZE" -gt "17000"; then
48045
48046  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48047  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48048  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48049  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48050  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48051  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48052    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48053    JVM_ARG_OK=true
48054  else
48055    $ECHO "Arg failed:" >&5
48056    $ECHO "$OUTPUT" >&5
48057    JVM_ARG_OK=false
48058  fi
48059
48060    fi
48061    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48062
48063  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48064  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48065  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48066  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48067  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48068  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48069    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48070    JVM_ARG_OK=true
48071  else
48072    $ECHO "Arg failed:" >&5
48073    $ECHO "$OUTPUT" >&5
48074    JVM_ARG_OK=false
48075  fi
48076
48077    fi
48078    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48079
48080  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48081  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48082  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48083  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48084  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48085  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48086    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48087    JVM_ARG_OK=true
48088  else
48089    $ECHO "Arg failed:" >&5
48090    $ECHO "$OUTPUT" >&5
48091    JVM_ARG_OK=false
48092  fi
48093
48094    fi
48095    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48096
48097  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48098  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48099  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48100  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48101  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48103    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48104    JVM_ARG_OK=true
48105  else
48106    $ECHO "Arg failed:" >&5
48107    $ECHO "$OUTPUT" >&5
48108    JVM_ARG_OK=false
48109  fi
48110
48111    fi
48112  fi
48113  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48114
48115  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48116  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48117  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48118  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48119  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48120  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48121    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48122    JVM_ARG_OK=true
48123  else
48124    $ECHO "Arg failed:" >&5
48125    $ECHO "$OUTPUT" >&5
48126    JVM_ARG_OK=false
48127  fi
48128
48129  fi
48130  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48131
48132  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48133  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48134  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48135  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48136  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48138    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48139    JVM_ARG_OK=true
48140  else
48141    $ECHO "Arg failed:" >&5
48142    $ECHO "$OUTPUT" >&5
48143    JVM_ARG_OK=false
48144  fi
48145
48146  fi
48147  if test "$JVM_ARG_OK" = false; then
48148
48149  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48150  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48151  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48152  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48153  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48155    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48156    JVM_ARG_OK=true
48157  else
48158    $ECHO "Arg failed:" >&5
48159    $ECHO "$OUTPUT" >&5
48160    JVM_ARG_OK=false
48161  fi
48162
48163  fi
48164
48165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48166$as_echo_n "checking whether to use sjavac... " >&6; }
48167  # Check whether --enable-sjavac was given.
48168if test "${enable_sjavac+set}" = set; then :
48169  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48170else
48171  ENABLE_SJAVAC='no'
48172fi
48173
48174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48175$as_echo "$ENABLE_SJAVAC" >&6; }
48176
48177
48178  if test "x$ENABLE_SJAVAC" = xyes; then
48179    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48180  else
48181    SJAVAC_SERVER_DIR=
48182  fi
48183
48184
48185
48186# Can the C/C++ compiler use precompiled headers?
48187
48188
48189  ###############################################################################
48190  #
48191  # Can the C/C++ compiler use precompiled headers?
48192  #
48193  # Check whether --enable-precompiled-headers was given.
48194if test "${enable_precompiled_headers+set}" = set; then :
48195  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48196else
48197  ENABLE_PRECOMPH=yes
48198fi
48199
48200
48201  USE_PRECOMPILED_HEADER=1
48202  if test "x$ENABLE_PRECOMPH" = xno; then
48203    USE_PRECOMPILED_HEADER=0
48204  fi
48205
48206  if test "x$ENABLE_PRECOMPH" = xyes; then
48207    # Check that the compiler actually supports precomp headers.
48208    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48210$as_echo_n "checking that precompiled headers work... " >&6; }
48211      echo "int alfa();" > conftest.h
48212      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48213      if test ! -f conftest.hpp.gch; then
48214        USE_PRECOMPILED_HEADER=0
48215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48216$as_echo "no" >&6; }
48217      else
48218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48219$as_echo "yes" >&6; }
48220      fi
48221      rm -f conftest.h conftest.hpp.gch
48222    fi
48223  fi
48224
48225
48226
48227
48228# Setup use of ccache, if available
48229
48230  # Check whether --enable-ccache was given.
48231if test "${enable_ccache+set}" = set; then :
48232  enableval=$enable_ccache;
48233fi
48234
48235
48236  CCACHE=
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48238$as_echo_n "checking is ccache enabled... " >&6; }
48239  ENABLE_CCACHE=$enable_ccache
48240  if test "x$enable_ccache" = xyes; then
48241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48242$as_echo "yes" >&6; }
48243    OLD_PATH="$PATH"
48244    if test "x$TOOLS_DIR" != x; then
48245      PATH=$TOOLS_DIR:$PATH
48246    fi
48247
48248
48249
48250  # Publish this variable in the help.
48251
48252
48253  if test "x$CCACHE" = x; then
48254    # The variable is not set by user, try to locate tool using the code snippet
48255    for ac_prog in ccache
48256do
48257  # Extract the first word of "$ac_prog", so it can be a program name with args.
48258set dummy $ac_prog; ac_word=$2
48259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48260$as_echo_n "checking for $ac_word... " >&6; }
48261if ${ac_cv_path_CCACHE+:} false; then :
48262  $as_echo_n "(cached) " >&6
48263else
48264  case $CCACHE in
48265  [\\/]* | ?:[\\/]*)
48266  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48267  ;;
48268  *)
48269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48270for as_dir in $PATH
48271do
48272  IFS=$as_save_IFS
48273  test -z "$as_dir" && as_dir=.
48274    for ac_exec_ext in '' $ac_executable_extensions; do
48275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48276    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48278    break 2
48279  fi
48280done
48281  done
48282IFS=$as_save_IFS
48283
48284  ;;
48285esac
48286fi
48287CCACHE=$ac_cv_path_CCACHE
48288if test -n "$CCACHE"; then
48289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48290$as_echo "$CCACHE" >&6; }
48291else
48292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48293$as_echo "no" >&6; }
48294fi
48295
48296
48297  test -n "$CCACHE" && break
48298done
48299
48300  else
48301    # The variable is set, but is it from the command line or the environment?
48302
48303    # Try to remove the string !CCACHE! from our list.
48304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48306      # If it failed, the variable was not from the command line. Ignore it,
48307      # but warn the user (except for BASH, which is always set by the calling BASH).
48308      if test "xCCACHE" != xBASH; then
48309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48310$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48311      fi
48312      # Try to locate tool using the code snippet
48313      for ac_prog in ccache
48314do
48315  # Extract the first word of "$ac_prog", so it can be a program name with args.
48316set dummy $ac_prog; ac_word=$2
48317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48318$as_echo_n "checking for $ac_word... " >&6; }
48319if ${ac_cv_path_CCACHE+:} false; then :
48320  $as_echo_n "(cached) " >&6
48321else
48322  case $CCACHE in
48323  [\\/]* | ?:[\\/]*)
48324  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48325  ;;
48326  *)
48327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48328for as_dir in $PATH
48329do
48330  IFS=$as_save_IFS
48331  test -z "$as_dir" && as_dir=.
48332    for ac_exec_ext in '' $ac_executable_extensions; do
48333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48334    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48336    break 2
48337  fi
48338done
48339  done
48340IFS=$as_save_IFS
48341
48342  ;;
48343esac
48344fi
48345CCACHE=$ac_cv_path_CCACHE
48346if test -n "$CCACHE"; then
48347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48348$as_echo "$CCACHE" >&6; }
48349else
48350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48351$as_echo "no" >&6; }
48352fi
48353
48354
48355  test -n "$CCACHE" && break
48356done
48357
48358    else
48359      # If it succeeded, then it was overridden by the user. We will use it
48360      # for the tool.
48361
48362      # First remove it from the list of overridden variables, so we can test
48363      # for unknown variables in the end.
48364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48365
48366      # Check if the provided tool contains a complete path.
48367      tool_specified="$CCACHE"
48368      tool_basename="${tool_specified##*/}"
48369      if test "x$tool_basename" = "x$tool_specified"; then
48370        # A command without a complete path is provided, search $PATH.
48371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48372$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48373        # Extract the first word of "$tool_basename", so it can be a program name with args.
48374set dummy $tool_basename; ac_word=$2
48375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48376$as_echo_n "checking for $ac_word... " >&6; }
48377if ${ac_cv_path_CCACHE+:} false; then :
48378  $as_echo_n "(cached) " >&6
48379else
48380  case $CCACHE in
48381  [\\/]* | ?:[\\/]*)
48382  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48383  ;;
48384  *)
48385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48386for as_dir in $PATH
48387do
48388  IFS=$as_save_IFS
48389  test -z "$as_dir" && as_dir=.
48390    for ac_exec_ext in '' $ac_executable_extensions; do
48391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48392    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48394    break 2
48395  fi
48396done
48397  done
48398IFS=$as_save_IFS
48399
48400  ;;
48401esac
48402fi
48403CCACHE=$ac_cv_path_CCACHE
48404if test -n "$CCACHE"; then
48405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48406$as_echo "$CCACHE" >&6; }
48407else
48408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48409$as_echo "no" >&6; }
48410fi
48411
48412
48413        if test "x$CCACHE" = x; then
48414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48415        fi
48416      else
48417        # Otherwise we believe it is a complete path. Use it as it is.
48418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48419$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48421$as_echo_n "checking for CCACHE... " >&6; }
48422        if test ! -x "$tool_specified"; then
48423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48424$as_echo "not found" >&6; }
48425          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48426        fi
48427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48428$as_echo "$tool_specified" >&6; }
48429      fi
48430    fi
48431  fi
48432
48433
48434
48435  if test "x$CCACHE" = x; then
48436    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48437  fi
48438
48439
48440    CCACHE_STATUS="enabled"
48441    PATH="$OLD_PATH"
48442  elif test "x$enable_ccache" = xno; then
48443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48444$as_echo "no, explicitly disabled" >&6; }
48445  elif test "x$enable_ccache" = x; then
48446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48447$as_echo "no" >&6; }
48448  else
48449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48450$as_echo "unknown" >&6; }
48451    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48452  fi
48453
48454
48455
48456# Check whether --with-ccache-dir was given.
48457if test "${with_ccache_dir+set}" = set; then :
48458  withval=$with_ccache_dir;
48459fi
48460
48461
48462  if test "x$with_ccache_dir" != x; then
48463    # When using a non home ccache directory, assume the use is to share ccache files
48464    # with other users. Thus change the umask.
48465    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48466    if test "x$CCACHE" = x; then
48467      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48468$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48469    fi
48470  fi
48471
48472  if test "x$CCACHE" != x; then
48473
48474  if test "x$CCACHE" != x; then
48475    # Only use ccache if it is 3.1.4 or later, which supports
48476    # precompiled headers.
48477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48478$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48479    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48480    if test "x$HAS_GOOD_CCACHE" = x; then
48481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48482$as_echo "no, disabling ccache" >&6; }
48483      CCACHE=
48484      CCACHE_STATUS="disabled"
48485    else
48486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48487$as_echo "yes" >&6; }
48488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48489$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48490      PUSHED_FLAGS="$CXXFLAGS"
48491      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48492      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48493/* end confdefs.h.  */
48494
48495int
48496main ()
48497{
48498
48499  ;
48500  return 0;
48501}
48502_ACEOF
48503if ac_fn_cxx_try_compile "$LINENO"; then :
48504  CC_KNOWS_CCACHE_TRICK=yes
48505else
48506  CC_KNOWS_CCACHE_TRICK=no
48507fi
48508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48509      CXXFLAGS="$PUSHED_FLAGS"
48510      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48512$as_echo "yes" >&6; }
48513      else
48514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48515$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48516        CCACHE=
48517        CCACHE_STATUS="disabled"
48518      fi
48519    fi
48520  fi
48521
48522  if test "x$CCACHE" != x; then
48523    CCACHE_SLOPPINESS=time_macros
48524    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48525    CCACHE_FLAGS=-fpch-preprocess
48526
48527    if test "x$SET_CCACHE_DIR" != x; then
48528      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48529      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48530    fi
48531  fi
48532
48533  fi
48534
48535
48536###############################################################################
48537#
48538# And now the finish...
48539#
48540###############################################################################
48541
48542# Check for some common pitfalls
48543
48544  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48545    file_to_test="$SRC_ROOT/LICENSE"
48546    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48547      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
48548    fi
48549  fi
48550
48551
48552  # Did user specify any unknown variables?
48553
48554  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48555    # Replace the separating ! with spaces before presenting for end user.
48556    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48557    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48558$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48559  fi
48560
48561
48562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48563$as_echo_n "checking if build directory is on local disk... " >&6; }
48564
48565  # df -l lists only local disks; if the given directory is not found then
48566  # a non-zero exit code is given
48567  if test "x$DF" = x; then
48568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48569      # msys does not have df; use Windows "net use" instead.
48570      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48571      if test "x$IS_NETWORK_DISK" = x; then
48572        OUTPUT_DIR_IS_LOCAL="yes"
48573      else
48574        OUTPUT_DIR_IS_LOCAL="no"
48575      fi
48576    else
48577      # No df here, say it's local
48578      OUTPUT_DIR_IS_LOCAL="yes"
48579    fi
48580  else
48581    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48582      OUTPUT_DIR_IS_LOCAL="yes"
48583    else
48584      OUTPUT_DIR_IS_LOCAL="no"
48585    fi
48586  fi
48587
48588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48589$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48590
48591
48592
48593  # Check if the user has any old-style ALT_ variables set.
48594  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48595
48596  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48597  # Since we can't properly handle the dependencies for this, warn the user about the situation
48598  if test -e $OUTPUT_ROOT/spec.gmk; then
48599    IS_RECONFIGURE=yes
48600  else
48601    IS_RECONFIGURE=no
48602  fi
48603
48604
48605# At the end, call the custom hook. (Dummy macro if no custom sources available)
48606
48607
48608# We're messing a bit with internal autoconf variables to put the config.status
48609# in the output directory instead of the current directory.
48610CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48611
48612# Create the actual output files. Now the main work of configure is done.
48613cat >confcache <<\_ACEOF
48614# This file is a shell script that caches the results of configure
48615# tests run on this system so they can be shared between configure
48616# scripts and configure runs, see configure's option --config-cache.
48617# It is not useful on other systems.  If it contains results you don't
48618# want to keep, you may remove or edit it.
48619#
48620# config.status only pays attention to the cache file if you give it
48621# the --recheck option to rerun configure.
48622#
48623# `ac_cv_env_foo' variables (set or unset) will be overridden when
48624# loading this file, other *unset* `ac_cv_foo' will be assigned the
48625# following values.
48626
48627_ACEOF
48628
48629# The following way of writing the cache mishandles newlines in values,
48630# but we know of no workaround that is simple, portable, and efficient.
48631# So, we kill variables containing newlines.
48632# Ultrix sh set writes to stderr and can't be redirected directly,
48633# and sets the high bit in the cache file unless we assign to the vars.
48634(
48635  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48636    eval ac_val=\$$ac_var
48637    case $ac_val in #(
48638    *${as_nl}*)
48639      case $ac_var in #(
48640      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48642      esac
48643      case $ac_var in #(
48644      _ | IFS | as_nl) ;; #(
48645      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48646      *) { eval $ac_var=; unset $ac_var;} ;;
48647      esac ;;
48648    esac
48649  done
48650
48651  (set) 2>&1 |
48652    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48653    *${as_nl}ac_space=\ *)
48654      # `set' does not quote correctly, so add quotes: double-quote
48655      # substitution turns \\\\ into \\, and sed turns \\ into \.
48656      sed -n \
48657	"s/'/'\\\\''/g;
48658	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48659      ;; #(
48660    *)
48661      # `set' quotes correctly as required by POSIX, so do not add quotes.
48662      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48663      ;;
48664    esac |
48665    sort
48666) |
48667  sed '
48668     /^ac_cv_env_/b end
48669     t clear
48670     :clear
48671     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48672     t end
48673     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48674     :end' >>confcache
48675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48676  if test -w "$cache_file"; then
48677    if test "x$cache_file" != "x/dev/null"; then
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48679$as_echo "$as_me: updating cache $cache_file" >&6;}
48680      if test ! -f "$cache_file" || test -h "$cache_file"; then
48681	cat confcache >"$cache_file"
48682      else
48683        case $cache_file in #(
48684        */* | ?:*)
48685	  mv -f confcache "$cache_file"$$ &&
48686	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48687        *)
48688	  mv -f confcache "$cache_file" ;;
48689	esac
48690      fi
48691    fi
48692  else
48693    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48694$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48695  fi
48696fi
48697rm -f confcache
48698
48699test "x$prefix" = xNONE && prefix=$ac_default_prefix
48700# Let make expand exec_prefix.
48701test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48702
48703DEFS=-DHAVE_CONFIG_H
48704
48705ac_libobjs=
48706ac_ltlibobjs=
48707U=
48708for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48709  # 1. Remove the extension, and $U if already installed.
48710  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48711  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48712  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48713  #    will be set to the directory where LIBOBJS objects are built.
48714  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48715  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48716done
48717LIBOBJS=$ac_libobjs
48718
48719LTLIBOBJS=$ac_ltlibobjs
48720
48721
48722
48723: "${CONFIG_STATUS=./config.status}"
48724ac_write_fail=0
48725ac_clean_files_save=$ac_clean_files
48726ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48727{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48728$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48729as_write_fail=0
48730cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48731#! $SHELL
48732# Generated by $as_me.
48733# Run this file to recreate the current configuration.
48734# Compiler output produced by configure, useful for debugging
48735# configure, is in config.log if it exists.
48736
48737debug=false
48738ac_cs_recheck=false
48739ac_cs_silent=false
48740
48741SHELL=\${CONFIG_SHELL-$SHELL}
48742export SHELL
48743_ASEOF
48744cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48745## -------------------- ##
48746## M4sh Initialization. ##
48747## -------------------- ##
48748
48749# Be more Bourne compatible
48750DUALCASE=1; export DUALCASE # for MKS sh
48751if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48752  emulate sh
48753  NULLCMD=:
48754  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48755  # is contrary to our usage.  Disable this feature.
48756  alias -g '${1+"$@"}'='"$@"'
48757  setopt NO_GLOB_SUBST
48758else
48759  case `(set -o) 2>/dev/null` in #(
48760  *posix*) :
48761    set -o posix ;; #(
48762  *) :
48763     ;;
48764esac
48765fi
48766
48767
48768as_nl='
48769'
48770export as_nl
48771# Printing a long string crashes Solaris 7 /usr/bin/printf.
48772as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48773as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48774as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48775# Prefer a ksh shell builtin over an external printf program on Solaris,
48776# but without wasting forks for bash or zsh.
48777if test -z "$BASH_VERSION$ZSH_VERSION" \
48778    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48779  as_echo='print -r --'
48780  as_echo_n='print -rn --'
48781elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48782  as_echo='printf %s\n'
48783  as_echo_n='printf %s'
48784else
48785  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48786    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48787    as_echo_n='/usr/ucb/echo -n'
48788  else
48789    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48790    as_echo_n_body='eval
48791      arg=$1;
48792      case $arg in #(
48793      *"$as_nl"*)
48794	expr "X$arg" : "X\\(.*\\)$as_nl";
48795	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48796      esac;
48797      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48798    '
48799    export as_echo_n_body
48800    as_echo_n='sh -c $as_echo_n_body as_echo'
48801  fi
48802  export as_echo_body
48803  as_echo='sh -c $as_echo_body as_echo'
48804fi
48805
48806# The user is always right.
48807if test "${PATH_SEPARATOR+set}" != set; then
48808  PATH_SEPARATOR=:
48809  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48810    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48811      PATH_SEPARATOR=';'
48812  }
48813fi
48814
48815
48816# IFS
48817# We need space, tab and new line, in precisely that order.  Quoting is
48818# there to prevent editors from complaining about space-tab.
48819# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48820# splitting by setting IFS to empty value.)
48821IFS=" ""	$as_nl"
48822
48823# Find who we are.  Look in the path if we contain no directory separator.
48824as_myself=
48825case $0 in #((
48826  *[\\/]* ) as_myself=$0 ;;
48827  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48828for as_dir in $PATH
48829do
48830  IFS=$as_save_IFS
48831  test -z "$as_dir" && as_dir=.
48832    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48833  done
48834IFS=$as_save_IFS
48835
48836     ;;
48837esac
48838# We did not find ourselves, most probably we were run as `sh COMMAND'
48839# in which case we are not to be found in the path.
48840if test "x$as_myself" = x; then
48841  as_myself=$0
48842fi
48843if test ! -f "$as_myself"; then
48844  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48845  exit 1
48846fi
48847
48848# Unset variables that we do not need and which cause bugs (e.g. in
48849# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48850# suppresses any "Segmentation fault" message there.  '((' could
48851# trigger a bug in pdksh 5.2.14.
48852for as_var in BASH_ENV ENV MAIL MAILPATH
48853do eval test x\${$as_var+set} = xset \
48854  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48855done
48856PS1='$ '
48857PS2='> '
48858PS4='+ '
48859
48860# NLS nuisances.
48861LC_ALL=C
48862export LC_ALL
48863LANGUAGE=C
48864export LANGUAGE
48865
48866# CDPATH.
48867(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48868
48869
48870# as_fn_error STATUS ERROR [LINENO LOG_FD]
48871# ----------------------------------------
48872# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48873# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48874# script with STATUS, using 1 if that was 0.
48875as_fn_error ()
48876{
48877  as_status=$1; test $as_status -eq 0 && as_status=1
48878  if test "$4"; then
48879    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48880    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48881  fi
48882  $as_echo "$as_me: error: $2" >&2
48883  as_fn_exit $as_status
48884} # as_fn_error
48885
48886
48887# as_fn_set_status STATUS
48888# -----------------------
48889# Set $? to STATUS, without forking.
48890as_fn_set_status ()
48891{
48892  return $1
48893} # as_fn_set_status
48894
48895# as_fn_exit STATUS
48896# -----------------
48897# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48898as_fn_exit ()
48899{
48900  set +e
48901  as_fn_set_status $1
48902  exit $1
48903} # as_fn_exit
48904
48905# as_fn_unset VAR
48906# ---------------
48907# Portably unset VAR.
48908as_fn_unset ()
48909{
48910  { eval $1=; unset $1;}
48911}
48912as_unset=as_fn_unset
48913# as_fn_append VAR VALUE
48914# ----------------------
48915# Append the text in VALUE to the end of the definition contained in VAR. Take
48916# advantage of any shell optimizations that allow amortized linear growth over
48917# repeated appends, instead of the typical quadratic growth present in naive
48918# implementations.
48919if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48920  eval 'as_fn_append ()
48921  {
48922    eval $1+=\$2
48923  }'
48924else
48925  as_fn_append ()
48926  {
48927    eval $1=\$$1\$2
48928  }
48929fi # as_fn_append
48930
48931# as_fn_arith ARG...
48932# ------------------
48933# Perform arithmetic evaluation on the ARGs, and store the result in the
48934# global $as_val. Take advantage of shells that can avoid forks. The arguments
48935# must be portable across $(()) and expr.
48936if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48937  eval 'as_fn_arith ()
48938  {
48939    as_val=$(( $* ))
48940  }'
48941else
48942  as_fn_arith ()
48943  {
48944    as_val=`expr "$@" || test $? -eq 1`
48945  }
48946fi # as_fn_arith
48947
48948
48949if expr a : '\(a\)' >/dev/null 2>&1 &&
48950   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48951  as_expr=expr
48952else
48953  as_expr=false
48954fi
48955
48956if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48957  as_basename=basename
48958else
48959  as_basename=false
48960fi
48961
48962if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48963  as_dirname=dirname
48964else
48965  as_dirname=false
48966fi
48967
48968as_me=`$as_basename -- "$0" ||
48969$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48970	 X"$0" : 'X\(//\)$' \| \
48971	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48972$as_echo X/"$0" |
48973    sed '/^.*\/\([^/][^/]*\)\/*$/{
48974	    s//\1/
48975	    q
48976	  }
48977	  /^X\/\(\/\/\)$/{
48978	    s//\1/
48979	    q
48980	  }
48981	  /^X\/\(\/\).*/{
48982	    s//\1/
48983	    q
48984	  }
48985	  s/.*/./; q'`
48986
48987# Avoid depending upon Character Ranges.
48988as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48989as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48990as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48991as_cr_digits='0123456789'
48992as_cr_alnum=$as_cr_Letters$as_cr_digits
48993
48994ECHO_C= ECHO_N= ECHO_T=
48995case `echo -n x` in #(((((
48996-n*)
48997  case `echo 'xy\c'` in
48998  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
48999  xy)  ECHO_C='\c';;
49000  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49001       ECHO_T='	';;
49002  esac;;
49003*)
49004  ECHO_N='-n';;
49005esac
49006
49007rm -f conf$$ conf$$.exe conf$$.file
49008if test -d conf$$.dir; then
49009  rm -f conf$$.dir/conf$$.file
49010else
49011  rm -f conf$$.dir
49012  mkdir conf$$.dir 2>/dev/null
49013fi
49014if (echo >conf$$.file) 2>/dev/null; then
49015  if ln -s conf$$.file conf$$ 2>/dev/null; then
49016    as_ln_s='ln -s'
49017    # ... but there are two gotchas:
49018    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49019    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49020    # In both cases, we have to default to `cp -pR'.
49021    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49022      as_ln_s='cp -pR'
49023  elif ln conf$$.file conf$$ 2>/dev/null; then
49024    as_ln_s=ln
49025  else
49026    as_ln_s='cp -pR'
49027  fi
49028else
49029  as_ln_s='cp -pR'
49030fi
49031rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49032rmdir conf$$.dir 2>/dev/null
49033
49034
49035# as_fn_mkdir_p
49036# -------------
49037# Create "$as_dir" as a directory, including parents if necessary.
49038as_fn_mkdir_p ()
49039{
49040
49041  case $as_dir in #(
49042  -*) as_dir=./$as_dir;;
49043  esac
49044  test -d "$as_dir" || eval $as_mkdir_p || {
49045    as_dirs=
49046    while :; do
49047      case $as_dir in #(
49048      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49049      *) as_qdir=$as_dir;;
49050      esac
49051      as_dirs="'$as_qdir' $as_dirs"
49052      as_dir=`$as_dirname -- "$as_dir" ||
49053$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49054	 X"$as_dir" : 'X\(//\)[^/]' \| \
49055	 X"$as_dir" : 'X\(//\)$' \| \
49056	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49057$as_echo X"$as_dir" |
49058    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49059	    s//\1/
49060	    q
49061	  }
49062	  /^X\(\/\/\)[^/].*/{
49063	    s//\1/
49064	    q
49065	  }
49066	  /^X\(\/\/\)$/{
49067	    s//\1/
49068	    q
49069	  }
49070	  /^X\(\/\).*/{
49071	    s//\1/
49072	    q
49073	  }
49074	  s/.*/./; q'`
49075      test -d "$as_dir" && break
49076    done
49077    test -z "$as_dirs" || eval "mkdir $as_dirs"
49078  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49079
49080
49081} # as_fn_mkdir_p
49082if mkdir -p . 2>/dev/null; then
49083  as_mkdir_p='mkdir -p "$as_dir"'
49084else
49085  test -d ./-p && rmdir ./-p
49086  as_mkdir_p=false
49087fi
49088
49089
49090# as_fn_executable_p FILE
49091# -----------------------
49092# Test if FILE is an executable regular file.
49093as_fn_executable_p ()
49094{
49095  test -f "$1" && test -x "$1"
49096} # as_fn_executable_p
49097as_test_x='test -x'
49098as_executable_p=as_fn_executable_p
49099
49100# Sed expression to map a string onto a valid CPP name.
49101as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49102
49103# Sed expression to map a string onto a valid variable name.
49104as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49105
49106
49107exec 6>&1
49108## ----------------------------------- ##
49109## Main body of $CONFIG_STATUS script. ##
49110## ----------------------------------- ##
49111_ASEOF
49112test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49113
49114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49115# Save the log message, to keep $0 and so on meaningful, and to
49116# report actual input values of CONFIG_FILES etc. instead of their
49117# values after options handling.
49118ac_log="
49119This file was extended by OpenJDK $as_me jdk8, which was
49120generated by GNU Autoconf 2.69.  Invocation command line was
49121
49122  CONFIG_FILES    = $CONFIG_FILES
49123  CONFIG_HEADERS  = $CONFIG_HEADERS
49124  CONFIG_LINKS    = $CONFIG_LINKS
49125  CONFIG_COMMANDS = $CONFIG_COMMANDS
49126  $ $0 $@
49127
49128on `(hostname || uname -n) 2>/dev/null | sed 1q`
49129"
49130
49131_ACEOF
49132
49133case $ac_config_files in *"
49134"*) set x $ac_config_files; shift; ac_config_files=$*;;
49135esac
49136
49137case $ac_config_headers in *"
49138"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49139esac
49140
49141
49142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49143# Files that config.status was made for.
49144config_files="$ac_config_files"
49145config_headers="$ac_config_headers"
49146
49147_ACEOF
49148
49149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49150ac_cs_usage="\
49151\`$as_me' instantiates files and other configuration actions
49152from templates according to the current configuration.  Unless the files
49153and actions are specified as TAGs, all are instantiated by default.
49154
49155Usage: $0 [OPTION]... [TAG]...
49156
49157  -h, --help       print this help, then exit
49158  -V, --version    print version number and configuration settings, then exit
49159      --config     print configuration, then exit
49160  -q, --quiet, --silent
49161                   do not print progress messages
49162  -d, --debug      don't remove temporary files
49163      --recheck    update $as_me by reconfiguring in the same conditions
49164      --file=FILE[:TEMPLATE]
49165                   instantiate the configuration file FILE
49166      --header=FILE[:TEMPLATE]
49167                   instantiate the configuration header FILE
49168
49169Configuration files:
49170$config_files
49171
49172Configuration headers:
49173$config_headers
49174
49175Report bugs to <build-dev@openjdk.java.net>.
49176OpenJDK home page: <http://openjdk.java.net>."
49177
49178_ACEOF
49179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49180ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49181ac_cs_version="\\
49182OpenJDK config.status jdk8
49183configured by $0, generated by GNU Autoconf 2.69,
49184  with options \\"\$ac_cs_config\\"
49185
49186Copyright (C) 2012 Free Software Foundation, Inc.
49187This config.status script is free software; the Free Software Foundation
49188gives unlimited permission to copy, distribute and modify it."
49189
49190ac_pwd='$ac_pwd'
49191srcdir='$srcdir'
49192AWK='$AWK'
49193test -n "\$AWK" || AWK=awk
49194_ACEOF
49195
49196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49197# The default lists apply if the user does not specify any file.
49198ac_need_defaults=:
49199while test $# != 0
49200do
49201  case $1 in
49202  --*=?*)
49203    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49204    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49205    ac_shift=:
49206    ;;
49207  --*=)
49208    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49209    ac_optarg=
49210    ac_shift=:
49211    ;;
49212  *)
49213    ac_option=$1
49214    ac_optarg=$2
49215    ac_shift=shift
49216    ;;
49217  esac
49218
49219  case $ac_option in
49220  # Handling of the options.
49221  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49222    ac_cs_recheck=: ;;
49223  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49224    $as_echo "$ac_cs_version"; exit ;;
49225  --config | --confi | --conf | --con | --co | --c )
49226    $as_echo "$ac_cs_config"; exit ;;
49227  --debug | --debu | --deb | --de | --d | -d )
49228    debug=: ;;
49229  --file | --fil | --fi | --f )
49230    $ac_shift
49231    case $ac_optarg in
49232    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49233    '') as_fn_error $? "missing file argument" ;;
49234    esac
49235    as_fn_append CONFIG_FILES " '$ac_optarg'"
49236    ac_need_defaults=false;;
49237  --header | --heade | --head | --hea )
49238    $ac_shift
49239    case $ac_optarg in
49240    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49241    esac
49242    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49243    ac_need_defaults=false;;
49244  --he | --h)
49245    # Conflict between --help and --header
49246    as_fn_error $? "ambiguous option: \`$1'
49247Try \`$0 --help' for more information.";;
49248  --help | --hel | -h )
49249    $as_echo "$ac_cs_usage"; exit ;;
49250  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49251  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49252    ac_cs_silent=: ;;
49253
49254  # This is an error.
49255  -*) as_fn_error $? "unrecognized option: \`$1'
49256Try \`$0 --help' for more information." ;;
49257
49258  *) as_fn_append ac_config_targets " $1"
49259     ac_need_defaults=false ;;
49260
49261  esac
49262  shift
49263done
49264
49265ac_configure_extra_args=
49266
49267if $ac_cs_silent; then
49268  exec 6>/dev/null
49269  ac_configure_extra_args="$ac_configure_extra_args --silent"
49270fi
49271
49272_ACEOF
49273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49274if \$ac_cs_recheck; then
49275  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49276  shift
49277  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49278  CONFIG_SHELL='$SHELL'
49279  export CONFIG_SHELL
49280  exec "\$@"
49281fi
49282
49283_ACEOF
49284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49285exec 5>>config.log
49286{
49287  echo
49288  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49289## Running $as_me. ##
49290_ASBOX
49291  $as_echo "$ac_log"
49292} >&5
49293
49294_ACEOF
49295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49296_ACEOF
49297
49298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49299
49300# Handling of arguments.
49301for ac_config_target in $ac_config_targets
49302do
49303  case $ac_config_target in
49304    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49305    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49306    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49307    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49308    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49309    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49310    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49311
49312  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49313  esac
49314done
49315
49316
49317# If the user did not use the arguments to specify the items to instantiate,
49318# then the envvar interface is used.  Set only those that are not.
49319# We use the long form for the default assignment because of an extremely
49320# bizarre bug on SunOS 4.1.3.
49321if $ac_need_defaults; then
49322  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49323  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49324fi
49325
49326# Have a temporary directory for convenience.  Make it in the build tree
49327# simply because there is no reason against having it here, and in addition,
49328# creating and moving files from /tmp can sometimes cause problems.
49329# Hook for its removal unless debugging.
49330# Note that there is a small window in which the directory will not be cleaned:
49331# after its creation but before its name has been assigned to `$tmp'.
49332$debug ||
49333{
49334  tmp= ac_tmp=
49335  trap 'exit_status=$?
49336  : "${ac_tmp:=$tmp}"
49337  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49338' 0
49339  trap 'as_fn_exit 1' 1 2 13 15
49340}
49341# Create a (secure) tmp directory for tmp files.
49342
49343{
49344  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49345  test -d "$tmp"
49346}  ||
49347{
49348  tmp=./conf$$-$RANDOM
49349  (umask 077 && mkdir "$tmp")
49350} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49351ac_tmp=$tmp
49352
49353# Set up the scripts for CONFIG_FILES section.
49354# No need to generate them if there are no CONFIG_FILES.
49355# This happens for instance with `./config.status config.h'.
49356if test -n "$CONFIG_FILES"; then
49357
49358
49359ac_cr=`echo X | tr X '\015'`
49360# On cygwin, bash can eat \r inside `` if the user requested igncr.
49361# But we know of no other shell where ac_cr would be empty at this
49362# point, so we can use a bashism as a fallback.
49363if test "x$ac_cr" = x; then
49364  eval ac_cr=\$\'\\r\'
49365fi
49366ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49367if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49368  ac_cs_awk_cr='\\r'
49369else
49370  ac_cs_awk_cr=$ac_cr
49371fi
49372
49373echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49374_ACEOF
49375
49376
49377{
49378  echo "cat >conf$$subs.awk <<_ACEOF" &&
49379  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49380  echo "_ACEOF"
49381} >conf$$subs.sh ||
49382  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49383ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49384ac_delim='%!_!# '
49385for ac_last_try in false false false false false :; do
49386  . ./conf$$subs.sh ||
49387    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49388
49389  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49390  if test $ac_delim_n = $ac_delim_num; then
49391    break
49392  elif $ac_last_try; then
49393    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49394  else
49395    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49396  fi
49397done
49398rm -f conf$$subs.sh
49399
49400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49401cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49402_ACEOF
49403sed -n '
49404h
49405s/^/S["/; s/!.*/"]=/
49406p
49407g
49408s/^[^!]*!//
49409:repl
49410t repl
49411s/'"$ac_delim"'$//
49412t delim
49413:nl
49414h
49415s/\(.\{148\}\)..*/\1/
49416t more1
49417s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49418p
49419n
49420b repl
49421:more1
49422s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49423p
49424g
49425s/.\{148\}//
49426t nl
49427:delim
49428h
49429s/\(.\{148\}\)..*/\1/
49430t more2
49431s/["\\]/\\&/g; s/^/"/; s/$/"/
49432p
49433b
49434:more2
49435s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49436p
49437g
49438s/.\{148\}//
49439t delim
49440' <conf$$subs.awk | sed '
49441/^[^""]/{
49442  N
49443  s/\n//
49444}
49445' >>$CONFIG_STATUS || ac_write_fail=1
49446rm -f conf$$subs.awk
49447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49448_ACAWK
49449cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49450  for (key in S) S_is_set[key] = 1
49451  FS = ""
49452
49453}
49454{
49455  line = $ 0
49456  nfields = split(line, field, "@")
49457  substed = 0
49458  len = length(field[1])
49459  for (i = 2; i < nfields; i++) {
49460    key = field[i]
49461    keylen = length(key)
49462    if (S_is_set[key]) {
49463      value = S[key]
49464      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49465      len += length(value) + length(field[++i])
49466      substed = 1
49467    } else
49468      len += 1 + keylen
49469  }
49470
49471  print line
49472}
49473
49474_ACAWK
49475_ACEOF
49476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49477if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49478  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49479else
49480  cat
49481fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49482  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49483_ACEOF
49484
49485# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49486# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49487# trailing colons and then remove the whole line if VPATH becomes empty
49488# (actually we leave an empty line to preserve line numbers).
49489if test "x$srcdir" = x.; then
49490  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49491h
49492s///
49493s/^/:/
49494s/[	 ]*$/:/
49495s/:\$(srcdir):/:/g
49496s/:\${srcdir}:/:/g
49497s/:@srcdir@:/:/g
49498s/^:*//
49499s/:*$//
49500x
49501s/\(=[	 ]*\).*/\1/
49502G
49503s/\n//
49504s/^[^=]*=[	 ]*$//
49505}'
49506fi
49507
49508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49509fi # test -n "$CONFIG_FILES"
49510
49511# Set up the scripts for CONFIG_HEADERS section.
49512# No need to generate them if there are no CONFIG_HEADERS.
49513# This happens for instance with `./config.status Makefile'.
49514if test -n "$CONFIG_HEADERS"; then
49515cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49516BEGIN {
49517_ACEOF
49518
49519# Transform confdefs.h into an awk script `defines.awk', embedded as
49520# here-document in config.status, that substitutes the proper values into
49521# config.h.in to produce config.h.
49522
49523# Create a delimiter string that does not exist in confdefs.h, to ease
49524# handling of long lines.
49525ac_delim='%!_!# '
49526for ac_last_try in false false :; do
49527  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49528  if test -z "$ac_tt"; then
49529    break
49530  elif $ac_last_try; then
49531    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49532  else
49533    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49534  fi
49535done
49536
49537# For the awk script, D is an array of macro values keyed by name,
49538# likewise P contains macro parameters if any.  Preserve backslash
49539# newline sequences.
49540
49541ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49542sed -n '
49543s/.\{148\}/&'"$ac_delim"'/g
49544t rset
49545:rset
49546s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49547t def
49548d
49549:def
49550s/\\$//
49551t bsnl
49552s/["\\]/\\&/g
49553s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49554D["\1"]=" \3"/p
49555s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49556d
49557:bsnl
49558s/["\\]/\\&/g
49559s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49560D["\1"]=" \3\\\\\\n"\\/p
49561t cont
49562s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49563t cont
49564d
49565:cont
49566n
49567s/.\{148\}/&'"$ac_delim"'/g
49568t clear
49569:clear
49570s/\\$//
49571t bsnlc
49572s/["\\]/\\&/g; s/^/"/; s/$/"/p
49573d
49574:bsnlc
49575s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49576b cont
49577' <confdefs.h | sed '
49578s/'"$ac_delim"'/"\\\
49579"/g' >>$CONFIG_STATUS || ac_write_fail=1
49580
49581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49582  for (key in D) D_is_set[key] = 1
49583  FS = ""
49584}
49585/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49586  line = \$ 0
49587  split(line, arg, " ")
49588  if (arg[1] == "#") {
49589    defundef = arg[2]
49590    mac1 = arg[3]
49591  } else {
49592    defundef = substr(arg[1], 2)
49593    mac1 = arg[2]
49594  }
49595  split(mac1, mac2, "(") #)
49596  macro = mac2[1]
49597  prefix = substr(line, 1, index(line, defundef) - 1)
49598  if (D_is_set[macro]) {
49599    # Preserve the white space surrounding the "#".
49600    print prefix "define", macro P[macro] D[macro]
49601    next
49602  } else {
49603    # Replace #undef with comments.  This is necessary, for example,
49604    # in the case of _POSIX_SOURCE, which is predefined and required
49605    # on some systems where configure will not decide to define it.
49606    if (defundef == "undef") {
49607      print "/*", prefix defundef, macro, "*/"
49608      next
49609    }
49610  }
49611}
49612{ print }
49613_ACAWK
49614_ACEOF
49615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49616  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49617fi # test -n "$CONFIG_HEADERS"
49618
49619
49620eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49621shift
49622for ac_tag
49623do
49624  case $ac_tag in
49625  :[FHLC]) ac_mode=$ac_tag; continue;;
49626  esac
49627  case $ac_mode$ac_tag in
49628  :[FHL]*:*);;
49629  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49630  :[FH]-) ac_tag=-:-;;
49631  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49632  esac
49633  ac_save_IFS=$IFS
49634  IFS=:
49635  set x $ac_tag
49636  IFS=$ac_save_IFS
49637  shift
49638  ac_file=$1
49639  shift
49640
49641  case $ac_mode in
49642  :L) ac_source=$1;;
49643  :[FH])
49644    ac_file_inputs=
49645    for ac_f
49646    do
49647      case $ac_f in
49648      -) ac_f="$ac_tmp/stdin";;
49649      *) # Look for the file first in the build tree, then in the source tree
49650	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49651	 # because $ac_f cannot contain `:'.
49652	 test -f "$ac_f" ||
49653	   case $ac_f in
49654	   [\\/$]*) false;;
49655	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49656	   esac ||
49657	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49658      esac
49659      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49660      as_fn_append ac_file_inputs " '$ac_f'"
49661    done
49662
49663    # Let's still pretend it is `configure' which instantiates (i.e., don't
49664    # use $as_me), people would be surprised to read:
49665    #    /* config.h.  Generated by config.status.  */
49666    configure_input='Generated from '`
49667	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49668	`' by configure.'
49669    if test x"$ac_file" != x-; then
49670      configure_input="$ac_file.  $configure_input"
49671      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49672$as_echo "$as_me: creating $ac_file" >&6;}
49673    fi
49674    # Neutralize special characters interpreted by sed in replacement strings.
49675    case $configure_input in #(
49676    *\&* | *\|* | *\\* )
49677       ac_sed_conf_input=`$as_echo "$configure_input" |
49678       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49679    *) ac_sed_conf_input=$configure_input;;
49680    esac
49681
49682    case $ac_tag in
49683    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49684      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49685    esac
49686    ;;
49687  esac
49688
49689  ac_dir=`$as_dirname -- "$ac_file" ||
49690$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49691	 X"$ac_file" : 'X\(//\)[^/]' \| \
49692	 X"$ac_file" : 'X\(//\)$' \| \
49693	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49694$as_echo X"$ac_file" |
49695    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49696	    s//\1/
49697	    q
49698	  }
49699	  /^X\(\/\/\)[^/].*/{
49700	    s//\1/
49701	    q
49702	  }
49703	  /^X\(\/\/\)$/{
49704	    s//\1/
49705	    q
49706	  }
49707	  /^X\(\/\).*/{
49708	    s//\1/
49709	    q
49710	  }
49711	  s/.*/./; q'`
49712  as_dir="$ac_dir"; as_fn_mkdir_p
49713  ac_builddir=.
49714
49715case "$ac_dir" in
49716.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49717*)
49718  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49719  # A ".." for each directory in $ac_dir_suffix.
49720  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49721  case $ac_top_builddir_sub in
49722  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49723  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49724  esac ;;
49725esac
49726ac_abs_top_builddir=$ac_pwd
49727ac_abs_builddir=$ac_pwd$ac_dir_suffix
49728# for backward compatibility:
49729ac_top_builddir=$ac_top_build_prefix
49730
49731case $srcdir in
49732  .)  # We are building in place.
49733    ac_srcdir=.
49734    ac_top_srcdir=$ac_top_builddir_sub
49735    ac_abs_top_srcdir=$ac_pwd ;;
49736  [\\/]* | ?:[\\/]* )  # Absolute name.
49737    ac_srcdir=$srcdir$ac_dir_suffix;
49738    ac_top_srcdir=$srcdir
49739    ac_abs_top_srcdir=$srcdir ;;
49740  *) # Relative name.
49741    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49742    ac_top_srcdir=$ac_top_build_prefix$srcdir
49743    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49744esac
49745ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49746
49747
49748  case $ac_mode in
49749  :F)
49750  #
49751  # CONFIG_FILE
49752  #
49753
49754_ACEOF
49755
49756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49757# If the template does not know about datarootdir, expand it.
49758# FIXME: This hack should be removed a few years after 2.60.
49759ac_datarootdir_hack=; ac_datarootdir_seen=
49760ac_sed_dataroot='
49761/datarootdir/ {
49762  p
49763  q
49764}
49765/@datadir@/p
49766/@docdir@/p
49767/@infodir@/p
49768/@localedir@/p
49769/@mandir@/p'
49770case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49771*datarootdir*) ac_datarootdir_seen=yes;;
49772*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49773  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49774$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49775_ACEOF
49776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49777  ac_datarootdir_hack='
49778  s&@datadir@&$datadir&g
49779  s&@docdir@&$docdir&g
49780  s&@infodir@&$infodir&g
49781  s&@localedir@&$localedir&g
49782  s&@mandir@&$mandir&g
49783  s&\\\${datarootdir}&$datarootdir&g' ;;
49784esac
49785_ACEOF
49786
49787# Neutralize VPATH when `$srcdir' = `.'.
49788# Shell code in configure.ac might set extrasub.
49789# FIXME: do we really want to maintain this feature?
49790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49791ac_sed_extra="$ac_vpsub
49792$extrasub
49793_ACEOF
49794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49795:t
49796/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49797s|@configure_input@|$ac_sed_conf_input|;t t
49798s&@top_builddir@&$ac_top_builddir_sub&;t t
49799s&@top_build_prefix@&$ac_top_build_prefix&;t t
49800s&@srcdir@&$ac_srcdir&;t t
49801s&@abs_srcdir@&$ac_abs_srcdir&;t t
49802s&@top_srcdir@&$ac_top_srcdir&;t t
49803s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49804s&@builddir@&$ac_builddir&;t t
49805s&@abs_builddir@&$ac_abs_builddir&;t t
49806s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49807$ac_datarootdir_hack
49808"
49809eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49810  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49811
49812test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49813  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49814  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49815      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49816  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49817which seems to be undefined.  Please make sure it is defined" >&5
49818$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49819which seems to be undefined.  Please make sure it is defined" >&2;}
49820
49821  rm -f "$ac_tmp/stdin"
49822  case $ac_file in
49823  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49824  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49825  esac \
49826  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49827 ;;
49828  :H)
49829  #
49830  # CONFIG_HEADER
49831  #
49832  if test x"$ac_file" != x-; then
49833    {
49834      $as_echo "/* $configure_input  */" \
49835      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49836    } >"$ac_tmp/config.h" \
49837      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49838    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49839      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49840$as_echo "$as_me: $ac_file is unchanged" >&6;}
49841    else
49842      rm -f "$ac_file"
49843      mv "$ac_tmp/config.h" "$ac_file" \
49844	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49845    fi
49846  else
49847    $as_echo "/* $configure_input  */" \
49848      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49849      || as_fn_error $? "could not create -" "$LINENO" 5
49850  fi
49851 ;;
49852
49853
49854  esac
49855
49856done # for ac_tag
49857
49858
49859as_fn_exit 0
49860_ACEOF
49861ac_clean_files=$ac_clean_files_save
49862
49863test $ac_write_fail = 0 ||
49864  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49865
49866
49867# configure is writing to config.log, and then calls config.status.
49868# config.status does its own redirection, appending to config.log.
49869# Unfortunately, on DOS this fails, as config.log is still kept open
49870# by configure, so config.status won't be able to write to it; its
49871# output is simply discarded.  So we exec the FD to /dev/null,
49872# effectively closing config.log, so it can be properly (re)opened and
49873# appended to by config.status.  When coming back to configure, we
49874# need to make the FD available again.
49875if test "$no_create" != yes; then
49876  ac_cs_success=:
49877  ac_config_status_args=
49878  test "$silent" = yes &&
49879    ac_config_status_args="$ac_config_status_args --quiet"
49880  exec 5>/dev/null
49881  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49882  exec 5>>config.log
49883  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49884  # would make configure fail if this is the last instruction.
49885  $ac_cs_success || as_fn_exit 1
49886fi
49887if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49888  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49889$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49890fi
49891
49892
49893# Try to move the config.log file to the output directory.
49894if test -e ./config.log; then
49895  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49896fi
49897
49898# Make the compare script executable
49899$CHMOD +x $OUTPUT_ROOT/compare.sh
49900
49901# Finally output some useful information to the user
49902
49903  # Finally output some useful information to the user
49904
49905  printf "\n"
49906  printf "====================================================\n"
49907  if test "x$no_create" != "xyes"; then
49908    if test "x$IS_RECONFIGURE" != "xyes"; then
49909      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
49910    else
49911      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
49912    fi
49913  else
49914    if test "x$IS_RECONFIGURE" != "xyes"; then
49915      printf "A configuration has been successfully checked but not created\n"
49916    else
49917      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
49918    fi
49919  fi
49920  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49921    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49922  else
49923    printf "using default settings.\n"
49924  fi
49925
49926  printf "\n"
49927  printf "Configuration summary:\n"
49928  printf "* Debug level:    $DEBUG_LEVEL\n"
49929  printf "* JDK variant:    $JDK_VARIANT\n"
49930  printf "* JVM variants:   $with_jvm_variants\n"
49931  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49932
49933  printf "\n"
49934  printf "Tools summary:\n"
49935  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49936    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49937  fi
49938  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49939  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
49940  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
49941  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
49942
49943  printf "\n"
49944  printf "Build performance summary:\n"
49945  printf "* Cores to use:   $JOBS\n"
49946  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49947  if test "x$CCACHE_STATUS" != "x"; then
49948    printf "* ccache status:  $CCACHE_STATUS\n"
49949  fi
49950  printf "\n"
49951
49952  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49953    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49954    printf "will result in longer build times.\n"
49955    printf "\n"
49956  fi
49957
49958  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49959    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49960    printf "These are not respected, and will be ignored. It is recommended\n"
49961    printf "that you clean your environment. The following variables are set:\n"
49962    printf "$FOUND_ALT_VARIABLES\n"
49963    printf "\n"
49964  fi
49965
49966  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49967    printf "WARNING: Your build output directory is not on a local disk.\n"
49968    printf "This will severely degrade build performance!\n"
49969    printf "It is recommended that you create an output directory on a local disk,\n"
49970    printf "and run the configure script again from that directory.\n"
49971    printf "\n"
49972  fi
49973
49974  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
49975    printf "WARNING: The result of this configuration has overridden an older\n"
49976    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
49977    printf "proper build. Failure to do so might result in strange build problems.\n"
49978    printf "\n"
49979  fi
49980
49981  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
49982    printf "WARNING: The result of this configuration was not saved.\n"
49983    printf "You should run without '--no-create | -n' to create the configuration.\n"
49984    printf "\n"
49985  fi
49986
49987