generated-configure.sh revision 954:82b65f34b79d
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637LIBCXX
638LLVM_LIBS
639LLVM_LDFLAGS
640LLVM_CFLAGS
641LLVM_CONFIG
642LIBFFI_LIBS
643LIBFFI_CFLAGS
644STATIC_CXX_SETTING
645LIBDL
646LIBM
647LIBZIP_CAN_USE_MMAP
648USE_EXTERNAL_LIBZ
649USE_EXTERNAL_LIBGIF
650USE_EXTERNAL_LIBJPEG
651ALSA_LIBS
652ALSA_CFLAGS
653FREETYPE_BUNDLE_LIB_PATH
654FREETYPE_LIBS
655FREETYPE_CFLAGS
656CUPS_CFLAGS
657OPENWIN_HOME
658X_EXTRA_LIBS
659X_LIBS
660X_PRE_LIBS
661X_CFLAGS
662XMKMF
663FIXPATH
664CXXFLAGS_DEBUG_SYMBOLS
665CFLAGS_DEBUG_SYMBOLS
666ZIP_DEBUGINFO_FILES
667ENABLE_DEBUG_SYMBOLS
668USING_BROKEN_SUSE_LD
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719ac_ct_STRIP
720ac_ct_NM
721MCS
722STRIP
723GNM
724NM
725AS
726CXXCPP
727CPP
728COMPILER_TYPE
729RC_FLAGS
730DUMPBIN
731WINAR
732HOTSPOT_RC
733HOTSPOT_MT
734RC
735MT
736WINLD
737HOTSPOT_LD
738HOTSPOT_CXX
739ARFLAGS
740ac_ct_AR
741AR
742LDEXECXX
743LDCXX
744LDEXE
745LD
746ac_ct_OBJC
747OBJCFLAGS
748OBJC
749ac_ct_CXX
750CXXFLAGS
751CXX
752ac_ct_PROPER_COMPILER_CXX
753PROPER_COMPILER_CXX
754TOOLS_DIR_CXX
755POTENTIAL_CXX
756COMPILER_TARGET_BITS_FLAG
757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764ac_ct_PROPER_COMPILER_CC
765PROPER_COMPILER_CC
766TOOLS_DIR_CC
767POTENTIAL_CC
768BUILD_LD
769BUILD_CXX
770BUILD_CC
771MSVCR_DLL
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776AR_OUT_OPTION
777LD_OUT_OPTION
778EXE_OUT_OPTION
779CC_OUT_OPTION
780BUILD_HOTSPOT
781HOTSPOT_DIST
782BUILD_OUTPUT
783OVERRIDE_SRC_ROOT
784ADD_SRC_ROOT
785JDK_TOPDIR
786NASHORN_TOPDIR
787HOTSPOT_TOPDIR
788JAXWS_TOPDIR
789JAXP_TOPDIR
790CORBA_TOPDIR
791LANGTOOLS_TOPDIR
792BOOT_JDK_JVMARGS
793JAVAC_FLAGS
794BOOT_JDK_SOURCETARGET
795BOOT_JDK
796BOOT_TOOLSJAR
797BOOT_RTJAR
798JAVA_CHECK
799JAVAC_CHECK
800COOKED_BUILD_NUMBER
801JDK_VERSION
802COPYRIGHT_YEAR
803MACOSX_BUNDLE_ID_BASE
804MACOSX_BUNDLE_NAME_BASE
805COMPANY_NAME
806JDK_RC_PLATFORM_NAME
807PRODUCT_SUFFIX
808PRODUCT_NAME
809LAUNCHER_NAME
810MILESTONE
811JDK_BUILD_NUMBER
812JDK_UPDATE_VERSION
813JDK_MICRO_VERSION
814JDK_MINOR_VERSION
815JDK_MAJOR_VERSION
816USER_RELEASE_SUFFIX
817COMPRESS_JARS
818UNLIMITED_CRYPTO
819CACERTS_FILE
820TEST_IN_BUILD
821BUILD_HEADLESS
822SUPPORT_HEADFUL
823SUPPORT_HEADLESS
824BDEPS_FTP
825BDEPS_UNZIP
826OS_VERSION_MICRO
827OS_VERSION_MINOR
828OS_VERSION_MAJOR
829PKG_CONFIG
830CODESIGN
831XATTR
832DSYMUTIL
833IS_GNU_TIME
834TIME
835STAT
836HG
837READELF
838OTOOL
839LDD
840ZIP
841UNZIP
842FIND_DELETE
843MAKE
844CHECK_TOOLSDIR_MAKE
845CHECK_TOOLSDIR_GMAKE
846CHECK_MAKE
847CHECK_GMAKE
848PKGHANDLER
849OUTPUT_ROOT
850CONF_NAME
851SPEC
852BUILD_VARIANT_RELEASE
853DEBUG_CLASSFILES
854FASTDEBUG
855VARIANT
856DEBUG_LEVEL
857MACOSX_UNIVERSAL
858INCLUDE_SA
859JVM_VARIANT_CORE
860JVM_VARIANT_ZEROSHARK
861JVM_VARIANT_ZERO
862JVM_VARIANT_KERNEL
863JVM_VARIANT_MINIMAL1
864JVM_VARIANT_CLIENT
865JVM_VARIANT_SERVER
866JVM_VARIANTS
867JVM_INTERPRETER
868JDK_VARIANT
869SET_OPENJDK
870BUILD_LOG_WRAPPER
871BUILD_LOG_PREVIOUS
872BUILD_LOG
873SYS_ROOT
874PATH_SEP
875SRC_ROOT
876ZERO_ARCHDEF
877DEFINE_CROSS_COMPILE_ARCH
878LP64
879OPENJDK_TARGET_OS_EXPORT_DIR
880OPENJDK_TARGET_OS_API_DIR
881OPENJDK_TARGET_CPU_JLI_CFLAGS
882OPENJDK_TARGET_CPU_OSARCH
883OPENJDK_TARGET_CPU_ISADIR
884OPENJDK_TARGET_CPU_LIBDIR
885OPENJDK_TARGET_CPU_LEGACY_LIB
886OPENJDK_TARGET_CPU_LEGACY
887REQUIRED_OS_VERSION
888REQUIRED_OS_NAME
889COMPILE_TYPE
890OPENJDK_TARGET_CPU_ENDIAN
891OPENJDK_TARGET_CPU_BITS
892OPENJDK_TARGET_CPU_ARCH
893OPENJDK_TARGET_CPU
894OPENJDK_TARGET_OS_API
895OPENJDK_TARGET_OS
896OPENJDK_BUILD_CPU_ENDIAN
897OPENJDK_BUILD_CPU_BITS
898OPENJDK_BUILD_CPU_ARCH
899OPENJDK_BUILD_CPU
900OPENJDK_BUILD_OS_API
901OPENJDK_BUILD_OS
902OPENJDK_BUILD_AUTOCONF_NAME
903OPENJDK_TARGET_AUTOCONF_NAME
904target_os
905target_vendor
906target_cpu
907target
908host_os
909host_vendor
910host_cpu
911host
912build_os
913build_vendor
914build_cpu
915build
916SETFILE
917DF
918READLINK
919CYGPATH
920SED
921FGREP
922EGREP
923GREP
924AWK
925XARGS
926WHICH
927WC
928UNIQ
929UNAME
930TR
931TOUCH
932TEE
933TAR
934TAIL
935SORT
936SH
937RM
938PRINTF
939NAWK
940MV
941MKTEMP
942MKDIR
943LS
944LN
945HEAD
946FIND
947FILE
948EXPR
949ECHO
950DIRNAME
951DIFF
952DATE
953CUT
954CPIO
955CP
956COMM
957CMP
958CHMOD
959CAT
960BASH
961BASENAME
962DATE_WHEN_CONFIGURED
963CONFIGURE_COMMAND_LINE
964CUSTOM_MAKE_DIR
965target_alias
966host_alias
967build_alias
968LIBS
969ECHO_T
970ECHO_N
971ECHO_C
972DEFS
973mandir
974localedir
975libdir
976psdir
977pdfdir
978dvidir
979htmldir
980infodir
981docdir
982oldincludedir
983includedir
984localstatedir
985sharedstatedir
986sysconfdir
987datadir
988datarootdir
989libexecdir
990sbindir
991bindir
992program_transform_name
993prefix
994exec_prefix
995PACKAGE_URL
996PACKAGE_BUGREPORT
997PACKAGE_STRING
998PACKAGE_VERSION
999PACKAGE_TARNAME
1000PACKAGE_NAME
1001PATH_SEPARATOR
1002SHELL'
1003ac_subst_files=''
1004ac_user_opts='
1005enable_option_checking
1006with_custom_make_dir
1007with_target_bits
1008with_sys_root
1009with_tools_dir
1010with_devkit
1011enable_openjdk_only
1012with_jdk_variant
1013with_jvm_interpreter
1014with_jvm_variants
1015enable_debug
1016with_debug_level
1017with_conf_name
1018with_builddeps_conf
1019with_builddeps_server
1020with_builddeps_dir
1021with_builddeps_group
1022enable_headful
1023enable_hotspot_test_in_build
1024with_cacerts_file
1025enable_unlimited_crypto
1026with_milestone
1027with_update_version
1028with_user_release_suffix
1029with_build_number
1030with_boot_jdk
1031with_boot_jdk_jvmargs
1032with_add_source_root
1033with_override_source_root
1034with_adds_and_overrides
1035with_override_langtools
1036with_override_corba
1037with_override_jaxp
1038with_override_jaxws
1039with_override_hotspot
1040with_override_nashorn
1041with_override_jdk
1042with_import_hotspot
1043with_msvcr_dll
1044with_dxsdk
1045with_dxsdk_lib
1046with_dxsdk_include
1047with_jtreg
1048with_extra_cflags
1049with_extra_cxxflags
1050with_extra_ldflags
1051enable_debug_symbols
1052enable_zip_debug_info
1053enable_macosx_runtime_support
1054with_x
1055with_cups
1056with_cups_include
1057with_freetype
1058with_freetype_include
1059with_freetype_lib
1060enable_freetype_bundling
1061with_alsa
1062with_alsa_include
1063with_alsa_lib
1064with_giflib
1065with_zlib
1066with_stdc__lib
1067with_num_cores
1068with_memory_size
1069with_jobs
1070with_sjavac_server_java
1071enable_sjavac
1072enable_precompiled_headers
1073enable_ccache
1074with_ccache_dir
1075'
1076      ac_precious_vars='build_alias
1077host_alias
1078target_alias
1079BASENAME
1080BASH
1081CAT
1082CHMOD
1083CMP
1084COMM
1085CP
1086CPIO
1087CUT
1088DATE
1089DIFF
1090DIRNAME
1091ECHO
1092EXPR
1093FILE
1094FIND
1095HEAD
1096LN
1097LS
1098MKDIR
1099MKTEMP
1100MV
1101NAWK
1102PRINTF
1103RM
1104SH
1105SORT
1106TAIL
1107TAR
1108TEE
1109TOUCH
1110TR
1111UNAME
1112UNIQ
1113WC
1114WHICH
1115XARGS
1116AWK
1117GREP
1118EGREP
1119FGREP
1120SED
1121CYGPATH
1122READLINK
1123DF
1124SETFILE
1125UNZIP
1126ZIP
1127LDD
1128OTOOL
1129READELF
1130HG
1131STAT
1132TIME
1133DSYMUTIL
1134XATTR
1135CODESIGN
1136PKG_CONFIG
1137BUILD_CC
1138BUILD_CXX
1139BUILD_LD
1140CC
1141CFLAGS
1142LDFLAGS
1143LIBS
1144CPPFLAGS
1145CXX
1146CXXFLAGS
1147CCC
1148OBJC
1149OBJCFLAGS
1150AR
1151CPP
1152CXXCPP
1153AS
1154NM
1155GNM
1156STRIP
1157MCS
1158OBJCOPY
1159OBJDUMP
1160LIPO
1161JTREGEXE
1162XMKMF
1163FREETYPE_CFLAGS
1164FREETYPE_LIBS
1165ALSA_CFLAGS
1166ALSA_LIBS
1167LIBFFI_CFLAGS
1168LIBFFI_LIBS'
1169
1170
1171# Initialize some variables set by options.
1172ac_init_help=
1173ac_init_version=false
1174ac_unrecognized_opts=
1175ac_unrecognized_sep=
1176# The variables have the same names as the options, with
1177# dashes changed to underlines.
1178cache_file=/dev/null
1179exec_prefix=NONE
1180no_create=
1181no_recursion=
1182prefix=NONE
1183program_prefix=NONE
1184program_suffix=NONE
1185program_transform_name=s,x,x,
1186silent=
1187site=
1188srcdir=
1189verbose=
1190x_includes=NONE
1191x_libraries=NONE
1192
1193# Installation directory options.
1194# These are left unexpanded so users can "make install exec_prefix=/foo"
1195# and all the variables that are supposed to be based on exec_prefix
1196# by default will actually change.
1197# Use braces instead of parens because sh, perl, etc. also accept them.
1198# (The list follows the same order as the GNU Coding Standards.)
1199bindir='${exec_prefix}/bin'
1200sbindir='${exec_prefix}/sbin'
1201libexecdir='${exec_prefix}/libexec'
1202datarootdir='${prefix}/share'
1203datadir='${datarootdir}'
1204sysconfdir='${prefix}/etc'
1205sharedstatedir='${prefix}/com'
1206localstatedir='${prefix}/var'
1207includedir='${prefix}/include'
1208oldincludedir='/usr/include'
1209docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1210infodir='${datarootdir}/info'
1211htmldir='${docdir}'
1212dvidir='${docdir}'
1213pdfdir='${docdir}'
1214psdir='${docdir}'
1215libdir='${exec_prefix}/lib'
1216localedir='${datarootdir}/locale'
1217mandir='${datarootdir}/man'
1218
1219ac_prev=
1220ac_dashdash=
1221for ac_option
1222do
1223  # If the previous option needs an argument, assign it.
1224  if test -n "$ac_prev"; then
1225    eval $ac_prev=\$ac_option
1226    ac_prev=
1227    continue
1228  fi
1229
1230  case $ac_option in
1231  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1232  *=)   ac_optarg= ;;
1233  *)    ac_optarg=yes ;;
1234  esac
1235
1236  # Accept the important Cygnus configure options, so we can diagnose typos.
1237
1238  case $ac_dashdash$ac_option in
1239  --)
1240    ac_dashdash=yes ;;
1241
1242  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1243    ac_prev=bindir ;;
1244  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1245    bindir=$ac_optarg ;;
1246
1247  -build | --build | --buil | --bui | --bu)
1248    ac_prev=build_alias ;;
1249  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1250    build_alias=$ac_optarg ;;
1251
1252  -cache-file | --cache-file | --cache-fil | --cache-fi \
1253  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1254    ac_prev=cache_file ;;
1255  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1256  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1257    cache_file=$ac_optarg ;;
1258
1259  --config-cache | -C)
1260    cache_file=config.cache ;;
1261
1262  -datadir | --datadir | --datadi | --datad)
1263    ac_prev=datadir ;;
1264  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1265    datadir=$ac_optarg ;;
1266
1267  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1268  | --dataroo | --dataro | --datar)
1269    ac_prev=datarootdir ;;
1270  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1271  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1272    datarootdir=$ac_optarg ;;
1273
1274  -disable-* | --disable-*)
1275    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1276    # Reject names that are not valid shell variable names.
1277    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1278      as_fn_error $? "invalid feature name: $ac_useropt"
1279    ac_useropt_orig=$ac_useropt
1280    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1281    case $ac_user_opts in
1282      *"
1283"enable_$ac_useropt"
1284"*) ;;
1285      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1286	 ac_unrecognized_sep=', ';;
1287    esac
1288    eval enable_$ac_useropt=no ;;
1289
1290  -docdir | --docdir | --docdi | --doc | --do)
1291    ac_prev=docdir ;;
1292  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1293    docdir=$ac_optarg ;;
1294
1295  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1296    ac_prev=dvidir ;;
1297  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1298    dvidir=$ac_optarg ;;
1299
1300  -enable-* | --enable-*)
1301    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1302    # Reject names that are not valid shell variable names.
1303    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1304      as_fn_error $? "invalid feature name: $ac_useropt"
1305    ac_useropt_orig=$ac_useropt
1306    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1307    case $ac_user_opts in
1308      *"
1309"enable_$ac_useropt"
1310"*) ;;
1311      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1312	 ac_unrecognized_sep=', ';;
1313    esac
1314    eval enable_$ac_useropt=\$ac_optarg ;;
1315
1316  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1317  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1318  | --exec | --exe | --ex)
1319    ac_prev=exec_prefix ;;
1320  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1321  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1322  | --exec=* | --exe=* | --ex=*)
1323    exec_prefix=$ac_optarg ;;
1324
1325  -gas | --gas | --ga | --g)
1326    # Obsolete; use --with-gas.
1327    with_gas=yes ;;
1328
1329  -help | --help | --hel | --he | -h)
1330    ac_init_help=long ;;
1331  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1332    ac_init_help=recursive ;;
1333  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1334    ac_init_help=short ;;
1335
1336  -host | --host | --hos | --ho)
1337    ac_prev=host_alias ;;
1338  -host=* | --host=* | --hos=* | --ho=*)
1339    host_alias=$ac_optarg ;;
1340
1341  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1342    ac_prev=htmldir ;;
1343  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1344  | --ht=*)
1345    htmldir=$ac_optarg ;;
1346
1347  -includedir | --includedir | --includedi | --included | --include \
1348  | --includ | --inclu | --incl | --inc)
1349    ac_prev=includedir ;;
1350  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1351  | --includ=* | --inclu=* | --incl=* | --inc=*)
1352    includedir=$ac_optarg ;;
1353
1354  -infodir | --infodir | --infodi | --infod | --info | --inf)
1355    ac_prev=infodir ;;
1356  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1357    infodir=$ac_optarg ;;
1358
1359  -libdir | --libdir | --libdi | --libd)
1360    ac_prev=libdir ;;
1361  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1362    libdir=$ac_optarg ;;
1363
1364  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1365  | --libexe | --libex | --libe)
1366    ac_prev=libexecdir ;;
1367  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1368  | --libexe=* | --libex=* | --libe=*)
1369    libexecdir=$ac_optarg ;;
1370
1371  -localedir | --localedir | --localedi | --localed | --locale)
1372    ac_prev=localedir ;;
1373  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1374    localedir=$ac_optarg ;;
1375
1376  -localstatedir | --localstatedir | --localstatedi | --localstated \
1377  | --localstate | --localstat | --localsta | --localst | --locals)
1378    ac_prev=localstatedir ;;
1379  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1380  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1381    localstatedir=$ac_optarg ;;
1382
1383  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1384    ac_prev=mandir ;;
1385  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1386    mandir=$ac_optarg ;;
1387
1388  -nfp | --nfp | --nf)
1389    # Obsolete; use --without-fp.
1390    with_fp=no ;;
1391
1392  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1393  | --no-cr | --no-c | -n)
1394    no_create=yes ;;
1395
1396  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1397  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1398    no_recursion=yes ;;
1399
1400  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1401  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1402  | --oldin | --oldi | --old | --ol | --o)
1403    ac_prev=oldincludedir ;;
1404  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1405  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1406  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1407    oldincludedir=$ac_optarg ;;
1408
1409  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1410    ac_prev=prefix ;;
1411  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1412    prefix=$ac_optarg ;;
1413
1414  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1415  | --program-pre | --program-pr | --program-p)
1416    ac_prev=program_prefix ;;
1417  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1418  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1419    program_prefix=$ac_optarg ;;
1420
1421  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1422  | --program-suf | --program-su | --program-s)
1423    ac_prev=program_suffix ;;
1424  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1425  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1426    program_suffix=$ac_optarg ;;
1427
1428  -program-transform-name | --program-transform-name \
1429  | --program-transform-nam | --program-transform-na \
1430  | --program-transform-n | --program-transform- \
1431  | --program-transform | --program-transfor \
1432  | --program-transfo | --program-transf \
1433  | --program-trans | --program-tran \
1434  | --progr-tra | --program-tr | --program-t)
1435    ac_prev=program_transform_name ;;
1436  -program-transform-name=* | --program-transform-name=* \
1437  | --program-transform-nam=* | --program-transform-na=* \
1438  | --program-transform-n=* | --program-transform-=* \
1439  | --program-transform=* | --program-transfor=* \
1440  | --program-transfo=* | --program-transf=* \
1441  | --program-trans=* | --program-tran=* \
1442  | --progr-tra=* | --program-tr=* | --program-t=*)
1443    program_transform_name=$ac_optarg ;;
1444
1445  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1446    ac_prev=pdfdir ;;
1447  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1448    pdfdir=$ac_optarg ;;
1449
1450  -psdir | --psdir | --psdi | --psd | --ps)
1451    ac_prev=psdir ;;
1452  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1453    psdir=$ac_optarg ;;
1454
1455  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1456  | -silent | --silent | --silen | --sile | --sil)
1457    silent=yes ;;
1458
1459  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1460    ac_prev=sbindir ;;
1461  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1462  | --sbi=* | --sb=*)
1463    sbindir=$ac_optarg ;;
1464
1465  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1466  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1467  | --sharedst | --shareds | --shared | --share | --shar \
1468  | --sha | --sh)
1469    ac_prev=sharedstatedir ;;
1470  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1471  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1472  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1473  | --sha=* | --sh=*)
1474    sharedstatedir=$ac_optarg ;;
1475
1476  -site | --site | --sit)
1477    ac_prev=site ;;
1478  -site=* | --site=* | --sit=*)
1479    site=$ac_optarg ;;
1480
1481  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1482    ac_prev=srcdir ;;
1483  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1484    srcdir=$ac_optarg ;;
1485
1486  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1487  | --syscon | --sysco | --sysc | --sys | --sy)
1488    ac_prev=sysconfdir ;;
1489  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1490  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1491    sysconfdir=$ac_optarg ;;
1492
1493  -target | --target | --targe | --targ | --tar | --ta | --t)
1494    ac_prev=target_alias ;;
1495  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1496    target_alias=$ac_optarg ;;
1497
1498  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1499    verbose=yes ;;
1500
1501  -version | --version | --versio | --versi | --vers | -V)
1502    ac_init_version=: ;;
1503
1504  -with-* | --with-*)
1505    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1506    # Reject names that are not valid shell variable names.
1507    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1508      as_fn_error $? "invalid package name: $ac_useropt"
1509    ac_useropt_orig=$ac_useropt
1510    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1511    case $ac_user_opts in
1512      *"
1513"with_$ac_useropt"
1514"*) ;;
1515      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1516	 ac_unrecognized_sep=', ';;
1517    esac
1518    eval with_$ac_useropt=\$ac_optarg ;;
1519
1520  -without-* | --without-*)
1521    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1522    # Reject names that are not valid shell variable names.
1523    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1524      as_fn_error $? "invalid package name: $ac_useropt"
1525    ac_useropt_orig=$ac_useropt
1526    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1527    case $ac_user_opts in
1528      *"
1529"with_$ac_useropt"
1530"*) ;;
1531      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1532	 ac_unrecognized_sep=', ';;
1533    esac
1534    eval with_$ac_useropt=no ;;
1535
1536  --x)
1537    # Obsolete; use --with-x.
1538    with_x=yes ;;
1539
1540  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1541  | --x-incl | --x-inc | --x-in | --x-i)
1542    ac_prev=x_includes ;;
1543  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1544  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1545    x_includes=$ac_optarg ;;
1546
1547  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1548  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1549    ac_prev=x_libraries ;;
1550  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1551  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1552    x_libraries=$ac_optarg ;;
1553
1554  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1555Try \`$0 --help' for more information"
1556    ;;
1557
1558  *=*)
1559    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1560    # Reject names that are not valid shell variable names.
1561    case $ac_envvar in #(
1562      '' | [0-9]* | *[!_$as_cr_alnum]* )
1563      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1564    esac
1565    eval $ac_envvar=\$ac_optarg
1566    export $ac_envvar ;;
1567
1568  *)
1569    # FIXME: should be removed in autoconf 3.0.
1570    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1571    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1572      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1573    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1574    ;;
1575
1576  esac
1577done
1578
1579if test -n "$ac_prev"; then
1580  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1581  as_fn_error $? "missing argument to $ac_option"
1582fi
1583
1584if test -n "$ac_unrecognized_opts"; then
1585  case $enable_option_checking in
1586    no) ;;
1587    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1588    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1589  esac
1590fi
1591
1592# Check all directory arguments for consistency.
1593for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1594		datadir sysconfdir sharedstatedir localstatedir includedir \
1595		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1596		libdir localedir mandir
1597do
1598  eval ac_val=\$$ac_var
1599  # Remove trailing slashes.
1600  case $ac_val in
1601    */ )
1602      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1603      eval $ac_var=\$ac_val;;
1604  esac
1605  # Be sure to have absolute directory names.
1606  case $ac_val in
1607    [\\/$]* | ?:[\\/]* )  continue;;
1608    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1609  esac
1610  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1611done
1612
1613# There might be people who depend on the old broken behavior: `$host'
1614# used to hold the argument of --host etc.
1615# FIXME: To remove some day.
1616build=$build_alias
1617host=$host_alias
1618target=$target_alias
1619
1620# FIXME: To remove some day.
1621if test "x$host_alias" != x; then
1622  if test "x$build_alias" = x; then
1623    cross_compiling=maybe
1624  elif test "x$build_alias" != "x$host_alias"; then
1625    cross_compiling=yes
1626  fi
1627fi
1628
1629ac_tool_prefix=
1630test -n "$host_alias" && ac_tool_prefix=$host_alias-
1631
1632test "$silent" = yes && exec 6>/dev/null
1633
1634
1635ac_pwd=`pwd` && test -n "$ac_pwd" &&
1636ac_ls_di=`ls -di .` &&
1637ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1638  as_fn_error $? "working directory cannot be determined"
1639test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1640  as_fn_error $? "pwd does not report name of working directory"
1641
1642
1643# Find the source files, if location was not specified.
1644if test -z "$srcdir"; then
1645  ac_srcdir_defaulted=yes
1646  # Try the directory containing this script, then the parent directory.
1647  ac_confdir=`$as_dirname -- "$as_myself" ||
1648$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1649	 X"$as_myself" : 'X\(//\)[^/]' \| \
1650	 X"$as_myself" : 'X\(//\)$' \| \
1651	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1652$as_echo X"$as_myself" |
1653    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1654	    s//\1/
1655	    q
1656	  }
1657	  /^X\(\/\/\)[^/].*/{
1658	    s//\1/
1659	    q
1660	  }
1661	  /^X\(\/\/\)$/{
1662	    s//\1/
1663	    q
1664	  }
1665	  /^X\(\/\).*/{
1666	    s//\1/
1667	    q
1668	  }
1669	  s/.*/./; q'`
1670  srcdir=$ac_confdir
1671  if test ! -r "$srcdir/$ac_unique_file"; then
1672    srcdir=..
1673  fi
1674else
1675  ac_srcdir_defaulted=no
1676fi
1677if test ! -r "$srcdir/$ac_unique_file"; then
1678  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1679  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1680fi
1681ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1682ac_abs_confdir=`(
1683	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1684	pwd)`
1685# When building in place, set srcdir=.
1686if test "$ac_abs_confdir" = "$ac_pwd"; then
1687  srcdir=.
1688fi
1689# Remove unnecessary trailing slashes from srcdir.
1690# Double slashes in file names in object file debugging info
1691# mess up M-x gdb in Emacs.
1692case $srcdir in
1693*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1694esac
1695for ac_var in $ac_precious_vars; do
1696  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1697  eval ac_env_${ac_var}_value=\$${ac_var}
1698  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1699  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1700done
1701
1702#
1703# Report the --help message.
1704#
1705if test "$ac_init_help" = "long"; then
1706  # Omit some internal or obsolete options to make the list less imposing.
1707  # This message is too long to be a string in the A/UX 3.1 sh.
1708  cat <<_ACEOF
1709\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1710
1711Usage: $0 [OPTION]... [VAR=VALUE]...
1712
1713To assign environment variables (e.g., CC, CFLAGS...), specify them as
1714VAR=VALUE.  See below for descriptions of some of the useful variables.
1715
1716Defaults for the options are specified in brackets.
1717
1718Configuration:
1719  -h, --help              display this help and exit
1720      --help=short        display options specific to this package
1721      --help=recursive    display the short help of all the included packages
1722  -V, --version           display version information and exit
1723  -q, --quiet, --silent   do not print \`checking ...' messages
1724      --cache-file=FILE   cache test results in FILE [disabled]
1725  -C, --config-cache      alias for \`--cache-file=config.cache'
1726  -n, --no-create         do not create output files
1727      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1728
1729Installation directories:
1730  --prefix=PREFIX         install architecture-independent files in PREFIX
1731                          [$ac_default_prefix]
1732  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1733                          [PREFIX]
1734
1735By default, \`make install' will install all the files in
1736\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1737an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1738for instance \`--prefix=\$HOME'.
1739
1740For better control, use the options below.
1741
1742Fine tuning of the installation directories:
1743  --bindir=DIR            user executables [EPREFIX/bin]
1744  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1745  --libexecdir=DIR        program executables [EPREFIX/libexec]
1746  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1747  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1748  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1749  --libdir=DIR            object code libraries [EPREFIX/lib]
1750  --includedir=DIR        C header files [PREFIX/include]
1751  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1752  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1753  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1754  --infodir=DIR           info documentation [DATAROOTDIR/info]
1755  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1756  --mandir=DIR            man documentation [DATAROOTDIR/man]
1757  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1758  --htmldir=DIR           html documentation [DOCDIR]
1759  --dvidir=DIR            dvi documentation [DOCDIR]
1760  --pdfdir=DIR            pdf documentation [DOCDIR]
1761  --psdir=DIR             ps documentation [DOCDIR]
1762_ACEOF
1763
1764  cat <<\_ACEOF
1765
1766X features:
1767  --x-includes=DIR    X include files are in DIR
1768  --x-libraries=DIR   X library files are in DIR
1769
1770System types:
1771  --build=BUILD     configure for building on BUILD [guessed]
1772  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1773  --target=TARGET   configure for building compilers for TARGET [HOST]
1774_ACEOF
1775fi
1776
1777if test -n "$ac_init_help"; then
1778  case $ac_init_help in
1779     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1780   esac
1781  cat <<\_ACEOF
1782
1783Optional Features:
1784  --disable-option-checking  ignore unrecognized --enable/--with options
1785  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1786  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1787  --enable-openjdk-only   suppress building custom source even if present
1788                          [disabled]
1789  --enable-debug          set the debug level to fastdebug (shorthand for
1790                          --with-debug-level=fastdebug) [disabled]
1791  --disable-headful       disable building headful support (graphical UI
1792                          support) [enabled]
1793  --enable-hotspot-test-in-build
1794                          run the Queens test after Hotspot build [disabled]
1795  --enable-unlimited-crypto
1796                          Enable unlimited crypto policy [disabled]
1797  --disable-debug-symbols disable generation of debug symbols [enabled]
1798  --disable-zip-debug-info
1799                          disable zipping of debug-info files [enabled]
1800  --enable-macosx-runtime-support
1801                          Deprecated. Option is kept for backwards
1802                          compatibility and is ignored
1803  --disable-freetype-bundling
1804                          disable bundling of the freetype library with the
1805                          build result [enabled on Windows or when using
1806                          --with-freetype, disabled otherwise]
1807  --enable-sjavac         use sjavac to do fast incremental compiles
1808                          [disabled]
1809  --disable-precompiled-headers
1810                          disable using precompiled headers when compiling C++
1811                          [enabled]
1812  --enable-ccache         enable using ccache to speed up recompilations
1813                          [disabled]
1814
1815Optional Packages:
1816  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1817  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1818  --with-custom-make-dir  use this directory for custom build/make files
1819  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1820                          support it), e.g. --with-target-bits=32 [guessed]
1821  --with-sys-root         pass this sys-root to the compilers and tools (for
1822                          cross-compiling)
1823  --with-tools-dir        search this directory for compilers and tools (for
1824                          cross-compiling)
1825  --with-devkit           use this directory as base for tools-dir and
1826                          sys-root (for cross-compiling)
1827  --with-jdk-variant      JDK variant to build (normal) [normal]
1828  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1829  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1830                          client, minimal1, kernel, zero, zeroshark, core)
1831                          [server]
1832  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1833                          [release]
1834  --with-conf-name        use this as the name of the configuration [generated
1835                          from important configuration options]
1836  --with-builddeps-conf   use this configuration file for the builddeps
1837  --with-builddeps-server download and use build dependencies from this server
1838                          url
1839  --with-builddeps-dir    store downloaded build dependencies here
1840                          [/localhome/builddeps]
1841  --with-builddeps-group  chgrp the downloaded build dependencies to this
1842                          group
1843  --with-cacerts-file     specify alternative cacerts file
1844  --with-milestone        Set milestone value for build [internal]
1845  --with-update-version   Set update version value for build [b00]
1846  --with-user-release-suffix
1847                          Add a custom string to the version string if build
1848                          number isn't set.[username_builddateb00]
1849  --with-build-number     Set build number value for build [b00]
1850  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1851  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1852                          invocations of the Boot JDK, overriding the default
1853                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1854                          -enableassertions"
1855  --with-add-source-root  for each and every source directory, look in this
1856                          additional source root for the same directory; if it
1857                          exists and have files in it, include it in the build
1858  --with-override-source-root
1859                          for each and every source directory, look in this
1860                          override source root for the same directory; if it
1861                          exists, use that directory instead and ignore the
1862                          directory in the original source root
1863  --with-adds-and-overrides
1864                          use the subdirs 'adds' and 'overrides' in the
1865                          specified directory as add-source-root and
1866                          override-source-root
1867  --with-override-langtools
1868                          use this langtools dir for the build
1869  --with-override-corba   use this corba dir for the build
1870  --with-override-jaxp    use this jaxp dir for the build
1871  --with-override-jaxws   use this jaxws dir for the build
1872  --with-override-hotspot use this hotspot dir for the build
1873  --with-override-nashorn use this nashorn dir for the build
1874  --with-override-jdk     use this jdk dir for the build
1875  --with-import-hotspot   import hotspot binaries from this jdk image or
1876                          hotspot build dist dir instead of building from
1877                          source
1878  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1879                          only) [probed]
1880  --with-dxsdk            Deprecated. Option is kept for backwards
1881                          compatibility and is ignored
1882  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1883                          compatibility and is ignored
1884  --with-dxsdk-include    Deprecated. Option is kept for backwards
1885                          compatibility and is ignored
1886  --with-jtreg            Regression Test Harness [probed]
1887  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1888  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1889  --with-extra-ldflags    extra flags to be used when linking jdk
1890  --with-x                use the X Window System
1891  --with-cups             specify prefix directory for the cups package
1892                          (expecting the headers under PATH/include)
1893  --with-cups-include     specify directory for the cups include files
1894  --with-freetype         specify prefix directory for the freetype package
1895                          (expecting the libraries under PATH/lib and the
1896                          headers under PATH/include)
1897  --with-freetype-include specify directory for the freetype include files
1898  --with-freetype-lib     specify directory for the freetype library
1899  --with-alsa             specify prefix directory for the alsa package
1900                          (expecting the libraries under PATH/lib and the
1901                          headers under PATH/include)
1902  --with-alsa-include     specify directory for the alsa include files
1903  --with-alsa-lib         specify directory for the alsa library
1904  --with-giflib           use giflib from build system or OpenJDK source
1905                          (system, bundled) [bundled]
1906  --with-zlib             use zlib from build system or OpenJDK source
1907                          (system, bundled) [bundled]
1908  --with-stdc++lib=<static>,<dynamic>,<default>
1909                          force linking of the C++ runtime on Linux to either
1910                          static or dynamic, default is static with dynamic as
1911                          fallback
1912  --with-num-cores        number of cores in the build system, e.g.
1913                          --with-num-cores=8 [probed]
1914  --with-memory-size      memory (in MB) available in the build system, e.g.
1915                          --with-memory-size=1024 [probed]
1916  --with-jobs             number of parallel jobs to let make run [calculated
1917                          based on cores and memory]
1918  --with-sjavac-server-java
1919                          use this java binary for running the sjavac
1920                          background server [Boot JDK java]
1921  --with-ccache-dir       where to store ccache files [~/.ccache]
1922
1923Some influential environment variables:
1924  BASENAME    Override default value for BASENAME
1925  BASH        Override default value for BASH
1926  CAT         Override default value for CAT
1927  CHMOD       Override default value for CHMOD
1928  CMP         Override default value for CMP
1929  COMM        Override default value for COMM
1930  CP          Override default value for CP
1931  CPIO        Override default value for CPIO
1932  CUT         Override default value for CUT
1933  DATE        Override default value for DATE
1934  DIFF        Override default value for DIFF
1935  DIRNAME     Override default value for DIRNAME
1936  ECHO        Override default value for ECHO
1937  EXPR        Override default value for EXPR
1938  FILE        Override default value for FILE
1939  FIND        Override default value for FIND
1940  HEAD        Override default value for HEAD
1941  LN          Override default value for LN
1942  LS          Override default value for LS
1943  MKDIR       Override default value for MKDIR
1944  MKTEMP      Override default value for MKTEMP
1945  MV          Override default value for MV
1946  NAWK        Override default value for NAWK
1947  PRINTF      Override default value for PRINTF
1948  RM          Override default value for RM
1949  SH          Override default value for SH
1950  SORT        Override default value for SORT
1951  TAIL        Override default value for TAIL
1952  TAR         Override default value for TAR
1953  TEE         Override default value for TEE
1954  TOUCH       Override default value for TOUCH
1955  TR          Override default value for TR
1956  UNAME       Override default value for UNAME
1957  UNIQ        Override default value for UNIQ
1958  WC          Override default value for WC
1959  WHICH       Override default value for WHICH
1960  XARGS       Override default value for XARGS
1961  AWK         Override default value for AWK
1962  GREP        Override default value for GREP
1963  EGREP       Override default value for EGREP
1964  FGREP       Override default value for FGREP
1965  SED         Override default value for SED
1966  CYGPATH     Override default value for CYGPATH
1967  READLINK    Override default value for READLINK
1968  DF          Override default value for DF
1969  SETFILE     Override default value for SETFILE
1970  UNZIP       Override default value for UNZIP
1971  ZIP         Override default value for ZIP
1972  LDD         Override default value for LDD
1973  OTOOL       Override default value for OTOOL
1974  READELF     Override default value for READELF
1975  HG          Override default value for HG
1976  STAT        Override default value for STAT
1977  TIME        Override default value for TIME
1978  DSYMUTIL    Override default value for DSYMUTIL
1979  XATTR       Override default value for XATTR
1980  CODESIGN    Override default value for CODESIGN
1981  PKG_CONFIG  path to pkg-config utility
1982  BUILD_CC    Override default value for BUILD_CC
1983  BUILD_CXX   Override default value for BUILD_CXX
1984  BUILD_LD    Override default value for BUILD_LD
1985  CC          C compiler command
1986  CFLAGS      C compiler flags
1987  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1988              nonstandard directory <lib dir>
1989  LIBS        libraries to pass to the linker, e.g. -l<library>
1990  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1991              you have headers in a nonstandard directory <include dir>
1992  CXX         C++ compiler command
1993  CXXFLAGS    C++ compiler flags
1994  OBJC        Objective C compiler command
1995  OBJCFLAGS   Objective C compiler flags
1996  AR          Override default value for AR
1997  CPP         C preprocessor
1998  CXXCPP      C++ preprocessor
1999  AS          Override default value for AS
2000  NM          Override default value for NM
2001  GNM         Override default value for GNM
2002  STRIP       Override default value for STRIP
2003  MCS         Override default value for MCS
2004  OBJCOPY     Override default value for OBJCOPY
2005  OBJDUMP     Override default value for OBJDUMP
2006  LIPO        Override default value for LIPO
2007  JTREGEXE    Override default value for JTREGEXE
2008  XMKMF       Path to xmkmf, Makefile generator for X Window System
2009  FREETYPE_CFLAGS
2010              C compiler flags for FREETYPE, overriding pkg-config
2011  FREETYPE_LIBS
2012              linker flags for FREETYPE, overriding pkg-config
2013  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2014  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2015  LIBFFI_CFLAGS
2016              C compiler flags for LIBFFI, overriding pkg-config
2017  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2018
2019Use these variables to override the choices made by `configure' or to help
2020it to find libraries and programs with nonstandard names/locations.
2021
2022Report bugs to <build-dev@openjdk.java.net>.
2023OpenJDK home page: <http://openjdk.java.net>.
2024_ACEOF
2025ac_status=$?
2026fi
2027
2028if test "$ac_init_help" = "recursive"; then
2029  # If there are subdirs, report their specific --help.
2030  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2031    test -d "$ac_dir" ||
2032      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2033      continue
2034    ac_builddir=.
2035
2036case "$ac_dir" in
2037.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2038*)
2039  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2040  # A ".." for each directory in $ac_dir_suffix.
2041  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2042  case $ac_top_builddir_sub in
2043  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2044  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2045  esac ;;
2046esac
2047ac_abs_top_builddir=$ac_pwd
2048ac_abs_builddir=$ac_pwd$ac_dir_suffix
2049# for backward compatibility:
2050ac_top_builddir=$ac_top_build_prefix
2051
2052case $srcdir in
2053  .)  # We are building in place.
2054    ac_srcdir=.
2055    ac_top_srcdir=$ac_top_builddir_sub
2056    ac_abs_top_srcdir=$ac_pwd ;;
2057  [\\/]* | ?:[\\/]* )  # Absolute name.
2058    ac_srcdir=$srcdir$ac_dir_suffix;
2059    ac_top_srcdir=$srcdir
2060    ac_abs_top_srcdir=$srcdir ;;
2061  *) # Relative name.
2062    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2063    ac_top_srcdir=$ac_top_build_prefix$srcdir
2064    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2065esac
2066ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2067
2068    cd "$ac_dir" || { ac_status=$?; continue; }
2069    # Check for guested configure.
2070    if test -f "$ac_srcdir/configure.gnu"; then
2071      echo &&
2072      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2073    elif test -f "$ac_srcdir/configure"; then
2074      echo &&
2075      $SHELL "$ac_srcdir/configure" --help=recursive
2076    else
2077      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2078    fi || ac_status=$?
2079    cd "$ac_pwd" || { ac_status=$?; break; }
2080  done
2081fi
2082
2083test -n "$ac_init_help" && exit $ac_status
2084if $ac_init_version; then
2085  cat <<\_ACEOF
2086OpenJDK configure jdk8
2087generated by GNU Autoconf 2.69
2088
2089Copyright (C) 2012 Free Software Foundation, Inc.
2090This configure script is free software; the Free Software Foundation
2091gives unlimited permission to copy, distribute and modify it.
2092_ACEOF
2093  exit
2094fi
2095
2096## ------------------------ ##
2097## Autoconf initialization. ##
2098## ------------------------ ##
2099
2100# ac_fn_c_try_compile LINENO
2101# --------------------------
2102# Try to compile conftest.$ac_ext, and return whether this succeeded.
2103ac_fn_c_try_compile ()
2104{
2105  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106  rm -f conftest.$ac_objext
2107  if { { ac_try="$ac_compile"
2108case "(($ac_try" in
2109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2110  *) ac_try_echo=$ac_try;;
2111esac
2112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2113$as_echo "$ac_try_echo"; } >&5
2114  (eval "$ac_compile") 2>conftest.err
2115  ac_status=$?
2116  if test -s conftest.err; then
2117    grep -v '^ *+' conftest.err >conftest.er1
2118    cat conftest.er1 >&5
2119    mv -f conftest.er1 conftest.err
2120  fi
2121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2122  test $ac_status = 0; } && {
2123	 test -z "$ac_c_werror_flag" ||
2124	 test ! -s conftest.err
2125       } && test -s conftest.$ac_objext; then :
2126  ac_retval=0
2127else
2128  $as_echo "$as_me: failed program was:" >&5
2129sed 's/^/| /' conftest.$ac_ext >&5
2130
2131	ac_retval=1
2132fi
2133  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2134  as_fn_set_status $ac_retval
2135
2136} # ac_fn_c_try_compile
2137
2138# ac_fn_cxx_try_compile LINENO
2139# ----------------------------
2140# Try to compile conftest.$ac_ext, and return whether this succeeded.
2141ac_fn_cxx_try_compile ()
2142{
2143  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2144  rm -f conftest.$ac_objext
2145  if { { ac_try="$ac_compile"
2146case "(($ac_try" in
2147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2148  *) ac_try_echo=$ac_try;;
2149esac
2150eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2151$as_echo "$ac_try_echo"; } >&5
2152  (eval "$ac_compile") 2>conftest.err
2153  ac_status=$?
2154  if test -s conftest.err; then
2155    grep -v '^ *+' conftest.err >conftest.er1
2156    cat conftest.er1 >&5
2157    mv -f conftest.er1 conftest.err
2158  fi
2159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2160  test $ac_status = 0; } && {
2161	 test -z "$ac_cxx_werror_flag" ||
2162	 test ! -s conftest.err
2163       } && test -s conftest.$ac_objext; then :
2164  ac_retval=0
2165else
2166  $as_echo "$as_me: failed program was:" >&5
2167sed 's/^/| /' conftest.$ac_ext >&5
2168
2169	ac_retval=1
2170fi
2171  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2172  as_fn_set_status $ac_retval
2173
2174} # ac_fn_cxx_try_compile
2175
2176# ac_fn_objc_try_compile LINENO
2177# -----------------------------
2178# Try to compile conftest.$ac_ext, and return whether this succeeded.
2179ac_fn_objc_try_compile ()
2180{
2181  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182  rm -f conftest.$ac_objext
2183  if { { ac_try="$ac_compile"
2184case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_compile") 2>conftest.err
2191  ac_status=$?
2192  if test -s conftest.err; then
2193    grep -v '^ *+' conftest.err >conftest.er1
2194    cat conftest.er1 >&5
2195    mv -f conftest.er1 conftest.err
2196  fi
2197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2198  test $ac_status = 0; } && {
2199	 test -z "$ac_objc_werror_flag" ||
2200	 test ! -s conftest.err
2201       } && test -s conftest.$ac_objext; then :
2202  ac_retval=0
2203else
2204  $as_echo "$as_me: failed program was:" >&5
2205sed 's/^/| /' conftest.$ac_ext >&5
2206
2207	ac_retval=1
2208fi
2209  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2210  as_fn_set_status $ac_retval
2211
2212} # ac_fn_objc_try_compile
2213
2214# ac_fn_c_try_cpp LINENO
2215# ----------------------
2216# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2217ac_fn_c_try_cpp ()
2218{
2219  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2220  if { { ac_try="$ac_cpp conftest.$ac_ext"
2221case "(($ac_try" in
2222  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2223  *) ac_try_echo=$ac_try;;
2224esac
2225eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2226$as_echo "$ac_try_echo"; } >&5
2227  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2228  ac_status=$?
2229  if test -s conftest.err; then
2230    grep -v '^ *+' conftest.err >conftest.er1
2231    cat conftest.er1 >&5
2232    mv -f conftest.er1 conftest.err
2233  fi
2234  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2235  test $ac_status = 0; } > conftest.i && {
2236	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2237	 test ! -s conftest.err
2238       }; then :
2239  ac_retval=0
2240else
2241  $as_echo "$as_me: failed program was:" >&5
2242sed 's/^/| /' conftest.$ac_ext >&5
2243
2244    ac_retval=1
2245fi
2246  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2247  as_fn_set_status $ac_retval
2248
2249} # ac_fn_c_try_cpp
2250
2251# ac_fn_cxx_try_cpp LINENO
2252# ------------------------
2253# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2254ac_fn_cxx_try_cpp ()
2255{
2256  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257  if { { ac_try="$ac_cpp conftest.$ac_ext"
2258case "(($ac_try" in
2259  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2260  *) ac_try_echo=$ac_try;;
2261esac
2262eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2263$as_echo "$ac_try_echo"; } >&5
2264  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2265  ac_status=$?
2266  if test -s conftest.err; then
2267    grep -v '^ *+' conftest.err >conftest.er1
2268    cat conftest.er1 >&5
2269    mv -f conftest.er1 conftest.err
2270  fi
2271  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2272  test $ac_status = 0; } > conftest.i && {
2273	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2274	 test ! -s conftest.err
2275       }; then :
2276  ac_retval=0
2277else
2278  $as_echo "$as_me: failed program was:" >&5
2279sed 's/^/| /' conftest.$ac_ext >&5
2280
2281    ac_retval=1
2282fi
2283  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2284  as_fn_set_status $ac_retval
2285
2286} # ac_fn_cxx_try_cpp
2287
2288# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2289# ---------------------------------------------------------
2290# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2291# the include files in INCLUDES and setting the cache variable VAR
2292# accordingly.
2293ac_fn_cxx_check_header_mongrel ()
2294{
2295  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296  if eval \${$3+:} false; then :
2297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2298$as_echo_n "checking for $2... " >&6; }
2299if eval \${$3+:} false; then :
2300  $as_echo_n "(cached) " >&6
2301fi
2302eval ac_res=\$$3
2303	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305else
2306  # Is the header compilable?
2307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2308$as_echo_n "checking $2 usability... " >&6; }
2309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h.  */
2311$4
2312#include <$2>
2313_ACEOF
2314if ac_fn_cxx_try_compile "$LINENO"; then :
2315  ac_header_compiler=yes
2316else
2317  ac_header_compiler=no
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2321$as_echo "$ac_header_compiler" >&6; }
2322
2323# Is the header present?
2324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2325$as_echo_n "checking $2 presence... " >&6; }
2326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h.  */
2328#include <$2>
2329_ACEOF
2330if ac_fn_cxx_try_cpp "$LINENO"; then :
2331  ac_header_preproc=yes
2332else
2333  ac_header_preproc=no
2334fi
2335rm -f conftest.err conftest.i conftest.$ac_ext
2336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2337$as_echo "$ac_header_preproc" >&6; }
2338
2339# So?  What about this header?
2340case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2341  yes:no: )
2342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2343$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2345$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2346    ;;
2347  no:yes:* )
2348    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2349$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2350    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2351$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2352    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2353$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2354    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2355$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2356    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2357$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2358( $as_echo "## ----------------------------------------- ##
2359## Report this to build-dev@openjdk.java.net ##
2360## ----------------------------------------- ##"
2361     ) | sed "s/^/$as_me: WARNING:     /" >&2
2362    ;;
2363esac
2364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2365$as_echo_n "checking for $2... " >&6; }
2366if eval \${$3+:} false; then :
2367  $as_echo_n "(cached) " >&6
2368else
2369  eval "$3=\$ac_header_compiler"
2370fi
2371eval ac_res=\$$3
2372	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2373$as_echo "$ac_res" >&6; }
2374fi
2375  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376
2377} # ac_fn_cxx_check_header_mongrel
2378
2379# ac_fn_cxx_try_run LINENO
2380# ------------------------
2381# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2382# that executables *can* be run.
2383ac_fn_cxx_try_run ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  if { { ac_try="$ac_link"
2387case "(($ac_try" in
2388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2389  *) ac_try_echo=$ac_try;;
2390esac
2391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2392$as_echo "$ac_try_echo"; } >&5
2393  (eval "$ac_link") 2>&5
2394  ac_status=$?
2395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2396  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2397  { { case "(($ac_try" in
2398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2399  *) ac_try_echo=$ac_try;;
2400esac
2401eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2402$as_echo "$ac_try_echo"; } >&5
2403  (eval "$ac_try") 2>&5
2404  ac_status=$?
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; }; }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: program exited with status $ac_status" >&5
2410       $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413       ac_retval=$ac_status
2414fi
2415  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417  as_fn_set_status $ac_retval
2418
2419} # ac_fn_cxx_try_run
2420
2421# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2422# ---------------------------------------------------------
2423# Tests whether HEADER exists and can be compiled using the include files in
2424# INCLUDES, setting the cache variable VAR accordingly.
2425ac_fn_cxx_check_header_compile ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2429$as_echo_n "checking for $2... " >&6; }
2430if eval \${$3+:} false; then :
2431  $as_echo_n "(cached) " >&6
2432else
2433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h.  */
2435$4
2436#include <$2>
2437_ACEOF
2438if ac_fn_cxx_try_compile "$LINENO"; then :
2439  eval "$3=yes"
2440else
2441  eval "$3=no"
2442fi
2443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444fi
2445eval ac_res=\$$3
2446	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2447$as_echo "$ac_res" >&6; }
2448  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2449
2450} # ac_fn_cxx_check_header_compile
2451
2452# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2453# ----------------------------------------------
2454# Tries to find the compile-time value of EXPR in a program that includes
2455# INCLUDES, setting VAR accordingly. Returns whether the value could be
2456# computed
2457ac_fn_cxx_compute_int ()
2458{
2459  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460  if test "$cross_compiling" = yes; then
2461    # Depending upon the size, compute the lo and hi bounds.
2462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464$4
2465int
2466main ()
2467{
2468static int test_array [1 - 2 * !(($2) >= 0)];
2469test_array [0] = 0;
2470return test_array [0];
2471
2472  ;
2473  return 0;
2474}
2475_ACEOF
2476if ac_fn_cxx_try_compile "$LINENO"; then :
2477  ac_lo=0 ac_mid=0
2478  while :; do
2479    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2480/* end confdefs.h.  */
2481$4
2482int
2483main ()
2484{
2485static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2486test_array [0] = 0;
2487return test_array [0];
2488
2489  ;
2490  return 0;
2491}
2492_ACEOF
2493if ac_fn_cxx_try_compile "$LINENO"; then :
2494  ac_hi=$ac_mid; break
2495else
2496  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2497			if test $ac_lo -le $ac_mid; then
2498			  ac_lo= ac_hi=
2499			  break
2500			fi
2501			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2502fi
2503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2504  done
2505else
2506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508$4
2509int
2510main ()
2511{
2512static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2522  while :; do
2523    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2524/* end confdefs.h.  */
2525$4
2526int
2527main ()
2528{
2529static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2530test_array [0] = 0;
2531return test_array [0];
2532
2533  ;
2534  return 0;
2535}
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  ac_lo=$ac_mid; break
2539else
2540  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2541			if test $ac_mid -le $ac_hi; then
2542			  ac_lo= ac_hi=
2543			  break
2544			fi
2545			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2546fi
2547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2548  done
2549else
2550  ac_lo= ac_hi=
2551fi
2552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555# Binary search between lo and hi bounds.
2556while test "x$ac_lo" != "x$ac_hi"; do
2557  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559/* end confdefs.h.  */
2560$4
2561int
2562main ()
2563{
2564static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2565test_array [0] = 0;
2566return test_array [0];
2567
2568  ;
2569  return 0;
2570}
2571_ACEOF
2572if ac_fn_cxx_try_compile "$LINENO"; then :
2573  ac_hi=$ac_mid
2574else
2575  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578done
2579case $ac_lo in #((
2580?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2581'') ac_retval=1 ;;
2582esac
2583  else
2584    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587static long int longval () { return $2; }
2588static unsigned long int ulongval () { return $2; }
2589#include <stdio.h>
2590#include <stdlib.h>
2591int
2592main ()
2593{
2594
2595  FILE *f = fopen ("conftest.val", "w");
2596  if (! f)
2597    return 1;
2598  if (($2) < 0)
2599    {
2600      long int i = longval ();
2601      if (i != ($2))
2602	return 1;
2603      fprintf (f, "%ld", i);
2604    }
2605  else
2606    {
2607      unsigned long int i = ulongval ();
2608      if (i != ($2))
2609	return 1;
2610      fprintf (f, "%lu", i);
2611    }
2612  /* Do not output a trailing newline, as this causes \r\n confusion
2613     on some platforms.  */
2614  return ferror (f) || fclose (f) != 0;
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_run "$LINENO"; then :
2621  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2622else
2623  ac_retval=1
2624fi
2625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2626  conftest.$ac_objext conftest.beam conftest.$ac_ext
2627rm -f conftest.val
2628
2629  fi
2630  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2631  as_fn_set_status $ac_retval
2632
2633} # ac_fn_cxx_compute_int
2634
2635# ac_fn_cxx_try_link LINENO
2636# -------------------------
2637# Try to link conftest.$ac_ext, and return whether this succeeded.
2638ac_fn_cxx_try_link ()
2639{
2640  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2641  rm -f conftest.$ac_objext conftest$ac_exeext
2642  if { { ac_try="$ac_link"
2643case "(($ac_try" in
2644  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645  *) ac_try_echo=$ac_try;;
2646esac
2647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2648$as_echo "$ac_try_echo"; } >&5
2649  (eval "$ac_link") 2>conftest.err
2650  ac_status=$?
2651  if test -s conftest.err; then
2652    grep -v '^ *+' conftest.err >conftest.er1
2653    cat conftest.er1 >&5
2654    mv -f conftest.er1 conftest.err
2655  fi
2656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2657  test $ac_status = 0; } && {
2658	 test -z "$ac_cxx_werror_flag" ||
2659	 test ! -s conftest.err
2660       } && test -s conftest$ac_exeext && {
2661	 test "$cross_compiling" = yes ||
2662	 test -x conftest$ac_exeext
2663       }; then :
2664  ac_retval=0
2665else
2666  $as_echo "$as_me: failed program was:" >&5
2667sed 's/^/| /' conftest.$ac_ext >&5
2668
2669	ac_retval=1
2670fi
2671  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2672  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2673  # interfere with the next link command; also delete a directory that is
2674  # left behind by Apple's compiler.  We do this before executing the actions.
2675  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677  as_fn_set_status $ac_retval
2678
2679} # ac_fn_cxx_try_link
2680
2681# ac_fn_cxx_check_func LINENO FUNC VAR
2682# ------------------------------------
2683# Tests whether FUNC exists, setting the cache variable VAR accordingly
2684ac_fn_cxx_check_func ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2688$as_echo_n "checking for $2... " >&6; }
2689if eval \${$3+:} false; then :
2690  $as_echo_n "(cached) " >&6
2691else
2692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h.  */
2694/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2695   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2696#define $2 innocuous_$2
2697
2698/* System header to define __stub macros and hopefully few prototypes,
2699    which can conflict with char $2 (); below.
2700    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2701    <limits.h> exists even on freestanding compilers.  */
2702
2703#ifdef __STDC__
2704# include <limits.h>
2705#else
2706# include <assert.h>
2707#endif
2708
2709#undef $2
2710
2711/* Override any GCC internal prototype to avoid an error.
2712   Use char because int might match the return type of a GCC
2713   builtin and then its argument prototype would still apply.  */
2714#ifdef __cplusplus
2715extern "C"
2716#endif
2717char $2 ();
2718/* The GNU C library defines this for functions which it implements
2719    to always fail with ENOSYS.  Some functions are actually named
2720    something starting with __ and the normal name is an alias.  */
2721#if defined __stub_$2 || defined __stub___$2
2722choke me
2723#endif
2724
2725int
2726main ()
2727{
2728return $2 ();
2729  ;
2730  return 0;
2731}
2732_ACEOF
2733if ac_fn_cxx_try_link "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext \
2739    conftest$ac_exeext conftest.$ac_ext
2740fi
2741eval ac_res=\$$3
2742	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2743$as_echo "$ac_res" >&6; }
2744  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2745
2746} # ac_fn_cxx_check_func
2747
2748# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2749# -------------------------------------------------------
2750# Tests whether HEADER exists and can be compiled using the include files in
2751# INCLUDES, setting the cache variable VAR accordingly.
2752ac_fn_c_check_header_compile ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2756$as_echo_n "checking for $2... " >&6; }
2757if eval \${$3+:} false; then :
2758  $as_echo_n "(cached) " >&6
2759else
2760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2761/* end confdefs.h.  */
2762$4
2763#include <$2>
2764_ACEOF
2765if ac_fn_c_try_compile "$LINENO"; then :
2766  eval "$3=yes"
2767else
2768  eval "$3=no"
2769fi
2770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2771fi
2772eval ac_res=\$$3
2773	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2774$as_echo "$ac_res" >&6; }
2775  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776
2777} # ac_fn_c_check_header_compile
2778cat >config.log <<_ACEOF
2779This file contains any messages produced by compilers while
2780running configure, to aid debugging if configure makes a mistake.
2781
2782It was created by OpenJDK $as_me jdk8, which was
2783generated by GNU Autoconf 2.69.  Invocation command line was
2784
2785  $ $0 $@
2786
2787_ACEOF
2788exec 5>>config.log
2789{
2790cat <<_ASUNAME
2791## --------- ##
2792## Platform. ##
2793## --------- ##
2794
2795hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2796uname -m = `(uname -m) 2>/dev/null || echo unknown`
2797uname -r = `(uname -r) 2>/dev/null || echo unknown`
2798uname -s = `(uname -s) 2>/dev/null || echo unknown`
2799uname -v = `(uname -v) 2>/dev/null || echo unknown`
2800
2801/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2802/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2803
2804/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2805/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2806/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2807/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2808/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2809/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2810/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2811
2812_ASUNAME
2813
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817  IFS=$as_save_IFS
2818  test -z "$as_dir" && as_dir=.
2819    $as_echo "PATH: $as_dir"
2820  done
2821IFS=$as_save_IFS
2822
2823} >&5
2824
2825cat >&5 <<_ACEOF
2826
2827
2828## ----------- ##
2829## Core tests. ##
2830## ----------- ##
2831
2832_ACEOF
2833
2834
2835# Keep a trace of the command line.
2836# Strip out --no-create and --no-recursion so they do not pile up.
2837# Strip out --silent because we don't want to record it for future runs.
2838# Also quote any args containing shell meta-characters.
2839# Make two passes to allow for proper duplicate-argument suppression.
2840ac_configure_args=
2841ac_configure_args0=
2842ac_configure_args1=
2843ac_must_keep_next=false
2844for ac_pass in 1 2
2845do
2846  for ac_arg
2847  do
2848    case $ac_arg in
2849    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2850    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2851    | -silent | --silent | --silen | --sile | --sil)
2852      continue ;;
2853    *\'*)
2854      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2855    esac
2856    case $ac_pass in
2857    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2858    2)
2859      as_fn_append ac_configure_args1 " '$ac_arg'"
2860      if test $ac_must_keep_next = true; then
2861	ac_must_keep_next=false # Got value, back to normal.
2862      else
2863	case $ac_arg in
2864	  *=* | --config-cache | -C | -disable-* | --disable-* \
2865	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2866	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2867	  | -with-* | --with-* | -without-* | --without-* | --x)
2868	    case "$ac_configure_args0 " in
2869	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2870	    esac
2871	    ;;
2872	  -* ) ac_must_keep_next=true ;;
2873	esac
2874      fi
2875      as_fn_append ac_configure_args " '$ac_arg'"
2876      ;;
2877    esac
2878  done
2879done
2880{ ac_configure_args0=; unset ac_configure_args0;}
2881{ ac_configure_args1=; unset ac_configure_args1;}
2882
2883# When interrupted or exit'd, cleanup temporary files, and complete
2884# config.log.  We remove comments because anyway the quotes in there
2885# would cause problems or look ugly.
2886# WARNING: Use '\'' to represent an apostrophe within the trap.
2887# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2888trap 'exit_status=$?
2889  # Save into config.log some information that might help in debugging.
2890  {
2891    echo
2892
2893    $as_echo "## ---------------- ##
2894## Cache variables. ##
2895## ---------------- ##"
2896    echo
2897    # The following way of writing the cache mishandles newlines in values,
2898(
2899  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2900    eval ac_val=\$$ac_var
2901    case $ac_val in #(
2902    *${as_nl}*)
2903      case $ac_var in #(
2904      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2905$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2906      esac
2907      case $ac_var in #(
2908      _ | IFS | as_nl) ;; #(
2909      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2910      *) { eval $ac_var=; unset $ac_var;} ;;
2911      esac ;;
2912    esac
2913  done
2914  (set) 2>&1 |
2915    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2916    *${as_nl}ac_space=\ *)
2917      sed -n \
2918	"s/'\''/'\''\\\\'\'''\''/g;
2919	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2920      ;; #(
2921    *)
2922      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2923      ;;
2924    esac |
2925    sort
2926)
2927    echo
2928
2929    $as_echo "## ----------------- ##
2930## Output variables. ##
2931## ----------------- ##"
2932    echo
2933    for ac_var in $ac_subst_vars
2934    do
2935      eval ac_val=\$$ac_var
2936      case $ac_val in
2937      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2938      esac
2939      $as_echo "$ac_var='\''$ac_val'\''"
2940    done | sort
2941    echo
2942
2943    if test -n "$ac_subst_files"; then
2944      $as_echo "## ------------------- ##
2945## File substitutions. ##
2946## ------------------- ##"
2947      echo
2948      for ac_var in $ac_subst_files
2949      do
2950	eval ac_val=\$$ac_var
2951	case $ac_val in
2952	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2953	esac
2954	$as_echo "$ac_var='\''$ac_val'\''"
2955      done | sort
2956      echo
2957    fi
2958
2959    if test -s confdefs.h; then
2960      $as_echo "## ----------- ##
2961## confdefs.h. ##
2962## ----------- ##"
2963      echo
2964      cat confdefs.h
2965      echo
2966    fi
2967    test "$ac_signal" != 0 &&
2968      $as_echo "$as_me: caught signal $ac_signal"
2969    $as_echo "$as_me: exit $exit_status"
2970  } >&5
2971  rm -f core *.core core.conftest.* &&
2972    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2973    exit $exit_status
2974' 0
2975for ac_signal in 1 2 13 15; do
2976  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2977done
2978ac_signal=0
2979
2980# confdefs.h avoids OS command line length limits that DEFS can exceed.
2981rm -f -r conftest* confdefs.h
2982
2983$as_echo "/* confdefs.h */" > confdefs.h
2984
2985# Predefined preprocessor variables.
2986
2987cat >>confdefs.h <<_ACEOF
2988#define PACKAGE_NAME "$PACKAGE_NAME"
2989_ACEOF
2990
2991cat >>confdefs.h <<_ACEOF
2992#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2993_ACEOF
2994
2995cat >>confdefs.h <<_ACEOF
2996#define PACKAGE_VERSION "$PACKAGE_VERSION"
2997_ACEOF
2998
2999cat >>confdefs.h <<_ACEOF
3000#define PACKAGE_STRING "$PACKAGE_STRING"
3001_ACEOF
3002
3003cat >>confdefs.h <<_ACEOF
3004#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3005_ACEOF
3006
3007cat >>confdefs.h <<_ACEOF
3008#define PACKAGE_URL "$PACKAGE_URL"
3009_ACEOF
3010
3011
3012# Let the site file select an alternate cache file if it wants to.
3013# Prefer an explicitly selected file to automatically selected ones.
3014ac_site_file1=NONE
3015ac_site_file2=NONE
3016if test -n "$CONFIG_SITE"; then
3017  # We do not want a PATH search for config.site.
3018  case $CONFIG_SITE in #((
3019    -*)  ac_site_file1=./$CONFIG_SITE;;
3020    */*) ac_site_file1=$CONFIG_SITE;;
3021    *)   ac_site_file1=./$CONFIG_SITE;;
3022  esac
3023elif test "x$prefix" != xNONE; then
3024  ac_site_file1=$prefix/share/config.site
3025  ac_site_file2=$prefix/etc/config.site
3026else
3027  ac_site_file1=$ac_default_prefix/share/config.site
3028  ac_site_file2=$ac_default_prefix/etc/config.site
3029fi
3030for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3031do
3032  test "x$ac_site_file" = xNONE && continue
3033  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3034    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3035$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3036    sed 's/^/| /' "$ac_site_file" >&5
3037    . "$ac_site_file" \
3038      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3040as_fn_error $? "failed to load site script $ac_site_file
3041See \`config.log' for more details" "$LINENO" 5; }
3042  fi
3043done
3044
3045if test -r "$cache_file"; then
3046  # Some versions of bash will fail to source /dev/null (special files
3047  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3048  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3049    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3050$as_echo "$as_me: loading cache $cache_file" >&6;}
3051    case $cache_file in
3052      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3053      *)                      . "./$cache_file";;
3054    esac
3055  fi
3056else
3057  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3058$as_echo "$as_me: creating cache $cache_file" >&6;}
3059  >$cache_file
3060fi
3061
3062# Check that the precious variables saved in the cache have kept the same
3063# value.
3064ac_cache_corrupted=false
3065for ac_var in $ac_precious_vars; do
3066  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3067  eval ac_new_set=\$ac_env_${ac_var}_set
3068  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3069  eval ac_new_val=\$ac_env_${ac_var}_value
3070  case $ac_old_set,$ac_new_set in
3071    set,)
3072      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3073$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3074      ac_cache_corrupted=: ;;
3075    ,set)
3076      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3077$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3078      ac_cache_corrupted=: ;;
3079    ,);;
3080    *)
3081      if test "x$ac_old_val" != "x$ac_new_val"; then
3082	# differences in whitespace do not lead to failure.
3083	ac_old_val_w=`echo x $ac_old_val`
3084	ac_new_val_w=`echo x $ac_new_val`
3085	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3086	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3087$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3088	  ac_cache_corrupted=:
3089	else
3090	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3091$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3092	  eval $ac_var=\$ac_old_val
3093	fi
3094	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3095$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3096	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3097$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3098      fi;;
3099  esac
3100  # Pass precious variables to config.status.
3101  if test "$ac_new_set" = set; then
3102    case $ac_new_val in
3103    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3104    *) ac_arg=$ac_var=$ac_new_val ;;
3105    esac
3106    case " $ac_configure_args " in
3107      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3108      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3109    esac
3110  fi
3111done
3112if $ac_cache_corrupted; then
3113  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3115  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3116$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3117  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3118fi
3119## -------------------- ##
3120## Main body of script. ##
3121## -------------------- ##
3122
3123ac_ext=c
3124ac_cpp='$CPP $CPPFLAGS'
3125ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3126ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3127ac_compiler_gnu=$ac_cv_c_compiler_gnu
3128
3129
3130
3131ac_aux_dir=
3132for ac_dir in build-aux "$srcdir"/build-aux; do
3133  if test -f "$ac_dir/install-sh"; then
3134    ac_aux_dir=$ac_dir
3135    ac_install_sh="$ac_aux_dir/install-sh -c"
3136    break
3137  elif test -f "$ac_dir/install.sh"; then
3138    ac_aux_dir=$ac_dir
3139    ac_install_sh="$ac_aux_dir/install.sh -c"
3140    break
3141  elif test -f "$ac_dir/shtool"; then
3142    ac_aux_dir=$ac_dir
3143    ac_install_sh="$ac_aux_dir/shtool install -c"
3144    break
3145  fi
3146done
3147if test -z "$ac_aux_dir"; then
3148  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3149fi
3150
3151# These three variables are undocumented and unsupported,
3152# and are intended to be withdrawn in a future Autoconf release.
3153# They can cause serious problems if a builder's source tree is in a directory
3154# whose full name contains unusual characters.
3155ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3156ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3157ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3158
3159
3160# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3161
3162#
3163# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3164# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3165#
3166# This code is free software; you can redistribute it and/or modify it
3167# under the terms of the GNU General Public License version 2 only, as
3168# published by the Free Software Foundation.  Oracle designates this
3169# particular file as subject to the "Classpath" exception as provided
3170# by Oracle in the LICENSE file that accompanied this code.
3171#
3172# This code is distributed in the hope that it will be useful, but WITHOUT
3173# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3174# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3175# version 2 for more details (a copy is included in the LICENSE file that
3176# accompanied this code).
3177#
3178# You should have received a copy of the GNU General Public License version
3179# 2 along with this work; if not, write to the Free Software Foundation,
3180# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3181#
3182# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3183# or visit www.oracle.com if you need additional information or have any
3184# questions.
3185#
3186
3187#
3188# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3189#
3190# This program is free software; you can redistribute it and/or modify
3191# it under the terms of the GNU General Public License as published by
3192# the Free Software Foundation; either version 2 of the License, or
3193# (at your option) any later version.
3194#
3195# This program is distributed in the hope that it will be useful, but
3196# WITHOUT ANY WARRANTY; without even the implied warranty of
3197# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3198# General Public License for more details.
3199#
3200# You should have received a copy of the GNU General Public License
3201# along with this program; if not, write to the Free Software
3202# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3203#
3204# As a special exception to the GNU General Public License, if you
3205# distribute this file as part of a program that contains a
3206# configuration script generated by Autoconf, you may include it under
3207# the same distribution terms that you use for the rest of that program.
3208
3209# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3210# ----------------------------------
3211# PKG_PROG_PKG_CONFIG
3212
3213# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3214#
3215# Check to see whether a particular set of modules exists.  Similar
3216# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3217#
3218#
3219# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3220# this or PKG_CHECK_MODULES is called, or make sure to call
3221# PKG_CHECK_EXISTS manually
3222# --------------------------------------------------------------
3223
3224
3225
3226# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3227# ---------------------------------------------
3228# _PKG_CONFIG
3229
3230# _PKG_SHORT_ERRORS_SUPPORTED
3231# -----------------------------
3232# _PKG_SHORT_ERRORS_SUPPORTED
3233
3234
3235# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3236# [ACTION-IF-NOT-FOUND])
3237#
3238#
3239# Note that if there is a possibility the first call to
3240# PKG_CHECK_MODULES might not happen, you should be sure to include an
3241# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3242#
3243#
3244# --------------------------------------------------------------
3245# PKG_CHECK_MODULES
3246
3247
3248# Include these first...
3249#
3250# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3275# If so, then append $1 to $2 \
3276# Also set JVM_ARG_OK to true/false depending on outcome.
3277
3278
3279# Appends a string to a path variable, only adding the : when needed.
3280
3281
3282# This will make sure the given variable points to a full and proper
3283# path. This means:
3284# 1) There will be no spaces in the path. On posix platforms,
3285#    spaces in the path will result in an error. On Windows,
3286#    the path will be rewritten using short-style to be space-free.
3287# 2) The path will be absolute, and it will be in unix-style (on
3288#     cygwin).
3289# $1: The name of the variable to fix
3290
3291
3292# This will make sure the given variable points to a executable
3293# with a full and proper path. This means:
3294# 1) There will be no spaces in the path. On posix platforms,
3295#    spaces in the path will result in an error. On Windows,
3296#    the path will be rewritten using short-style to be space-free.
3297# 2) The path will be absolute, and it will be in unix-style (on
3298#     cygwin).
3299# Any arguments given to the executable is preserved.
3300# If the input variable does not have a directory specification, then
3301# it need to be in the PATH.
3302# $1: The name of the variable to fix
3303
3304
3305
3306
3307# Register a --with argument but mark it as deprecated
3308# $1: The name of the with argument to deprecate, not including --with-
3309
3310
3311# Register a --enable argument but mark it as deprecated
3312# $1: The name of the with argument to deprecate, not including --enable-
3313# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3314
3315
3316
3317
3318# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3319# $1: variable to check
3320
3321
3322# Check that there are no unprocessed overridden variables left.
3323# If so, they are an incorrect argument and we will exit with an error.
3324
3325
3326# Setup a tool for the given variable. If correctly specified by the user,
3327# use that value, otherwise search for the tool using the supplied code snippet.
3328# $1: variable to set
3329# $2: code snippet to call to look for the tool
3330
3331
3332# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3333# $1: variable to set
3334# $2: executable name (or list of names) to look for
3335
3336
3337# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3338# $1: variable to set
3339# $2: executable name (or list of names) to look for
3340
3341
3342# Like BASIC_PATH_PROGS but fails if no tool was found.
3343# $1: variable to set
3344# $2: executable name (or list of names) to look for
3345
3346
3347# Like BASIC_SETUP_TOOL but fails if no tool was found.
3348# $1: variable to set
3349# $2: autoconf macro to call to look for the special tool
3350
3351
3352# Setup the most fundamental tools that relies on not much else to set up,
3353# but is used by much of the early bootstrap code.
3354
3355
3356# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3357
3358
3359
3360
3361
3362
3363
3364#%%% Simple tools %%%
3365
3366# Check if we have found a usable version of make
3367# $1: the path to a potential make binary (or empty)
3368# $2: the description on how we found this
3369
3370
3371# Goes looking for a usable version of GNU make.
3372
3373
3374
3375
3376
3377
3378# Check if build directory is on local disk. If not possible to determine,
3379# we prefer to claim it's local.
3380# Argument 1: directory to test
3381# Argument 2: what to do if it is on local disk
3382# Argument 3: what to do otherwise (remote disk or failure)
3383
3384
3385# Check that source files have basic read permissions set. This might
3386# not be the case in cygwin in certain conditions.
3387
3388
3389
3390
3391#
3392# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3393# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3394#
3395# This code is free software; you can redistribute it and/or modify it
3396# under the terms of the GNU General Public License version 2 only, as
3397# published by the Free Software Foundation.  Oracle designates this
3398# particular file as subject to the "Classpath" exception as provided
3399# by Oracle in the LICENSE file that accompanied this code.
3400#
3401# This code is distributed in the hope that it will be useful, but WITHOUT
3402# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3403# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3404# version 2 for more details (a copy is included in the LICENSE file that
3405# accompanied this code).
3406#
3407# You should have received a copy of the GNU General Public License version
3408# 2 along with this work; if not, write to the Free Software Foundation,
3409# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3410#
3411# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3412# or visit www.oracle.com if you need additional information or have any
3413# questions.
3414#
3415
3416
3417
3418
3419
3420# Helper function which possibly converts a path using DOS-style short mode.
3421# If so, the updated path is stored in $new_path.
3422# $1: The path to check
3423
3424
3425# Helper function which possibly converts a path using DOS-style short mode.
3426# If so, the updated path is stored in $new_path.
3427# $1: The path to check
3428
3429
3430# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3431# and could probably be heavily simplified. However, all changes in this
3432# area tend to need lot of testing in different scenarios, and in lack of
3433# proper unit testing, cleaning this up has not been deemed worth the effort
3434# at the moment.
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3445
3446
3447
3448
3449#
3450# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3451# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3452#
3453# This code is free software; you can redistribute it and/or modify it
3454# under the terms of the GNU General Public License version 2 only, as
3455# published by the Free Software Foundation.  Oracle designates this
3456# particular file as subject to the "Classpath" exception as provided
3457# by Oracle in the LICENSE file that accompanied this code.
3458#
3459# This code is distributed in the hope that it will be useful, but WITHOUT
3460# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3461# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3462# version 2 for more details (a copy is included in the LICENSE file that
3463# accompanied this code).
3464#
3465# You should have received a copy of the GNU General Public License version
3466# 2 along with this work; if not, write to the Free Software Foundation,
3467# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3468#
3469# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3470# or visit www.oracle.com if you need additional information or have any
3471# questions.
3472#
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484# ... then the rest
3485#
3486# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3487# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3488#
3489# This code is free software; you can redistribute it and/or modify it
3490# under the terms of the GNU General Public License version 2 only, as
3491# published by the Free Software Foundation.  Oracle designates this
3492# particular file as subject to the "Classpath" exception as provided
3493# by Oracle in the LICENSE file that accompanied this code.
3494#
3495# This code is distributed in the hope that it will be useful, but WITHOUT
3496# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3497# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3498# version 2 for more details (a copy is included in the LICENSE file that
3499# accompanied this code).
3500#
3501# You should have received a copy of the GNU General Public License version
3502# 2 along with this work; if not, write to the Free Software Foundation,
3503# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3504#
3505# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3506# or visit www.oracle.com if you need additional information or have any
3507# questions.
3508#
3509
3510# Execute the check given as argument, and verify the result
3511# If the Boot JDK was previously found, do nothing
3512# $1 A command line (typically autoconf macro) to execute
3513
3514
3515# Test: Is bootjdk explicitely set by command line arguments?
3516
3517
3518# Test: Is bootjdk available from builddeps?
3519
3520
3521# Test: Is $JAVA_HOME set?
3522
3523
3524# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3525
3526
3527# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3528
3529
3530# Look for a jdk in the given path. If there are multiple, try to select the newest.
3531# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3532# $1 = Path to directory containing jdk installations.
3533# $2 = String to append to the found JDK directory to get the proper JDK home
3534
3535
3536# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3537# environmental variable as base for where to look.
3538# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3539
3540
3541# Test: Is there a JDK installed in default, well-known locations?
3542
3543
3544# Check that a command-line tool in the Boot JDK is correct
3545# $1 = name of variable to assign
3546# $2 = name of binary
3547
3548
3549###############################################################################
3550#
3551# We need a Boot JDK to bootstrap the build.
3552#
3553
3554
3555
3556
3557
3558#
3559# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3560# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561#
3562# This code is free software; you can redistribute it and/or modify it
3563# under the terms of the GNU General Public License version 2 only, as
3564# published by the Free Software Foundation.  Oracle designates this
3565# particular file as subject to the "Classpath" exception as provided
3566# by Oracle in the LICENSE file that accompanied this code.
3567#
3568# This code is distributed in the hope that it will be useful, but WITHOUT
3569# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571# version 2 for more details (a copy is included in the LICENSE file that
3572# accompanied this code).
3573#
3574# You should have received a copy of the GNU General Public License version
3575# 2 along with this work; if not, write to the Free Software Foundation,
3576# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577#
3578# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579# or visit www.oracle.com if you need additional information or have any
3580# questions.
3581#
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602#
3603# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3604# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3605#
3606# This code is free software; you can redistribute it and/or modify it
3607# under the terms of the GNU General Public License version 2 only, as
3608# published by the Free Software Foundation.  Oracle designates this
3609# particular file as subject to the "Classpath" exception as provided
3610# by Oracle in the LICENSE file that accompanied this code.
3611#
3612# This code is distributed in the hope that it will be useful, but WITHOUT
3613# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3614# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3615# version 2 for more details (a copy is included in the LICENSE file that
3616# accompanied this code).
3617#
3618# You should have received a copy of the GNU General Public License version
3619# 2 along with this work; if not, write to the Free Software Foundation,
3620# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3621#
3622# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3623# or visit www.oracle.com if you need additional information or have any
3624# questions.
3625#
3626
3627
3628
3629
3630
3631cygwin_help() {
3632  case $1 in
3633    unzip)
3634      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3635      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3636      ;;
3637    zip)
3638      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3639      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3640      ;;
3641    make)
3642      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3643      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3644      ;;
3645    freetype)
3646      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3647        HELP_MSG="To install freetype, run:
3648wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3649chmod +x /tmp/freetype-setup.exe
3650/tmp/freetype-setup.exe
3651Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3652After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3653      else
3654        HELP_MSG="You need to build a 64-bit version of freetype.
3655This is not readily available.
3656You can find source code and build instructions on
3657http://www.freetype.org/
3658If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3659      fi
3660      ;;
3661  esac
3662}
3663
3664msys_help() {
3665  PKGHANDLER_COMMAND=""
3666}
3667
3668apt_help() {
3669  case $1 in
3670    devkit)
3671      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3672    openjdk)
3673      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3674    alsa)
3675      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3676    cups)
3677      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3678    freetype)
3679      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3680    pulse)
3681      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3682    x11)
3683      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3684    ccache)
3685      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3686  esac
3687}
3688
3689yum_help() {
3690  case $1 in
3691    devkit)
3692      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3693    openjdk)
3694      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3695    alsa)
3696      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3697    cups)
3698      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3699    freetype)
3700      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3701    pulse)
3702      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3703    x11)
3704      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3705    ccache)
3706      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3707  esac
3708}
3709
3710port_help() {
3711  PKGHANDLER_COMMAND=""
3712}
3713
3714pkgutil_help() {
3715  PKGHANDLER_COMMAND=""
3716}
3717
3718pkgadd_help() {
3719  PKGHANDLER_COMMAND=""
3720}
3721
3722
3723
3724#
3725# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758###############################################################################
3759#
3760# Should we build only OpenJDK even if closed sources are present?
3761#
3762
3763
3764
3765
3766###############################################################################
3767#
3768# Setup version numbers
3769#
3770
3771
3772
3773
3774
3775
3776# Support for customization of the build process. Some build files
3777# will include counterparts from this location, if they exist. This allows
3778# for a degree of customization of the build targets and the rules/recipes
3779# to create them
3780
3781# Check whether --with-custom-make-dir was given.
3782if test "${with_custom_make_dir+set}" = set; then :
3783  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3784fi
3785
3786
3787
3788#
3789# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3790# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3791#
3792# This code is free software; you can redistribute it and/or modify it
3793# under the terms of the GNU General Public License version 2 only, as
3794# published by the Free Software Foundation.  Oracle designates this
3795# particular file as subject to the "Classpath" exception as provided
3796# by Oracle in the LICENSE file that accompanied this code.
3797#
3798# This code is distributed in the hope that it will be useful, but WITHOUT
3799# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3800# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3801# version 2 for more details (a copy is included in the LICENSE file that
3802# accompanied this code).
3803#
3804# You should have received a copy of the GNU General Public License version
3805# 2 along with this work; if not, write to the Free Software Foundation,
3806# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3807#
3808# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3809# or visit www.oracle.com if you need additional information or have any
3810# questions.
3811#
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829#
3830# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3831# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3832#
3833# This code is free software; you can redistribute it and/or modify it
3834# under the terms of the GNU General Public License version 2 only, as
3835# published by the Free Software Foundation.  Oracle designates this
3836# particular file as subject to the "Classpath" exception as provided
3837# by Oracle in the LICENSE file that accompanied this code.
3838#
3839# This code is distributed in the hope that it will be useful, but WITHOUT
3840# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3841# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3842# version 2 for more details (a copy is included in the LICENSE file that
3843# accompanied this code).
3844#
3845# You should have received a copy of the GNU General Public License version
3846# 2 along with this work; if not, write to the Free Software Foundation,
3847# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3848#
3849# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3850# or visit www.oracle.com if you need additional information or have any
3851# questions.
3852#
3853
3854# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3855# Converts autoconf style CPU name to OpenJDK style, into
3856# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3857
3858
3859# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3860# Converts autoconf style OS name to OpenJDK style, into
3861# VAR_OS and VAR_OS_API.
3862
3863
3864# Expects $host_os $host_cpu $build_os and $build_cpu
3865# and $with_target_bits to have been setup!
3866#
3867# Translate the standard triplet(quadruplet) definition
3868# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3869# OPENJDK_BUILD_OS, etc.
3870
3871
3872# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3873# accordingly. Must be done after setting up build and target system, but before
3874# doing anything else with these values.
3875
3876
3877# Setup the legacy variables, for controlling the old makefiles.
3878#
3879
3880
3881
3882
3883#%%% Build and target systems %%%
3884
3885
3886
3887
3888# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3889# Add -mX to various FLAGS variables.
3890
3891
3892
3893
3894
3895
3896#
3897# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3898# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3899#
3900# This code is free software; you can redistribute it and/or modify it
3901# under the terms of the GNU General Public License version 2 only, as
3902# published by the Free Software Foundation.  Oracle designates this
3903# particular file as subject to the "Classpath" exception as provided
3904# by Oracle in the LICENSE file that accompanied this code.
3905#
3906# This code is distributed in the hope that it will be useful, but WITHOUT
3907# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3908# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3909# version 2 for more details (a copy is included in the LICENSE file that
3910# accompanied this code).
3911#
3912# You should have received a copy of the GNU General Public License version
3913# 2 along with this work; if not, write to the Free Software Foundation,
3914# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3915#
3916# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3917# or visit www.oracle.com if you need additional information or have any
3918# questions.
3919#
3920
3921
3922
3923
3924
3925
3926
3927
3928#
3929# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3930# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3931#
3932# This code is free software; you can redistribute it and/or modify it
3933# under the terms of the GNU General Public License version 2 only, as
3934# published by the Free Software Foundation.  Oracle designates this
3935# particular file as subject to the "Classpath" exception as provided
3936# by Oracle in the LICENSE file that accompanied this code.
3937#
3938# This code is distributed in the hope that it will be useful, but WITHOUT
3939# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3940# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3941# version 2 for more details (a copy is included in the LICENSE file that
3942# accompanied this code).
3943#
3944# You should have received a copy of the GNU General Public License version
3945# 2 along with this work; if not, write to the Free Software Foundation,
3946# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3947#
3948# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3949# or visit www.oracle.com if you need additional information or have any
3950# questions.
3951#
3952
3953# $1 = compiler to test (CC or CXX)
3954# $2 = human readable name of compiler (C or C++)
3955
3956
3957
3958
3959
3960# $1 = compiler to test (CC or CXX)
3961# $2 = human readable name of compiler (C or C++)
3962# $3 = list of compiler names to search for
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3977#                                   [RUN-IF-FALSE])
3978# ------------------------------------------------------------
3979# Check that the c and c++ compilers support an argument
3980
3981
3982
3983
3984# Setup the JTREG paths
3985
3986
3987#
3988# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016
4017
4018# Check if the VS env variables were setup prior to running configure.
4019# If not, then find vcvarsall.bat and run it automatically, and integrate
4020# the set env variables into the spec file.
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031# This line needs to be here, verbatim, after all includes and the dummy hook
4032# definitions. It is replaced with custom functionality when building
4033# custom sources.
4034#CUSTOM_AUTOCONF_INCLUDE
4035
4036# Do not change or remove the following line, it is needed for consistency checks:
4037DATE_WHEN_GENERATED=1390990903
4038
4039###############################################################################
4040#
4041# Initialization / Boot-strapping
4042#
4043# The bootstrapping process needs to solve the "chicken or the egg" problem,
4044# thus it jumps back and forth, each time gaining something needed later on.
4045#
4046###############################################################################
4047
4048# Basic initialization that must happen first of all
4049
4050  # Save the original command line. This is passed to us by the wrapper configure script.
4051
4052  DATE_WHEN_CONFIGURED=`LANG=C date`
4053
4054  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4055$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4056  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4057$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4058
4059
4060  # Start with tools that do not need have cross compilation support
4061  # and can be expected to be found in the default PATH. These tools are
4062  # used by configure. Nor are these tools expected to be found in the
4063  # devkit from the builddeps server either, since they are
4064  # needed to download the devkit.
4065
4066  # First are all the simple required tools.
4067
4068
4069
4070  # Publish this variable in the help.
4071
4072
4073  if test "x$BASENAME" = x; then
4074    # The variable is not set by user, try to locate tool using the code snippet
4075    for ac_prog in basename
4076do
4077  # Extract the first word of "$ac_prog", so it can be a program name with args.
4078set dummy $ac_prog; ac_word=$2
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
4081if ${ac_cv_path_BASENAME+:} false; then :
4082  $as_echo_n "(cached) " >&6
4083else
4084  case $BASENAME in
4085  [\\/]* | ?:[\\/]*)
4086  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4087  ;;
4088  *)
4089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in $PATH
4091do
4092  IFS=$as_save_IFS
4093  test -z "$as_dir" && as_dir=.
4094    for ac_exec_ext in '' $ac_executable_extensions; do
4095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4096    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4098    break 2
4099  fi
4100done
4101  done
4102IFS=$as_save_IFS
4103
4104  ;;
4105esac
4106fi
4107BASENAME=$ac_cv_path_BASENAME
4108if test -n "$BASENAME"; then
4109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4110$as_echo "$BASENAME" >&6; }
4111else
4112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
4114fi
4115
4116
4117  test -n "$BASENAME" && break
4118done
4119
4120  else
4121    # The variable is set, but is it from the command line or the environment?
4122
4123    # Try to remove the string !BASENAME! from our list.
4124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4126      # If it failed, the variable was not from the command line. Ignore it,
4127      # but warn the user (except for BASH, which is always set by the calling BASH).
4128      if test "xBASENAME" != xBASH; then
4129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4130$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4131      fi
4132      # Try to locate tool using the code snippet
4133      for ac_prog in basename
4134do
4135  # Extract the first word of "$ac_prog", so it can be a program name with args.
4136set dummy $ac_prog; ac_word=$2
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4138$as_echo_n "checking for $ac_word... " >&6; }
4139if ${ac_cv_path_BASENAME+:} false; then :
4140  $as_echo_n "(cached) " >&6
4141else
4142  case $BASENAME in
4143  [\\/]* | ?:[\\/]*)
4144  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4145  ;;
4146  *)
4147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4148for as_dir in $PATH
4149do
4150  IFS=$as_save_IFS
4151  test -z "$as_dir" && as_dir=.
4152    for ac_exec_ext in '' $ac_executable_extensions; do
4153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4154    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4156    break 2
4157  fi
4158done
4159  done
4160IFS=$as_save_IFS
4161
4162  ;;
4163esac
4164fi
4165BASENAME=$ac_cv_path_BASENAME
4166if test -n "$BASENAME"; then
4167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4168$as_echo "$BASENAME" >&6; }
4169else
4170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4171$as_echo "no" >&6; }
4172fi
4173
4174
4175  test -n "$BASENAME" && break
4176done
4177
4178    else
4179      # If it succeeded, then it was overridden by the user. We will use it
4180      # for the tool.
4181
4182      # First remove it from the list of overridden variables, so we can test
4183      # for unknown variables in the end.
4184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4185
4186      # Check if the provided tool contains a complete path.
4187      tool_specified="$BASENAME"
4188      tool_basename="${tool_specified##*/}"
4189      if test "x$tool_basename" = "x$tool_specified"; then
4190        # A command without a complete path is provided, search $PATH.
4191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4192$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4193        # Extract the first word of "$tool_basename", so it can be a program name with args.
4194set dummy $tool_basename; ac_word=$2
4195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4196$as_echo_n "checking for $ac_word... " >&6; }
4197if ${ac_cv_path_BASENAME+:} false; then :
4198  $as_echo_n "(cached) " >&6
4199else
4200  case $BASENAME in
4201  [\\/]* | ?:[\\/]*)
4202  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4203  ;;
4204  *)
4205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4206for as_dir in $PATH
4207do
4208  IFS=$as_save_IFS
4209  test -z "$as_dir" && as_dir=.
4210    for ac_exec_ext in '' $ac_executable_extensions; do
4211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4212    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4214    break 2
4215  fi
4216done
4217  done
4218IFS=$as_save_IFS
4219
4220  ;;
4221esac
4222fi
4223BASENAME=$ac_cv_path_BASENAME
4224if test -n "$BASENAME"; then
4225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4226$as_echo "$BASENAME" >&6; }
4227else
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4229$as_echo "no" >&6; }
4230fi
4231
4232
4233        if test "x$BASENAME" = x; then
4234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4235        fi
4236      else
4237        # Otherwise we believe it is a complete path. Use it as it is.
4238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4239$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4241$as_echo_n "checking for BASENAME... " >&6; }
4242        if test ! -x "$tool_specified"; then
4243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4244$as_echo "not found" >&6; }
4245          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4246        fi
4247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4248$as_echo "$tool_specified" >&6; }
4249      fi
4250    fi
4251  fi
4252
4253
4254
4255  if test "x$BASENAME" = x; then
4256    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4257  fi
4258
4259
4260
4261
4262
4263  # Publish this variable in the help.
4264
4265
4266  if test "x$BASH" = x; then
4267    # The variable is not set by user, try to locate tool using the code snippet
4268    for ac_prog in bash
4269do
4270  # Extract the first word of "$ac_prog", so it can be a program name with args.
4271set dummy $ac_prog; ac_word=$2
4272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4273$as_echo_n "checking for $ac_word... " >&6; }
4274if ${ac_cv_path_BASH+:} false; then :
4275  $as_echo_n "(cached) " >&6
4276else
4277  case $BASH in
4278  [\\/]* | ?:[\\/]*)
4279  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4280  ;;
4281  *)
4282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4283for as_dir in $PATH
4284do
4285  IFS=$as_save_IFS
4286  test -z "$as_dir" && as_dir=.
4287    for ac_exec_ext in '' $ac_executable_extensions; do
4288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4289    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4291    break 2
4292  fi
4293done
4294  done
4295IFS=$as_save_IFS
4296
4297  ;;
4298esac
4299fi
4300BASH=$ac_cv_path_BASH
4301if test -n "$BASH"; then
4302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4303$as_echo "$BASH" >&6; }
4304else
4305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4306$as_echo "no" >&6; }
4307fi
4308
4309
4310  test -n "$BASH" && break
4311done
4312
4313  else
4314    # The variable is set, but is it from the command line or the environment?
4315
4316    # Try to remove the string !BASH! from our list.
4317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4319      # If it failed, the variable was not from the command line. Ignore it,
4320      # but warn the user (except for BASH, which is always set by the calling BASH).
4321      if test "xBASH" != xBASH; then
4322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4323$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4324      fi
4325      # Try to locate tool using the code snippet
4326      for ac_prog in bash
4327do
4328  # Extract the first word of "$ac_prog", so it can be a program name with args.
4329set dummy $ac_prog; ac_word=$2
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4331$as_echo_n "checking for $ac_word... " >&6; }
4332if ${ac_cv_path_BASH+:} false; then :
4333  $as_echo_n "(cached) " >&6
4334else
4335  case $BASH in
4336  [\\/]* | ?:[\\/]*)
4337  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4338  ;;
4339  *)
4340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4341for as_dir in $PATH
4342do
4343  IFS=$as_save_IFS
4344  test -z "$as_dir" && as_dir=.
4345    for ac_exec_ext in '' $ac_executable_extensions; do
4346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4347    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4349    break 2
4350  fi
4351done
4352  done
4353IFS=$as_save_IFS
4354
4355  ;;
4356esac
4357fi
4358BASH=$ac_cv_path_BASH
4359if test -n "$BASH"; then
4360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4361$as_echo "$BASH" >&6; }
4362else
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364$as_echo "no" >&6; }
4365fi
4366
4367
4368  test -n "$BASH" && break
4369done
4370
4371    else
4372      # If it succeeded, then it was overridden by the user. We will use it
4373      # for the tool.
4374
4375      # First remove it from the list of overridden variables, so we can test
4376      # for unknown variables in the end.
4377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4378
4379      # Check if the provided tool contains a complete path.
4380      tool_specified="$BASH"
4381      tool_basename="${tool_specified##*/}"
4382      if test "x$tool_basename" = "x$tool_specified"; then
4383        # A command without a complete path is provided, search $PATH.
4384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4385$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4386        # Extract the first word of "$tool_basename", so it can be a program name with args.
4387set dummy $tool_basename; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_BASH+:} false; then :
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $BASH in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403    for ac_exec_ext in '' $ac_executable_extensions; do
4404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410  done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416BASH=$ac_cv_path_BASH
4417if test -n "$BASH"; then
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4419$as_echo "$BASH" >&6; }
4420else
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426        if test "x$BASH" = x; then
4427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4428        fi
4429      else
4430        # Otherwise we believe it is a complete path. Use it as it is.
4431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4432$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4434$as_echo_n "checking for BASH... " >&6; }
4435        if test ! -x "$tool_specified"; then
4436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4437$as_echo "not found" >&6; }
4438          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4439        fi
4440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4441$as_echo "$tool_specified" >&6; }
4442      fi
4443    fi
4444  fi
4445
4446
4447
4448  if test "x$BASH" = x; then
4449    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4450  fi
4451
4452
4453
4454
4455
4456  # Publish this variable in the help.
4457
4458
4459  if test "x$CAT" = x; then
4460    # The variable is not set by user, try to locate tool using the code snippet
4461    for ac_prog in cat
4462do
4463  # Extract the first word of "$ac_prog", so it can be a program name with args.
4464set dummy $ac_prog; ac_word=$2
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4466$as_echo_n "checking for $ac_word... " >&6; }
4467if ${ac_cv_path_CAT+:} false; then :
4468  $as_echo_n "(cached) " >&6
4469else
4470  case $CAT in
4471  [\\/]* | ?:[\\/]*)
4472  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4473  ;;
4474  *)
4475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4476for as_dir in $PATH
4477do
4478  IFS=$as_save_IFS
4479  test -z "$as_dir" && as_dir=.
4480    for ac_exec_ext in '' $ac_executable_extensions; do
4481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4482    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4484    break 2
4485  fi
4486done
4487  done
4488IFS=$as_save_IFS
4489
4490  ;;
4491esac
4492fi
4493CAT=$ac_cv_path_CAT
4494if test -n "$CAT"; then
4495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4496$as_echo "$CAT" >&6; }
4497else
4498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4499$as_echo "no" >&6; }
4500fi
4501
4502
4503  test -n "$CAT" && break
4504done
4505
4506  else
4507    # The variable is set, but is it from the command line or the environment?
4508
4509    # Try to remove the string !CAT! from our list.
4510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4512      # If it failed, the variable was not from the command line. Ignore it,
4513      # but warn the user (except for BASH, which is always set by the calling BASH).
4514      if test "xCAT" != xBASH; then
4515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4516$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4517      fi
4518      # Try to locate tool using the code snippet
4519      for ac_prog in cat
4520do
4521  # Extract the first word of "$ac_prog", so it can be a program name with args.
4522set dummy $ac_prog; ac_word=$2
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4524$as_echo_n "checking for $ac_word... " >&6; }
4525if ${ac_cv_path_CAT+:} false; then :
4526  $as_echo_n "(cached) " >&6
4527else
4528  case $CAT in
4529  [\\/]* | ?:[\\/]*)
4530  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4531  ;;
4532  *)
4533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4534for as_dir in $PATH
4535do
4536  IFS=$as_save_IFS
4537  test -z "$as_dir" && as_dir=.
4538    for ac_exec_ext in '' $ac_executable_extensions; do
4539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4540    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4542    break 2
4543  fi
4544done
4545  done
4546IFS=$as_save_IFS
4547
4548  ;;
4549esac
4550fi
4551CAT=$ac_cv_path_CAT
4552if test -n "$CAT"; then
4553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4554$as_echo "$CAT" >&6; }
4555else
4556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557$as_echo "no" >&6; }
4558fi
4559
4560
4561  test -n "$CAT" && break
4562done
4563
4564    else
4565      # If it succeeded, then it was overridden by the user. We will use it
4566      # for the tool.
4567
4568      # First remove it from the list of overridden variables, so we can test
4569      # for unknown variables in the end.
4570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4571
4572      # Check if the provided tool contains a complete path.
4573      tool_specified="$CAT"
4574      tool_basename="${tool_specified##*/}"
4575      if test "x$tool_basename" = "x$tool_specified"; then
4576        # A command without a complete path is provided, search $PATH.
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4578$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4579        # Extract the first word of "$tool_basename", so it can be a program name with args.
4580set dummy $tool_basename; ac_word=$2
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4582$as_echo_n "checking for $ac_word... " >&6; }
4583if ${ac_cv_path_CAT+:} false; then :
4584  $as_echo_n "(cached) " >&6
4585else
4586  case $CAT in
4587  [\\/]* | ?:[\\/]*)
4588  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4589  ;;
4590  *)
4591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4592for as_dir in $PATH
4593do
4594  IFS=$as_save_IFS
4595  test -z "$as_dir" && as_dir=.
4596    for ac_exec_ext in '' $ac_executable_extensions; do
4597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4598    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4600    break 2
4601  fi
4602done
4603  done
4604IFS=$as_save_IFS
4605
4606  ;;
4607esac
4608fi
4609CAT=$ac_cv_path_CAT
4610if test -n "$CAT"; then
4611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4612$as_echo "$CAT" >&6; }
4613else
4614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615$as_echo "no" >&6; }
4616fi
4617
4618
4619        if test "x$CAT" = x; then
4620          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4621        fi
4622      else
4623        # Otherwise we believe it is a complete path. Use it as it is.
4624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4625$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4627$as_echo_n "checking for CAT... " >&6; }
4628        if test ! -x "$tool_specified"; then
4629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4630$as_echo "not found" >&6; }
4631          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4632        fi
4633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4634$as_echo "$tool_specified" >&6; }
4635      fi
4636    fi
4637  fi
4638
4639
4640
4641  if test "x$CAT" = x; then
4642    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4643  fi
4644
4645
4646
4647
4648
4649  # Publish this variable in the help.
4650
4651
4652  if test "x$CHMOD" = x; then
4653    # The variable is not set by user, try to locate tool using the code snippet
4654    for ac_prog in chmod
4655do
4656  # Extract the first word of "$ac_prog", so it can be a program name with args.
4657set dummy $ac_prog; ac_word=$2
4658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4659$as_echo_n "checking for $ac_word... " >&6; }
4660if ${ac_cv_path_CHMOD+:} false; then :
4661  $as_echo_n "(cached) " >&6
4662else
4663  case $CHMOD in
4664  [\\/]* | ?:[\\/]*)
4665  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4666  ;;
4667  *)
4668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4669for as_dir in $PATH
4670do
4671  IFS=$as_save_IFS
4672  test -z "$as_dir" && as_dir=.
4673    for ac_exec_ext in '' $ac_executable_extensions; do
4674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4675    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4677    break 2
4678  fi
4679done
4680  done
4681IFS=$as_save_IFS
4682
4683  ;;
4684esac
4685fi
4686CHMOD=$ac_cv_path_CHMOD
4687if test -n "$CHMOD"; then
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4689$as_echo "$CHMOD" >&6; }
4690else
4691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
4693fi
4694
4695
4696  test -n "$CHMOD" && break
4697done
4698
4699  else
4700    # The variable is set, but is it from the command line or the environment?
4701
4702    # Try to remove the string !CHMOD! from our list.
4703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4705      # If it failed, the variable was not from the command line. Ignore it,
4706      # but warn the user (except for BASH, which is always set by the calling BASH).
4707      if test "xCHMOD" != xBASH; then
4708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4709$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4710      fi
4711      # Try to locate tool using the code snippet
4712      for ac_prog in chmod
4713do
4714  # Extract the first word of "$ac_prog", so it can be a program name with args.
4715set dummy $ac_prog; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
4718if ${ac_cv_path_CHMOD+:} false; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  case $CHMOD in
4722  [\\/]* | ?:[\\/]*)
4723  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4724  ;;
4725  *)
4726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4733    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735    break 2
4736  fi
4737done
4738  done
4739IFS=$as_save_IFS
4740
4741  ;;
4742esac
4743fi
4744CHMOD=$ac_cv_path_CHMOD
4745if test -n "$CHMOD"; then
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4747$as_echo "$CHMOD" >&6; }
4748else
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753
4754  test -n "$CHMOD" && break
4755done
4756
4757    else
4758      # If it succeeded, then it was overridden by the user. We will use it
4759      # for the tool.
4760
4761      # First remove it from the list of overridden variables, so we can test
4762      # for unknown variables in the end.
4763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4764
4765      # Check if the provided tool contains a complete path.
4766      tool_specified="$CHMOD"
4767      tool_basename="${tool_specified##*/}"
4768      if test "x$tool_basename" = "x$tool_specified"; then
4769        # A command without a complete path is provided, search $PATH.
4770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4771$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4772        # Extract the first word of "$tool_basename", so it can be a program name with args.
4773set dummy $tool_basename; ac_word=$2
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4775$as_echo_n "checking for $ac_word... " >&6; }
4776if ${ac_cv_path_CHMOD+:} false; then :
4777  $as_echo_n "(cached) " >&6
4778else
4779  case $CHMOD in
4780  [\\/]* | ?:[\\/]*)
4781  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4782  ;;
4783  *)
4784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787  IFS=$as_save_IFS
4788  test -z "$as_dir" && as_dir=.
4789    for ac_exec_ext in '' $ac_executable_extensions; do
4790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4791    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793    break 2
4794  fi
4795done
4796  done
4797IFS=$as_save_IFS
4798
4799  ;;
4800esac
4801fi
4802CHMOD=$ac_cv_path_CHMOD
4803if test -n "$CHMOD"; then
4804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4805$as_echo "$CHMOD" >&6; }
4806else
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4808$as_echo "no" >&6; }
4809fi
4810
4811
4812        if test "x$CHMOD" = x; then
4813          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4814        fi
4815      else
4816        # Otherwise we believe it is a complete path. Use it as it is.
4817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
4818$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
4819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
4820$as_echo_n "checking for CHMOD... " >&6; }
4821        if test ! -x "$tool_specified"; then
4822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4823$as_echo "not found" >&6; }
4824          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
4825        fi
4826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4827$as_echo "$tool_specified" >&6; }
4828      fi
4829    fi
4830  fi
4831
4832
4833
4834  if test "x$CHMOD" = x; then
4835    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
4836  fi
4837
4838
4839
4840
4841
4842  # Publish this variable in the help.
4843
4844
4845  if test "x$CMP" = x; then
4846    # The variable is not set by user, try to locate tool using the code snippet
4847    for ac_prog in cmp
4848do
4849  # Extract the first word of "$ac_prog", so it can be a program name with args.
4850set dummy $ac_prog; ac_word=$2
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852$as_echo_n "checking for $ac_word... " >&6; }
4853if ${ac_cv_path_CMP+:} false; then :
4854  $as_echo_n "(cached) " >&6
4855else
4856  case $CMP in
4857  [\\/]* | ?:[\\/]*)
4858  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4859  ;;
4860  *)
4861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in $PATH
4863do
4864  IFS=$as_save_IFS
4865  test -z "$as_dir" && as_dir=.
4866    for ac_exec_ext in '' $ac_executable_extensions; do
4867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4868    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4870    break 2
4871  fi
4872done
4873  done
4874IFS=$as_save_IFS
4875
4876  ;;
4877esac
4878fi
4879CMP=$ac_cv_path_CMP
4880if test -n "$CMP"; then
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4882$as_echo "$CMP" >&6; }
4883else
4884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885$as_echo "no" >&6; }
4886fi
4887
4888
4889  test -n "$CMP" && break
4890done
4891
4892  else
4893    # The variable is set, but is it from the command line or the environment?
4894
4895    # Try to remove the string !CMP! from our list.
4896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
4897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4898      # If it failed, the variable was not from the command line. Ignore it,
4899      # but warn the user (except for BASH, which is always set by the calling BASH).
4900      if test "xCMP" != xBASH; then
4901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
4902$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
4903      fi
4904      # Try to locate tool using the code snippet
4905      for ac_prog in cmp
4906do
4907  # Extract the first word of "$ac_prog", so it can be a program name with args.
4908set dummy $ac_prog; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if ${ac_cv_path_CMP+:} false; then :
4912  $as_echo_n "(cached) " >&6
4913else
4914  case $CMP in
4915  [\\/]* | ?:[\\/]*)
4916  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4917  ;;
4918  *)
4919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in $PATH
4921do
4922  IFS=$as_save_IFS
4923  test -z "$as_dir" && as_dir=.
4924    for ac_exec_ext in '' $ac_executable_extensions; do
4925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4926    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928    break 2
4929  fi
4930done
4931  done
4932IFS=$as_save_IFS
4933
4934  ;;
4935esac
4936fi
4937CMP=$ac_cv_path_CMP
4938if test -n "$CMP"; then
4939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4940$as_echo "$CMP" >&6; }
4941else
4942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946
4947  test -n "$CMP" && break
4948done
4949
4950    else
4951      # If it succeeded, then it was overridden by the user. We will use it
4952      # for the tool.
4953
4954      # First remove it from the list of overridden variables, so we can test
4955      # for unknown variables in the end.
4956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4957
4958      # Check if the provided tool contains a complete path.
4959      tool_specified="$CMP"
4960      tool_basename="${tool_specified##*/}"
4961      if test "x$tool_basename" = "x$tool_specified"; then
4962        # A command without a complete path is provided, search $PATH.
4963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
4964$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
4965        # Extract the first word of "$tool_basename", so it can be a program name with args.
4966set dummy $tool_basename; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_CMP+:} false; then :
4970  $as_echo_n "(cached) " >&6
4971else
4972  case $CMP in
4973  [\\/]* | ?:[\\/]*)
4974  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4975  ;;
4976  *)
4977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in $PATH
4979do
4980  IFS=$as_save_IFS
4981  test -z "$as_dir" && as_dir=.
4982    for ac_exec_ext in '' $ac_executable_extensions; do
4983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986    break 2
4987  fi
4988done
4989  done
4990IFS=$as_save_IFS
4991
4992  ;;
4993esac
4994fi
4995CMP=$ac_cv_path_CMP
4996if test -n "$CMP"; then
4997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4998$as_echo "$CMP" >&6; }
4999else
5000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004
5005        if test "x$CMP" = x; then
5006          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5007        fi
5008      else
5009        # Otherwise we believe it is a complete path. Use it as it is.
5010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5011$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5013$as_echo_n "checking for CMP... " >&6; }
5014        if test ! -x "$tool_specified"; then
5015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5016$as_echo "not found" >&6; }
5017          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5018        fi
5019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5020$as_echo "$tool_specified" >&6; }
5021      fi
5022    fi
5023  fi
5024
5025
5026
5027  if test "x$CMP" = x; then
5028    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5029  fi
5030
5031
5032
5033
5034
5035  # Publish this variable in the help.
5036
5037
5038  if test "x$COMM" = x; then
5039    # The variable is not set by user, try to locate tool using the code snippet
5040    for ac_prog in comm
5041do
5042  # Extract the first word of "$ac_prog", so it can be a program name with args.
5043set dummy $ac_prog; ac_word=$2
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045$as_echo_n "checking for $ac_word... " >&6; }
5046if ${ac_cv_path_COMM+:} false; then :
5047  $as_echo_n "(cached) " >&6
5048else
5049  case $COMM in
5050  [\\/]* | ?:[\\/]*)
5051  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5052  ;;
5053  *)
5054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in $PATH
5056do
5057  IFS=$as_save_IFS
5058  test -z "$as_dir" && as_dir=.
5059    for ac_exec_ext in '' $ac_executable_extensions; do
5060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063    break 2
5064  fi
5065done
5066  done
5067IFS=$as_save_IFS
5068
5069  ;;
5070esac
5071fi
5072COMM=$ac_cv_path_COMM
5073if test -n "$COMM"; then
5074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5075$as_echo "$COMM" >&6; }
5076else
5077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
5079fi
5080
5081
5082  test -n "$COMM" && break
5083done
5084
5085  else
5086    # The variable is set, but is it from the command line or the environment?
5087
5088    # Try to remove the string !COMM! from our list.
5089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5091      # If it failed, the variable was not from the command line. Ignore it,
5092      # but warn the user (except for BASH, which is always set by the calling BASH).
5093      if test "xCOMM" != xBASH; then
5094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5095$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5096      fi
5097      # Try to locate tool using the code snippet
5098      for ac_prog in comm
5099do
5100  # Extract the first word of "$ac_prog", so it can be a program name with args.
5101set dummy $ac_prog; ac_word=$2
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
5104if ${ac_cv_path_COMM+:} false; then :
5105  $as_echo_n "(cached) " >&6
5106else
5107  case $COMM in
5108  [\\/]* | ?:[\\/]*)
5109  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5110  ;;
5111  *)
5112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5113for as_dir in $PATH
5114do
5115  IFS=$as_save_IFS
5116  test -z "$as_dir" && as_dir=.
5117    for ac_exec_ext in '' $ac_executable_extensions; do
5118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5119    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5121    break 2
5122  fi
5123done
5124  done
5125IFS=$as_save_IFS
5126
5127  ;;
5128esac
5129fi
5130COMM=$ac_cv_path_COMM
5131if test -n "$COMM"; then
5132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5133$as_echo "$COMM" >&6; }
5134else
5135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136$as_echo "no" >&6; }
5137fi
5138
5139
5140  test -n "$COMM" && break
5141done
5142
5143    else
5144      # If it succeeded, then it was overridden by the user. We will use it
5145      # for the tool.
5146
5147      # First remove it from the list of overridden variables, so we can test
5148      # for unknown variables in the end.
5149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5150
5151      # Check if the provided tool contains a complete path.
5152      tool_specified="$COMM"
5153      tool_basename="${tool_specified##*/}"
5154      if test "x$tool_basename" = "x$tool_specified"; then
5155        # A command without a complete path is provided, search $PATH.
5156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5157$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5158        # Extract the first word of "$tool_basename", so it can be a program name with args.
5159set dummy $tool_basename; ac_word=$2
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5161$as_echo_n "checking for $ac_word... " >&6; }
5162if ${ac_cv_path_COMM+:} false; then :
5163  $as_echo_n "(cached) " >&6
5164else
5165  case $COMM in
5166  [\\/]* | ?:[\\/]*)
5167  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5168  ;;
5169  *)
5170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5171for as_dir in $PATH
5172do
5173  IFS=$as_save_IFS
5174  test -z "$as_dir" && as_dir=.
5175    for ac_exec_ext in '' $ac_executable_extensions; do
5176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5177    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5179    break 2
5180  fi
5181done
5182  done
5183IFS=$as_save_IFS
5184
5185  ;;
5186esac
5187fi
5188COMM=$ac_cv_path_COMM
5189if test -n "$COMM"; then
5190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5191$as_echo "$COMM" >&6; }
5192else
5193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
5195fi
5196
5197
5198        if test "x$COMM" = x; then
5199          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5200        fi
5201      else
5202        # Otherwise we believe it is a complete path. Use it as it is.
5203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5204$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5206$as_echo_n "checking for COMM... " >&6; }
5207        if test ! -x "$tool_specified"; then
5208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5209$as_echo "not found" >&6; }
5210          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5211        fi
5212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5213$as_echo "$tool_specified" >&6; }
5214      fi
5215    fi
5216  fi
5217
5218
5219
5220  if test "x$COMM" = x; then
5221    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5222  fi
5223
5224
5225
5226
5227
5228  # Publish this variable in the help.
5229
5230
5231  if test "x$CP" = x; then
5232    # The variable is not set by user, try to locate tool using the code snippet
5233    for ac_prog in cp
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if ${ac_cv_path_CP+:} false; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $CP in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5254    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265CP=$ac_cv_path_CP
5266if test -n "$CP"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5268$as_echo "$CP" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$CP" && break
5276done
5277
5278  else
5279    # The variable is set, but is it from the command line or the environment?
5280
5281    # Try to remove the string !CP! from our list.
5282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5284      # If it failed, the variable was not from the command line. Ignore it,
5285      # but warn the user (except for BASH, which is always set by the calling BASH).
5286      if test "xCP" != xBASH; then
5287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5288$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5289      fi
5290      # Try to locate tool using the code snippet
5291      for ac_prog in cp
5292do
5293  # Extract the first word of "$ac_prog", so it can be a program name with args.
5294set dummy $ac_prog; ac_word=$2
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5296$as_echo_n "checking for $ac_word... " >&6; }
5297if ${ac_cv_path_CP+:} false; then :
5298  $as_echo_n "(cached) " >&6
5299else
5300  case $CP in
5301  [\\/]* | ?:[\\/]*)
5302  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5303  ;;
5304  *)
5305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5306for as_dir in $PATH
5307do
5308  IFS=$as_save_IFS
5309  test -z "$as_dir" && as_dir=.
5310    for ac_exec_ext in '' $ac_executable_extensions; do
5311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5312    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5314    break 2
5315  fi
5316done
5317  done
5318IFS=$as_save_IFS
5319
5320  ;;
5321esac
5322fi
5323CP=$ac_cv_path_CP
5324if test -n "$CP"; then
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5326$as_echo "$CP" >&6; }
5327else
5328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5329$as_echo "no" >&6; }
5330fi
5331
5332
5333  test -n "$CP" && break
5334done
5335
5336    else
5337      # If it succeeded, then it was overridden by the user. We will use it
5338      # for the tool.
5339
5340      # First remove it from the list of overridden variables, so we can test
5341      # for unknown variables in the end.
5342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5343
5344      # Check if the provided tool contains a complete path.
5345      tool_specified="$CP"
5346      tool_basename="${tool_specified##*/}"
5347      if test "x$tool_basename" = "x$tool_specified"; then
5348        # A command without a complete path is provided, search $PATH.
5349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5350$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5351        # Extract the first word of "$tool_basename", so it can be a program name with args.
5352set dummy $tool_basename; ac_word=$2
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354$as_echo_n "checking for $ac_word... " >&6; }
5355if ${ac_cv_path_CP+:} false; then :
5356  $as_echo_n "(cached) " >&6
5357else
5358  case $CP in
5359  [\\/]* | ?:[\\/]*)
5360  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5361  ;;
5362  *)
5363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366  IFS=$as_save_IFS
5367  test -z "$as_dir" && as_dir=.
5368    for ac_exec_ext in '' $ac_executable_extensions; do
5369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5370    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5372    break 2
5373  fi
5374done
5375  done
5376IFS=$as_save_IFS
5377
5378  ;;
5379esac
5380fi
5381CP=$ac_cv_path_CP
5382if test -n "$CP"; then
5383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5384$as_echo "$CP" >&6; }
5385else
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389
5390
5391        if test "x$CP" = x; then
5392          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5393        fi
5394      else
5395        # Otherwise we believe it is a complete path. Use it as it is.
5396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5397$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5399$as_echo_n "checking for CP... " >&6; }
5400        if test ! -x "$tool_specified"; then
5401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5402$as_echo "not found" >&6; }
5403          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5404        fi
5405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5406$as_echo "$tool_specified" >&6; }
5407      fi
5408    fi
5409  fi
5410
5411
5412
5413  if test "x$CP" = x; then
5414    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5415  fi
5416
5417
5418
5419
5420
5421  # Publish this variable in the help.
5422
5423
5424  if test "x$CPIO" = x; then
5425    # The variable is not set by user, try to locate tool using the code snippet
5426    for ac_prog in cpio
5427do
5428  # Extract the first word of "$ac_prog", so it can be a program name with args.
5429set dummy $ac_prog; ac_word=$2
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431$as_echo_n "checking for $ac_word... " >&6; }
5432if ${ac_cv_path_CPIO+:} false; then :
5433  $as_echo_n "(cached) " >&6
5434else
5435  case $CPIO in
5436  [\\/]* | ?:[\\/]*)
5437  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5438  ;;
5439  *)
5440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441for as_dir in $PATH
5442do
5443  IFS=$as_save_IFS
5444  test -z "$as_dir" && as_dir=.
5445    for ac_exec_ext in '' $ac_executable_extensions; do
5446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449    break 2
5450  fi
5451done
5452  done
5453IFS=$as_save_IFS
5454
5455  ;;
5456esac
5457fi
5458CPIO=$ac_cv_path_CPIO
5459if test -n "$CPIO"; then
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5461$as_echo "$CPIO" >&6; }
5462else
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464$as_echo "no" >&6; }
5465fi
5466
5467
5468  test -n "$CPIO" && break
5469done
5470
5471  else
5472    # The variable is set, but is it from the command line or the environment?
5473
5474    # Try to remove the string !CPIO! from our list.
5475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5477      # If it failed, the variable was not from the command line. Ignore it,
5478      # but warn the user (except for BASH, which is always set by the calling BASH).
5479      if test "xCPIO" != xBASH; then
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5481$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5482      fi
5483      # Try to locate tool using the code snippet
5484      for ac_prog in cpio
5485do
5486  # Extract the first word of "$ac_prog", so it can be a program name with args.
5487set dummy $ac_prog; ac_word=$2
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489$as_echo_n "checking for $ac_word... " >&6; }
5490if ${ac_cv_path_CPIO+:} false; then :
5491  $as_echo_n "(cached) " >&6
5492else
5493  case $CPIO in
5494  [\\/]* | ?:[\\/]*)
5495  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5496  ;;
5497  *)
5498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499for as_dir in $PATH
5500do
5501  IFS=$as_save_IFS
5502  test -z "$as_dir" && as_dir=.
5503    for ac_exec_ext in '' $ac_executable_extensions; do
5504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5505    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5507    break 2
5508  fi
5509done
5510  done
5511IFS=$as_save_IFS
5512
5513  ;;
5514esac
5515fi
5516CPIO=$ac_cv_path_CPIO
5517if test -n "$CPIO"; then
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5519$as_echo "$CPIO" >&6; }
5520else
5521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522$as_echo "no" >&6; }
5523fi
5524
5525
5526  test -n "$CPIO" && break
5527done
5528
5529    else
5530      # If it succeeded, then it was overridden by the user. We will use it
5531      # for the tool.
5532
5533      # First remove it from the list of overridden variables, so we can test
5534      # for unknown variables in the end.
5535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5536
5537      # Check if the provided tool contains a complete path.
5538      tool_specified="$CPIO"
5539      tool_basename="${tool_specified##*/}"
5540      if test "x$tool_basename" = "x$tool_specified"; then
5541        # A command without a complete path is provided, search $PATH.
5542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5543$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5544        # Extract the first word of "$tool_basename", so it can be a program name with args.
5545set dummy $tool_basename; ac_word=$2
5546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547$as_echo_n "checking for $ac_word... " >&6; }
5548if ${ac_cv_path_CPIO+:} false; then :
5549  $as_echo_n "(cached) " >&6
5550else
5551  case $CPIO in
5552  [\\/]* | ?:[\\/]*)
5553  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5554  ;;
5555  *)
5556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5557for as_dir in $PATH
5558do
5559  IFS=$as_save_IFS
5560  test -z "$as_dir" && as_dir=.
5561    for ac_exec_ext in '' $ac_executable_extensions; do
5562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5563    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5565    break 2
5566  fi
5567done
5568  done
5569IFS=$as_save_IFS
5570
5571  ;;
5572esac
5573fi
5574CPIO=$ac_cv_path_CPIO
5575if test -n "$CPIO"; then
5576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5577$as_echo "$CPIO" >&6; }
5578else
5579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580$as_echo "no" >&6; }
5581fi
5582
5583
5584        if test "x$CPIO" = x; then
5585          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5586        fi
5587      else
5588        # Otherwise we believe it is a complete path. Use it as it is.
5589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5590$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5592$as_echo_n "checking for CPIO... " >&6; }
5593        if test ! -x "$tool_specified"; then
5594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5595$as_echo "not found" >&6; }
5596          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5597        fi
5598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5599$as_echo "$tool_specified" >&6; }
5600      fi
5601    fi
5602  fi
5603
5604
5605
5606  if test "x$CPIO" = x; then
5607    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5608  fi
5609
5610
5611
5612
5613
5614  # Publish this variable in the help.
5615
5616
5617  if test "x$CUT" = x; then
5618    # The variable is not set by user, try to locate tool using the code snippet
5619    for ac_prog in cut
5620do
5621  # Extract the first word of "$ac_prog", so it can be a program name with args.
5622set dummy $ac_prog; ac_word=$2
5623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5624$as_echo_n "checking for $ac_word... " >&6; }
5625if ${ac_cv_path_CUT+:} false; then :
5626  $as_echo_n "(cached) " >&6
5627else
5628  case $CUT in
5629  [\\/]* | ?:[\\/]*)
5630  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5631  ;;
5632  *)
5633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5634for as_dir in $PATH
5635do
5636  IFS=$as_save_IFS
5637  test -z "$as_dir" && as_dir=.
5638    for ac_exec_ext in '' $ac_executable_extensions; do
5639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5640    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5642    break 2
5643  fi
5644done
5645  done
5646IFS=$as_save_IFS
5647
5648  ;;
5649esac
5650fi
5651CUT=$ac_cv_path_CUT
5652if test -n "$CUT"; then
5653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5654$as_echo "$CUT" >&6; }
5655else
5656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657$as_echo "no" >&6; }
5658fi
5659
5660
5661  test -n "$CUT" && break
5662done
5663
5664  else
5665    # The variable is set, but is it from the command line or the environment?
5666
5667    # Try to remove the string !CUT! from our list.
5668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5670      # If it failed, the variable was not from the command line. Ignore it,
5671      # but warn the user (except for BASH, which is always set by the calling BASH).
5672      if test "xCUT" != xBASH; then
5673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5674$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5675      fi
5676      # Try to locate tool using the code snippet
5677      for ac_prog in cut
5678do
5679  # Extract the first word of "$ac_prog", so it can be a program name with args.
5680set dummy $ac_prog; ac_word=$2
5681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682$as_echo_n "checking for $ac_word... " >&6; }
5683if ${ac_cv_path_CUT+:} false; then :
5684  $as_echo_n "(cached) " >&6
5685else
5686  case $CUT in
5687  [\\/]* | ?:[\\/]*)
5688  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5689  ;;
5690  *)
5691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694  IFS=$as_save_IFS
5695  test -z "$as_dir" && as_dir=.
5696    for ac_exec_ext in '' $ac_executable_extensions; do
5697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700    break 2
5701  fi
5702done
5703  done
5704IFS=$as_save_IFS
5705
5706  ;;
5707esac
5708fi
5709CUT=$ac_cv_path_CUT
5710if test -n "$CUT"; then
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5712$as_echo "$CUT" >&6; }
5713else
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716fi
5717
5718
5719  test -n "$CUT" && break
5720done
5721
5722    else
5723      # If it succeeded, then it was overridden by the user. We will use it
5724      # for the tool.
5725
5726      # First remove it from the list of overridden variables, so we can test
5727      # for unknown variables in the end.
5728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5729
5730      # Check if the provided tool contains a complete path.
5731      tool_specified="$CUT"
5732      tool_basename="${tool_specified##*/}"
5733      if test "x$tool_basename" = "x$tool_specified"; then
5734        # A command without a complete path is provided, search $PATH.
5735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5736$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5737        # Extract the first word of "$tool_basename", so it can be a program name with args.
5738set dummy $tool_basename; ac_word=$2
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
5741if ${ac_cv_path_CUT+:} false; then :
5742  $as_echo_n "(cached) " >&6
5743else
5744  case $CUT in
5745  [\\/]* | ?:[\\/]*)
5746  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5747  ;;
5748  *)
5749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750for as_dir in $PATH
5751do
5752  IFS=$as_save_IFS
5753  test -z "$as_dir" && as_dir=.
5754    for ac_exec_ext in '' $ac_executable_extensions; do
5755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5756    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758    break 2
5759  fi
5760done
5761  done
5762IFS=$as_save_IFS
5763
5764  ;;
5765esac
5766fi
5767CUT=$ac_cv_path_CUT
5768if test -n "$CUT"; then
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5770$as_echo "$CUT" >&6; }
5771else
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
5774fi
5775
5776
5777        if test "x$CUT" = x; then
5778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5779        fi
5780      else
5781        # Otherwise we believe it is a complete path. Use it as it is.
5782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5783$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5785$as_echo_n "checking for CUT... " >&6; }
5786        if test ! -x "$tool_specified"; then
5787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5788$as_echo "not found" >&6; }
5789          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5790        fi
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5792$as_echo "$tool_specified" >&6; }
5793      fi
5794    fi
5795  fi
5796
5797
5798
5799  if test "x$CUT" = x; then
5800    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5801  fi
5802
5803
5804
5805
5806
5807  # Publish this variable in the help.
5808
5809
5810  if test "x$DATE" = x; then
5811    # The variable is not set by user, try to locate tool using the code snippet
5812    for ac_prog in date
5813do
5814  # Extract the first word of "$ac_prog", so it can be a program name with args.
5815set dummy $ac_prog; ac_word=$2
5816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5817$as_echo_n "checking for $ac_word... " >&6; }
5818if ${ac_cv_path_DATE+:} false; then :
5819  $as_echo_n "(cached) " >&6
5820else
5821  case $DATE in
5822  [\\/]* | ?:[\\/]*)
5823  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5824  ;;
5825  *)
5826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5827for as_dir in $PATH
5828do
5829  IFS=$as_save_IFS
5830  test -z "$as_dir" && as_dir=.
5831    for ac_exec_ext in '' $ac_executable_extensions; do
5832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5833    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5835    break 2
5836  fi
5837done
5838  done
5839IFS=$as_save_IFS
5840
5841  ;;
5842esac
5843fi
5844DATE=$ac_cv_path_DATE
5845if test -n "$DATE"; then
5846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5847$as_echo "$DATE" >&6; }
5848else
5849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5850$as_echo "no" >&6; }
5851fi
5852
5853
5854  test -n "$DATE" && break
5855done
5856
5857  else
5858    # The variable is set, but is it from the command line or the environment?
5859
5860    # Try to remove the string !DATE! from our list.
5861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5863      # If it failed, the variable was not from the command line. Ignore it,
5864      # but warn the user (except for BASH, which is always set by the calling BASH).
5865      if test "xDATE" != xBASH; then
5866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5867$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5868      fi
5869      # Try to locate tool using the code snippet
5870      for ac_prog in date
5871do
5872  # Extract the first word of "$ac_prog", so it can be a program name with args.
5873set dummy $ac_prog; ac_word=$2
5874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5875$as_echo_n "checking for $ac_word... " >&6; }
5876if ${ac_cv_path_DATE+:} false; then :
5877  $as_echo_n "(cached) " >&6
5878else
5879  case $DATE in
5880  [\\/]* | ?:[\\/]*)
5881  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5882  ;;
5883  *)
5884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5885for as_dir in $PATH
5886do
5887  IFS=$as_save_IFS
5888  test -z "$as_dir" && as_dir=.
5889    for ac_exec_ext in '' $ac_executable_extensions; do
5890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5891    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5893    break 2
5894  fi
5895done
5896  done
5897IFS=$as_save_IFS
5898
5899  ;;
5900esac
5901fi
5902DATE=$ac_cv_path_DATE
5903if test -n "$DATE"; then
5904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5905$as_echo "$DATE" >&6; }
5906else
5907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5908$as_echo "no" >&6; }
5909fi
5910
5911
5912  test -n "$DATE" && break
5913done
5914
5915    else
5916      # If it succeeded, then it was overridden by the user. We will use it
5917      # for the tool.
5918
5919      # First remove it from the list of overridden variables, so we can test
5920      # for unknown variables in the end.
5921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5922
5923      # Check if the provided tool contains a complete path.
5924      tool_specified="$DATE"
5925      tool_basename="${tool_specified##*/}"
5926      if test "x$tool_basename" = "x$tool_specified"; then
5927        # A command without a complete path is provided, search $PATH.
5928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
5929$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
5930        # Extract the first word of "$tool_basename", so it can be a program name with args.
5931set dummy $tool_basename; ac_word=$2
5932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
5934if ${ac_cv_path_DATE+:} false; then :
5935  $as_echo_n "(cached) " >&6
5936else
5937  case $DATE in
5938  [\\/]* | ?:[\\/]*)
5939  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5940  ;;
5941  *)
5942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943for as_dir in $PATH
5944do
5945  IFS=$as_save_IFS
5946  test -z "$as_dir" && as_dir=.
5947    for ac_exec_ext in '' $ac_executable_extensions; do
5948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5949    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5951    break 2
5952  fi
5953done
5954  done
5955IFS=$as_save_IFS
5956
5957  ;;
5958esac
5959fi
5960DATE=$ac_cv_path_DATE
5961if test -n "$DATE"; then
5962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5963$as_echo "$DATE" >&6; }
5964else
5965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5966$as_echo "no" >&6; }
5967fi
5968
5969
5970        if test "x$DATE" = x; then
5971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5972        fi
5973      else
5974        # Otherwise we believe it is a complete path. Use it as it is.
5975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
5976$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
5978$as_echo_n "checking for DATE... " >&6; }
5979        if test ! -x "$tool_specified"; then
5980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5981$as_echo "not found" >&6; }
5982          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
5983        fi
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5985$as_echo "$tool_specified" >&6; }
5986      fi
5987    fi
5988  fi
5989
5990
5991
5992  if test "x$DATE" = x; then
5993    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
5994  fi
5995
5996
5997
5998
5999
6000  # Publish this variable in the help.
6001
6002
6003  if test "x$DIFF" = x; then
6004    # The variable is not set by user, try to locate tool using the code snippet
6005    for ac_prog in gdiff diff
6006do
6007  # Extract the first word of "$ac_prog", so it can be a program name with args.
6008set dummy $ac_prog; ac_word=$2
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
6011if ${ac_cv_path_DIFF+:} false; then :
6012  $as_echo_n "(cached) " >&6
6013else
6014  case $DIFF in
6015  [\\/]* | ?:[\\/]*)
6016  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6017  ;;
6018  *)
6019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020for as_dir in $PATH
6021do
6022  IFS=$as_save_IFS
6023  test -z "$as_dir" && as_dir=.
6024    for ac_exec_ext in '' $ac_executable_extensions; do
6025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6026    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6028    break 2
6029  fi
6030done
6031  done
6032IFS=$as_save_IFS
6033
6034  ;;
6035esac
6036fi
6037DIFF=$ac_cv_path_DIFF
6038if test -n "$DIFF"; then
6039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6040$as_echo "$DIFF" >&6; }
6041else
6042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
6044fi
6045
6046
6047  test -n "$DIFF" && break
6048done
6049
6050  else
6051    # The variable is set, but is it from the command line or the environment?
6052
6053    # Try to remove the string !DIFF! from our list.
6054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6056      # If it failed, the variable was not from the command line. Ignore it,
6057      # but warn the user (except for BASH, which is always set by the calling BASH).
6058      if test "xDIFF" != xBASH; then
6059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6060$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6061      fi
6062      # Try to locate tool using the code snippet
6063      for ac_prog in gdiff diff
6064do
6065  # Extract the first word of "$ac_prog", so it can be a program name with args.
6066set dummy $ac_prog; ac_word=$2
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
6069if ${ac_cv_path_DIFF+:} false; then :
6070  $as_echo_n "(cached) " >&6
6071else
6072  case $DIFF in
6073  [\\/]* | ?:[\\/]*)
6074  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6075  ;;
6076  *)
6077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6078for as_dir in $PATH
6079do
6080  IFS=$as_save_IFS
6081  test -z "$as_dir" && as_dir=.
6082    for ac_exec_ext in '' $ac_executable_extensions; do
6083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6084    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6086    break 2
6087  fi
6088done
6089  done
6090IFS=$as_save_IFS
6091
6092  ;;
6093esac
6094fi
6095DIFF=$ac_cv_path_DIFF
6096if test -n "$DIFF"; then
6097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6098$as_echo "$DIFF" >&6; }
6099else
6100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
6102fi
6103
6104
6105  test -n "$DIFF" && break
6106done
6107
6108    else
6109      # If it succeeded, then it was overridden by the user. We will use it
6110      # for the tool.
6111
6112      # First remove it from the list of overridden variables, so we can test
6113      # for unknown variables in the end.
6114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6115
6116      # Check if the provided tool contains a complete path.
6117      tool_specified="$DIFF"
6118      tool_basename="${tool_specified##*/}"
6119      if test "x$tool_basename" = "x$tool_specified"; then
6120        # A command without a complete path is provided, search $PATH.
6121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6122$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6123        # Extract the first word of "$tool_basename", so it can be a program name with args.
6124set dummy $tool_basename; ac_word=$2
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
6127if ${ac_cv_path_DIFF+:} false; then :
6128  $as_echo_n "(cached) " >&6
6129else
6130  case $DIFF in
6131  [\\/]* | ?:[\\/]*)
6132  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6133  ;;
6134  *)
6135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138  IFS=$as_save_IFS
6139  test -z "$as_dir" && as_dir=.
6140    for ac_exec_ext in '' $ac_executable_extensions; do
6141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6142    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6144    break 2
6145  fi
6146done
6147  done
6148IFS=$as_save_IFS
6149
6150  ;;
6151esac
6152fi
6153DIFF=$ac_cv_path_DIFF
6154if test -n "$DIFF"; then
6155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6156$as_echo "$DIFF" >&6; }
6157else
6158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
6160fi
6161
6162
6163        if test "x$DIFF" = x; then
6164          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6165        fi
6166      else
6167        # Otherwise we believe it is a complete path. Use it as it is.
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6169$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6171$as_echo_n "checking for DIFF... " >&6; }
6172        if test ! -x "$tool_specified"; then
6173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6174$as_echo "not found" >&6; }
6175          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6176        fi
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6178$as_echo "$tool_specified" >&6; }
6179      fi
6180    fi
6181  fi
6182
6183
6184
6185  if test "x$DIFF" = x; then
6186    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6187  fi
6188
6189
6190
6191
6192
6193  # Publish this variable in the help.
6194
6195
6196  if test "x$DIRNAME" = x; then
6197    # The variable is not set by user, try to locate tool using the code snippet
6198    for ac_prog in dirname
6199do
6200  # Extract the first word of "$ac_prog", so it can be a program name with args.
6201set dummy $ac_prog; ac_word=$2
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if ${ac_cv_path_DIRNAME+:} false; then :
6205  $as_echo_n "(cached) " >&6
6206else
6207  case $DIRNAME in
6208  [\\/]* | ?:[\\/]*)
6209  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6210  ;;
6211  *)
6212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6213for as_dir in $PATH
6214do
6215  IFS=$as_save_IFS
6216  test -z "$as_dir" && as_dir=.
6217    for ac_exec_ext in '' $ac_executable_extensions; do
6218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6219    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6221    break 2
6222  fi
6223done
6224  done
6225IFS=$as_save_IFS
6226
6227  ;;
6228esac
6229fi
6230DIRNAME=$ac_cv_path_DIRNAME
6231if test -n "$DIRNAME"; then
6232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6233$as_echo "$DIRNAME" >&6; }
6234else
6235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6236$as_echo "no" >&6; }
6237fi
6238
6239
6240  test -n "$DIRNAME" && break
6241done
6242
6243  else
6244    # The variable is set, but is it from the command line or the environment?
6245
6246    # Try to remove the string !DIRNAME! from our list.
6247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6249      # If it failed, the variable was not from the command line. Ignore it,
6250      # but warn the user (except for BASH, which is always set by the calling BASH).
6251      if test "xDIRNAME" != xBASH; then
6252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6253$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6254      fi
6255      # Try to locate tool using the code snippet
6256      for ac_prog in dirname
6257do
6258  # Extract the first word of "$ac_prog", so it can be a program name with args.
6259set dummy $ac_prog; ac_word=$2
6260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6261$as_echo_n "checking for $ac_word... " >&6; }
6262if ${ac_cv_path_DIRNAME+:} false; then :
6263  $as_echo_n "(cached) " >&6
6264else
6265  case $DIRNAME in
6266  [\\/]* | ?:[\\/]*)
6267  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6268  ;;
6269  *)
6270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6271for as_dir in $PATH
6272do
6273  IFS=$as_save_IFS
6274  test -z "$as_dir" && as_dir=.
6275    for ac_exec_ext in '' $ac_executable_extensions; do
6276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6277    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6279    break 2
6280  fi
6281done
6282  done
6283IFS=$as_save_IFS
6284
6285  ;;
6286esac
6287fi
6288DIRNAME=$ac_cv_path_DIRNAME
6289if test -n "$DIRNAME"; then
6290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6291$as_echo "$DIRNAME" >&6; }
6292else
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }
6295fi
6296
6297
6298  test -n "$DIRNAME" && break
6299done
6300
6301    else
6302      # If it succeeded, then it was overridden by the user. We will use it
6303      # for the tool.
6304
6305      # First remove it from the list of overridden variables, so we can test
6306      # for unknown variables in the end.
6307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6308
6309      # Check if the provided tool contains a complete path.
6310      tool_specified="$DIRNAME"
6311      tool_basename="${tool_specified##*/}"
6312      if test "x$tool_basename" = "x$tool_specified"; then
6313        # A command without a complete path is provided, search $PATH.
6314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6315$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6316        # Extract the first word of "$tool_basename", so it can be a program name with args.
6317set dummy $tool_basename; ac_word=$2
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6319$as_echo_n "checking for $ac_word... " >&6; }
6320if ${ac_cv_path_DIRNAME+:} false; then :
6321  $as_echo_n "(cached) " >&6
6322else
6323  case $DIRNAME in
6324  [\\/]* | ?:[\\/]*)
6325  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6326  ;;
6327  *)
6328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6329for as_dir in $PATH
6330do
6331  IFS=$as_save_IFS
6332  test -z "$as_dir" && as_dir=.
6333    for ac_exec_ext in '' $ac_executable_extensions; do
6334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6335    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6337    break 2
6338  fi
6339done
6340  done
6341IFS=$as_save_IFS
6342
6343  ;;
6344esac
6345fi
6346DIRNAME=$ac_cv_path_DIRNAME
6347if test -n "$DIRNAME"; then
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6349$as_echo "$DIRNAME" >&6; }
6350else
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352$as_echo "no" >&6; }
6353fi
6354
6355
6356        if test "x$DIRNAME" = x; then
6357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6358        fi
6359      else
6360        # Otherwise we believe it is a complete path. Use it as it is.
6361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6362$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6364$as_echo_n "checking for DIRNAME... " >&6; }
6365        if test ! -x "$tool_specified"; then
6366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6367$as_echo "not found" >&6; }
6368          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6369        fi
6370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6371$as_echo "$tool_specified" >&6; }
6372      fi
6373    fi
6374  fi
6375
6376
6377
6378  if test "x$DIRNAME" = x; then
6379    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6380  fi
6381
6382
6383
6384
6385
6386  # Publish this variable in the help.
6387
6388
6389  if test "x$ECHO" = x; then
6390    # The variable is not set by user, try to locate tool using the code snippet
6391    for ac_prog in echo
6392do
6393  # Extract the first word of "$ac_prog", so it can be a program name with args.
6394set dummy $ac_prog; ac_word=$2
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6396$as_echo_n "checking for $ac_word... " >&6; }
6397if ${ac_cv_path_ECHO+:} false; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  case $ECHO in
6401  [\\/]* | ?:[\\/]*)
6402  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6403  ;;
6404  *)
6405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6406for as_dir in $PATH
6407do
6408  IFS=$as_save_IFS
6409  test -z "$as_dir" && as_dir=.
6410    for ac_exec_ext in '' $ac_executable_extensions; do
6411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6412    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6414    break 2
6415  fi
6416done
6417  done
6418IFS=$as_save_IFS
6419
6420  ;;
6421esac
6422fi
6423ECHO=$ac_cv_path_ECHO
6424if test -n "$ECHO"; then
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6426$as_echo "$ECHO" >&6; }
6427else
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430fi
6431
6432
6433  test -n "$ECHO" && break
6434done
6435
6436  else
6437    # The variable is set, but is it from the command line or the environment?
6438
6439    # Try to remove the string !ECHO! from our list.
6440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6442      # If it failed, the variable was not from the command line. Ignore it,
6443      # but warn the user (except for BASH, which is always set by the calling BASH).
6444      if test "xECHO" != xBASH; then
6445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6446$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6447      fi
6448      # Try to locate tool using the code snippet
6449      for ac_prog in echo
6450do
6451  # Extract the first word of "$ac_prog", so it can be a program name with args.
6452set dummy $ac_prog; ac_word=$2
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6454$as_echo_n "checking for $ac_word... " >&6; }
6455if ${ac_cv_path_ECHO+:} false; then :
6456  $as_echo_n "(cached) " >&6
6457else
6458  case $ECHO in
6459  [\\/]* | ?:[\\/]*)
6460  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6461  ;;
6462  *)
6463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6464for as_dir in $PATH
6465do
6466  IFS=$as_save_IFS
6467  test -z "$as_dir" && as_dir=.
6468    for ac_exec_ext in '' $ac_executable_extensions; do
6469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6470    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6472    break 2
6473  fi
6474done
6475  done
6476IFS=$as_save_IFS
6477
6478  ;;
6479esac
6480fi
6481ECHO=$ac_cv_path_ECHO
6482if test -n "$ECHO"; then
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6484$as_echo "$ECHO" >&6; }
6485else
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6487$as_echo "no" >&6; }
6488fi
6489
6490
6491  test -n "$ECHO" && break
6492done
6493
6494    else
6495      # If it succeeded, then it was overridden by the user. We will use it
6496      # for the tool.
6497
6498      # First remove it from the list of overridden variables, so we can test
6499      # for unknown variables in the end.
6500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6501
6502      # Check if the provided tool contains a complete path.
6503      tool_specified="$ECHO"
6504      tool_basename="${tool_specified##*/}"
6505      if test "x$tool_basename" = "x$tool_specified"; then
6506        # A command without a complete path is provided, search $PATH.
6507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6508$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6509        # Extract the first word of "$tool_basename", so it can be a program name with args.
6510set dummy $tool_basename; ac_word=$2
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6512$as_echo_n "checking for $ac_word... " >&6; }
6513if ${ac_cv_path_ECHO+:} false; then :
6514  $as_echo_n "(cached) " >&6
6515else
6516  case $ECHO in
6517  [\\/]* | ?:[\\/]*)
6518  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6519  ;;
6520  *)
6521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6522for as_dir in $PATH
6523do
6524  IFS=$as_save_IFS
6525  test -z "$as_dir" && as_dir=.
6526    for ac_exec_ext in '' $ac_executable_extensions; do
6527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6528    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6530    break 2
6531  fi
6532done
6533  done
6534IFS=$as_save_IFS
6535
6536  ;;
6537esac
6538fi
6539ECHO=$ac_cv_path_ECHO
6540if test -n "$ECHO"; then
6541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6542$as_echo "$ECHO" >&6; }
6543else
6544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6545$as_echo "no" >&6; }
6546fi
6547
6548
6549        if test "x$ECHO" = x; then
6550          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6551        fi
6552      else
6553        # Otherwise we believe it is a complete path. Use it as it is.
6554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6555$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6557$as_echo_n "checking for ECHO... " >&6; }
6558        if test ! -x "$tool_specified"; then
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6560$as_echo "not found" >&6; }
6561          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6562        fi
6563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6564$as_echo "$tool_specified" >&6; }
6565      fi
6566    fi
6567  fi
6568
6569
6570
6571  if test "x$ECHO" = x; then
6572    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6573  fi
6574
6575
6576
6577
6578
6579  # Publish this variable in the help.
6580
6581
6582  if test "x$EXPR" = x; then
6583    # The variable is not set by user, try to locate tool using the code snippet
6584    for ac_prog in expr
6585do
6586  # Extract the first word of "$ac_prog", so it can be a program name with args.
6587set dummy $ac_prog; ac_word=$2
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6589$as_echo_n "checking for $ac_word... " >&6; }
6590if ${ac_cv_path_EXPR+:} false; then :
6591  $as_echo_n "(cached) " >&6
6592else
6593  case $EXPR in
6594  [\\/]* | ?:[\\/]*)
6595  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6596  ;;
6597  *)
6598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6599for as_dir in $PATH
6600do
6601  IFS=$as_save_IFS
6602  test -z "$as_dir" && as_dir=.
6603    for ac_exec_ext in '' $ac_executable_extensions; do
6604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6605    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6607    break 2
6608  fi
6609done
6610  done
6611IFS=$as_save_IFS
6612
6613  ;;
6614esac
6615fi
6616EXPR=$ac_cv_path_EXPR
6617if test -n "$EXPR"; then
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6619$as_echo "$EXPR" >&6; }
6620else
6621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6622$as_echo "no" >&6; }
6623fi
6624
6625
6626  test -n "$EXPR" && break
6627done
6628
6629  else
6630    # The variable is set, but is it from the command line or the environment?
6631
6632    # Try to remove the string !EXPR! from our list.
6633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6635      # If it failed, the variable was not from the command line. Ignore it,
6636      # but warn the user (except for BASH, which is always set by the calling BASH).
6637      if test "xEXPR" != xBASH; then
6638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6639$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6640      fi
6641      # Try to locate tool using the code snippet
6642      for ac_prog in expr
6643do
6644  # Extract the first word of "$ac_prog", so it can be a program name with args.
6645set dummy $ac_prog; ac_word=$2
6646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6647$as_echo_n "checking for $ac_word... " >&6; }
6648if ${ac_cv_path_EXPR+:} false; then :
6649  $as_echo_n "(cached) " >&6
6650else
6651  case $EXPR in
6652  [\\/]* | ?:[\\/]*)
6653  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6654  ;;
6655  *)
6656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6657for as_dir in $PATH
6658do
6659  IFS=$as_save_IFS
6660  test -z "$as_dir" && as_dir=.
6661    for ac_exec_ext in '' $ac_executable_extensions; do
6662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6663    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6665    break 2
6666  fi
6667done
6668  done
6669IFS=$as_save_IFS
6670
6671  ;;
6672esac
6673fi
6674EXPR=$ac_cv_path_EXPR
6675if test -n "$EXPR"; then
6676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6677$as_echo "$EXPR" >&6; }
6678else
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6680$as_echo "no" >&6; }
6681fi
6682
6683
6684  test -n "$EXPR" && break
6685done
6686
6687    else
6688      # If it succeeded, then it was overridden by the user. We will use it
6689      # for the tool.
6690
6691      # First remove it from the list of overridden variables, so we can test
6692      # for unknown variables in the end.
6693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6694
6695      # Check if the provided tool contains a complete path.
6696      tool_specified="$EXPR"
6697      tool_basename="${tool_specified##*/}"
6698      if test "x$tool_basename" = "x$tool_specified"; then
6699        # A command without a complete path is provided, search $PATH.
6700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6701$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6702        # Extract the first word of "$tool_basename", so it can be a program name with args.
6703set dummy $tool_basename; ac_word=$2
6704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6705$as_echo_n "checking for $ac_word... " >&6; }
6706if ${ac_cv_path_EXPR+:} false; then :
6707  $as_echo_n "(cached) " >&6
6708else
6709  case $EXPR in
6710  [\\/]* | ?:[\\/]*)
6711  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6712  ;;
6713  *)
6714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6715for as_dir in $PATH
6716do
6717  IFS=$as_save_IFS
6718  test -z "$as_dir" && as_dir=.
6719    for ac_exec_ext in '' $ac_executable_extensions; do
6720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6721    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6723    break 2
6724  fi
6725done
6726  done
6727IFS=$as_save_IFS
6728
6729  ;;
6730esac
6731fi
6732EXPR=$ac_cv_path_EXPR
6733if test -n "$EXPR"; then
6734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6735$as_echo "$EXPR" >&6; }
6736else
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738$as_echo "no" >&6; }
6739fi
6740
6741
6742        if test "x$EXPR" = x; then
6743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6744        fi
6745      else
6746        # Otherwise we believe it is a complete path. Use it as it is.
6747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6748$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6750$as_echo_n "checking for EXPR... " >&6; }
6751        if test ! -x "$tool_specified"; then
6752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6753$as_echo "not found" >&6; }
6754          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6755        fi
6756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6757$as_echo "$tool_specified" >&6; }
6758      fi
6759    fi
6760  fi
6761
6762
6763
6764  if test "x$EXPR" = x; then
6765    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6766  fi
6767
6768
6769
6770
6771
6772  # Publish this variable in the help.
6773
6774
6775  if test "x$FILE" = x; then
6776    # The variable is not set by user, try to locate tool using the code snippet
6777    for ac_prog in file
6778do
6779  # Extract the first word of "$ac_prog", so it can be a program name with args.
6780set dummy $ac_prog; ac_word=$2
6781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6782$as_echo_n "checking for $ac_word... " >&6; }
6783if ${ac_cv_path_FILE+:} false; then :
6784  $as_echo_n "(cached) " >&6
6785else
6786  case $FILE in
6787  [\\/]* | ?:[\\/]*)
6788  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6789  ;;
6790  *)
6791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6792for as_dir in $PATH
6793do
6794  IFS=$as_save_IFS
6795  test -z "$as_dir" && as_dir=.
6796    for ac_exec_ext in '' $ac_executable_extensions; do
6797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6798    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6800    break 2
6801  fi
6802done
6803  done
6804IFS=$as_save_IFS
6805
6806  ;;
6807esac
6808fi
6809FILE=$ac_cv_path_FILE
6810if test -n "$FILE"; then
6811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6812$as_echo "$FILE" >&6; }
6813else
6814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6815$as_echo "no" >&6; }
6816fi
6817
6818
6819  test -n "$FILE" && break
6820done
6821
6822  else
6823    # The variable is set, but is it from the command line or the environment?
6824
6825    # Try to remove the string !FILE! from our list.
6826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6828      # If it failed, the variable was not from the command line. Ignore it,
6829      # but warn the user (except for BASH, which is always set by the calling BASH).
6830      if test "xFILE" != xBASH; then
6831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6832$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6833      fi
6834      # Try to locate tool using the code snippet
6835      for ac_prog in file
6836do
6837  # Extract the first word of "$ac_prog", so it can be a program name with args.
6838set dummy $ac_prog; ac_word=$2
6839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6840$as_echo_n "checking for $ac_word... " >&6; }
6841if ${ac_cv_path_FILE+:} false; then :
6842  $as_echo_n "(cached) " >&6
6843else
6844  case $FILE in
6845  [\\/]* | ?:[\\/]*)
6846  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6847  ;;
6848  *)
6849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6850for as_dir in $PATH
6851do
6852  IFS=$as_save_IFS
6853  test -z "$as_dir" && as_dir=.
6854    for ac_exec_ext in '' $ac_executable_extensions; do
6855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6856    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6858    break 2
6859  fi
6860done
6861  done
6862IFS=$as_save_IFS
6863
6864  ;;
6865esac
6866fi
6867FILE=$ac_cv_path_FILE
6868if test -n "$FILE"; then
6869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6870$as_echo "$FILE" >&6; }
6871else
6872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6873$as_echo "no" >&6; }
6874fi
6875
6876
6877  test -n "$FILE" && break
6878done
6879
6880    else
6881      # If it succeeded, then it was overridden by the user. We will use it
6882      # for the tool.
6883
6884      # First remove it from the list of overridden variables, so we can test
6885      # for unknown variables in the end.
6886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6887
6888      # Check if the provided tool contains a complete path.
6889      tool_specified="$FILE"
6890      tool_basename="${tool_specified##*/}"
6891      if test "x$tool_basename" = "x$tool_specified"; then
6892        # A command without a complete path is provided, search $PATH.
6893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6894$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6895        # Extract the first word of "$tool_basename", so it can be a program name with args.
6896set dummy $tool_basename; ac_word=$2
6897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6898$as_echo_n "checking for $ac_word... " >&6; }
6899if ${ac_cv_path_FILE+:} false; then :
6900  $as_echo_n "(cached) " >&6
6901else
6902  case $FILE in
6903  [\\/]* | ?:[\\/]*)
6904  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6905  ;;
6906  *)
6907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6908for as_dir in $PATH
6909do
6910  IFS=$as_save_IFS
6911  test -z "$as_dir" && as_dir=.
6912    for ac_exec_ext in '' $ac_executable_extensions; do
6913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6914    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6916    break 2
6917  fi
6918done
6919  done
6920IFS=$as_save_IFS
6921
6922  ;;
6923esac
6924fi
6925FILE=$ac_cv_path_FILE
6926if test -n "$FILE"; then
6927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6928$as_echo "$FILE" >&6; }
6929else
6930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6931$as_echo "no" >&6; }
6932fi
6933
6934
6935        if test "x$FILE" = x; then
6936          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6937        fi
6938      else
6939        # Otherwise we believe it is a complete path. Use it as it is.
6940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
6941$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
6942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
6943$as_echo_n "checking for FILE... " >&6; }
6944        if test ! -x "$tool_specified"; then
6945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6946$as_echo "not found" >&6; }
6947          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
6948        fi
6949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6950$as_echo "$tool_specified" >&6; }
6951      fi
6952    fi
6953  fi
6954
6955
6956
6957  if test "x$FILE" = x; then
6958    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
6959  fi
6960
6961
6962
6963
6964
6965  # Publish this variable in the help.
6966
6967
6968  if test "x$FIND" = x; then
6969    # The variable is not set by user, try to locate tool using the code snippet
6970    for ac_prog in find
6971do
6972  # Extract the first word of "$ac_prog", so it can be a program name with args.
6973set dummy $ac_prog; ac_word=$2
6974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6975$as_echo_n "checking for $ac_word... " >&6; }
6976if ${ac_cv_path_FIND+:} false; then :
6977  $as_echo_n "(cached) " >&6
6978else
6979  case $FIND in
6980  [\\/]* | ?:[\\/]*)
6981  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
6982  ;;
6983  *)
6984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6985for as_dir in $PATH
6986do
6987  IFS=$as_save_IFS
6988  test -z "$as_dir" && as_dir=.
6989    for ac_exec_ext in '' $ac_executable_extensions; do
6990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6991    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
6992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6993    break 2
6994  fi
6995done
6996  done
6997IFS=$as_save_IFS
6998
6999  ;;
7000esac
7001fi
7002FIND=$ac_cv_path_FIND
7003if test -n "$FIND"; then
7004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7005$as_echo "$FIND" >&6; }
7006else
7007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7008$as_echo "no" >&6; }
7009fi
7010
7011
7012  test -n "$FIND" && break
7013done
7014
7015  else
7016    # The variable is set, but is it from the command line or the environment?
7017
7018    # Try to remove the string !FIND! from our list.
7019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7021      # If it failed, the variable was not from the command line. Ignore it,
7022      # but warn the user (except for BASH, which is always set by the calling BASH).
7023      if test "xFIND" != xBASH; then
7024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7025$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7026      fi
7027      # Try to locate tool using the code snippet
7028      for ac_prog in find
7029do
7030  # Extract the first word of "$ac_prog", so it can be a program name with args.
7031set dummy $ac_prog; ac_word=$2
7032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7033$as_echo_n "checking for $ac_word... " >&6; }
7034if ${ac_cv_path_FIND+:} false; then :
7035  $as_echo_n "(cached) " >&6
7036else
7037  case $FIND in
7038  [\\/]* | ?:[\\/]*)
7039  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7040  ;;
7041  *)
7042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043for as_dir in $PATH
7044do
7045  IFS=$as_save_IFS
7046  test -z "$as_dir" && as_dir=.
7047    for ac_exec_ext in '' $ac_executable_extensions; do
7048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7049    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7051    break 2
7052  fi
7053done
7054  done
7055IFS=$as_save_IFS
7056
7057  ;;
7058esac
7059fi
7060FIND=$ac_cv_path_FIND
7061if test -n "$FIND"; then
7062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7063$as_echo "$FIND" >&6; }
7064else
7065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066$as_echo "no" >&6; }
7067fi
7068
7069
7070  test -n "$FIND" && break
7071done
7072
7073    else
7074      # If it succeeded, then it was overridden by the user. We will use it
7075      # for the tool.
7076
7077      # First remove it from the list of overridden variables, so we can test
7078      # for unknown variables in the end.
7079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7080
7081      # Check if the provided tool contains a complete path.
7082      tool_specified="$FIND"
7083      tool_basename="${tool_specified##*/}"
7084      if test "x$tool_basename" = "x$tool_specified"; then
7085        # A command without a complete path is provided, search $PATH.
7086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7087$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7088        # Extract the first word of "$tool_basename", so it can be a program name with args.
7089set dummy $tool_basename; ac_word=$2
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091$as_echo_n "checking for $ac_word... " >&6; }
7092if ${ac_cv_path_FIND+:} false; then :
7093  $as_echo_n "(cached) " >&6
7094else
7095  case $FIND in
7096  [\\/]* | ?:[\\/]*)
7097  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7098  ;;
7099  *)
7100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101for as_dir in $PATH
7102do
7103  IFS=$as_save_IFS
7104  test -z "$as_dir" && as_dir=.
7105    for ac_exec_ext in '' $ac_executable_extensions; do
7106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109    break 2
7110  fi
7111done
7112  done
7113IFS=$as_save_IFS
7114
7115  ;;
7116esac
7117fi
7118FIND=$ac_cv_path_FIND
7119if test -n "$FIND"; then
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7121$as_echo "$FIND" >&6; }
7122else
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }
7125fi
7126
7127
7128        if test "x$FIND" = x; then
7129          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7130        fi
7131      else
7132        # Otherwise we believe it is a complete path. Use it as it is.
7133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7134$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7136$as_echo_n "checking for FIND... " >&6; }
7137        if test ! -x "$tool_specified"; then
7138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7139$as_echo "not found" >&6; }
7140          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7141        fi
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7143$as_echo "$tool_specified" >&6; }
7144      fi
7145    fi
7146  fi
7147
7148
7149
7150  if test "x$FIND" = x; then
7151    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7152  fi
7153
7154
7155
7156
7157
7158  # Publish this variable in the help.
7159
7160
7161  if test "x$HEAD" = x; then
7162    # The variable is not set by user, try to locate tool using the code snippet
7163    for ac_prog in head
7164do
7165  # Extract the first word of "$ac_prog", so it can be a program name with args.
7166set dummy $ac_prog; ac_word=$2
7167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7168$as_echo_n "checking for $ac_word... " >&6; }
7169if ${ac_cv_path_HEAD+:} false; then :
7170  $as_echo_n "(cached) " >&6
7171else
7172  case $HEAD in
7173  [\\/]* | ?:[\\/]*)
7174  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7175  ;;
7176  *)
7177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178for as_dir in $PATH
7179do
7180  IFS=$as_save_IFS
7181  test -z "$as_dir" && as_dir=.
7182    for ac_exec_ext in '' $ac_executable_extensions; do
7183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7186    break 2
7187  fi
7188done
7189  done
7190IFS=$as_save_IFS
7191
7192  ;;
7193esac
7194fi
7195HEAD=$ac_cv_path_HEAD
7196if test -n "$HEAD"; then
7197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7198$as_echo "$HEAD" >&6; }
7199else
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201$as_echo "no" >&6; }
7202fi
7203
7204
7205  test -n "$HEAD" && break
7206done
7207
7208  else
7209    # The variable is set, but is it from the command line or the environment?
7210
7211    # Try to remove the string !HEAD! from our list.
7212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7214      # If it failed, the variable was not from the command line. Ignore it,
7215      # but warn the user (except for BASH, which is always set by the calling BASH).
7216      if test "xHEAD" != xBASH; then
7217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7218$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7219      fi
7220      # Try to locate tool using the code snippet
7221      for ac_prog in head
7222do
7223  # Extract the first word of "$ac_prog", so it can be a program name with args.
7224set dummy $ac_prog; ac_word=$2
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7226$as_echo_n "checking for $ac_word... " >&6; }
7227if ${ac_cv_path_HEAD+:} false; then :
7228  $as_echo_n "(cached) " >&6
7229else
7230  case $HEAD in
7231  [\\/]* | ?:[\\/]*)
7232  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7233  ;;
7234  *)
7235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7236for as_dir in $PATH
7237do
7238  IFS=$as_save_IFS
7239  test -z "$as_dir" && as_dir=.
7240    for ac_exec_ext in '' $ac_executable_extensions; do
7241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7242    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7244    break 2
7245  fi
7246done
7247  done
7248IFS=$as_save_IFS
7249
7250  ;;
7251esac
7252fi
7253HEAD=$ac_cv_path_HEAD
7254if test -n "$HEAD"; then
7255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7256$as_echo "$HEAD" >&6; }
7257else
7258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7259$as_echo "no" >&6; }
7260fi
7261
7262
7263  test -n "$HEAD" && break
7264done
7265
7266    else
7267      # If it succeeded, then it was overridden by the user. We will use it
7268      # for the tool.
7269
7270      # First remove it from the list of overridden variables, so we can test
7271      # for unknown variables in the end.
7272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7273
7274      # Check if the provided tool contains a complete path.
7275      tool_specified="$HEAD"
7276      tool_basename="${tool_specified##*/}"
7277      if test "x$tool_basename" = "x$tool_specified"; then
7278        # A command without a complete path is provided, search $PATH.
7279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7280$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7281        # Extract the first word of "$tool_basename", so it can be a program name with args.
7282set dummy $tool_basename; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_path_HEAD+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  case $HEAD in
7289  [\\/]* | ?:[\\/]*)
7290  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7291  ;;
7292  *)
7293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7294for as_dir in $PATH
7295do
7296  IFS=$as_save_IFS
7297  test -z "$as_dir" && as_dir=.
7298    for ac_exec_ext in '' $ac_executable_extensions; do
7299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7300    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7302    break 2
7303  fi
7304done
7305  done
7306IFS=$as_save_IFS
7307
7308  ;;
7309esac
7310fi
7311HEAD=$ac_cv_path_HEAD
7312if test -n "$HEAD"; then
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7314$as_echo "$HEAD" >&6; }
7315else
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
7318fi
7319
7320
7321        if test "x$HEAD" = x; then
7322          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7323        fi
7324      else
7325        # Otherwise we believe it is a complete path. Use it as it is.
7326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7327$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7329$as_echo_n "checking for HEAD... " >&6; }
7330        if test ! -x "$tool_specified"; then
7331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7332$as_echo "not found" >&6; }
7333          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7334        fi
7335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7336$as_echo "$tool_specified" >&6; }
7337      fi
7338    fi
7339  fi
7340
7341
7342
7343  if test "x$HEAD" = x; then
7344    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7345  fi
7346
7347
7348
7349
7350
7351  # Publish this variable in the help.
7352
7353
7354  if test "x$LN" = x; then
7355    # The variable is not set by user, try to locate tool using the code snippet
7356    for ac_prog in ln
7357do
7358  # Extract the first word of "$ac_prog", so it can be a program name with args.
7359set dummy $ac_prog; ac_word=$2
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7361$as_echo_n "checking for $ac_word... " >&6; }
7362if ${ac_cv_path_LN+:} false; then :
7363  $as_echo_n "(cached) " >&6
7364else
7365  case $LN in
7366  [\\/]* | ?:[\\/]*)
7367  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7368  ;;
7369  *)
7370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7371for as_dir in $PATH
7372do
7373  IFS=$as_save_IFS
7374  test -z "$as_dir" && as_dir=.
7375    for ac_exec_ext in '' $ac_executable_extensions; do
7376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7377    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7379    break 2
7380  fi
7381done
7382  done
7383IFS=$as_save_IFS
7384
7385  ;;
7386esac
7387fi
7388LN=$ac_cv_path_LN
7389if test -n "$LN"; then
7390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7391$as_echo "$LN" >&6; }
7392else
7393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
7395fi
7396
7397
7398  test -n "$LN" && break
7399done
7400
7401  else
7402    # The variable is set, but is it from the command line or the environment?
7403
7404    # Try to remove the string !LN! from our list.
7405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7407      # If it failed, the variable was not from the command line. Ignore it,
7408      # but warn the user (except for BASH, which is always set by the calling BASH).
7409      if test "xLN" != xBASH; then
7410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7411$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7412      fi
7413      # Try to locate tool using the code snippet
7414      for ac_prog in ln
7415do
7416  # Extract the first word of "$ac_prog", so it can be a program name with args.
7417set dummy $ac_prog; ac_word=$2
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419$as_echo_n "checking for $ac_word... " >&6; }
7420if ${ac_cv_path_LN+:} false; then :
7421  $as_echo_n "(cached) " >&6
7422else
7423  case $LN in
7424  [\\/]* | ?:[\\/]*)
7425  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7426  ;;
7427  *)
7428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429for as_dir in $PATH
7430do
7431  IFS=$as_save_IFS
7432  test -z "$as_dir" && as_dir=.
7433    for ac_exec_ext in '' $ac_executable_extensions; do
7434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7435    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7437    break 2
7438  fi
7439done
7440  done
7441IFS=$as_save_IFS
7442
7443  ;;
7444esac
7445fi
7446LN=$ac_cv_path_LN
7447if test -n "$LN"; then
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7449$as_echo "$LN" >&6; }
7450else
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452$as_echo "no" >&6; }
7453fi
7454
7455
7456  test -n "$LN" && break
7457done
7458
7459    else
7460      # If it succeeded, then it was overridden by the user. We will use it
7461      # for the tool.
7462
7463      # First remove it from the list of overridden variables, so we can test
7464      # for unknown variables in the end.
7465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7466
7467      # Check if the provided tool contains a complete path.
7468      tool_specified="$LN"
7469      tool_basename="${tool_specified##*/}"
7470      if test "x$tool_basename" = "x$tool_specified"; then
7471        # A command without a complete path is provided, search $PATH.
7472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7473$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7474        # Extract the first word of "$tool_basename", so it can be a program name with args.
7475set dummy $tool_basename; ac_word=$2
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7477$as_echo_n "checking for $ac_word... " >&6; }
7478if ${ac_cv_path_LN+:} false; then :
7479  $as_echo_n "(cached) " >&6
7480else
7481  case $LN in
7482  [\\/]* | ?:[\\/]*)
7483  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7484  ;;
7485  *)
7486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487for as_dir in $PATH
7488do
7489  IFS=$as_save_IFS
7490  test -z "$as_dir" && as_dir=.
7491    for ac_exec_ext in '' $ac_executable_extensions; do
7492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7493    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7495    break 2
7496  fi
7497done
7498  done
7499IFS=$as_save_IFS
7500
7501  ;;
7502esac
7503fi
7504LN=$ac_cv_path_LN
7505if test -n "$LN"; then
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7507$as_echo "$LN" >&6; }
7508else
7509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7510$as_echo "no" >&6; }
7511fi
7512
7513
7514        if test "x$LN" = x; then
7515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7516        fi
7517      else
7518        # Otherwise we believe it is a complete path. Use it as it is.
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7520$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7522$as_echo_n "checking for LN... " >&6; }
7523        if test ! -x "$tool_specified"; then
7524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7525$as_echo "not found" >&6; }
7526          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7527        fi
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7529$as_echo "$tool_specified" >&6; }
7530      fi
7531    fi
7532  fi
7533
7534
7535
7536  if test "x$LN" = x; then
7537    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7538  fi
7539
7540
7541
7542
7543
7544  # Publish this variable in the help.
7545
7546
7547  if test "x$LS" = x; then
7548    # The variable is not set by user, try to locate tool using the code snippet
7549    for ac_prog in ls
7550do
7551  # Extract the first word of "$ac_prog", so it can be a program name with args.
7552set dummy $ac_prog; ac_word=$2
7553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7554$as_echo_n "checking for $ac_word... " >&6; }
7555if ${ac_cv_path_LS+:} false; then :
7556  $as_echo_n "(cached) " >&6
7557else
7558  case $LS in
7559  [\\/]* | ?:[\\/]*)
7560  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7561  ;;
7562  *)
7563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7564for as_dir in $PATH
7565do
7566  IFS=$as_save_IFS
7567  test -z "$as_dir" && as_dir=.
7568    for ac_exec_ext in '' $ac_executable_extensions; do
7569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7570    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7572    break 2
7573  fi
7574done
7575  done
7576IFS=$as_save_IFS
7577
7578  ;;
7579esac
7580fi
7581LS=$ac_cv_path_LS
7582if test -n "$LS"; then
7583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7584$as_echo "$LS" >&6; }
7585else
7586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
7588fi
7589
7590
7591  test -n "$LS" && break
7592done
7593
7594  else
7595    # The variable is set, but is it from the command line or the environment?
7596
7597    # Try to remove the string !LS! from our list.
7598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7600      # If it failed, the variable was not from the command line. Ignore it,
7601      # but warn the user (except for BASH, which is always set by the calling BASH).
7602      if test "xLS" != xBASH; then
7603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7604$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7605      fi
7606      # Try to locate tool using the code snippet
7607      for ac_prog in ls
7608do
7609  # Extract the first word of "$ac_prog", so it can be a program name with args.
7610set dummy $ac_prog; ac_word=$2
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7612$as_echo_n "checking for $ac_word... " >&6; }
7613if ${ac_cv_path_LS+:} false; then :
7614  $as_echo_n "(cached) " >&6
7615else
7616  case $LS in
7617  [\\/]* | ?:[\\/]*)
7618  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7619  ;;
7620  *)
7621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7622for as_dir in $PATH
7623do
7624  IFS=$as_save_IFS
7625  test -z "$as_dir" && as_dir=.
7626    for ac_exec_ext in '' $ac_executable_extensions; do
7627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7628    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7630    break 2
7631  fi
7632done
7633  done
7634IFS=$as_save_IFS
7635
7636  ;;
7637esac
7638fi
7639LS=$ac_cv_path_LS
7640if test -n "$LS"; then
7641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7642$as_echo "$LS" >&6; }
7643else
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7645$as_echo "no" >&6; }
7646fi
7647
7648
7649  test -n "$LS" && break
7650done
7651
7652    else
7653      # If it succeeded, then it was overridden by the user. We will use it
7654      # for the tool.
7655
7656      # First remove it from the list of overridden variables, so we can test
7657      # for unknown variables in the end.
7658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7659
7660      # Check if the provided tool contains a complete path.
7661      tool_specified="$LS"
7662      tool_basename="${tool_specified##*/}"
7663      if test "x$tool_basename" = "x$tool_specified"; then
7664        # A command without a complete path is provided, search $PATH.
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7666$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7667        # Extract the first word of "$tool_basename", so it can be a program name with args.
7668set dummy $tool_basename; ac_word=$2
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670$as_echo_n "checking for $ac_word... " >&6; }
7671if ${ac_cv_path_LS+:} false; then :
7672  $as_echo_n "(cached) " >&6
7673else
7674  case $LS in
7675  [\\/]* | ?:[\\/]*)
7676  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7677  ;;
7678  *)
7679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  test -z "$as_dir" && as_dir=.
7684    for ac_exec_ext in '' $ac_executable_extensions; do
7685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7686    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7688    break 2
7689  fi
7690done
7691  done
7692IFS=$as_save_IFS
7693
7694  ;;
7695esac
7696fi
7697LS=$ac_cv_path_LS
7698if test -n "$LS"; then
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7700$as_echo "$LS" >&6; }
7701else
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
7704fi
7705
7706
7707        if test "x$LS" = x; then
7708          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7709        fi
7710      else
7711        # Otherwise we believe it is a complete path. Use it as it is.
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7713$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7715$as_echo_n "checking for LS... " >&6; }
7716        if test ! -x "$tool_specified"; then
7717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7718$as_echo "not found" >&6; }
7719          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7720        fi
7721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7722$as_echo "$tool_specified" >&6; }
7723      fi
7724    fi
7725  fi
7726
7727
7728
7729  if test "x$LS" = x; then
7730    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7731  fi
7732
7733
7734
7735
7736
7737  # Publish this variable in the help.
7738
7739
7740  if test "x$MKDIR" = x; then
7741    # The variable is not set by user, try to locate tool using the code snippet
7742    for ac_prog in mkdir
7743do
7744  # Extract the first word of "$ac_prog", so it can be a program name with args.
7745set dummy $ac_prog; ac_word=$2
7746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7747$as_echo_n "checking for $ac_word... " >&6; }
7748if ${ac_cv_path_MKDIR+:} false; then :
7749  $as_echo_n "(cached) " >&6
7750else
7751  case $MKDIR in
7752  [\\/]* | ?:[\\/]*)
7753  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7754  ;;
7755  *)
7756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7757for as_dir in $PATH
7758do
7759  IFS=$as_save_IFS
7760  test -z "$as_dir" && as_dir=.
7761    for ac_exec_ext in '' $ac_executable_extensions; do
7762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7763    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7765    break 2
7766  fi
7767done
7768  done
7769IFS=$as_save_IFS
7770
7771  ;;
7772esac
7773fi
7774MKDIR=$ac_cv_path_MKDIR
7775if test -n "$MKDIR"; then
7776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7777$as_echo "$MKDIR" >&6; }
7778else
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780$as_echo "no" >&6; }
7781fi
7782
7783
7784  test -n "$MKDIR" && break
7785done
7786
7787  else
7788    # The variable is set, but is it from the command line or the environment?
7789
7790    # Try to remove the string !MKDIR! from our list.
7791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7793      # If it failed, the variable was not from the command line. Ignore it,
7794      # but warn the user (except for BASH, which is always set by the calling BASH).
7795      if test "xMKDIR" != xBASH; then
7796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7797$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7798      fi
7799      # Try to locate tool using the code snippet
7800      for ac_prog in mkdir
7801do
7802  # Extract the first word of "$ac_prog", so it can be a program name with args.
7803set dummy $ac_prog; ac_word=$2
7804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7805$as_echo_n "checking for $ac_word... " >&6; }
7806if ${ac_cv_path_MKDIR+:} false; then :
7807  $as_echo_n "(cached) " >&6
7808else
7809  case $MKDIR in
7810  [\\/]* | ?:[\\/]*)
7811  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7812  ;;
7813  *)
7814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7815for as_dir in $PATH
7816do
7817  IFS=$as_save_IFS
7818  test -z "$as_dir" && as_dir=.
7819    for ac_exec_ext in '' $ac_executable_extensions; do
7820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7821    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7823    break 2
7824  fi
7825done
7826  done
7827IFS=$as_save_IFS
7828
7829  ;;
7830esac
7831fi
7832MKDIR=$ac_cv_path_MKDIR
7833if test -n "$MKDIR"; then
7834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7835$as_echo "$MKDIR" >&6; }
7836else
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7838$as_echo "no" >&6; }
7839fi
7840
7841
7842  test -n "$MKDIR" && break
7843done
7844
7845    else
7846      # If it succeeded, then it was overridden by the user. We will use it
7847      # for the tool.
7848
7849      # First remove it from the list of overridden variables, so we can test
7850      # for unknown variables in the end.
7851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7852
7853      # Check if the provided tool contains a complete path.
7854      tool_specified="$MKDIR"
7855      tool_basename="${tool_specified##*/}"
7856      if test "x$tool_basename" = "x$tool_specified"; then
7857        # A command without a complete path is provided, search $PATH.
7858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7859$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7860        # Extract the first word of "$tool_basename", so it can be a program name with args.
7861set dummy $tool_basename; ac_word=$2
7862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7863$as_echo_n "checking for $ac_word... " >&6; }
7864if ${ac_cv_path_MKDIR+:} false; then :
7865  $as_echo_n "(cached) " >&6
7866else
7867  case $MKDIR in
7868  [\\/]* | ?:[\\/]*)
7869  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7870  ;;
7871  *)
7872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7873for as_dir in $PATH
7874do
7875  IFS=$as_save_IFS
7876  test -z "$as_dir" && as_dir=.
7877    for ac_exec_ext in '' $ac_executable_extensions; do
7878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7879    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7881    break 2
7882  fi
7883done
7884  done
7885IFS=$as_save_IFS
7886
7887  ;;
7888esac
7889fi
7890MKDIR=$ac_cv_path_MKDIR
7891if test -n "$MKDIR"; then
7892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7893$as_echo "$MKDIR" >&6; }
7894else
7895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7896$as_echo "no" >&6; }
7897fi
7898
7899
7900        if test "x$MKDIR" = x; then
7901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7902        fi
7903      else
7904        # Otherwise we believe it is a complete path. Use it as it is.
7905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
7906$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
7908$as_echo_n "checking for MKDIR... " >&6; }
7909        if test ! -x "$tool_specified"; then
7910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7911$as_echo "not found" >&6; }
7912          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
7913        fi
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7915$as_echo "$tool_specified" >&6; }
7916      fi
7917    fi
7918  fi
7919
7920
7921
7922  if test "x$MKDIR" = x; then
7923    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
7924  fi
7925
7926
7927
7928
7929
7930  # Publish this variable in the help.
7931
7932
7933  if test "x$MKTEMP" = x; then
7934    # The variable is not set by user, try to locate tool using the code snippet
7935    for ac_prog in mktemp
7936do
7937  # Extract the first word of "$ac_prog", so it can be a program name with args.
7938set dummy $ac_prog; ac_word=$2
7939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7940$as_echo_n "checking for $ac_word... " >&6; }
7941if ${ac_cv_path_MKTEMP+:} false; then :
7942  $as_echo_n "(cached) " >&6
7943else
7944  case $MKTEMP in
7945  [\\/]* | ?:[\\/]*)
7946  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
7947  ;;
7948  *)
7949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7950for as_dir in $PATH
7951do
7952  IFS=$as_save_IFS
7953  test -z "$as_dir" && as_dir=.
7954    for ac_exec_ext in '' $ac_executable_extensions; do
7955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7956    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
7957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7958    break 2
7959  fi
7960done
7961  done
7962IFS=$as_save_IFS
7963
7964  ;;
7965esac
7966fi
7967MKTEMP=$ac_cv_path_MKTEMP
7968if test -n "$MKTEMP"; then
7969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
7970$as_echo "$MKTEMP" >&6; }
7971else
7972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7973$as_echo "no" >&6; }
7974fi
7975
7976
7977  test -n "$MKTEMP" && break
7978done
7979
7980  else
7981    # The variable is set, but is it from the command line or the environment?
7982
7983    # Try to remove the string !MKTEMP! from our list.
7984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
7985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7986      # If it failed, the variable was not from the command line. Ignore it,
7987      # but warn the user (except for BASH, which is always set by the calling BASH).
7988      if test "xMKTEMP" != xBASH; then
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
7990$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
7991      fi
7992      # Try to locate tool using the code snippet
7993      for ac_prog in mktemp
7994do
7995  # Extract the first word of "$ac_prog", so it can be a program name with args.
7996set dummy $ac_prog; ac_word=$2
7997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7998$as_echo_n "checking for $ac_word... " >&6; }
7999if ${ac_cv_path_MKTEMP+:} false; then :
8000  $as_echo_n "(cached) " >&6
8001else
8002  case $MKTEMP in
8003  [\\/]* | ?:[\\/]*)
8004  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8005  ;;
8006  *)
8007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8008for as_dir in $PATH
8009do
8010  IFS=$as_save_IFS
8011  test -z "$as_dir" && as_dir=.
8012    for ac_exec_ext in '' $ac_executable_extensions; do
8013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8014    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8016    break 2
8017  fi
8018done
8019  done
8020IFS=$as_save_IFS
8021
8022  ;;
8023esac
8024fi
8025MKTEMP=$ac_cv_path_MKTEMP
8026if test -n "$MKTEMP"; then
8027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8028$as_echo "$MKTEMP" >&6; }
8029else
8030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8031$as_echo "no" >&6; }
8032fi
8033
8034
8035  test -n "$MKTEMP" && break
8036done
8037
8038    else
8039      # If it succeeded, then it was overridden by the user. We will use it
8040      # for the tool.
8041
8042      # First remove it from the list of overridden variables, so we can test
8043      # for unknown variables in the end.
8044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8045
8046      # Check if the provided tool contains a complete path.
8047      tool_specified="$MKTEMP"
8048      tool_basename="${tool_specified##*/}"
8049      if test "x$tool_basename" = "x$tool_specified"; then
8050        # A command without a complete path is provided, search $PATH.
8051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8052$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8053        # Extract the first word of "$tool_basename", so it can be a program name with args.
8054set dummy $tool_basename; ac_word=$2
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8056$as_echo_n "checking for $ac_word... " >&6; }
8057if ${ac_cv_path_MKTEMP+:} false; then :
8058  $as_echo_n "(cached) " >&6
8059else
8060  case $MKTEMP in
8061  [\\/]* | ?:[\\/]*)
8062  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8063  ;;
8064  *)
8065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8066for as_dir in $PATH
8067do
8068  IFS=$as_save_IFS
8069  test -z "$as_dir" && as_dir=.
8070    for ac_exec_ext in '' $ac_executable_extensions; do
8071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8072    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8074    break 2
8075  fi
8076done
8077  done
8078IFS=$as_save_IFS
8079
8080  ;;
8081esac
8082fi
8083MKTEMP=$ac_cv_path_MKTEMP
8084if test -n "$MKTEMP"; then
8085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8086$as_echo "$MKTEMP" >&6; }
8087else
8088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8089$as_echo "no" >&6; }
8090fi
8091
8092
8093        if test "x$MKTEMP" = x; then
8094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8095        fi
8096      else
8097        # Otherwise we believe it is a complete path. Use it as it is.
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8099$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8101$as_echo_n "checking for MKTEMP... " >&6; }
8102        if test ! -x "$tool_specified"; then
8103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8104$as_echo "not found" >&6; }
8105          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8106        fi
8107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8108$as_echo "$tool_specified" >&6; }
8109      fi
8110    fi
8111  fi
8112
8113
8114
8115  if test "x$MKTEMP" = x; then
8116    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8117  fi
8118
8119
8120
8121
8122
8123  # Publish this variable in the help.
8124
8125
8126  if test "x$MV" = x; then
8127    # The variable is not set by user, try to locate tool using the code snippet
8128    for ac_prog in mv
8129do
8130  # Extract the first word of "$ac_prog", so it can be a program name with args.
8131set dummy $ac_prog; ac_word=$2
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8133$as_echo_n "checking for $ac_word... " >&6; }
8134if ${ac_cv_path_MV+:} false; then :
8135  $as_echo_n "(cached) " >&6
8136else
8137  case $MV in
8138  [\\/]* | ?:[\\/]*)
8139  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8140  ;;
8141  *)
8142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8143for as_dir in $PATH
8144do
8145  IFS=$as_save_IFS
8146  test -z "$as_dir" && as_dir=.
8147    for ac_exec_ext in '' $ac_executable_extensions; do
8148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8149    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8151    break 2
8152  fi
8153done
8154  done
8155IFS=$as_save_IFS
8156
8157  ;;
8158esac
8159fi
8160MV=$ac_cv_path_MV
8161if test -n "$MV"; then
8162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8163$as_echo "$MV" >&6; }
8164else
8165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8166$as_echo "no" >&6; }
8167fi
8168
8169
8170  test -n "$MV" && break
8171done
8172
8173  else
8174    # The variable is set, but is it from the command line or the environment?
8175
8176    # Try to remove the string !MV! from our list.
8177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8179      # If it failed, the variable was not from the command line. Ignore it,
8180      # but warn the user (except for BASH, which is always set by the calling BASH).
8181      if test "xMV" != xBASH; then
8182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8183$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8184      fi
8185      # Try to locate tool using the code snippet
8186      for ac_prog in mv
8187do
8188  # Extract the first word of "$ac_prog", so it can be a program name with args.
8189set dummy $ac_prog; ac_word=$2
8190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8191$as_echo_n "checking for $ac_word... " >&6; }
8192if ${ac_cv_path_MV+:} false; then :
8193  $as_echo_n "(cached) " >&6
8194else
8195  case $MV in
8196  [\\/]* | ?:[\\/]*)
8197  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8198  ;;
8199  *)
8200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8201for as_dir in $PATH
8202do
8203  IFS=$as_save_IFS
8204  test -z "$as_dir" && as_dir=.
8205    for ac_exec_ext in '' $ac_executable_extensions; do
8206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8207    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8209    break 2
8210  fi
8211done
8212  done
8213IFS=$as_save_IFS
8214
8215  ;;
8216esac
8217fi
8218MV=$ac_cv_path_MV
8219if test -n "$MV"; then
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8221$as_echo "$MV" >&6; }
8222else
8223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224$as_echo "no" >&6; }
8225fi
8226
8227
8228  test -n "$MV" && break
8229done
8230
8231    else
8232      # If it succeeded, then it was overridden by the user. We will use it
8233      # for the tool.
8234
8235      # First remove it from the list of overridden variables, so we can test
8236      # for unknown variables in the end.
8237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8238
8239      # Check if the provided tool contains a complete path.
8240      tool_specified="$MV"
8241      tool_basename="${tool_specified##*/}"
8242      if test "x$tool_basename" = "x$tool_specified"; then
8243        # A command without a complete path is provided, search $PATH.
8244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8245$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8246        # Extract the first word of "$tool_basename", so it can be a program name with args.
8247set dummy $tool_basename; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if ${ac_cv_path_MV+:} false; then :
8251  $as_echo_n "(cached) " >&6
8252else
8253  case $MV in
8254  [\\/]* | ?:[\\/]*)
8255  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8256  ;;
8257  *)
8258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261  IFS=$as_save_IFS
8262  test -z "$as_dir" && as_dir=.
8263    for ac_exec_ext in '' $ac_executable_extensions; do
8264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8265    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267    break 2
8268  fi
8269done
8270  done
8271IFS=$as_save_IFS
8272
8273  ;;
8274esac
8275fi
8276MV=$ac_cv_path_MV
8277if test -n "$MV"; then
8278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8279$as_echo "$MV" >&6; }
8280else
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
8283fi
8284
8285
8286        if test "x$MV" = x; then
8287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8288        fi
8289      else
8290        # Otherwise we believe it is a complete path. Use it as it is.
8291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8292$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8294$as_echo_n "checking for MV... " >&6; }
8295        if test ! -x "$tool_specified"; then
8296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8297$as_echo "not found" >&6; }
8298          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8299        fi
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8301$as_echo "$tool_specified" >&6; }
8302      fi
8303    fi
8304  fi
8305
8306
8307
8308  if test "x$MV" = x; then
8309    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8310  fi
8311
8312
8313
8314
8315
8316  # Publish this variable in the help.
8317
8318
8319  if test "x$NAWK" = x; then
8320    # The variable is not set by user, try to locate tool using the code snippet
8321    for ac_prog in nawk gawk awk
8322do
8323  # Extract the first word of "$ac_prog", so it can be a program name with args.
8324set dummy $ac_prog; ac_word=$2
8325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8326$as_echo_n "checking for $ac_word... " >&6; }
8327if ${ac_cv_path_NAWK+:} false; then :
8328  $as_echo_n "(cached) " >&6
8329else
8330  case $NAWK in
8331  [\\/]* | ?:[\\/]*)
8332  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8333  ;;
8334  *)
8335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8336for as_dir in $PATH
8337do
8338  IFS=$as_save_IFS
8339  test -z "$as_dir" && as_dir=.
8340    for ac_exec_ext in '' $ac_executable_extensions; do
8341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8342    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8344    break 2
8345  fi
8346done
8347  done
8348IFS=$as_save_IFS
8349
8350  ;;
8351esac
8352fi
8353NAWK=$ac_cv_path_NAWK
8354if test -n "$NAWK"; then
8355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8356$as_echo "$NAWK" >&6; }
8357else
8358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8359$as_echo "no" >&6; }
8360fi
8361
8362
8363  test -n "$NAWK" && break
8364done
8365
8366  else
8367    # The variable is set, but is it from the command line or the environment?
8368
8369    # Try to remove the string !NAWK! from our list.
8370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8372      # If it failed, the variable was not from the command line. Ignore it,
8373      # but warn the user (except for BASH, which is always set by the calling BASH).
8374      if test "xNAWK" != xBASH; then
8375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8376$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8377      fi
8378      # Try to locate tool using the code snippet
8379      for ac_prog in nawk gawk awk
8380do
8381  # Extract the first word of "$ac_prog", so it can be a program name with args.
8382set dummy $ac_prog; ac_word=$2
8383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384$as_echo_n "checking for $ac_word... " >&6; }
8385if ${ac_cv_path_NAWK+:} false; then :
8386  $as_echo_n "(cached) " >&6
8387else
8388  case $NAWK in
8389  [\\/]* | ?:[\\/]*)
8390  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8391  ;;
8392  *)
8393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8394for as_dir in $PATH
8395do
8396  IFS=$as_save_IFS
8397  test -z "$as_dir" && as_dir=.
8398    for ac_exec_ext in '' $ac_executable_extensions; do
8399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8400    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8402    break 2
8403  fi
8404done
8405  done
8406IFS=$as_save_IFS
8407
8408  ;;
8409esac
8410fi
8411NAWK=$ac_cv_path_NAWK
8412if test -n "$NAWK"; then
8413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8414$as_echo "$NAWK" >&6; }
8415else
8416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8417$as_echo "no" >&6; }
8418fi
8419
8420
8421  test -n "$NAWK" && break
8422done
8423
8424    else
8425      # If it succeeded, then it was overridden by the user. We will use it
8426      # for the tool.
8427
8428      # First remove it from the list of overridden variables, so we can test
8429      # for unknown variables in the end.
8430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8431
8432      # Check if the provided tool contains a complete path.
8433      tool_specified="$NAWK"
8434      tool_basename="${tool_specified##*/}"
8435      if test "x$tool_basename" = "x$tool_specified"; then
8436        # A command without a complete path is provided, search $PATH.
8437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8438$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8439        # Extract the first word of "$tool_basename", so it can be a program name with args.
8440set dummy $tool_basename; ac_word=$2
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8442$as_echo_n "checking for $ac_word... " >&6; }
8443if ${ac_cv_path_NAWK+:} false; then :
8444  $as_echo_n "(cached) " >&6
8445else
8446  case $NAWK in
8447  [\\/]* | ?:[\\/]*)
8448  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8449  ;;
8450  *)
8451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8452for as_dir in $PATH
8453do
8454  IFS=$as_save_IFS
8455  test -z "$as_dir" && as_dir=.
8456    for ac_exec_ext in '' $ac_executable_extensions; do
8457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8458    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8460    break 2
8461  fi
8462done
8463  done
8464IFS=$as_save_IFS
8465
8466  ;;
8467esac
8468fi
8469NAWK=$ac_cv_path_NAWK
8470if test -n "$NAWK"; then
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8472$as_echo "$NAWK" >&6; }
8473else
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8475$as_echo "no" >&6; }
8476fi
8477
8478
8479        if test "x$NAWK" = x; then
8480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8481        fi
8482      else
8483        # Otherwise we believe it is a complete path. Use it as it is.
8484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8485$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8487$as_echo_n "checking for NAWK... " >&6; }
8488        if test ! -x "$tool_specified"; then
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8490$as_echo "not found" >&6; }
8491          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8492        fi
8493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8494$as_echo "$tool_specified" >&6; }
8495      fi
8496    fi
8497  fi
8498
8499
8500
8501  if test "x$NAWK" = x; then
8502    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8503  fi
8504
8505
8506
8507
8508
8509  # Publish this variable in the help.
8510
8511
8512  if test "x$PRINTF" = x; then
8513    # The variable is not set by user, try to locate tool using the code snippet
8514    for ac_prog in printf
8515do
8516  # Extract the first word of "$ac_prog", so it can be a program name with args.
8517set dummy $ac_prog; ac_word=$2
8518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519$as_echo_n "checking for $ac_word... " >&6; }
8520if ${ac_cv_path_PRINTF+:} false; then :
8521  $as_echo_n "(cached) " >&6
8522else
8523  case $PRINTF in
8524  [\\/]* | ?:[\\/]*)
8525  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8526  ;;
8527  *)
8528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529for as_dir in $PATH
8530do
8531  IFS=$as_save_IFS
8532  test -z "$as_dir" && as_dir=.
8533    for ac_exec_ext in '' $ac_executable_extensions; do
8534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8537    break 2
8538  fi
8539done
8540  done
8541IFS=$as_save_IFS
8542
8543  ;;
8544esac
8545fi
8546PRINTF=$ac_cv_path_PRINTF
8547if test -n "$PRINTF"; then
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8549$as_echo "$PRINTF" >&6; }
8550else
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
8553fi
8554
8555
8556  test -n "$PRINTF" && break
8557done
8558
8559  else
8560    # The variable is set, but is it from the command line or the environment?
8561
8562    # Try to remove the string !PRINTF! from our list.
8563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8565      # If it failed, the variable was not from the command line. Ignore it,
8566      # but warn the user (except for BASH, which is always set by the calling BASH).
8567      if test "xPRINTF" != xBASH; then
8568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8569$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8570      fi
8571      # Try to locate tool using the code snippet
8572      for ac_prog in printf
8573do
8574  # Extract the first word of "$ac_prog", so it can be a program name with args.
8575set dummy $ac_prog; ac_word=$2
8576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8577$as_echo_n "checking for $ac_word... " >&6; }
8578if ${ac_cv_path_PRINTF+:} false; then :
8579  $as_echo_n "(cached) " >&6
8580else
8581  case $PRINTF in
8582  [\\/]* | ?:[\\/]*)
8583  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8584  ;;
8585  *)
8586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8587for as_dir in $PATH
8588do
8589  IFS=$as_save_IFS
8590  test -z "$as_dir" && as_dir=.
8591    for ac_exec_ext in '' $ac_executable_extensions; do
8592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8593    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8595    break 2
8596  fi
8597done
8598  done
8599IFS=$as_save_IFS
8600
8601  ;;
8602esac
8603fi
8604PRINTF=$ac_cv_path_PRINTF
8605if test -n "$PRINTF"; then
8606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8607$as_echo "$PRINTF" >&6; }
8608else
8609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8610$as_echo "no" >&6; }
8611fi
8612
8613
8614  test -n "$PRINTF" && break
8615done
8616
8617    else
8618      # If it succeeded, then it was overridden by the user. We will use it
8619      # for the tool.
8620
8621      # First remove it from the list of overridden variables, so we can test
8622      # for unknown variables in the end.
8623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8624
8625      # Check if the provided tool contains a complete path.
8626      tool_specified="$PRINTF"
8627      tool_basename="${tool_specified##*/}"
8628      if test "x$tool_basename" = "x$tool_specified"; then
8629        # A command without a complete path is provided, search $PATH.
8630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8631$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8632        # Extract the first word of "$tool_basename", so it can be a program name with args.
8633set dummy $tool_basename; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_PRINTF+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $PRINTF in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662PRINTF=$ac_cv_path_PRINTF
8663if test -n "$PRINTF"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8665$as_echo "$PRINTF" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672        if test "x$PRINTF" = x; then
8673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8674        fi
8675      else
8676        # Otherwise we believe it is a complete path. Use it as it is.
8677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8678$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8680$as_echo_n "checking for PRINTF... " >&6; }
8681        if test ! -x "$tool_specified"; then
8682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8683$as_echo "not found" >&6; }
8684          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8685        fi
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8687$as_echo "$tool_specified" >&6; }
8688      fi
8689    fi
8690  fi
8691
8692
8693
8694  if test "x$PRINTF" = x; then
8695    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8696  fi
8697
8698
8699
8700
8701
8702  # Publish this variable in the help.
8703
8704
8705  if test "x$RM" = x; then
8706    # The variable is not set by user, try to locate tool using the code snippet
8707    for ac_prog in rm
8708do
8709  # Extract the first word of "$ac_prog", so it can be a program name with args.
8710set dummy $ac_prog; ac_word=$2
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712$as_echo_n "checking for $ac_word... " >&6; }
8713if ${ac_cv_path_RM+:} false; then :
8714  $as_echo_n "(cached) " >&6
8715else
8716  case $RM in
8717  [\\/]* | ?:[\\/]*)
8718  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8719  ;;
8720  *)
8721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8722for as_dir in $PATH
8723do
8724  IFS=$as_save_IFS
8725  test -z "$as_dir" && as_dir=.
8726    for ac_exec_ext in '' $ac_executable_extensions; do
8727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8728    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8730    break 2
8731  fi
8732done
8733  done
8734IFS=$as_save_IFS
8735
8736  ;;
8737esac
8738fi
8739RM=$ac_cv_path_RM
8740if test -n "$RM"; then
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8742$as_echo "$RM" >&6; }
8743else
8744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
8746fi
8747
8748
8749  test -n "$RM" && break
8750done
8751
8752  else
8753    # The variable is set, but is it from the command line or the environment?
8754
8755    # Try to remove the string !RM! from our list.
8756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8758      # If it failed, the variable was not from the command line. Ignore it,
8759      # but warn the user (except for BASH, which is always set by the calling BASH).
8760      if test "xRM" != xBASH; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8762$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8763      fi
8764      # Try to locate tool using the code snippet
8765      for ac_prog in rm
8766do
8767  # Extract the first word of "$ac_prog", so it can be a program name with args.
8768set dummy $ac_prog; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_RM+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $RM in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797RM=$ac_cv_path_RM
8798if test -n "$RM"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8800$as_echo "$RM" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807  test -n "$RM" && break
8808done
8809
8810    else
8811      # If it succeeded, then it was overridden by the user. We will use it
8812      # for the tool.
8813
8814      # First remove it from the list of overridden variables, so we can test
8815      # for unknown variables in the end.
8816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8817
8818      # Check if the provided tool contains a complete path.
8819      tool_specified="$RM"
8820      tool_basename="${tool_specified##*/}"
8821      if test "x$tool_basename" = "x$tool_specified"; then
8822        # A command without a complete path is provided, search $PATH.
8823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8824$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8825        # Extract the first word of "$tool_basename", so it can be a program name with args.
8826set dummy $tool_basename; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_RM+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $RM in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855RM=$ac_cv_path_RM
8856if test -n "$RM"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8858$as_echo "$RM" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865        if test "x$RM" = x; then
8866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8867        fi
8868      else
8869        # Otherwise we believe it is a complete path. Use it as it is.
8870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8871$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8873$as_echo_n "checking for RM... " >&6; }
8874        if test ! -x "$tool_specified"; then
8875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8876$as_echo "not found" >&6; }
8877          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8878        fi
8879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8880$as_echo "$tool_specified" >&6; }
8881      fi
8882    fi
8883  fi
8884
8885
8886
8887  if test "x$RM" = x; then
8888    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8889  fi
8890
8891
8892
8893
8894
8895  # Publish this variable in the help.
8896
8897
8898  if test "x$SH" = x; then
8899    # The variable is not set by user, try to locate tool using the code snippet
8900    for ac_prog in sh
8901do
8902  # Extract the first word of "$ac_prog", so it can be a program name with args.
8903set dummy $ac_prog; ac_word=$2
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if ${ac_cv_path_SH+:} false; then :
8907  $as_echo_n "(cached) " >&6
8908else
8909  case $SH in
8910  [\\/]* | ?:[\\/]*)
8911  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8912  ;;
8913  *)
8914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917  IFS=$as_save_IFS
8918  test -z "$as_dir" && as_dir=.
8919    for ac_exec_ext in '' $ac_executable_extensions; do
8920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8921    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8923    break 2
8924  fi
8925done
8926  done
8927IFS=$as_save_IFS
8928
8929  ;;
8930esac
8931fi
8932SH=$ac_cv_path_SH
8933if test -n "$SH"; then
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8935$as_echo "$SH" >&6; }
8936else
8937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
8940
8941
8942  test -n "$SH" && break
8943done
8944
8945  else
8946    # The variable is set, but is it from the command line or the environment?
8947
8948    # Try to remove the string !SH! from our list.
8949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
8950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8951      # If it failed, the variable was not from the command line. Ignore it,
8952      # but warn the user (except for BASH, which is always set by the calling BASH).
8953      if test "xSH" != xBASH; then
8954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
8955$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
8956      fi
8957      # Try to locate tool using the code snippet
8958      for ac_prog in sh
8959do
8960  # Extract the first word of "$ac_prog", so it can be a program name with args.
8961set dummy $ac_prog; ac_word=$2
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8963$as_echo_n "checking for $ac_word... " >&6; }
8964if ${ac_cv_path_SH+:} false; then :
8965  $as_echo_n "(cached) " >&6
8966else
8967  case $SH in
8968  [\\/]* | ?:[\\/]*)
8969  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8970  ;;
8971  *)
8972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8973for as_dir in $PATH
8974do
8975  IFS=$as_save_IFS
8976  test -z "$as_dir" && as_dir=.
8977    for ac_exec_ext in '' $ac_executable_extensions; do
8978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8979    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8981    break 2
8982  fi
8983done
8984  done
8985IFS=$as_save_IFS
8986
8987  ;;
8988esac
8989fi
8990SH=$ac_cv_path_SH
8991if test -n "$SH"; then
8992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8993$as_echo "$SH" >&6; }
8994else
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996$as_echo "no" >&6; }
8997fi
8998
8999
9000  test -n "$SH" && break
9001done
9002
9003    else
9004      # If it succeeded, then it was overridden by the user. We will use it
9005      # for the tool.
9006
9007      # First remove it from the list of overridden variables, so we can test
9008      # for unknown variables in the end.
9009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9010
9011      # Check if the provided tool contains a complete path.
9012      tool_specified="$SH"
9013      tool_basename="${tool_specified##*/}"
9014      if test "x$tool_basename" = "x$tool_specified"; then
9015        # A command without a complete path is provided, search $PATH.
9016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9017$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9018        # Extract the first word of "$tool_basename", so it can be a program name with args.
9019set dummy $tool_basename; ac_word=$2
9020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9021$as_echo_n "checking for $ac_word... " >&6; }
9022if ${ac_cv_path_SH+:} false; then :
9023  $as_echo_n "(cached) " >&6
9024else
9025  case $SH in
9026  [\\/]* | ?:[\\/]*)
9027  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9028  ;;
9029  *)
9030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9031for as_dir in $PATH
9032do
9033  IFS=$as_save_IFS
9034  test -z "$as_dir" && as_dir=.
9035    for ac_exec_ext in '' $ac_executable_extensions; do
9036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9037    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9039    break 2
9040  fi
9041done
9042  done
9043IFS=$as_save_IFS
9044
9045  ;;
9046esac
9047fi
9048SH=$ac_cv_path_SH
9049if test -n "$SH"; then
9050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9051$as_echo "$SH" >&6; }
9052else
9053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054$as_echo "no" >&6; }
9055fi
9056
9057
9058        if test "x$SH" = x; then
9059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9060        fi
9061      else
9062        # Otherwise we believe it is a complete path. Use it as it is.
9063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9064$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9066$as_echo_n "checking for SH... " >&6; }
9067        if test ! -x "$tool_specified"; then
9068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9069$as_echo "not found" >&6; }
9070          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9071        fi
9072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9073$as_echo "$tool_specified" >&6; }
9074      fi
9075    fi
9076  fi
9077
9078
9079
9080  if test "x$SH" = x; then
9081    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9082  fi
9083
9084
9085
9086
9087
9088  # Publish this variable in the help.
9089
9090
9091  if test "x$SORT" = x; then
9092    # The variable is not set by user, try to locate tool using the code snippet
9093    for ac_prog in sort
9094do
9095  # Extract the first word of "$ac_prog", so it can be a program name with args.
9096set dummy $ac_prog; ac_word=$2
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9098$as_echo_n "checking for $ac_word... " >&6; }
9099if ${ac_cv_path_SORT+:} false; then :
9100  $as_echo_n "(cached) " >&6
9101else
9102  case $SORT in
9103  [\\/]* | ?:[\\/]*)
9104  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9105  ;;
9106  *)
9107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9108for as_dir in $PATH
9109do
9110  IFS=$as_save_IFS
9111  test -z "$as_dir" && as_dir=.
9112    for ac_exec_ext in '' $ac_executable_extensions; do
9113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9114    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9116    break 2
9117  fi
9118done
9119  done
9120IFS=$as_save_IFS
9121
9122  ;;
9123esac
9124fi
9125SORT=$ac_cv_path_SORT
9126if test -n "$SORT"; then
9127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9128$as_echo "$SORT" >&6; }
9129else
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
9132fi
9133
9134
9135  test -n "$SORT" && break
9136done
9137
9138  else
9139    # The variable is set, but is it from the command line or the environment?
9140
9141    # Try to remove the string !SORT! from our list.
9142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9144      # If it failed, the variable was not from the command line. Ignore it,
9145      # but warn the user (except for BASH, which is always set by the calling BASH).
9146      if test "xSORT" != xBASH; then
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9148$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9149      fi
9150      # Try to locate tool using the code snippet
9151      for ac_prog in sort
9152do
9153  # Extract the first word of "$ac_prog", so it can be a program name with args.
9154set dummy $ac_prog; ac_word=$2
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9156$as_echo_n "checking for $ac_word... " >&6; }
9157if ${ac_cv_path_SORT+:} false; then :
9158  $as_echo_n "(cached) " >&6
9159else
9160  case $SORT in
9161  [\\/]* | ?:[\\/]*)
9162  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9163  ;;
9164  *)
9165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9166for as_dir in $PATH
9167do
9168  IFS=$as_save_IFS
9169  test -z "$as_dir" && as_dir=.
9170    for ac_exec_ext in '' $ac_executable_extensions; do
9171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9172    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9174    break 2
9175  fi
9176done
9177  done
9178IFS=$as_save_IFS
9179
9180  ;;
9181esac
9182fi
9183SORT=$ac_cv_path_SORT
9184if test -n "$SORT"; then
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9186$as_echo "$SORT" >&6; }
9187else
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
9190fi
9191
9192
9193  test -n "$SORT" && break
9194done
9195
9196    else
9197      # If it succeeded, then it was overridden by the user. We will use it
9198      # for the tool.
9199
9200      # First remove it from the list of overridden variables, so we can test
9201      # for unknown variables in the end.
9202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9203
9204      # Check if the provided tool contains a complete path.
9205      tool_specified="$SORT"
9206      tool_basename="${tool_specified##*/}"
9207      if test "x$tool_basename" = "x$tool_specified"; then
9208        # A command without a complete path is provided, search $PATH.
9209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9210$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9211        # Extract the first word of "$tool_basename", so it can be a program name with args.
9212set dummy $tool_basename; ac_word=$2
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9214$as_echo_n "checking for $ac_word... " >&6; }
9215if ${ac_cv_path_SORT+:} false; then :
9216  $as_echo_n "(cached) " >&6
9217else
9218  case $SORT in
9219  [\\/]* | ?:[\\/]*)
9220  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9221  ;;
9222  *)
9223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9224for as_dir in $PATH
9225do
9226  IFS=$as_save_IFS
9227  test -z "$as_dir" && as_dir=.
9228    for ac_exec_ext in '' $ac_executable_extensions; do
9229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9230    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9232    break 2
9233  fi
9234done
9235  done
9236IFS=$as_save_IFS
9237
9238  ;;
9239esac
9240fi
9241SORT=$ac_cv_path_SORT
9242if test -n "$SORT"; then
9243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9244$as_echo "$SORT" >&6; }
9245else
9246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9247$as_echo "no" >&6; }
9248fi
9249
9250
9251        if test "x$SORT" = x; then
9252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9253        fi
9254      else
9255        # Otherwise we believe it is a complete path. Use it as it is.
9256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9257$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9259$as_echo_n "checking for SORT... " >&6; }
9260        if test ! -x "$tool_specified"; then
9261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9262$as_echo "not found" >&6; }
9263          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9264        fi
9265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9266$as_echo "$tool_specified" >&6; }
9267      fi
9268    fi
9269  fi
9270
9271
9272
9273  if test "x$SORT" = x; then
9274    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9275  fi
9276
9277
9278
9279
9280
9281  # Publish this variable in the help.
9282
9283
9284  if test "x$TAIL" = x; then
9285    # The variable is not set by user, try to locate tool using the code snippet
9286    for ac_prog in tail
9287do
9288  # Extract the first word of "$ac_prog", so it can be a program name with args.
9289set dummy $ac_prog; ac_word=$2
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9291$as_echo_n "checking for $ac_word... " >&6; }
9292if ${ac_cv_path_TAIL+:} false; then :
9293  $as_echo_n "(cached) " >&6
9294else
9295  case $TAIL in
9296  [\\/]* | ?:[\\/]*)
9297  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9298  ;;
9299  *)
9300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9301for as_dir in $PATH
9302do
9303  IFS=$as_save_IFS
9304  test -z "$as_dir" && as_dir=.
9305    for ac_exec_ext in '' $ac_executable_extensions; do
9306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9307    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9309    break 2
9310  fi
9311done
9312  done
9313IFS=$as_save_IFS
9314
9315  ;;
9316esac
9317fi
9318TAIL=$ac_cv_path_TAIL
9319if test -n "$TAIL"; then
9320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9321$as_echo "$TAIL" >&6; }
9322else
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9324$as_echo "no" >&6; }
9325fi
9326
9327
9328  test -n "$TAIL" && break
9329done
9330
9331  else
9332    # The variable is set, but is it from the command line or the environment?
9333
9334    # Try to remove the string !TAIL! from our list.
9335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9337      # If it failed, the variable was not from the command line. Ignore it,
9338      # but warn the user (except for BASH, which is always set by the calling BASH).
9339      if test "xTAIL" != xBASH; then
9340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9341$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9342      fi
9343      # Try to locate tool using the code snippet
9344      for ac_prog in tail
9345do
9346  # Extract the first word of "$ac_prog", so it can be a program name with args.
9347set dummy $ac_prog; ac_word=$2
9348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9349$as_echo_n "checking for $ac_word... " >&6; }
9350if ${ac_cv_path_TAIL+:} false; then :
9351  $as_echo_n "(cached) " >&6
9352else
9353  case $TAIL in
9354  [\\/]* | ?:[\\/]*)
9355  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9356  ;;
9357  *)
9358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359for as_dir in $PATH
9360do
9361  IFS=$as_save_IFS
9362  test -z "$as_dir" && as_dir=.
9363    for ac_exec_ext in '' $ac_executable_extensions; do
9364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9365    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9367    break 2
9368  fi
9369done
9370  done
9371IFS=$as_save_IFS
9372
9373  ;;
9374esac
9375fi
9376TAIL=$ac_cv_path_TAIL
9377if test -n "$TAIL"; then
9378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9379$as_echo "$TAIL" >&6; }
9380else
9381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382$as_echo "no" >&6; }
9383fi
9384
9385
9386  test -n "$TAIL" && break
9387done
9388
9389    else
9390      # If it succeeded, then it was overridden by the user. We will use it
9391      # for the tool.
9392
9393      # First remove it from the list of overridden variables, so we can test
9394      # for unknown variables in the end.
9395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9396
9397      # Check if the provided tool contains a complete path.
9398      tool_specified="$TAIL"
9399      tool_basename="${tool_specified##*/}"
9400      if test "x$tool_basename" = "x$tool_specified"; then
9401        # A command without a complete path is provided, search $PATH.
9402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9403$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9404        # Extract the first word of "$tool_basename", so it can be a program name with args.
9405set dummy $tool_basename; ac_word=$2
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9407$as_echo_n "checking for $ac_word... " >&6; }
9408if ${ac_cv_path_TAIL+:} false; then :
9409  $as_echo_n "(cached) " >&6
9410else
9411  case $TAIL in
9412  [\\/]* | ?:[\\/]*)
9413  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9414  ;;
9415  *)
9416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9417for as_dir in $PATH
9418do
9419  IFS=$as_save_IFS
9420  test -z "$as_dir" && as_dir=.
9421    for ac_exec_ext in '' $ac_executable_extensions; do
9422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9423    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9425    break 2
9426  fi
9427done
9428  done
9429IFS=$as_save_IFS
9430
9431  ;;
9432esac
9433fi
9434TAIL=$ac_cv_path_TAIL
9435if test -n "$TAIL"; then
9436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9437$as_echo "$TAIL" >&6; }
9438else
9439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9440$as_echo "no" >&6; }
9441fi
9442
9443
9444        if test "x$TAIL" = x; then
9445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9446        fi
9447      else
9448        # Otherwise we believe it is a complete path. Use it as it is.
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9450$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9452$as_echo_n "checking for TAIL... " >&6; }
9453        if test ! -x "$tool_specified"; then
9454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9455$as_echo "not found" >&6; }
9456          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9457        fi
9458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9459$as_echo "$tool_specified" >&6; }
9460      fi
9461    fi
9462  fi
9463
9464
9465
9466  if test "x$TAIL" = x; then
9467    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9468  fi
9469
9470
9471
9472
9473
9474  # Publish this variable in the help.
9475
9476
9477  if test "x$TAR" = x; then
9478    # The variable is not set by user, try to locate tool using the code snippet
9479    for ac_prog in tar
9480do
9481  # Extract the first word of "$ac_prog", so it can be a program name with args.
9482set dummy $ac_prog; ac_word=$2
9483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9484$as_echo_n "checking for $ac_word... " >&6; }
9485if ${ac_cv_path_TAR+:} false; then :
9486  $as_echo_n "(cached) " >&6
9487else
9488  case $TAR in
9489  [\\/]* | ?:[\\/]*)
9490  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9491  ;;
9492  *)
9493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9494for as_dir in $PATH
9495do
9496  IFS=$as_save_IFS
9497  test -z "$as_dir" && as_dir=.
9498    for ac_exec_ext in '' $ac_executable_extensions; do
9499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9500    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9502    break 2
9503  fi
9504done
9505  done
9506IFS=$as_save_IFS
9507
9508  ;;
9509esac
9510fi
9511TAR=$ac_cv_path_TAR
9512if test -n "$TAR"; then
9513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9514$as_echo "$TAR" >&6; }
9515else
9516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9517$as_echo "no" >&6; }
9518fi
9519
9520
9521  test -n "$TAR" && break
9522done
9523
9524  else
9525    # The variable is set, but is it from the command line or the environment?
9526
9527    # Try to remove the string !TAR! from our list.
9528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9530      # If it failed, the variable was not from the command line. Ignore it,
9531      # but warn the user (except for BASH, which is always set by the calling BASH).
9532      if test "xTAR" != xBASH; then
9533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9534$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9535      fi
9536      # Try to locate tool using the code snippet
9537      for ac_prog in tar
9538do
9539  # Extract the first word of "$ac_prog", so it can be a program name with args.
9540set dummy $ac_prog; ac_word=$2
9541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9542$as_echo_n "checking for $ac_word... " >&6; }
9543if ${ac_cv_path_TAR+:} false; then :
9544  $as_echo_n "(cached) " >&6
9545else
9546  case $TAR in
9547  [\\/]* | ?:[\\/]*)
9548  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9549  ;;
9550  *)
9551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9552for as_dir in $PATH
9553do
9554  IFS=$as_save_IFS
9555  test -z "$as_dir" && as_dir=.
9556    for ac_exec_ext in '' $ac_executable_extensions; do
9557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9558    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9560    break 2
9561  fi
9562done
9563  done
9564IFS=$as_save_IFS
9565
9566  ;;
9567esac
9568fi
9569TAR=$ac_cv_path_TAR
9570if test -n "$TAR"; then
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9572$as_echo "$TAR" >&6; }
9573else
9574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
9576fi
9577
9578
9579  test -n "$TAR" && break
9580done
9581
9582    else
9583      # If it succeeded, then it was overridden by the user. We will use it
9584      # for the tool.
9585
9586      # First remove it from the list of overridden variables, so we can test
9587      # for unknown variables in the end.
9588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9589
9590      # Check if the provided tool contains a complete path.
9591      tool_specified="$TAR"
9592      tool_basename="${tool_specified##*/}"
9593      if test "x$tool_basename" = "x$tool_specified"; then
9594        # A command without a complete path is provided, search $PATH.
9595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9596$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9597        # Extract the first word of "$tool_basename", so it can be a program name with args.
9598set dummy $tool_basename; ac_word=$2
9599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600$as_echo_n "checking for $ac_word... " >&6; }
9601if ${ac_cv_path_TAR+:} false; then :
9602  $as_echo_n "(cached) " >&6
9603else
9604  case $TAR in
9605  [\\/]* | ?:[\\/]*)
9606  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9607  ;;
9608  *)
9609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9610for as_dir in $PATH
9611do
9612  IFS=$as_save_IFS
9613  test -z "$as_dir" && as_dir=.
9614    for ac_exec_ext in '' $ac_executable_extensions; do
9615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9616    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9618    break 2
9619  fi
9620done
9621  done
9622IFS=$as_save_IFS
9623
9624  ;;
9625esac
9626fi
9627TAR=$ac_cv_path_TAR
9628if test -n "$TAR"; then
9629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9630$as_echo "$TAR" >&6; }
9631else
9632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633$as_echo "no" >&6; }
9634fi
9635
9636
9637        if test "x$TAR" = x; then
9638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9639        fi
9640      else
9641        # Otherwise we believe it is a complete path. Use it as it is.
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9643$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9645$as_echo_n "checking for TAR... " >&6; }
9646        if test ! -x "$tool_specified"; then
9647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9648$as_echo "not found" >&6; }
9649          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9650        fi
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9652$as_echo "$tool_specified" >&6; }
9653      fi
9654    fi
9655  fi
9656
9657
9658
9659  if test "x$TAR" = x; then
9660    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9661  fi
9662
9663
9664
9665
9666
9667  # Publish this variable in the help.
9668
9669
9670  if test "x$TEE" = x; then
9671    # The variable is not set by user, try to locate tool using the code snippet
9672    for ac_prog in tee
9673do
9674  # Extract the first word of "$ac_prog", so it can be a program name with args.
9675set dummy $ac_prog; ac_word=$2
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9677$as_echo_n "checking for $ac_word... " >&6; }
9678if ${ac_cv_path_TEE+:} false; then :
9679  $as_echo_n "(cached) " >&6
9680else
9681  case $TEE in
9682  [\\/]* | ?:[\\/]*)
9683  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9684  ;;
9685  *)
9686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9687for as_dir in $PATH
9688do
9689  IFS=$as_save_IFS
9690  test -z "$as_dir" && as_dir=.
9691    for ac_exec_ext in '' $ac_executable_extensions; do
9692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9693    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9695    break 2
9696  fi
9697done
9698  done
9699IFS=$as_save_IFS
9700
9701  ;;
9702esac
9703fi
9704TEE=$ac_cv_path_TEE
9705if test -n "$TEE"; then
9706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9707$as_echo "$TEE" >&6; }
9708else
9709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9710$as_echo "no" >&6; }
9711fi
9712
9713
9714  test -n "$TEE" && break
9715done
9716
9717  else
9718    # The variable is set, but is it from the command line or the environment?
9719
9720    # Try to remove the string !TEE! from our list.
9721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9723      # If it failed, the variable was not from the command line. Ignore it,
9724      # but warn the user (except for BASH, which is always set by the calling BASH).
9725      if test "xTEE" != xBASH; then
9726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9727$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9728      fi
9729      # Try to locate tool using the code snippet
9730      for ac_prog in tee
9731do
9732  # Extract the first word of "$ac_prog", so it can be a program name with args.
9733set dummy $ac_prog; ac_word=$2
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9735$as_echo_n "checking for $ac_word... " >&6; }
9736if ${ac_cv_path_TEE+:} false; then :
9737  $as_echo_n "(cached) " >&6
9738else
9739  case $TEE in
9740  [\\/]* | ?:[\\/]*)
9741  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9742  ;;
9743  *)
9744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9745for as_dir in $PATH
9746do
9747  IFS=$as_save_IFS
9748  test -z "$as_dir" && as_dir=.
9749    for ac_exec_ext in '' $ac_executable_extensions; do
9750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9751    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9753    break 2
9754  fi
9755done
9756  done
9757IFS=$as_save_IFS
9758
9759  ;;
9760esac
9761fi
9762TEE=$ac_cv_path_TEE
9763if test -n "$TEE"; then
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9765$as_echo "$TEE" >&6; }
9766else
9767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9768$as_echo "no" >&6; }
9769fi
9770
9771
9772  test -n "$TEE" && break
9773done
9774
9775    else
9776      # If it succeeded, then it was overridden by the user. We will use it
9777      # for the tool.
9778
9779      # First remove it from the list of overridden variables, so we can test
9780      # for unknown variables in the end.
9781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9782
9783      # Check if the provided tool contains a complete path.
9784      tool_specified="$TEE"
9785      tool_basename="${tool_specified##*/}"
9786      if test "x$tool_basename" = "x$tool_specified"; then
9787        # A command without a complete path is provided, search $PATH.
9788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9789$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9790        # Extract the first word of "$tool_basename", so it can be a program name with args.
9791set dummy $tool_basename; ac_word=$2
9792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9793$as_echo_n "checking for $ac_word... " >&6; }
9794if ${ac_cv_path_TEE+:} false; then :
9795  $as_echo_n "(cached) " >&6
9796else
9797  case $TEE in
9798  [\\/]* | ?:[\\/]*)
9799  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9800  ;;
9801  *)
9802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9803for as_dir in $PATH
9804do
9805  IFS=$as_save_IFS
9806  test -z "$as_dir" && as_dir=.
9807    for ac_exec_ext in '' $ac_executable_extensions; do
9808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9809    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9811    break 2
9812  fi
9813done
9814  done
9815IFS=$as_save_IFS
9816
9817  ;;
9818esac
9819fi
9820TEE=$ac_cv_path_TEE
9821if test -n "$TEE"; then
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9823$as_echo "$TEE" >&6; }
9824else
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
9827fi
9828
9829
9830        if test "x$TEE" = x; then
9831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9832        fi
9833      else
9834        # Otherwise we believe it is a complete path. Use it as it is.
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9836$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9838$as_echo_n "checking for TEE... " >&6; }
9839        if test ! -x "$tool_specified"; then
9840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9841$as_echo "not found" >&6; }
9842          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9843        fi
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9845$as_echo "$tool_specified" >&6; }
9846      fi
9847    fi
9848  fi
9849
9850
9851
9852  if test "x$TEE" = x; then
9853    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9854  fi
9855
9856
9857
9858
9859
9860  # Publish this variable in the help.
9861
9862
9863  if test "x$TOUCH" = x; then
9864    # The variable is not set by user, try to locate tool using the code snippet
9865    for ac_prog in touch
9866do
9867  # Extract the first word of "$ac_prog", so it can be a program name with args.
9868set dummy $ac_prog; ac_word=$2
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9870$as_echo_n "checking for $ac_word... " >&6; }
9871if ${ac_cv_path_TOUCH+:} false; then :
9872  $as_echo_n "(cached) " >&6
9873else
9874  case $TOUCH in
9875  [\\/]* | ?:[\\/]*)
9876  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9877  ;;
9878  *)
9879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880for as_dir in $PATH
9881do
9882  IFS=$as_save_IFS
9883  test -z "$as_dir" && as_dir=.
9884    for ac_exec_ext in '' $ac_executable_extensions; do
9885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9886    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9888    break 2
9889  fi
9890done
9891  done
9892IFS=$as_save_IFS
9893
9894  ;;
9895esac
9896fi
9897TOUCH=$ac_cv_path_TOUCH
9898if test -n "$TOUCH"; then
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9900$as_echo "$TOUCH" >&6; }
9901else
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
9904fi
9905
9906
9907  test -n "$TOUCH" && break
9908done
9909
9910  else
9911    # The variable is set, but is it from the command line or the environment?
9912
9913    # Try to remove the string !TOUCH! from our list.
9914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
9915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9916      # If it failed, the variable was not from the command line. Ignore it,
9917      # but warn the user (except for BASH, which is always set by the calling BASH).
9918      if test "xTOUCH" != xBASH; then
9919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
9920$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
9921      fi
9922      # Try to locate tool using the code snippet
9923      for ac_prog in touch
9924do
9925  # Extract the first word of "$ac_prog", so it can be a program name with args.
9926set dummy $ac_prog; ac_word=$2
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9928$as_echo_n "checking for $ac_word... " >&6; }
9929if ${ac_cv_path_TOUCH+:} false; then :
9930  $as_echo_n "(cached) " >&6
9931else
9932  case $TOUCH in
9933  [\\/]* | ?:[\\/]*)
9934  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9935  ;;
9936  *)
9937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9938for as_dir in $PATH
9939do
9940  IFS=$as_save_IFS
9941  test -z "$as_dir" && as_dir=.
9942    for ac_exec_ext in '' $ac_executable_extensions; do
9943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9944    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9946    break 2
9947  fi
9948done
9949  done
9950IFS=$as_save_IFS
9951
9952  ;;
9953esac
9954fi
9955TOUCH=$ac_cv_path_TOUCH
9956if test -n "$TOUCH"; then
9957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9958$as_echo "$TOUCH" >&6; }
9959else
9960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961$as_echo "no" >&6; }
9962fi
9963
9964
9965  test -n "$TOUCH" && break
9966done
9967
9968    else
9969      # If it succeeded, then it was overridden by the user. We will use it
9970      # for the tool.
9971
9972      # First remove it from the list of overridden variables, so we can test
9973      # for unknown variables in the end.
9974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9975
9976      # Check if the provided tool contains a complete path.
9977      tool_specified="$TOUCH"
9978      tool_basename="${tool_specified##*/}"
9979      if test "x$tool_basename" = "x$tool_specified"; then
9980        # A command without a complete path is provided, search $PATH.
9981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
9982$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
9983        # Extract the first word of "$tool_basename", so it can be a program name with args.
9984set dummy $tool_basename; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if ${ac_cv_path_TOUCH+:} false; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $TOUCH in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013TOUCH=$ac_cv_path_TOUCH
10014if test -n "$TOUCH"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10016$as_echo "$TOUCH" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023        if test "x$TOUCH" = x; then
10024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10025        fi
10026      else
10027        # Otherwise we believe it is a complete path. Use it as it is.
10028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10029$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10031$as_echo_n "checking for TOUCH... " >&6; }
10032        if test ! -x "$tool_specified"; then
10033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10034$as_echo "not found" >&6; }
10035          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10036        fi
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10038$as_echo "$tool_specified" >&6; }
10039      fi
10040    fi
10041  fi
10042
10043
10044
10045  if test "x$TOUCH" = x; then
10046    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10047  fi
10048
10049
10050
10051
10052
10053  # Publish this variable in the help.
10054
10055
10056  if test "x$TR" = x; then
10057    # The variable is not set by user, try to locate tool using the code snippet
10058    for ac_prog in tr
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if ${ac_cv_path_TR+:} false; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $TR in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090TR=$ac_cv_path_TR
10091if test -n "$TR"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10093$as_echo "$TR" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$TR" && break
10101done
10102
10103  else
10104    # The variable is set, but is it from the command line or the environment?
10105
10106    # Try to remove the string !TR! from our list.
10107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109      # If it failed, the variable was not from the command line. Ignore it,
10110      # but warn the user (except for BASH, which is always set by the calling BASH).
10111      if test "xTR" != xBASH; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10113$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10114      fi
10115      # Try to locate tool using the code snippet
10116      for ac_prog in tr
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_TR+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $TR in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148TR=$ac_cv_path_TR
10149if test -n "$TR"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10151$as_echo "$TR" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$TR" && break
10159done
10160
10161    else
10162      # If it succeeded, then it was overridden by the user. We will use it
10163      # for the tool.
10164
10165      # First remove it from the list of overridden variables, so we can test
10166      # for unknown variables in the end.
10167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168
10169      # Check if the provided tool contains a complete path.
10170      tool_specified="$TR"
10171      tool_basename="${tool_specified##*/}"
10172      if test "x$tool_basename" = "x$tool_specified"; then
10173        # A command without a complete path is provided, search $PATH.
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10175$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10176        # Extract the first word of "$tool_basename", so it can be a program name with args.
10177set dummy $tool_basename; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_TR+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $TR in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206TR=$ac_cv_path_TR
10207if test -n "$TR"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10209$as_echo "$TR" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216        if test "x$TR" = x; then
10217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10218        fi
10219      else
10220        # Otherwise we believe it is a complete path. Use it as it is.
10221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10222$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10224$as_echo_n "checking for TR... " >&6; }
10225        if test ! -x "$tool_specified"; then
10226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10227$as_echo "not found" >&6; }
10228          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10229        fi
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10231$as_echo "$tool_specified" >&6; }
10232      fi
10233    fi
10234  fi
10235
10236
10237
10238  if test "x$TR" = x; then
10239    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10240  fi
10241
10242
10243
10244
10245
10246  # Publish this variable in the help.
10247
10248
10249  if test "x$UNAME" = x; then
10250    # The variable is not set by user, try to locate tool using the code snippet
10251    for ac_prog in uname
10252do
10253  # Extract the first word of "$ac_prog", so it can be a program name with args.
10254set dummy $ac_prog; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_UNAME+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $UNAME in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283UNAME=$ac_cv_path_UNAME
10284if test -n "$UNAME"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10286$as_echo "$UNAME" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293  test -n "$UNAME" && break
10294done
10295
10296  else
10297    # The variable is set, but is it from the command line or the environment?
10298
10299    # Try to remove the string !UNAME! from our list.
10300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10302      # If it failed, the variable was not from the command line. Ignore it,
10303      # but warn the user (except for BASH, which is always set by the calling BASH).
10304      if test "xUNAME" != xBASH; then
10305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10306$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10307      fi
10308      # Try to locate tool using the code snippet
10309      for ac_prog in uname
10310do
10311  # Extract the first word of "$ac_prog", so it can be a program name with args.
10312set dummy $ac_prog; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_UNAME+:} false; then :
10316  $as_echo_n "(cached) " >&6
10317else
10318  case $UNAME in
10319  [\\/]* | ?:[\\/]*)
10320  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10321  ;;
10322  *)
10323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326  IFS=$as_save_IFS
10327  test -z "$as_dir" && as_dir=.
10328    for ac_exec_ext in '' $ac_executable_extensions; do
10329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332    break 2
10333  fi
10334done
10335  done
10336IFS=$as_save_IFS
10337
10338  ;;
10339esac
10340fi
10341UNAME=$ac_cv_path_UNAME
10342if test -n "$UNAME"; then
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10344$as_echo "$UNAME" >&6; }
10345else
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351  test -n "$UNAME" && break
10352done
10353
10354    else
10355      # If it succeeded, then it was overridden by the user. We will use it
10356      # for the tool.
10357
10358      # First remove it from the list of overridden variables, so we can test
10359      # for unknown variables in the end.
10360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10361
10362      # Check if the provided tool contains a complete path.
10363      tool_specified="$UNAME"
10364      tool_basename="${tool_specified##*/}"
10365      if test "x$tool_basename" = "x$tool_specified"; then
10366        # A command without a complete path is provided, search $PATH.
10367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10368$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10369        # Extract the first word of "$tool_basename", so it can be a program name with args.
10370set dummy $tool_basename; ac_word=$2
10371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10372$as_echo_n "checking for $ac_word... " >&6; }
10373if ${ac_cv_path_UNAME+:} false; then :
10374  $as_echo_n "(cached) " >&6
10375else
10376  case $UNAME in
10377  [\\/]* | ?:[\\/]*)
10378  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10379  ;;
10380  *)
10381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382for as_dir in $PATH
10383do
10384  IFS=$as_save_IFS
10385  test -z "$as_dir" && as_dir=.
10386    for ac_exec_ext in '' $ac_executable_extensions; do
10387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10388    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10390    break 2
10391  fi
10392done
10393  done
10394IFS=$as_save_IFS
10395
10396  ;;
10397esac
10398fi
10399UNAME=$ac_cv_path_UNAME
10400if test -n "$UNAME"; then
10401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10402$as_echo "$UNAME" >&6; }
10403else
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
10406fi
10407
10408
10409        if test "x$UNAME" = x; then
10410          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10411        fi
10412      else
10413        # Otherwise we believe it is a complete path. Use it as it is.
10414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10415$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10417$as_echo_n "checking for UNAME... " >&6; }
10418        if test ! -x "$tool_specified"; then
10419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10420$as_echo "not found" >&6; }
10421          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10422        fi
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10424$as_echo "$tool_specified" >&6; }
10425      fi
10426    fi
10427  fi
10428
10429
10430
10431  if test "x$UNAME" = x; then
10432    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10433  fi
10434
10435
10436
10437
10438
10439  # Publish this variable in the help.
10440
10441
10442  if test "x$UNIQ" = x; then
10443    # The variable is not set by user, try to locate tool using the code snippet
10444    for ac_prog in uniq
10445do
10446  # Extract the first word of "$ac_prog", so it can be a program name with args.
10447set dummy $ac_prog; ac_word=$2
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10449$as_echo_n "checking for $ac_word... " >&6; }
10450if ${ac_cv_path_UNIQ+:} false; then :
10451  $as_echo_n "(cached) " >&6
10452else
10453  case $UNIQ in
10454  [\\/]* | ?:[\\/]*)
10455  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10456  ;;
10457  *)
10458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10459for as_dir in $PATH
10460do
10461  IFS=$as_save_IFS
10462  test -z "$as_dir" && as_dir=.
10463    for ac_exec_ext in '' $ac_executable_extensions; do
10464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10465    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10467    break 2
10468  fi
10469done
10470  done
10471IFS=$as_save_IFS
10472
10473  ;;
10474esac
10475fi
10476UNIQ=$ac_cv_path_UNIQ
10477if test -n "$UNIQ"; then
10478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10479$as_echo "$UNIQ" >&6; }
10480else
10481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
10483fi
10484
10485
10486  test -n "$UNIQ" && break
10487done
10488
10489  else
10490    # The variable is set, but is it from the command line or the environment?
10491
10492    # Try to remove the string !UNIQ! from our list.
10493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10495      # If it failed, the variable was not from the command line. Ignore it,
10496      # but warn the user (except for BASH, which is always set by the calling BASH).
10497      if test "xUNIQ" != xBASH; then
10498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10499$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10500      fi
10501      # Try to locate tool using the code snippet
10502      for ac_prog in uniq
10503do
10504  # Extract the first word of "$ac_prog", so it can be a program name with args.
10505set dummy $ac_prog; ac_word=$2
10506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10507$as_echo_n "checking for $ac_word... " >&6; }
10508if ${ac_cv_path_UNIQ+:} false; then :
10509  $as_echo_n "(cached) " >&6
10510else
10511  case $UNIQ in
10512  [\\/]* | ?:[\\/]*)
10513  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10514  ;;
10515  *)
10516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10517for as_dir in $PATH
10518do
10519  IFS=$as_save_IFS
10520  test -z "$as_dir" && as_dir=.
10521    for ac_exec_ext in '' $ac_executable_extensions; do
10522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10523    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10525    break 2
10526  fi
10527done
10528  done
10529IFS=$as_save_IFS
10530
10531  ;;
10532esac
10533fi
10534UNIQ=$ac_cv_path_UNIQ
10535if test -n "$UNIQ"; then
10536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10537$as_echo "$UNIQ" >&6; }
10538else
10539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
10541fi
10542
10543
10544  test -n "$UNIQ" && break
10545done
10546
10547    else
10548      # If it succeeded, then it was overridden by the user. We will use it
10549      # for the tool.
10550
10551      # First remove it from the list of overridden variables, so we can test
10552      # for unknown variables in the end.
10553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10554
10555      # Check if the provided tool contains a complete path.
10556      tool_specified="$UNIQ"
10557      tool_basename="${tool_specified##*/}"
10558      if test "x$tool_basename" = "x$tool_specified"; then
10559        # A command without a complete path is provided, search $PATH.
10560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10561$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10562        # Extract the first word of "$tool_basename", so it can be a program name with args.
10563set dummy $tool_basename; ac_word=$2
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10565$as_echo_n "checking for $ac_word... " >&6; }
10566if ${ac_cv_path_UNIQ+:} false; then :
10567  $as_echo_n "(cached) " >&6
10568else
10569  case $UNIQ in
10570  [\\/]* | ?:[\\/]*)
10571  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10572  ;;
10573  *)
10574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10575for as_dir in $PATH
10576do
10577  IFS=$as_save_IFS
10578  test -z "$as_dir" && as_dir=.
10579    for ac_exec_ext in '' $ac_executable_extensions; do
10580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10581    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10583    break 2
10584  fi
10585done
10586  done
10587IFS=$as_save_IFS
10588
10589  ;;
10590esac
10591fi
10592UNIQ=$ac_cv_path_UNIQ
10593if test -n "$UNIQ"; then
10594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10595$as_echo "$UNIQ" >&6; }
10596else
10597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10598$as_echo "no" >&6; }
10599fi
10600
10601
10602        if test "x$UNIQ" = x; then
10603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10604        fi
10605      else
10606        # Otherwise we believe it is a complete path. Use it as it is.
10607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10608$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10610$as_echo_n "checking for UNIQ... " >&6; }
10611        if test ! -x "$tool_specified"; then
10612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10613$as_echo "not found" >&6; }
10614          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10615        fi
10616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10617$as_echo "$tool_specified" >&6; }
10618      fi
10619    fi
10620  fi
10621
10622
10623
10624  if test "x$UNIQ" = x; then
10625    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10626  fi
10627
10628
10629
10630
10631
10632  # Publish this variable in the help.
10633
10634
10635  if test "x$WC" = x; then
10636    # The variable is not set by user, try to locate tool using the code snippet
10637    for ac_prog in wc
10638do
10639  # Extract the first word of "$ac_prog", so it can be a program name with args.
10640set dummy $ac_prog; ac_word=$2
10641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10642$as_echo_n "checking for $ac_word... " >&6; }
10643if ${ac_cv_path_WC+:} false; then :
10644  $as_echo_n "(cached) " >&6
10645else
10646  case $WC in
10647  [\\/]* | ?:[\\/]*)
10648  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10649  ;;
10650  *)
10651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10652for as_dir in $PATH
10653do
10654  IFS=$as_save_IFS
10655  test -z "$as_dir" && as_dir=.
10656    for ac_exec_ext in '' $ac_executable_extensions; do
10657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10658    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10660    break 2
10661  fi
10662done
10663  done
10664IFS=$as_save_IFS
10665
10666  ;;
10667esac
10668fi
10669WC=$ac_cv_path_WC
10670if test -n "$WC"; then
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10672$as_echo "$WC" >&6; }
10673else
10674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
10676fi
10677
10678
10679  test -n "$WC" && break
10680done
10681
10682  else
10683    # The variable is set, but is it from the command line or the environment?
10684
10685    # Try to remove the string !WC! from our list.
10686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10688      # If it failed, the variable was not from the command line. Ignore it,
10689      # but warn the user (except for BASH, which is always set by the calling BASH).
10690      if test "xWC" != xBASH; then
10691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10692$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10693      fi
10694      # Try to locate tool using the code snippet
10695      for ac_prog in wc
10696do
10697  # Extract the first word of "$ac_prog", so it can be a program name with args.
10698set dummy $ac_prog; ac_word=$2
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10700$as_echo_n "checking for $ac_word... " >&6; }
10701if ${ac_cv_path_WC+:} false; then :
10702  $as_echo_n "(cached) " >&6
10703else
10704  case $WC in
10705  [\\/]* | ?:[\\/]*)
10706  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10707  ;;
10708  *)
10709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10710for as_dir in $PATH
10711do
10712  IFS=$as_save_IFS
10713  test -z "$as_dir" && as_dir=.
10714    for ac_exec_ext in '' $ac_executable_extensions; do
10715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10716    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10718    break 2
10719  fi
10720done
10721  done
10722IFS=$as_save_IFS
10723
10724  ;;
10725esac
10726fi
10727WC=$ac_cv_path_WC
10728if test -n "$WC"; then
10729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10730$as_echo "$WC" >&6; }
10731else
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
10734fi
10735
10736
10737  test -n "$WC" && break
10738done
10739
10740    else
10741      # If it succeeded, then it was overridden by the user. We will use it
10742      # for the tool.
10743
10744      # First remove it from the list of overridden variables, so we can test
10745      # for unknown variables in the end.
10746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10747
10748      # Check if the provided tool contains a complete path.
10749      tool_specified="$WC"
10750      tool_basename="${tool_specified##*/}"
10751      if test "x$tool_basename" = "x$tool_specified"; then
10752        # A command without a complete path is provided, search $PATH.
10753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10754$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10755        # Extract the first word of "$tool_basename", so it can be a program name with args.
10756set dummy $tool_basename; ac_word=$2
10757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758$as_echo_n "checking for $ac_word... " >&6; }
10759if ${ac_cv_path_WC+:} false; then :
10760  $as_echo_n "(cached) " >&6
10761else
10762  case $WC in
10763  [\\/]* | ?:[\\/]*)
10764  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10765  ;;
10766  *)
10767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768for as_dir in $PATH
10769do
10770  IFS=$as_save_IFS
10771  test -z "$as_dir" && as_dir=.
10772    for ac_exec_ext in '' $ac_executable_extensions; do
10773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10776    break 2
10777  fi
10778done
10779  done
10780IFS=$as_save_IFS
10781
10782  ;;
10783esac
10784fi
10785WC=$ac_cv_path_WC
10786if test -n "$WC"; then
10787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10788$as_echo "$WC" >&6; }
10789else
10790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791$as_echo "no" >&6; }
10792fi
10793
10794
10795        if test "x$WC" = x; then
10796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10797        fi
10798      else
10799        # Otherwise we believe it is a complete path. Use it as it is.
10800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10801$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10803$as_echo_n "checking for WC... " >&6; }
10804        if test ! -x "$tool_specified"; then
10805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10806$as_echo "not found" >&6; }
10807          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10808        fi
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10810$as_echo "$tool_specified" >&6; }
10811      fi
10812    fi
10813  fi
10814
10815
10816
10817  if test "x$WC" = x; then
10818    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10819  fi
10820
10821
10822
10823
10824
10825  # Publish this variable in the help.
10826
10827
10828  if test "x$WHICH" = x; then
10829    # The variable is not set by user, try to locate tool using the code snippet
10830    for ac_prog in which
10831do
10832  # Extract the first word of "$ac_prog", so it can be a program name with args.
10833set dummy $ac_prog; ac_word=$2
10834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10835$as_echo_n "checking for $ac_word... " >&6; }
10836if ${ac_cv_path_WHICH+:} false; then :
10837  $as_echo_n "(cached) " >&6
10838else
10839  case $WHICH in
10840  [\\/]* | ?:[\\/]*)
10841  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10842  ;;
10843  *)
10844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10845for as_dir in $PATH
10846do
10847  IFS=$as_save_IFS
10848  test -z "$as_dir" && as_dir=.
10849    for ac_exec_ext in '' $ac_executable_extensions; do
10850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10851    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10853    break 2
10854  fi
10855done
10856  done
10857IFS=$as_save_IFS
10858
10859  ;;
10860esac
10861fi
10862WHICH=$ac_cv_path_WHICH
10863if test -n "$WHICH"; then
10864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10865$as_echo "$WHICH" >&6; }
10866else
10867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868$as_echo "no" >&6; }
10869fi
10870
10871
10872  test -n "$WHICH" && break
10873done
10874
10875  else
10876    # The variable is set, but is it from the command line or the environment?
10877
10878    # Try to remove the string !WHICH! from our list.
10879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10881      # If it failed, the variable was not from the command line. Ignore it,
10882      # but warn the user (except for BASH, which is always set by the calling BASH).
10883      if test "xWHICH" != xBASH; then
10884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10885$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10886      fi
10887      # Try to locate tool using the code snippet
10888      for ac_prog in which
10889do
10890  # Extract the first word of "$ac_prog", so it can be a program name with args.
10891set dummy $ac_prog; ac_word=$2
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10893$as_echo_n "checking for $ac_word... " >&6; }
10894if ${ac_cv_path_WHICH+:} false; then :
10895  $as_echo_n "(cached) " >&6
10896else
10897  case $WHICH in
10898  [\\/]* | ?:[\\/]*)
10899  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10900  ;;
10901  *)
10902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10903for as_dir in $PATH
10904do
10905  IFS=$as_save_IFS
10906  test -z "$as_dir" && as_dir=.
10907    for ac_exec_ext in '' $ac_executable_extensions; do
10908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10909    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10911    break 2
10912  fi
10913done
10914  done
10915IFS=$as_save_IFS
10916
10917  ;;
10918esac
10919fi
10920WHICH=$ac_cv_path_WHICH
10921if test -n "$WHICH"; then
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10923$as_echo "$WHICH" >&6; }
10924else
10925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
10927fi
10928
10929
10930  test -n "$WHICH" && break
10931done
10932
10933    else
10934      # If it succeeded, then it was overridden by the user. We will use it
10935      # for the tool.
10936
10937      # First remove it from the list of overridden variables, so we can test
10938      # for unknown variables in the end.
10939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10940
10941      # Check if the provided tool contains a complete path.
10942      tool_specified="$WHICH"
10943      tool_basename="${tool_specified##*/}"
10944      if test "x$tool_basename" = "x$tool_specified"; then
10945        # A command without a complete path is provided, search $PATH.
10946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
10947$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
10948        # Extract the first word of "$tool_basename", so it can be a program name with args.
10949set dummy $tool_basename; ac_word=$2
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10951$as_echo_n "checking for $ac_word... " >&6; }
10952if ${ac_cv_path_WHICH+:} false; then :
10953  $as_echo_n "(cached) " >&6
10954else
10955  case $WHICH in
10956  [\\/]* | ?:[\\/]*)
10957  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10958  ;;
10959  *)
10960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10961for as_dir in $PATH
10962do
10963  IFS=$as_save_IFS
10964  test -z "$as_dir" && as_dir=.
10965    for ac_exec_ext in '' $ac_executable_extensions; do
10966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10967    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10969    break 2
10970  fi
10971done
10972  done
10973IFS=$as_save_IFS
10974
10975  ;;
10976esac
10977fi
10978WHICH=$ac_cv_path_WHICH
10979if test -n "$WHICH"; then
10980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10981$as_echo "$WHICH" >&6; }
10982else
10983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
10985fi
10986
10987
10988        if test "x$WHICH" = x; then
10989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10990        fi
10991      else
10992        # Otherwise we believe it is a complete path. Use it as it is.
10993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
10994$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
10995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
10996$as_echo_n "checking for WHICH... " >&6; }
10997        if test ! -x "$tool_specified"; then
10998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10999$as_echo "not found" >&6; }
11000          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11001        fi
11002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11003$as_echo "$tool_specified" >&6; }
11004      fi
11005    fi
11006  fi
11007
11008
11009
11010  if test "x$WHICH" = x; then
11011    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11012  fi
11013
11014
11015
11016
11017
11018  # Publish this variable in the help.
11019
11020
11021  if test "x$XARGS" = x; then
11022    # The variable is not set by user, try to locate tool using the code snippet
11023    for ac_prog in xargs
11024do
11025  # Extract the first word of "$ac_prog", so it can be a program name with args.
11026set dummy $ac_prog; ac_word=$2
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11028$as_echo_n "checking for $ac_word... " >&6; }
11029if ${ac_cv_path_XARGS+:} false; then :
11030  $as_echo_n "(cached) " >&6
11031else
11032  case $XARGS in
11033  [\\/]* | ?:[\\/]*)
11034  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11035  ;;
11036  *)
11037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11038for as_dir in $PATH
11039do
11040  IFS=$as_save_IFS
11041  test -z "$as_dir" && as_dir=.
11042    for ac_exec_ext in '' $ac_executable_extensions; do
11043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11044    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11046    break 2
11047  fi
11048done
11049  done
11050IFS=$as_save_IFS
11051
11052  ;;
11053esac
11054fi
11055XARGS=$ac_cv_path_XARGS
11056if test -n "$XARGS"; then
11057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11058$as_echo "$XARGS" >&6; }
11059else
11060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061$as_echo "no" >&6; }
11062fi
11063
11064
11065  test -n "$XARGS" && break
11066done
11067
11068  else
11069    # The variable is set, but is it from the command line or the environment?
11070
11071    # Try to remove the string !XARGS! from our list.
11072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11074      # If it failed, the variable was not from the command line. Ignore it,
11075      # but warn the user (except for BASH, which is always set by the calling BASH).
11076      if test "xXARGS" != xBASH; then
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11078$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11079      fi
11080      # Try to locate tool using the code snippet
11081      for ac_prog in xargs
11082do
11083  # Extract the first word of "$ac_prog", so it can be a program name with args.
11084set dummy $ac_prog; ac_word=$2
11085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11086$as_echo_n "checking for $ac_word... " >&6; }
11087if ${ac_cv_path_XARGS+:} false; then :
11088  $as_echo_n "(cached) " >&6
11089else
11090  case $XARGS in
11091  [\\/]* | ?:[\\/]*)
11092  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11093  ;;
11094  *)
11095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11096for as_dir in $PATH
11097do
11098  IFS=$as_save_IFS
11099  test -z "$as_dir" && as_dir=.
11100    for ac_exec_ext in '' $ac_executable_extensions; do
11101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11102    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11104    break 2
11105  fi
11106done
11107  done
11108IFS=$as_save_IFS
11109
11110  ;;
11111esac
11112fi
11113XARGS=$ac_cv_path_XARGS
11114if test -n "$XARGS"; then
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11116$as_echo "$XARGS" >&6; }
11117else
11118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11119$as_echo "no" >&6; }
11120fi
11121
11122
11123  test -n "$XARGS" && break
11124done
11125
11126    else
11127      # If it succeeded, then it was overridden by the user. We will use it
11128      # for the tool.
11129
11130      # First remove it from the list of overridden variables, so we can test
11131      # for unknown variables in the end.
11132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11133
11134      # Check if the provided tool contains a complete path.
11135      tool_specified="$XARGS"
11136      tool_basename="${tool_specified##*/}"
11137      if test "x$tool_basename" = "x$tool_specified"; then
11138        # A command without a complete path is provided, search $PATH.
11139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11140$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11141        # Extract the first word of "$tool_basename", so it can be a program name with args.
11142set dummy $tool_basename; ac_word=$2
11143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11144$as_echo_n "checking for $ac_word... " >&6; }
11145if ${ac_cv_path_XARGS+:} false; then :
11146  $as_echo_n "(cached) " >&6
11147else
11148  case $XARGS in
11149  [\\/]* | ?:[\\/]*)
11150  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11151  ;;
11152  *)
11153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11154for as_dir in $PATH
11155do
11156  IFS=$as_save_IFS
11157  test -z "$as_dir" && as_dir=.
11158    for ac_exec_ext in '' $ac_executable_extensions; do
11159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11160    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11162    break 2
11163  fi
11164done
11165  done
11166IFS=$as_save_IFS
11167
11168  ;;
11169esac
11170fi
11171XARGS=$ac_cv_path_XARGS
11172if test -n "$XARGS"; then
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11174$as_echo "$XARGS" >&6; }
11175else
11176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
11178fi
11179
11180
11181        if test "x$XARGS" = x; then
11182          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11183        fi
11184      else
11185        # Otherwise we believe it is a complete path. Use it as it is.
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11187$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11189$as_echo_n "checking for XARGS... " >&6; }
11190        if test ! -x "$tool_specified"; then
11191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11192$as_echo "not found" >&6; }
11193          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11194        fi
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11196$as_echo "$tool_specified" >&6; }
11197      fi
11198    fi
11199  fi
11200
11201
11202
11203  if test "x$XARGS" = x; then
11204    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11205  fi
11206
11207
11208
11209  # Then required tools that require some special treatment.
11210
11211
11212  # Publish this variable in the help.
11213
11214
11215  if test "x$AWK" = x; then
11216    # The variable is not set by user, try to locate tool using the code snippet
11217    for ac_prog in gawk mawk nawk awk
11218do
11219  # Extract the first word of "$ac_prog", so it can be a program name with args.
11220set dummy $ac_prog; ac_word=$2
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11222$as_echo_n "checking for $ac_word... " >&6; }
11223if ${ac_cv_prog_AWK+:} false; then :
11224  $as_echo_n "(cached) " >&6
11225else
11226  if test -n "$AWK"; then
11227  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11228else
11229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11230for as_dir in $PATH
11231do
11232  IFS=$as_save_IFS
11233  test -z "$as_dir" && as_dir=.
11234    for ac_exec_ext in '' $ac_executable_extensions; do
11235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11236    ac_cv_prog_AWK="$ac_prog"
11237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11238    break 2
11239  fi
11240done
11241  done
11242IFS=$as_save_IFS
11243
11244fi
11245fi
11246AWK=$ac_cv_prog_AWK
11247if test -n "$AWK"; then
11248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11249$as_echo "$AWK" >&6; }
11250else
11251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11252$as_echo "no" >&6; }
11253fi
11254
11255
11256  test -n "$AWK" && break
11257done
11258
11259  else
11260    # The variable is set, but is it from the command line or the environment?
11261
11262    # Try to remove the string !AWK! from our list.
11263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11265      # If it failed, the variable was not from the command line. Ignore it,
11266      # but warn the user (except for BASH, which is always set by the calling BASH).
11267      if test "xAWK" != xBASH; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11269$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11270      fi
11271      # Try to locate tool using the code snippet
11272      for ac_prog in gawk mawk nawk awk
11273do
11274  # Extract the first word of "$ac_prog", so it can be a program name with args.
11275set dummy $ac_prog; ac_word=$2
11276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11277$as_echo_n "checking for $ac_word... " >&6; }
11278if ${ac_cv_prog_AWK+:} false; then :
11279  $as_echo_n "(cached) " >&6
11280else
11281  if test -n "$AWK"; then
11282  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11283else
11284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11285for as_dir in $PATH
11286do
11287  IFS=$as_save_IFS
11288  test -z "$as_dir" && as_dir=.
11289    for ac_exec_ext in '' $ac_executable_extensions; do
11290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11291    ac_cv_prog_AWK="$ac_prog"
11292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11293    break 2
11294  fi
11295done
11296  done
11297IFS=$as_save_IFS
11298
11299fi
11300fi
11301AWK=$ac_cv_prog_AWK
11302if test -n "$AWK"; then
11303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11304$as_echo "$AWK" >&6; }
11305else
11306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
11308fi
11309
11310
11311  test -n "$AWK" && break
11312done
11313
11314    else
11315      # If it succeeded, then it was overridden by the user. We will use it
11316      # for the tool.
11317
11318      # First remove it from the list of overridden variables, so we can test
11319      # for unknown variables in the end.
11320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11321
11322      # Check if the provided tool contains a complete path.
11323      tool_specified="$AWK"
11324      tool_basename="${tool_specified##*/}"
11325      if test "x$tool_basename" = "x$tool_specified"; then
11326        # A command without a complete path is provided, search $PATH.
11327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11328$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11329        # Extract the first word of "$tool_basename", so it can be a program name with args.
11330set dummy $tool_basename; ac_word=$2
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11332$as_echo_n "checking for $ac_word... " >&6; }
11333if ${ac_cv_path_AWK+:} false; then :
11334  $as_echo_n "(cached) " >&6
11335else
11336  case $AWK in
11337  [\\/]* | ?:[\\/]*)
11338  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11339  ;;
11340  *)
11341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11342for as_dir in $PATH
11343do
11344  IFS=$as_save_IFS
11345  test -z "$as_dir" && as_dir=.
11346    for ac_exec_ext in '' $ac_executable_extensions; do
11347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11348    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11350    break 2
11351  fi
11352done
11353  done
11354IFS=$as_save_IFS
11355
11356  ;;
11357esac
11358fi
11359AWK=$ac_cv_path_AWK
11360if test -n "$AWK"; then
11361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11362$as_echo "$AWK" >&6; }
11363else
11364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
11366fi
11367
11368
11369        if test "x$AWK" = x; then
11370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11371        fi
11372      else
11373        # Otherwise we believe it is a complete path. Use it as it is.
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11375$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11377$as_echo_n "checking for AWK... " >&6; }
11378        if test ! -x "$tool_specified"; then
11379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11380$as_echo "not found" >&6; }
11381          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11382        fi
11383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11384$as_echo "$tool_specified" >&6; }
11385      fi
11386    fi
11387  fi
11388
11389
11390  if test "x$AWK" = x; then
11391    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11392  fi
11393
11394
11395
11396
11397  # Publish this variable in the help.
11398
11399
11400  if test "x$GREP" = x; then
11401    # The variable is not set by user, try to locate tool using the code snippet
11402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11403$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11404if ${ac_cv_path_GREP+:} false; then :
11405  $as_echo_n "(cached) " >&6
11406else
11407  if test -z "$GREP"; then
11408  ac_path_GREP_found=false
11409  # Loop through the user's path and test for each of PROGNAME-LIST
11410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11412do
11413  IFS=$as_save_IFS
11414  test -z "$as_dir" && as_dir=.
11415    for ac_prog in grep ggrep; do
11416    for ac_exec_ext in '' $ac_executable_extensions; do
11417      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11418      as_fn_executable_p "$ac_path_GREP" || continue
11419# Check for GNU ac_path_GREP and select it if it is found.
11420  # Check for GNU $ac_path_GREP
11421case `"$ac_path_GREP" --version 2>&1` in
11422*GNU*)
11423  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11424*)
11425  ac_count=0
11426  $as_echo_n 0123456789 >"conftest.in"
11427  while :
11428  do
11429    cat "conftest.in" "conftest.in" >"conftest.tmp"
11430    mv "conftest.tmp" "conftest.in"
11431    cp "conftest.in" "conftest.nl"
11432    $as_echo 'GREP' >> "conftest.nl"
11433    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11435    as_fn_arith $ac_count + 1 && ac_count=$as_val
11436    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11437      # Best one so far, save it but keep looking for a better one
11438      ac_cv_path_GREP="$ac_path_GREP"
11439      ac_path_GREP_max=$ac_count
11440    fi
11441    # 10*(2^10) chars as input seems more than enough
11442    test $ac_count -gt 10 && break
11443  done
11444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11445esac
11446
11447      $ac_path_GREP_found && break 3
11448    done
11449  done
11450  done
11451IFS=$as_save_IFS
11452  if test -z "$ac_cv_path_GREP"; then
11453    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11454  fi
11455else
11456  ac_cv_path_GREP=$GREP
11457fi
11458
11459fi
11460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11461$as_echo "$ac_cv_path_GREP" >&6; }
11462 GREP="$ac_cv_path_GREP"
11463
11464
11465  else
11466    # The variable is set, but is it from the command line or the environment?
11467
11468    # Try to remove the string !GREP! from our list.
11469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11471      # If it failed, the variable was not from the command line. Ignore it,
11472      # but warn the user (except for BASH, which is always set by the calling BASH).
11473      if test "xGREP" != xBASH; then
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11475$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11476      fi
11477      # Try to locate tool using the code snippet
11478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11479$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11480if ${ac_cv_path_GREP+:} false; then :
11481  $as_echo_n "(cached) " >&6
11482else
11483  if test -z "$GREP"; then
11484  ac_path_GREP_found=false
11485  # Loop through the user's path and test for each of PROGNAME-LIST
11486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11488do
11489  IFS=$as_save_IFS
11490  test -z "$as_dir" && as_dir=.
11491    for ac_prog in grep ggrep; do
11492    for ac_exec_ext in '' $ac_executable_extensions; do
11493      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11494      as_fn_executable_p "$ac_path_GREP" || continue
11495# Check for GNU ac_path_GREP and select it if it is found.
11496  # Check for GNU $ac_path_GREP
11497case `"$ac_path_GREP" --version 2>&1` in
11498*GNU*)
11499  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11500*)
11501  ac_count=0
11502  $as_echo_n 0123456789 >"conftest.in"
11503  while :
11504  do
11505    cat "conftest.in" "conftest.in" >"conftest.tmp"
11506    mv "conftest.tmp" "conftest.in"
11507    cp "conftest.in" "conftest.nl"
11508    $as_echo 'GREP' >> "conftest.nl"
11509    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11510    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11511    as_fn_arith $ac_count + 1 && ac_count=$as_val
11512    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11513      # Best one so far, save it but keep looking for a better one
11514      ac_cv_path_GREP="$ac_path_GREP"
11515      ac_path_GREP_max=$ac_count
11516    fi
11517    # 10*(2^10) chars as input seems more than enough
11518    test $ac_count -gt 10 && break
11519  done
11520  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11521esac
11522
11523      $ac_path_GREP_found && break 3
11524    done
11525  done
11526  done
11527IFS=$as_save_IFS
11528  if test -z "$ac_cv_path_GREP"; then
11529    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11530  fi
11531else
11532  ac_cv_path_GREP=$GREP
11533fi
11534
11535fi
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11537$as_echo "$ac_cv_path_GREP" >&6; }
11538 GREP="$ac_cv_path_GREP"
11539
11540
11541    else
11542      # If it succeeded, then it was overridden by the user. We will use it
11543      # for the tool.
11544
11545      # First remove it from the list of overridden variables, so we can test
11546      # for unknown variables in the end.
11547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11548
11549      # Check if the provided tool contains a complete path.
11550      tool_specified="$GREP"
11551      tool_basename="${tool_specified##*/}"
11552      if test "x$tool_basename" = "x$tool_specified"; then
11553        # A command without a complete path is provided, search $PATH.
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11555$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11556        # Extract the first word of "$tool_basename", so it can be a program name with args.
11557set dummy $tool_basename; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_GREP+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $GREP in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586GREP=$ac_cv_path_GREP
11587if test -n "$GREP"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11589$as_echo "$GREP" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596        if test "x$GREP" = x; then
11597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11598        fi
11599      else
11600        # Otherwise we believe it is a complete path. Use it as it is.
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11602$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11604$as_echo_n "checking for GREP... " >&6; }
11605        if test ! -x "$tool_specified"; then
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11607$as_echo "not found" >&6; }
11608          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11609        fi
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11611$as_echo "$tool_specified" >&6; }
11612      fi
11613    fi
11614  fi
11615
11616
11617  if test "x$GREP" = x; then
11618    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11619  fi
11620
11621
11622
11623
11624  # Publish this variable in the help.
11625
11626
11627  if test "x$EGREP" = x; then
11628    # The variable is not set by user, try to locate tool using the code snippet
11629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11630$as_echo_n "checking for egrep... " >&6; }
11631if ${ac_cv_path_EGREP+:} false; then :
11632  $as_echo_n "(cached) " >&6
11633else
11634  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11635   then ac_cv_path_EGREP="$GREP -E"
11636   else
11637     if test -z "$EGREP"; then
11638  ac_path_EGREP_found=false
11639  # Loop through the user's path and test for each of PROGNAME-LIST
11640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11641for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11642do
11643  IFS=$as_save_IFS
11644  test -z "$as_dir" && as_dir=.
11645    for ac_prog in egrep; do
11646    for ac_exec_ext in '' $ac_executable_extensions; do
11647      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11648      as_fn_executable_p "$ac_path_EGREP" || continue
11649# Check for GNU ac_path_EGREP and select it if it is found.
11650  # Check for GNU $ac_path_EGREP
11651case `"$ac_path_EGREP" --version 2>&1` in
11652*GNU*)
11653  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11654*)
11655  ac_count=0
11656  $as_echo_n 0123456789 >"conftest.in"
11657  while :
11658  do
11659    cat "conftest.in" "conftest.in" >"conftest.tmp"
11660    mv "conftest.tmp" "conftest.in"
11661    cp "conftest.in" "conftest.nl"
11662    $as_echo 'EGREP' >> "conftest.nl"
11663    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11664    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11665    as_fn_arith $ac_count + 1 && ac_count=$as_val
11666    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11667      # Best one so far, save it but keep looking for a better one
11668      ac_cv_path_EGREP="$ac_path_EGREP"
11669      ac_path_EGREP_max=$ac_count
11670    fi
11671    # 10*(2^10) chars as input seems more than enough
11672    test $ac_count -gt 10 && break
11673  done
11674  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11675esac
11676
11677      $ac_path_EGREP_found && break 3
11678    done
11679  done
11680  done
11681IFS=$as_save_IFS
11682  if test -z "$ac_cv_path_EGREP"; then
11683    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11684  fi
11685else
11686  ac_cv_path_EGREP=$EGREP
11687fi
11688
11689   fi
11690fi
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11692$as_echo "$ac_cv_path_EGREP" >&6; }
11693 EGREP="$ac_cv_path_EGREP"
11694
11695
11696  else
11697    # The variable is set, but is it from the command line or the environment?
11698
11699    # Try to remove the string !EGREP! from our list.
11700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11702      # If it failed, the variable was not from the command line. Ignore it,
11703      # but warn the user (except for BASH, which is always set by the calling BASH).
11704      if test "xEGREP" != xBASH; then
11705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11706$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11707      fi
11708      # Try to locate tool using the code snippet
11709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11710$as_echo_n "checking for egrep... " >&6; }
11711if ${ac_cv_path_EGREP+:} false; then :
11712  $as_echo_n "(cached) " >&6
11713else
11714  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11715   then ac_cv_path_EGREP="$GREP -E"
11716   else
11717     if test -z "$EGREP"; then
11718  ac_path_EGREP_found=false
11719  # Loop through the user's path and test for each of PROGNAME-LIST
11720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11721for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11722do
11723  IFS=$as_save_IFS
11724  test -z "$as_dir" && as_dir=.
11725    for ac_prog in egrep; do
11726    for ac_exec_ext in '' $ac_executable_extensions; do
11727      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11728      as_fn_executable_p "$ac_path_EGREP" || continue
11729# Check for GNU ac_path_EGREP and select it if it is found.
11730  # Check for GNU $ac_path_EGREP
11731case `"$ac_path_EGREP" --version 2>&1` in
11732*GNU*)
11733  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11734*)
11735  ac_count=0
11736  $as_echo_n 0123456789 >"conftest.in"
11737  while :
11738  do
11739    cat "conftest.in" "conftest.in" >"conftest.tmp"
11740    mv "conftest.tmp" "conftest.in"
11741    cp "conftest.in" "conftest.nl"
11742    $as_echo 'EGREP' >> "conftest.nl"
11743    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11744    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11745    as_fn_arith $ac_count + 1 && ac_count=$as_val
11746    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11747      # Best one so far, save it but keep looking for a better one
11748      ac_cv_path_EGREP="$ac_path_EGREP"
11749      ac_path_EGREP_max=$ac_count
11750    fi
11751    # 10*(2^10) chars as input seems more than enough
11752    test $ac_count -gt 10 && break
11753  done
11754  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11755esac
11756
11757      $ac_path_EGREP_found && break 3
11758    done
11759  done
11760  done
11761IFS=$as_save_IFS
11762  if test -z "$ac_cv_path_EGREP"; then
11763    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11764  fi
11765else
11766  ac_cv_path_EGREP=$EGREP
11767fi
11768
11769   fi
11770fi
11771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11772$as_echo "$ac_cv_path_EGREP" >&6; }
11773 EGREP="$ac_cv_path_EGREP"
11774
11775
11776    else
11777      # If it succeeded, then it was overridden by the user. We will use it
11778      # for the tool.
11779
11780      # First remove it from the list of overridden variables, so we can test
11781      # for unknown variables in the end.
11782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11783
11784      # Check if the provided tool contains a complete path.
11785      tool_specified="$EGREP"
11786      tool_basename="${tool_specified##*/}"
11787      if test "x$tool_basename" = "x$tool_specified"; then
11788        # A command without a complete path is provided, search $PATH.
11789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11790$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11791        # Extract the first word of "$tool_basename", so it can be a program name with args.
11792set dummy $tool_basename; ac_word=$2
11793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11794$as_echo_n "checking for $ac_word... " >&6; }
11795if ${ac_cv_path_EGREP+:} false; then :
11796  $as_echo_n "(cached) " >&6
11797else
11798  case $EGREP in
11799  [\\/]* | ?:[\\/]*)
11800  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11801  ;;
11802  *)
11803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11804for as_dir in $PATH
11805do
11806  IFS=$as_save_IFS
11807  test -z "$as_dir" && as_dir=.
11808    for ac_exec_ext in '' $ac_executable_extensions; do
11809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11810    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11812    break 2
11813  fi
11814done
11815  done
11816IFS=$as_save_IFS
11817
11818  ;;
11819esac
11820fi
11821EGREP=$ac_cv_path_EGREP
11822if test -n "$EGREP"; then
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11824$as_echo "$EGREP" >&6; }
11825else
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11827$as_echo "no" >&6; }
11828fi
11829
11830
11831        if test "x$EGREP" = x; then
11832          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11833        fi
11834      else
11835        # Otherwise we believe it is a complete path. Use it as it is.
11836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11837$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11839$as_echo_n "checking for EGREP... " >&6; }
11840        if test ! -x "$tool_specified"; then
11841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11842$as_echo "not found" >&6; }
11843          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11844        fi
11845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11846$as_echo "$tool_specified" >&6; }
11847      fi
11848    fi
11849  fi
11850
11851
11852  if test "x$EGREP" = x; then
11853    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11854  fi
11855
11856
11857
11858
11859  # Publish this variable in the help.
11860
11861
11862  if test "x$FGREP" = x; then
11863    # The variable is not set by user, try to locate tool using the code snippet
11864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11865$as_echo_n "checking for fgrep... " >&6; }
11866if ${ac_cv_path_FGREP+:} false; then :
11867  $as_echo_n "(cached) " >&6
11868else
11869  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11870   then ac_cv_path_FGREP="$GREP -F"
11871   else
11872     if test -z "$FGREP"; then
11873  ac_path_FGREP_found=false
11874  # Loop through the user's path and test for each of PROGNAME-LIST
11875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11876for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11877do
11878  IFS=$as_save_IFS
11879  test -z "$as_dir" && as_dir=.
11880    for ac_prog in fgrep; do
11881    for ac_exec_ext in '' $ac_executable_extensions; do
11882      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11883      as_fn_executable_p "$ac_path_FGREP" || continue
11884# Check for GNU ac_path_FGREP and select it if it is found.
11885  # Check for GNU $ac_path_FGREP
11886case `"$ac_path_FGREP" --version 2>&1` in
11887*GNU*)
11888  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11889*)
11890  ac_count=0
11891  $as_echo_n 0123456789 >"conftest.in"
11892  while :
11893  do
11894    cat "conftest.in" "conftest.in" >"conftest.tmp"
11895    mv "conftest.tmp" "conftest.in"
11896    cp "conftest.in" "conftest.nl"
11897    $as_echo 'FGREP' >> "conftest.nl"
11898    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11899    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11900    as_fn_arith $ac_count + 1 && ac_count=$as_val
11901    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11902      # Best one so far, save it but keep looking for a better one
11903      ac_cv_path_FGREP="$ac_path_FGREP"
11904      ac_path_FGREP_max=$ac_count
11905    fi
11906    # 10*(2^10) chars as input seems more than enough
11907    test $ac_count -gt 10 && break
11908  done
11909  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11910esac
11911
11912      $ac_path_FGREP_found && break 3
11913    done
11914  done
11915  done
11916IFS=$as_save_IFS
11917  if test -z "$ac_cv_path_FGREP"; then
11918    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11919  fi
11920else
11921  ac_cv_path_FGREP=$FGREP
11922fi
11923
11924   fi
11925fi
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11927$as_echo "$ac_cv_path_FGREP" >&6; }
11928 FGREP="$ac_cv_path_FGREP"
11929
11930
11931  else
11932    # The variable is set, but is it from the command line or the environment?
11933
11934    # Try to remove the string !FGREP! from our list.
11935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
11936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11937      # If it failed, the variable was not from the command line. Ignore it,
11938      # but warn the user (except for BASH, which is always set by the calling BASH).
11939      if test "xFGREP" != xBASH; then
11940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
11941$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
11942      fi
11943      # Try to locate tool using the code snippet
11944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11945$as_echo_n "checking for fgrep... " >&6; }
11946if ${ac_cv_path_FGREP+:} false; then :
11947  $as_echo_n "(cached) " >&6
11948else
11949  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11950   then ac_cv_path_FGREP="$GREP -F"
11951   else
11952     if test -z "$FGREP"; then
11953  ac_path_FGREP_found=false
11954  # Loop through the user's path and test for each of PROGNAME-LIST
11955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11956for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11957do
11958  IFS=$as_save_IFS
11959  test -z "$as_dir" && as_dir=.
11960    for ac_prog in fgrep; do
11961    for ac_exec_ext in '' $ac_executable_extensions; do
11962      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11963      as_fn_executable_p "$ac_path_FGREP" || continue
11964# Check for GNU ac_path_FGREP and select it if it is found.
11965  # Check for GNU $ac_path_FGREP
11966case `"$ac_path_FGREP" --version 2>&1` in
11967*GNU*)
11968  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11969*)
11970  ac_count=0
11971  $as_echo_n 0123456789 >"conftest.in"
11972  while :
11973  do
11974    cat "conftest.in" "conftest.in" >"conftest.tmp"
11975    mv "conftest.tmp" "conftest.in"
11976    cp "conftest.in" "conftest.nl"
11977    $as_echo 'FGREP' >> "conftest.nl"
11978    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11979    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11980    as_fn_arith $ac_count + 1 && ac_count=$as_val
11981    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11982      # Best one so far, save it but keep looking for a better one
11983      ac_cv_path_FGREP="$ac_path_FGREP"
11984      ac_path_FGREP_max=$ac_count
11985    fi
11986    # 10*(2^10) chars as input seems more than enough
11987    test $ac_count -gt 10 && break
11988  done
11989  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11990esac
11991
11992      $ac_path_FGREP_found && break 3
11993    done
11994  done
11995  done
11996IFS=$as_save_IFS
11997  if test -z "$ac_cv_path_FGREP"; then
11998    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11999  fi
12000else
12001  ac_cv_path_FGREP=$FGREP
12002fi
12003
12004   fi
12005fi
12006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12007$as_echo "$ac_cv_path_FGREP" >&6; }
12008 FGREP="$ac_cv_path_FGREP"
12009
12010
12011    else
12012      # If it succeeded, then it was overridden by the user. We will use it
12013      # for the tool.
12014
12015      # First remove it from the list of overridden variables, so we can test
12016      # for unknown variables in the end.
12017      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12018
12019      # Check if the provided tool contains a complete path.
12020      tool_specified="$FGREP"
12021      tool_basename="${tool_specified##*/}"
12022      if test "x$tool_basename" = "x$tool_specified"; then
12023        # A command without a complete path is provided, search $PATH.
12024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12025$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12026        # Extract the first word of "$tool_basename", so it can be a program name with args.
12027set dummy $tool_basename; ac_word=$2
12028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12029$as_echo_n "checking for $ac_word... " >&6; }
12030if ${ac_cv_path_FGREP+:} false; then :
12031  $as_echo_n "(cached) " >&6
12032else
12033  case $FGREP in
12034  [\\/]* | ?:[\\/]*)
12035  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12036  ;;
12037  *)
12038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12039for as_dir in $PATH
12040do
12041  IFS=$as_save_IFS
12042  test -z "$as_dir" && as_dir=.
12043    for ac_exec_ext in '' $ac_executable_extensions; do
12044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12045    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12047    break 2
12048  fi
12049done
12050  done
12051IFS=$as_save_IFS
12052
12053  ;;
12054esac
12055fi
12056FGREP=$ac_cv_path_FGREP
12057if test -n "$FGREP"; then
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12059$as_echo "$FGREP" >&6; }
12060else
12061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
12063fi
12064
12065
12066        if test "x$FGREP" = x; then
12067          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12068        fi
12069      else
12070        # Otherwise we believe it is a complete path. Use it as it is.
12071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12072$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12074$as_echo_n "checking for FGREP... " >&6; }
12075        if test ! -x "$tool_specified"; then
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12077$as_echo "not found" >&6; }
12078          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12079        fi
12080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12081$as_echo "$tool_specified" >&6; }
12082      fi
12083    fi
12084  fi
12085
12086
12087  if test "x$FGREP" = x; then
12088    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12089  fi
12090
12091
12092
12093
12094  # Publish this variable in the help.
12095
12096
12097  if test "x$SED" = x; then
12098    # The variable is not set by user, try to locate tool using the code snippet
12099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12100$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12101if ${ac_cv_path_SED+:} false; then :
12102  $as_echo_n "(cached) " >&6
12103else
12104            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12105     for ac_i in 1 2 3 4 5 6 7; do
12106       ac_script="$ac_script$as_nl$ac_script"
12107     done
12108     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12109     { ac_script=; unset ac_script;}
12110     if test -z "$SED"; then
12111  ac_path_SED_found=false
12112  # Loop through the user's path and test for each of PROGNAME-LIST
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_prog in sed gsed; do
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12121      as_fn_executable_p "$ac_path_SED" || continue
12122# Check for GNU ac_path_SED and select it if it is found.
12123  # Check for GNU $ac_path_SED
12124case `"$ac_path_SED" --version 2>&1` in
12125*GNU*)
12126  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12127*)
12128  ac_count=0
12129  $as_echo_n 0123456789 >"conftest.in"
12130  while :
12131  do
12132    cat "conftest.in" "conftest.in" >"conftest.tmp"
12133    mv "conftest.tmp" "conftest.in"
12134    cp "conftest.in" "conftest.nl"
12135    $as_echo '' >> "conftest.nl"
12136    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12138    as_fn_arith $ac_count + 1 && ac_count=$as_val
12139    if test $ac_count -gt ${ac_path_SED_max-0}; then
12140      # Best one so far, save it but keep looking for a better one
12141      ac_cv_path_SED="$ac_path_SED"
12142      ac_path_SED_max=$ac_count
12143    fi
12144    # 10*(2^10) chars as input seems more than enough
12145    test $ac_count -gt 10 && break
12146  done
12147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12148esac
12149
12150      $ac_path_SED_found && break 3
12151    done
12152  done
12153  done
12154IFS=$as_save_IFS
12155  if test -z "$ac_cv_path_SED"; then
12156    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12157  fi
12158else
12159  ac_cv_path_SED=$SED
12160fi
12161
12162fi
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12164$as_echo "$ac_cv_path_SED" >&6; }
12165 SED="$ac_cv_path_SED"
12166  rm -f conftest.sed
12167
12168  else
12169    # The variable is set, but is it from the command line or the environment?
12170
12171    # Try to remove the string !SED! from our list.
12172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12174      # If it failed, the variable was not from the command line. Ignore it,
12175      # but warn the user (except for BASH, which is always set by the calling BASH).
12176      if test "xSED" != xBASH; then
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12178$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12179      fi
12180      # Try to locate tool using the code snippet
12181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12182$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12183if ${ac_cv_path_SED+:} false; then :
12184  $as_echo_n "(cached) " >&6
12185else
12186            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12187     for ac_i in 1 2 3 4 5 6 7; do
12188       ac_script="$ac_script$as_nl$ac_script"
12189     done
12190     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12191     { ac_script=; unset ac_script;}
12192     if test -z "$SED"; then
12193  ac_path_SED_found=false
12194  # Loop through the user's path and test for each of PROGNAME-LIST
12195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196for as_dir in $PATH
12197do
12198  IFS=$as_save_IFS
12199  test -z "$as_dir" && as_dir=.
12200    for ac_prog in sed gsed; do
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12203      as_fn_executable_p "$ac_path_SED" || continue
12204# Check for GNU ac_path_SED and select it if it is found.
12205  # Check for GNU $ac_path_SED
12206case `"$ac_path_SED" --version 2>&1` in
12207*GNU*)
12208  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12209*)
12210  ac_count=0
12211  $as_echo_n 0123456789 >"conftest.in"
12212  while :
12213  do
12214    cat "conftest.in" "conftest.in" >"conftest.tmp"
12215    mv "conftest.tmp" "conftest.in"
12216    cp "conftest.in" "conftest.nl"
12217    $as_echo '' >> "conftest.nl"
12218    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12219    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12220    as_fn_arith $ac_count + 1 && ac_count=$as_val
12221    if test $ac_count -gt ${ac_path_SED_max-0}; then
12222      # Best one so far, save it but keep looking for a better one
12223      ac_cv_path_SED="$ac_path_SED"
12224      ac_path_SED_max=$ac_count
12225    fi
12226    # 10*(2^10) chars as input seems more than enough
12227    test $ac_count -gt 10 && break
12228  done
12229  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12230esac
12231
12232      $ac_path_SED_found && break 3
12233    done
12234  done
12235  done
12236IFS=$as_save_IFS
12237  if test -z "$ac_cv_path_SED"; then
12238    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12239  fi
12240else
12241  ac_cv_path_SED=$SED
12242fi
12243
12244fi
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12246$as_echo "$ac_cv_path_SED" >&6; }
12247 SED="$ac_cv_path_SED"
12248  rm -f conftest.sed
12249
12250    else
12251      # If it succeeded, then it was overridden by the user. We will use it
12252      # for the tool.
12253
12254      # First remove it from the list of overridden variables, so we can test
12255      # for unknown variables in the end.
12256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12257
12258      # Check if the provided tool contains a complete path.
12259      tool_specified="$SED"
12260      tool_basename="${tool_specified##*/}"
12261      if test "x$tool_basename" = "x$tool_specified"; then
12262        # A command without a complete path is provided, search $PATH.
12263        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12264$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12265        # Extract the first word of "$tool_basename", so it can be a program name with args.
12266set dummy $tool_basename; ac_word=$2
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12268$as_echo_n "checking for $ac_word... " >&6; }
12269if ${ac_cv_path_SED+:} false; then :
12270  $as_echo_n "(cached) " >&6
12271else
12272  case $SED in
12273  [\\/]* | ?:[\\/]*)
12274  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12275  ;;
12276  *)
12277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12278for as_dir in $PATH
12279do
12280  IFS=$as_save_IFS
12281  test -z "$as_dir" && as_dir=.
12282    for ac_exec_ext in '' $ac_executable_extensions; do
12283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12284    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12286    break 2
12287  fi
12288done
12289  done
12290IFS=$as_save_IFS
12291
12292  ;;
12293esac
12294fi
12295SED=$ac_cv_path_SED
12296if test -n "$SED"; then
12297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12298$as_echo "$SED" >&6; }
12299else
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12301$as_echo "no" >&6; }
12302fi
12303
12304
12305        if test "x$SED" = x; then
12306          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12307        fi
12308      else
12309        # Otherwise we believe it is a complete path. Use it as it is.
12310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12311$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12313$as_echo_n "checking for SED... " >&6; }
12314        if test ! -x "$tool_specified"; then
12315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12316$as_echo "not found" >&6; }
12317          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12318        fi
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12320$as_echo "$tool_specified" >&6; }
12321      fi
12322    fi
12323  fi
12324
12325
12326  if test "x$SED" = x; then
12327    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12328  fi
12329
12330
12331
12332  # Always force rm.
12333  RM="$RM -f"
12334
12335  # pwd behaves differently on various platforms and some don't support the -L flag.
12336  # Always use the bash builtin pwd to get uniform behavior.
12337  THEPWDCMD=pwd
12338
12339  # These are not required on all platforms
12340
12341
12342  # Publish this variable in the help.
12343
12344
12345  if test "x$CYGPATH" = x; then
12346    # The variable is not set by user, try to locate tool using the code snippet
12347    for ac_prog in cygpath
12348do
12349  # Extract the first word of "$ac_prog", so it can be a program name with args.
12350set dummy $ac_prog; ac_word=$2
12351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12352$as_echo_n "checking for $ac_word... " >&6; }
12353if ${ac_cv_path_CYGPATH+:} false; then :
12354  $as_echo_n "(cached) " >&6
12355else
12356  case $CYGPATH in
12357  [\\/]* | ?:[\\/]*)
12358  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12359  ;;
12360  *)
12361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12362for as_dir in $PATH
12363do
12364  IFS=$as_save_IFS
12365  test -z "$as_dir" && as_dir=.
12366    for ac_exec_ext in '' $ac_executable_extensions; do
12367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12368    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12370    break 2
12371  fi
12372done
12373  done
12374IFS=$as_save_IFS
12375
12376  ;;
12377esac
12378fi
12379CYGPATH=$ac_cv_path_CYGPATH
12380if test -n "$CYGPATH"; then
12381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12382$as_echo "$CYGPATH" >&6; }
12383else
12384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12385$as_echo "no" >&6; }
12386fi
12387
12388
12389  test -n "$CYGPATH" && break
12390done
12391
12392  else
12393    # The variable is set, but is it from the command line or the environment?
12394
12395    # Try to remove the string !CYGPATH! from our list.
12396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12398      # If it failed, the variable was not from the command line. Ignore it,
12399      # but warn the user (except for BASH, which is always set by the calling BASH).
12400      if test "xCYGPATH" != xBASH; then
12401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12402$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12403      fi
12404      # Try to locate tool using the code snippet
12405      for ac_prog in cygpath
12406do
12407  # Extract the first word of "$ac_prog", so it can be a program name with args.
12408set dummy $ac_prog; ac_word=$2
12409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12410$as_echo_n "checking for $ac_word... " >&6; }
12411if ${ac_cv_path_CYGPATH+:} false; then :
12412  $as_echo_n "(cached) " >&6
12413else
12414  case $CYGPATH in
12415  [\\/]* | ?:[\\/]*)
12416  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12417  ;;
12418  *)
12419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12420for as_dir in $PATH
12421do
12422  IFS=$as_save_IFS
12423  test -z "$as_dir" && as_dir=.
12424    for ac_exec_ext in '' $ac_executable_extensions; do
12425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12426    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12428    break 2
12429  fi
12430done
12431  done
12432IFS=$as_save_IFS
12433
12434  ;;
12435esac
12436fi
12437CYGPATH=$ac_cv_path_CYGPATH
12438if test -n "$CYGPATH"; then
12439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12440$as_echo "$CYGPATH" >&6; }
12441else
12442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12443$as_echo "no" >&6; }
12444fi
12445
12446
12447  test -n "$CYGPATH" && break
12448done
12449
12450    else
12451      # If it succeeded, then it was overridden by the user. We will use it
12452      # for the tool.
12453
12454      # First remove it from the list of overridden variables, so we can test
12455      # for unknown variables in the end.
12456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12457
12458      # Check if the provided tool contains a complete path.
12459      tool_specified="$CYGPATH"
12460      tool_basename="${tool_specified##*/}"
12461      if test "x$tool_basename" = "x$tool_specified"; then
12462        # A command without a complete path is provided, search $PATH.
12463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12464$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12465        # Extract the first word of "$tool_basename", so it can be a program name with args.
12466set dummy $tool_basename; ac_word=$2
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12468$as_echo_n "checking for $ac_word... " >&6; }
12469if ${ac_cv_path_CYGPATH+:} false; then :
12470  $as_echo_n "(cached) " >&6
12471else
12472  case $CYGPATH in
12473  [\\/]* | ?:[\\/]*)
12474  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12475  ;;
12476  *)
12477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12478for as_dir in $PATH
12479do
12480  IFS=$as_save_IFS
12481  test -z "$as_dir" && as_dir=.
12482    for ac_exec_ext in '' $ac_executable_extensions; do
12483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12484    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12486    break 2
12487  fi
12488done
12489  done
12490IFS=$as_save_IFS
12491
12492  ;;
12493esac
12494fi
12495CYGPATH=$ac_cv_path_CYGPATH
12496if test -n "$CYGPATH"; then
12497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12498$as_echo "$CYGPATH" >&6; }
12499else
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12501$as_echo "no" >&6; }
12502fi
12503
12504
12505        if test "x$CYGPATH" = x; then
12506          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12507        fi
12508      else
12509        # Otherwise we believe it is a complete path. Use it as it is.
12510        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12511$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12513$as_echo_n "checking for CYGPATH... " >&6; }
12514        if test ! -x "$tool_specified"; then
12515          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12516$as_echo "not found" >&6; }
12517          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12518        fi
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12520$as_echo "$tool_specified" >&6; }
12521      fi
12522    fi
12523  fi
12524
12525
12526
12527
12528  # Publish this variable in the help.
12529
12530
12531  if test "x$READLINK" = x; then
12532    # The variable is not set by user, try to locate tool using the code snippet
12533    for ac_prog in greadlink readlink
12534do
12535  # Extract the first word of "$ac_prog", so it can be a program name with args.
12536set dummy $ac_prog; ac_word=$2
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12538$as_echo_n "checking for $ac_word... " >&6; }
12539if ${ac_cv_path_READLINK+:} false; then :
12540  $as_echo_n "(cached) " >&6
12541else
12542  case $READLINK in
12543  [\\/]* | ?:[\\/]*)
12544  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12545  ;;
12546  *)
12547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12548for as_dir in $PATH
12549do
12550  IFS=$as_save_IFS
12551  test -z "$as_dir" && as_dir=.
12552    for ac_exec_ext in '' $ac_executable_extensions; do
12553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12554    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12556    break 2
12557  fi
12558done
12559  done
12560IFS=$as_save_IFS
12561
12562  ;;
12563esac
12564fi
12565READLINK=$ac_cv_path_READLINK
12566if test -n "$READLINK"; then
12567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12568$as_echo "$READLINK" >&6; }
12569else
12570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12571$as_echo "no" >&6; }
12572fi
12573
12574
12575  test -n "$READLINK" && break
12576done
12577
12578  else
12579    # The variable is set, but is it from the command line or the environment?
12580
12581    # Try to remove the string !READLINK! from our list.
12582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12584      # If it failed, the variable was not from the command line. Ignore it,
12585      # but warn the user (except for BASH, which is always set by the calling BASH).
12586      if test "xREADLINK" != xBASH; then
12587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12588$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12589      fi
12590      # Try to locate tool using the code snippet
12591      for ac_prog in greadlink readlink
12592do
12593  # Extract the first word of "$ac_prog", so it can be a program name with args.
12594set dummy $ac_prog; ac_word=$2
12595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12596$as_echo_n "checking for $ac_word... " >&6; }
12597if ${ac_cv_path_READLINK+:} false; then :
12598  $as_echo_n "(cached) " >&6
12599else
12600  case $READLINK in
12601  [\\/]* | ?:[\\/]*)
12602  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12603  ;;
12604  *)
12605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12606for as_dir in $PATH
12607do
12608  IFS=$as_save_IFS
12609  test -z "$as_dir" && as_dir=.
12610    for ac_exec_ext in '' $ac_executable_extensions; do
12611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12612    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12614    break 2
12615  fi
12616done
12617  done
12618IFS=$as_save_IFS
12619
12620  ;;
12621esac
12622fi
12623READLINK=$ac_cv_path_READLINK
12624if test -n "$READLINK"; then
12625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12626$as_echo "$READLINK" >&6; }
12627else
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629$as_echo "no" >&6; }
12630fi
12631
12632
12633  test -n "$READLINK" && break
12634done
12635
12636    else
12637      # If it succeeded, then it was overridden by the user. We will use it
12638      # for the tool.
12639
12640      # First remove it from the list of overridden variables, so we can test
12641      # for unknown variables in the end.
12642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12643
12644      # Check if the provided tool contains a complete path.
12645      tool_specified="$READLINK"
12646      tool_basename="${tool_specified##*/}"
12647      if test "x$tool_basename" = "x$tool_specified"; then
12648        # A command without a complete path is provided, search $PATH.
12649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12650$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12651        # Extract the first word of "$tool_basename", so it can be a program name with args.
12652set dummy $tool_basename; ac_word=$2
12653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12654$as_echo_n "checking for $ac_word... " >&6; }
12655if ${ac_cv_path_READLINK+:} false; then :
12656  $as_echo_n "(cached) " >&6
12657else
12658  case $READLINK in
12659  [\\/]* | ?:[\\/]*)
12660  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12661  ;;
12662  *)
12663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12664for as_dir in $PATH
12665do
12666  IFS=$as_save_IFS
12667  test -z "$as_dir" && as_dir=.
12668    for ac_exec_ext in '' $ac_executable_extensions; do
12669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12670    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12672    break 2
12673  fi
12674done
12675  done
12676IFS=$as_save_IFS
12677
12678  ;;
12679esac
12680fi
12681READLINK=$ac_cv_path_READLINK
12682if test -n "$READLINK"; then
12683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12684$as_echo "$READLINK" >&6; }
12685else
12686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12687$as_echo "no" >&6; }
12688fi
12689
12690
12691        if test "x$READLINK" = x; then
12692          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12693        fi
12694      else
12695        # Otherwise we believe it is a complete path. Use it as it is.
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12697$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12699$as_echo_n "checking for READLINK... " >&6; }
12700        if test ! -x "$tool_specified"; then
12701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12702$as_echo "not found" >&6; }
12703          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12704        fi
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12706$as_echo "$tool_specified" >&6; }
12707      fi
12708    fi
12709  fi
12710
12711
12712
12713
12714  # Publish this variable in the help.
12715
12716
12717  if test "x$DF" = x; then
12718    # The variable is not set by user, try to locate tool using the code snippet
12719    for ac_prog in df
12720do
12721  # Extract the first word of "$ac_prog", so it can be a program name with args.
12722set dummy $ac_prog; ac_word=$2
12723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12724$as_echo_n "checking for $ac_word... " >&6; }
12725if ${ac_cv_path_DF+:} false; then :
12726  $as_echo_n "(cached) " >&6
12727else
12728  case $DF in
12729  [\\/]* | ?:[\\/]*)
12730  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12731  ;;
12732  *)
12733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12734for as_dir in $PATH
12735do
12736  IFS=$as_save_IFS
12737  test -z "$as_dir" && as_dir=.
12738    for ac_exec_ext in '' $ac_executable_extensions; do
12739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12740    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12742    break 2
12743  fi
12744done
12745  done
12746IFS=$as_save_IFS
12747
12748  ;;
12749esac
12750fi
12751DF=$ac_cv_path_DF
12752if test -n "$DF"; then
12753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12754$as_echo "$DF" >&6; }
12755else
12756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12757$as_echo "no" >&6; }
12758fi
12759
12760
12761  test -n "$DF" && break
12762done
12763
12764  else
12765    # The variable is set, but is it from the command line or the environment?
12766
12767    # Try to remove the string !DF! from our list.
12768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12770      # If it failed, the variable was not from the command line. Ignore it,
12771      # but warn the user (except for BASH, which is always set by the calling BASH).
12772      if test "xDF" != xBASH; then
12773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12774$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12775      fi
12776      # Try to locate tool using the code snippet
12777      for ac_prog in df
12778do
12779  # Extract the first word of "$ac_prog", so it can be a program name with args.
12780set dummy $ac_prog; ac_word=$2
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12782$as_echo_n "checking for $ac_word... " >&6; }
12783if ${ac_cv_path_DF+:} false; then :
12784  $as_echo_n "(cached) " >&6
12785else
12786  case $DF in
12787  [\\/]* | ?:[\\/]*)
12788  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12789  ;;
12790  *)
12791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12792for as_dir in $PATH
12793do
12794  IFS=$as_save_IFS
12795  test -z "$as_dir" && as_dir=.
12796    for ac_exec_ext in '' $ac_executable_extensions; do
12797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12798    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12800    break 2
12801  fi
12802done
12803  done
12804IFS=$as_save_IFS
12805
12806  ;;
12807esac
12808fi
12809DF=$ac_cv_path_DF
12810if test -n "$DF"; then
12811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12812$as_echo "$DF" >&6; }
12813else
12814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12815$as_echo "no" >&6; }
12816fi
12817
12818
12819  test -n "$DF" && break
12820done
12821
12822    else
12823      # If it succeeded, then it was overridden by the user. We will use it
12824      # for the tool.
12825
12826      # First remove it from the list of overridden variables, so we can test
12827      # for unknown variables in the end.
12828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12829
12830      # Check if the provided tool contains a complete path.
12831      tool_specified="$DF"
12832      tool_basename="${tool_specified##*/}"
12833      if test "x$tool_basename" = "x$tool_specified"; then
12834        # A command without a complete path is provided, search $PATH.
12835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12837        # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_DF+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $DF in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867DF=$ac_cv_path_DF
12868if test -n "$DF"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12870$as_echo "$DF" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877        if test "x$DF" = x; then
12878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879        fi
12880      else
12881        # Otherwise we believe it is a complete path. Use it as it is.
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12885$as_echo_n "checking for DF... " >&6; }
12886        if test ! -x "$tool_specified"; then
12887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12890        fi
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893      fi
12894    fi
12895  fi
12896
12897
12898
12899
12900  # Publish this variable in the help.
12901
12902
12903  if test "x$SETFILE" = x; then
12904    # The variable is not set by user, try to locate tool using the code snippet
12905    for ac_prog in SetFile
12906do
12907  # Extract the first word of "$ac_prog", so it can be a program name with args.
12908set dummy $ac_prog; ac_word=$2
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12910$as_echo_n "checking for $ac_word... " >&6; }
12911if ${ac_cv_path_SETFILE+:} false; then :
12912  $as_echo_n "(cached) " >&6
12913else
12914  case $SETFILE in
12915  [\\/]* | ?:[\\/]*)
12916  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12917  ;;
12918  *)
12919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12920for as_dir in $PATH
12921do
12922  IFS=$as_save_IFS
12923  test -z "$as_dir" && as_dir=.
12924    for ac_exec_ext in '' $ac_executable_extensions; do
12925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12926    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12928    break 2
12929  fi
12930done
12931  done
12932IFS=$as_save_IFS
12933
12934  ;;
12935esac
12936fi
12937SETFILE=$ac_cv_path_SETFILE
12938if test -n "$SETFILE"; then
12939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
12940$as_echo "$SETFILE" >&6; }
12941else
12942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
12944fi
12945
12946
12947  test -n "$SETFILE" && break
12948done
12949
12950  else
12951    # The variable is set, but is it from the command line or the environment?
12952
12953    # Try to remove the string !SETFILE! from our list.
12954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
12955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12956      # If it failed, the variable was not from the command line. Ignore it,
12957      # but warn the user (except for BASH, which is always set by the calling BASH).
12958      if test "xSETFILE" != xBASH; then
12959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
12960$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
12961      fi
12962      # Try to locate tool using the code snippet
12963      for ac_prog in SetFile
12964do
12965  # Extract the first word of "$ac_prog", so it can be a program name with args.
12966set dummy $ac_prog; ac_word=$2
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12968$as_echo_n "checking for $ac_word... " >&6; }
12969if ${ac_cv_path_SETFILE+:} false; then :
12970  $as_echo_n "(cached) " >&6
12971else
12972  case $SETFILE in
12973  [\\/]* | ?:[\\/]*)
12974  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12975  ;;
12976  *)
12977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978for as_dir in $PATH
12979do
12980  IFS=$as_save_IFS
12981  test -z "$as_dir" && as_dir=.
12982    for ac_exec_ext in '' $ac_executable_extensions; do
12983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12984    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12986    break 2
12987  fi
12988done
12989  done
12990IFS=$as_save_IFS
12991
12992  ;;
12993esac
12994fi
12995SETFILE=$ac_cv_path_SETFILE
12996if test -n "$SETFILE"; then
12997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
12998$as_echo "$SETFILE" >&6; }
12999else
13000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13001$as_echo "no" >&6; }
13002fi
13003
13004
13005  test -n "$SETFILE" && break
13006done
13007
13008    else
13009      # If it succeeded, then it was overridden by the user. We will use it
13010      # for the tool.
13011
13012      # First remove it from the list of overridden variables, so we can test
13013      # for unknown variables in the end.
13014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13015
13016      # Check if the provided tool contains a complete path.
13017      tool_specified="$SETFILE"
13018      tool_basename="${tool_specified##*/}"
13019      if test "x$tool_basename" = "x$tool_specified"; then
13020        # A command without a complete path is provided, search $PATH.
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13022$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13023        # Extract the first word of "$tool_basename", so it can be a program name with args.
13024set dummy $tool_basename; ac_word=$2
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13026$as_echo_n "checking for $ac_word... " >&6; }
13027if ${ac_cv_path_SETFILE+:} false; then :
13028  $as_echo_n "(cached) " >&6
13029else
13030  case $SETFILE in
13031  [\\/]* | ?:[\\/]*)
13032  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13033  ;;
13034  *)
13035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13036for as_dir in $PATH
13037do
13038  IFS=$as_save_IFS
13039  test -z "$as_dir" && as_dir=.
13040    for ac_exec_ext in '' $ac_executable_extensions; do
13041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13042    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13044    break 2
13045  fi
13046done
13047  done
13048IFS=$as_save_IFS
13049
13050  ;;
13051esac
13052fi
13053SETFILE=$ac_cv_path_SETFILE
13054if test -n "$SETFILE"; then
13055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13056$as_echo "$SETFILE" >&6; }
13057else
13058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13059$as_echo "no" >&6; }
13060fi
13061
13062
13063        if test "x$SETFILE" = x; then
13064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13065        fi
13066      else
13067        # Otherwise we believe it is a complete path. Use it as it is.
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13069$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13071$as_echo_n "checking for SETFILE... " >&6; }
13072        if test ! -x "$tool_specified"; then
13073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13074$as_echo "not found" >&6; }
13075          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13076        fi
13077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13078$as_echo "$tool_specified" >&6; }
13079      fi
13080    fi
13081  fi
13082
13083
13084
13085
13086# Now we can determine OpenJDK build and target platforms. This is required to
13087# have early on.
13088# Make sure we can run config.sub.
13089$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13090  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13091
13092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13093$as_echo_n "checking build system type... " >&6; }
13094if ${ac_cv_build+:} false; then :
13095  $as_echo_n "(cached) " >&6
13096else
13097  ac_build_alias=$build_alias
13098test "x$ac_build_alias" = x &&
13099  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13100test "x$ac_build_alias" = x &&
13101  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13102ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13103  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13104
13105fi
13106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13107$as_echo "$ac_cv_build" >&6; }
13108case $ac_cv_build in
13109*-*-*) ;;
13110*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13111esac
13112build=$ac_cv_build
13113ac_save_IFS=$IFS; IFS='-'
13114set x $ac_cv_build
13115shift
13116build_cpu=$1
13117build_vendor=$2
13118shift; shift
13119# Remember, the first character of IFS is used to create $*,
13120# except with old shells:
13121build_os=$*
13122IFS=$ac_save_IFS
13123case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13124
13125
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13127$as_echo_n "checking host system type... " >&6; }
13128if ${ac_cv_host+:} false; then :
13129  $as_echo_n "(cached) " >&6
13130else
13131  if test "x$host_alias" = x; then
13132  ac_cv_host=$ac_cv_build
13133else
13134  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13135    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13136fi
13137
13138fi
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13140$as_echo "$ac_cv_host" >&6; }
13141case $ac_cv_host in
13142*-*-*) ;;
13143*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13144esac
13145host=$ac_cv_host
13146ac_save_IFS=$IFS; IFS='-'
13147set x $ac_cv_host
13148shift
13149host_cpu=$1
13150host_vendor=$2
13151shift; shift
13152# Remember, the first character of IFS is used to create $*,
13153# except with old shells:
13154host_os=$*
13155IFS=$ac_save_IFS
13156case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13157
13158
13159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13160$as_echo_n "checking target system type... " >&6; }
13161if ${ac_cv_target+:} false; then :
13162  $as_echo_n "(cached) " >&6
13163else
13164  if test "x$target_alias" = x; then
13165  ac_cv_target=$ac_cv_host
13166else
13167  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13168    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13169fi
13170
13171fi
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13173$as_echo "$ac_cv_target" >&6; }
13174case $ac_cv_target in
13175*-*-*) ;;
13176*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13177esac
13178target=$ac_cv_target
13179ac_save_IFS=$IFS; IFS='-'
13180set x $ac_cv_target
13181shift
13182target_cpu=$1
13183target_vendor=$2
13184shift; shift
13185# Remember, the first character of IFS is used to create $*,
13186# except with old shells:
13187target_os=$*
13188IFS=$ac_save_IFS
13189case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13190
13191
13192# The aliases save the names the user supplied, while $host etc.
13193# will get canonicalized.
13194test -n "$target_alias" &&
13195  test "$program_prefix$program_suffix$program_transform_name" = \
13196    NONENONEs,x,x, &&
13197  program_prefix=${target_alias}-
13198
13199  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13200  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13201  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13202  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13203  # to use the configure naming style.
13204
13205
13206
13207
13208
13209  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13210  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13211  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13212  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13213  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13214  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13215
13216
13217
13218  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13219
13220  case "$build_os" in
13221    *linux*)
13222      VAR_OS=linux
13223      VAR_OS_API=posix
13224      VAR_OS_ENV=linux
13225      ;;
13226    *solaris*)
13227      VAR_OS=solaris
13228      VAR_OS_API=posix
13229      VAR_OS_ENV=solaris
13230      ;;
13231    *darwin*)
13232      VAR_OS=macosx
13233      VAR_OS_API=posix
13234      VAR_OS_ENV=macosx
13235      ;;
13236    *bsd*)
13237      VAR_OS=bsd
13238      VAR_OS_API=posix
13239      VAR_OS_ENV=bsd
13240      ;;
13241    *cygwin*)
13242      VAR_OS=windows
13243      VAR_OS_API=winapi
13244      VAR_OS_ENV=windows.cygwin
13245      ;;
13246    *mingw*)
13247      VAR_OS=windows
13248      VAR_OS_API=winapi
13249      VAR_OS_ENV=windows.msys
13250      ;;
13251    *aix*)
13252      VAR_OS=aix
13253      VAR_OS_API=posix
13254      VAR_OS_ENV=aix
13255      ;;
13256    *)
13257      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13258      ;;
13259  esac
13260
13261
13262  # First argument is the cpu name from the trip/quad
13263  case "$build_cpu" in
13264    x86_64)
13265      VAR_CPU=x86_64
13266      VAR_CPU_ARCH=x86
13267      VAR_CPU_BITS=64
13268      VAR_CPU_ENDIAN=little
13269      ;;
13270    i?86)
13271      VAR_CPU=x86
13272      VAR_CPU_ARCH=x86
13273      VAR_CPU_BITS=32
13274      VAR_CPU_ENDIAN=little
13275      ;;
13276    arm*)
13277      VAR_CPU=arm
13278      VAR_CPU_ARCH=arm
13279      VAR_CPU_BITS=32
13280      VAR_CPU_ENDIAN=little
13281      ;;
13282    powerpc)
13283      VAR_CPU=ppc
13284      VAR_CPU_ARCH=ppc
13285      VAR_CPU_BITS=32
13286      VAR_CPU_ENDIAN=big
13287      ;;
13288    powerpc64)
13289      VAR_CPU=ppc64
13290      VAR_CPU_ARCH=ppc
13291      VAR_CPU_BITS=64
13292      VAR_CPU_ENDIAN=big
13293      ;;
13294    s390)
13295      VAR_CPU=s390
13296      VAR_CPU_ARCH=s390
13297      VAR_CPU_BITS=32
13298      VAR_CPU_ENDIAN=big
13299      ;;
13300    s390x)
13301      VAR_CPU=s390x
13302      VAR_CPU_ARCH=s390
13303      VAR_CPU_BITS=64
13304      VAR_CPU_ENDIAN=big
13305      ;;
13306    sparc)
13307      VAR_CPU=sparc
13308      VAR_CPU_ARCH=sparc
13309      VAR_CPU_BITS=32
13310      VAR_CPU_ENDIAN=big
13311      ;;
13312    sparcv9)
13313      VAR_CPU=sparcv9
13314      VAR_CPU_ARCH=sparc
13315      VAR_CPU_BITS=64
13316      VAR_CPU_ENDIAN=big
13317      ;;
13318    *)
13319      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13320      ;;
13321  esac
13322
13323  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13324  OPENJDK_BUILD_OS="$VAR_OS"
13325  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13326  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13327  OPENJDK_BUILD_CPU="$VAR_CPU"
13328  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13329  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13330  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13331
13332
13333
13334
13335
13336
13337
13338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13339$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13341$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13342
13343  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13344
13345  case "$host_os" in
13346    *linux*)
13347      VAR_OS=linux
13348      VAR_OS_API=posix
13349      VAR_OS_ENV=linux
13350      ;;
13351    *solaris*)
13352      VAR_OS=solaris
13353      VAR_OS_API=posix
13354      VAR_OS_ENV=solaris
13355      ;;
13356    *darwin*)
13357      VAR_OS=macosx
13358      VAR_OS_API=posix
13359      VAR_OS_ENV=macosx
13360      ;;
13361    *bsd*)
13362      VAR_OS=bsd
13363      VAR_OS_API=posix
13364      VAR_OS_ENV=bsd
13365      ;;
13366    *cygwin*)
13367      VAR_OS=windows
13368      VAR_OS_API=winapi
13369      VAR_OS_ENV=windows.cygwin
13370      ;;
13371    *mingw*)
13372      VAR_OS=windows
13373      VAR_OS_API=winapi
13374      VAR_OS_ENV=windows.msys
13375      ;;
13376    *aix*)
13377      VAR_OS=aix
13378      VAR_OS_API=posix
13379      VAR_OS_ENV=aix
13380      ;;
13381    *)
13382      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13383      ;;
13384  esac
13385
13386
13387  # First argument is the cpu name from the trip/quad
13388  case "$host_cpu" in
13389    x86_64)
13390      VAR_CPU=x86_64
13391      VAR_CPU_ARCH=x86
13392      VAR_CPU_BITS=64
13393      VAR_CPU_ENDIAN=little
13394      ;;
13395    i?86)
13396      VAR_CPU=x86
13397      VAR_CPU_ARCH=x86
13398      VAR_CPU_BITS=32
13399      VAR_CPU_ENDIAN=little
13400      ;;
13401    arm*)
13402      VAR_CPU=arm
13403      VAR_CPU_ARCH=arm
13404      VAR_CPU_BITS=32
13405      VAR_CPU_ENDIAN=little
13406      ;;
13407    powerpc)
13408      VAR_CPU=ppc
13409      VAR_CPU_ARCH=ppc
13410      VAR_CPU_BITS=32
13411      VAR_CPU_ENDIAN=big
13412      ;;
13413    powerpc64)
13414      VAR_CPU=ppc64
13415      VAR_CPU_ARCH=ppc
13416      VAR_CPU_BITS=64
13417      VAR_CPU_ENDIAN=big
13418      ;;
13419    s390)
13420      VAR_CPU=s390
13421      VAR_CPU_ARCH=s390
13422      VAR_CPU_BITS=32
13423      VAR_CPU_ENDIAN=big
13424      ;;
13425    s390x)
13426      VAR_CPU=s390x
13427      VAR_CPU_ARCH=s390
13428      VAR_CPU_BITS=64
13429      VAR_CPU_ENDIAN=big
13430      ;;
13431    sparc)
13432      VAR_CPU=sparc
13433      VAR_CPU_ARCH=sparc
13434      VAR_CPU_BITS=32
13435      VAR_CPU_ENDIAN=big
13436      ;;
13437    sparcv9)
13438      VAR_CPU=sparcv9
13439      VAR_CPU_ARCH=sparc
13440      VAR_CPU_BITS=64
13441      VAR_CPU_ENDIAN=big
13442      ;;
13443    *)
13444      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13445      ;;
13446  esac
13447
13448  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13449  OPENJDK_TARGET_OS="$VAR_OS"
13450  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13451  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13452  OPENJDK_TARGET_CPU="$VAR_CPU"
13453  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13454  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13455  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13456
13457
13458
13459
13460
13461
13462
13463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13464$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13466$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13467
13468
13469
13470# Check whether --with-target-bits was given.
13471if test "${with_target_bits+set}" = set; then :
13472  withval=$with_target_bits;
13473fi
13474
13475
13476  # We have three types of compiles:
13477  # native  == normal compilation, target system == build system
13478  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13479  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13480  #
13481  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13482    # We're doing a proper cross-compilation
13483    COMPILE_TYPE="cross"
13484  else
13485    COMPILE_TYPE="native"
13486  fi
13487
13488  if test "x$with_target_bits" != x; then
13489    if test "x$COMPILE_TYPE" = "xcross"; then
13490      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13491    fi
13492
13493    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13494      # A reduced build is requested
13495      COMPILE_TYPE="reduced"
13496      OPENJDK_TARGET_CPU_BITS=32
13497      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13498        OPENJDK_TARGET_CPU=x86
13499      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13500        OPENJDK_TARGET_CPU=sparc
13501      else
13502        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13503      fi
13504    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13505      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
13506    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13507      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13508$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13509    else
13510      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13511    fi
13512  fi
13513
13514
13515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13516$as_echo_n "checking compilation type... " >&6; }
13517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13518$as_echo "$COMPILE_TYPE" >&6; }
13519
13520
13521  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13522    REQUIRED_OS_NAME=SunOS
13523    REQUIRED_OS_VERSION=5.10
13524  fi
13525  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13526    REQUIRED_OS_NAME=Linux
13527    REQUIRED_OS_VERSION=2.6
13528  fi
13529  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13530    REQUIRED_OS_NAME=Windows
13531    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13532      REQUIRED_OS_VERSION=5.2
13533    else
13534      REQUIRED_OS_VERSION=5.1
13535    fi
13536  fi
13537  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13538    REQUIRED_OS_NAME=Darwin
13539    REQUIRED_OS_VERSION=11.2
13540  fi
13541
13542
13543
13544
13545
13546  # Also store the legacy naming of the cpu.
13547  # Ie i586 and amd64 instead of x86 and x86_64
13548  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13549  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13550    OPENJDK_TARGET_CPU_LEGACY="i586"
13551  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13552    # On all platforms except MacOSX replace x86_64 with amd64.
13553    OPENJDK_TARGET_CPU_LEGACY="amd64"
13554  fi
13555
13556
13557  # And the second legacy naming of the cpu.
13558  # Ie i386 and amd64 instead of x86 and x86_64.
13559  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13560  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13561    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13562  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13563    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13564  fi
13565
13566
13567  # This is the name of the cpu (but using i386 and amd64 instead of
13568  # x86 and x86_64, respectively), preceeded by a /, to be used when
13569  # locating libraries. On macosx, it's empty, though.
13570  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13571  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13572    OPENJDK_TARGET_CPU_LIBDIR=""
13573  fi
13574
13575
13576  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13577  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13578  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13579  OPENJDK_TARGET_CPU_ISADIR=""
13580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13581    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13582      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13583    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13584      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13585    fi
13586  fi
13587
13588
13589  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13590  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13591  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13592    # On linux only, we replace x86 with i386.
13593    OPENJDK_TARGET_CPU_OSARCH="i386"
13594  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13595    # On all platforms except macosx, we replace x86_64 with amd64.
13596    OPENJDK_TARGET_CPU_OSARCH="amd64"
13597  fi
13598
13599
13600  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13601  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13602    OPENJDK_TARGET_CPU_JLI="i386"
13603  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13604    # On all platforms except macosx, we replace x86_64 with amd64.
13605    OPENJDK_TARGET_CPU_JLI="amd64"
13606  fi
13607  # Now setup the -D flags for building libjli.
13608  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13609  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13610    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13611      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13612    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13613      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13614    fi
13615  fi
13616
13617
13618  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13619  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13620    OPENJDK_TARGET_OS_API_DIR="solaris"
13621  fi
13622  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13623    OPENJDK_TARGET_OS_API_DIR="windows"
13624  fi
13625
13626
13627  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13628      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13629  else
13630      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13631  fi
13632
13633
13634  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13635    A_LP64="LP64:="
13636    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13637    # unpack200.exe
13638    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13639      ADD_LP64="-D_LP64=1"
13640    fi
13641  fi
13642  LP64=$A_LP64
13643
13644
13645  if test "x$COMPILE_TYPE" = "xcross"; then
13646    # FIXME: ... or should this include reduced builds..?
13647    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13648  else
13649    DEFINE_CROSS_COMPILE_ARCH=""
13650  fi
13651
13652
13653  # ZERO_ARCHDEF is used to enable architecture-specific code
13654  case "${OPENJDK_TARGET_CPU}" in
13655    ppc*)    ZERO_ARCHDEF=PPC   ;;
13656    s390*)   ZERO_ARCHDEF=S390  ;;
13657    sparc*)  ZERO_ARCHDEF=SPARC ;;
13658    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13659    x86)     ZERO_ARCHDEF=IA32  ;;
13660    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13661  esac
13662
13663
13664
13665
13666# Continue setting up basic stuff. Most remaining code require fundamental tools.
13667
13668  # Locate the directory of this script.
13669  SCRIPT="$0"
13670  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13671
13672  # Where is the source? It is located two levels above the configure script.
13673  CURDIR="$PWD"
13674  cd "$AUTOCONF_DIR/../.."
13675  SRC_ROOT="`$THEPWDCMD -L`"
13676
13677  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13678    PATH_SEP=";"
13679
13680  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13681  if test $SRC_ROOT_LENGTH -gt 100; then
13682    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13683  fi
13684
13685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13687$as_echo_n "checking cygwin release... " >&6; }
13688    CYGWIN_VERSION=`$UNAME -r`
13689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13690$as_echo "$CYGWIN_VERSION" >&6; }
13691    WINDOWS_ENV_VENDOR='cygwin'
13692    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13693
13694    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13695    if test "x$CYGWIN_VERSION_OK" = x; then
13696      { $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
13697$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;}
13698      as_fn_error $? "Cannot continue" "$LINENO" 5
13699    fi
13700    if test "x$CYGPATH" = x; then
13701      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13702    fi
13703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13704$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13705    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13706    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13707    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13708    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13710$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13711    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13712    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13713    if test "x$test_cygdrive_prefix" = x; then
13714      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13715    fi
13716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13718$as_echo_n "checking msys release... " >&6; }
13719    MSYS_VERSION=`$UNAME -r`
13720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13721$as_echo "$MSYS_VERSION" >&6; }
13722
13723    WINDOWS_ENV_VENDOR='msys'
13724    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13725
13726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13727$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13728    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13729    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13730
13731  windows_path="$MSYS_ROOT_PATH"
13732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13733    unix_path=`$CYGPATH -u "$windows_path"`
13734    MSYS_ROOT_PATH="$unix_path"
13735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13737    MSYS_ROOT_PATH="$unix_path"
13738  fi
13739
13740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13741$as_echo "$MSYS_ROOT_PATH" >&6; }
13742    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13743  else
13744    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13745  fi
13746
13747  # Test if windows or unix (cygwin/msys) find is first in path.
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13749$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13750  FIND_BINARY_OUTPUT=`find --version 2>&1`
13751  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13753$as_echo "unix style" >&6; }
13754  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13756$as_echo "Windows" >&6; }
13757    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13758$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13759    { $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
13760$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13761    as_fn_error $? "Cannot continue" "$LINENO" 5
13762  else
13763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13764$as_echo "unknown" >&6; }
13765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13766$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13767  fi
13768
13769  else
13770    PATH_SEP=":"
13771  fi
13772
13773
13774
13775  cd "$CURDIR"
13776
13777
13778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13779
13780  # Input might be given as Windows format, start by converting to
13781  # unix format.
13782  path="$SRC_ROOT"
13783  new_path=`$CYGPATH -u "$path"`
13784
13785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13788  # "foo.exe" is OK but "foo" is an error.
13789  #
13790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13791  # It is also a way to make sure we got the proper file name for the real test later on.
13792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13793  if test "x$test_shortpath" = x; then
13794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13795$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13796    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13797  fi
13798
13799  # Call helper function which possibly converts this using DOS-style short mode.
13800  # If so, the updated path is stored in $new_path.
13801
13802  input_path="$new_path"
13803  # Check if we need to convert this using DOS-style short mode. If the path
13804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13805  # take no chances and rewrite it.
13806  # Note: m4 eats our [], so we need to use [ and ] instead.
13807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13808  if test "x$has_forbidden_chars" != x; then
13809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13813      # Going to short mode and back again did indeed matter. Since short mode is
13814      # case insensitive, let's make it lowercase to improve readability.
13815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13816      # Now convert it back to Unix-stile (cygpath)
13817      input_path=`$CYGPATH -u "$shortmode_path"`
13818      new_path="$input_path"
13819    fi
13820  fi
13821
13822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13823  if test "x$test_cygdrive_prefix" = x; then
13824    # As a simple fix, exclude /usr/bin since it's not a real path.
13825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13827      # a path prefixed by /cygdrive for fixpath to work.
13828      new_path="$CYGWIN_ROOT_PATH$input_path"
13829    fi
13830  fi
13831
13832
13833  if test "x$path" != "x$new_path"; then
13834    SRC_ROOT="$new_path"
13835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13836$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13837  fi
13838
13839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13840
13841  path="$SRC_ROOT"
13842  has_colon=`$ECHO $path | $GREP ^.:`
13843  new_path="$path"
13844  if test "x$has_colon" = x; then
13845    # Not in mixed or Windows style, start by that.
13846    new_path=`cmd //c echo $path`
13847  fi
13848
13849
13850  input_path="$new_path"
13851  # Check if we need to convert this using DOS-style short mode. If the path
13852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13853  # take no chances and rewrite it.
13854  # Note: m4 eats our [], so we need to use [ and ] instead.
13855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13856  if test "x$has_forbidden_chars" != x; then
13857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13859  fi
13860
13861
13862  windows_path="$new_path"
13863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13864    unix_path=`$CYGPATH -u "$windows_path"`
13865    new_path="$unix_path"
13866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13868    new_path="$unix_path"
13869  fi
13870
13871  if test "x$path" != "x$new_path"; then
13872    SRC_ROOT="$new_path"
13873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13874$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13875  fi
13876
13877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13879
13880  else
13881    # We're on a posix platform. Hooray! :)
13882    path="$SRC_ROOT"
13883    has_space=`$ECHO "$path" | $GREP " "`
13884    if test "x$has_space" != x; then
13885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13886$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13887      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13888    fi
13889
13890    # Use eval to expand a potential ~
13891    eval path="$path"
13892    if test ! -f "$path" && test ! -d "$path"; then
13893      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
13894    fi
13895
13896    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
13897  fi
13898
13899
13900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13901
13902  # Input might be given as Windows format, start by converting to
13903  # unix format.
13904  path="$CURDIR"
13905  new_path=`$CYGPATH -u "$path"`
13906
13907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13910  # "foo.exe" is OK but "foo" is an error.
13911  #
13912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13913  # It is also a way to make sure we got the proper file name for the real test later on.
13914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13915  if test "x$test_shortpath" = x; then
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13917$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13918    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13919  fi
13920
13921  # Call helper function which possibly converts this using DOS-style short mode.
13922  # If so, the updated path is stored in $new_path.
13923
13924  input_path="$new_path"
13925  # Check if we need to convert this using DOS-style short mode. If the path
13926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13927  # take no chances and rewrite it.
13928  # Note: m4 eats our [], so we need to use [ and ] instead.
13929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13930  if test "x$has_forbidden_chars" != x; then
13931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13935      # Going to short mode and back again did indeed matter. Since short mode is
13936      # case insensitive, let's make it lowercase to improve readability.
13937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13938      # Now convert it back to Unix-stile (cygpath)
13939      input_path=`$CYGPATH -u "$shortmode_path"`
13940      new_path="$input_path"
13941    fi
13942  fi
13943
13944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13945  if test "x$test_cygdrive_prefix" = x; then
13946    # As a simple fix, exclude /usr/bin since it's not a real path.
13947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13949      # a path prefixed by /cygdrive for fixpath to work.
13950      new_path="$CYGWIN_ROOT_PATH$input_path"
13951    fi
13952  fi
13953
13954
13955  if test "x$path" != "x$new_path"; then
13956    CURDIR="$new_path"
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
13958$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
13959  fi
13960
13961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13962
13963  path="$CURDIR"
13964  has_colon=`$ECHO $path | $GREP ^.:`
13965  new_path="$path"
13966  if test "x$has_colon" = x; then
13967    # Not in mixed or Windows style, start by that.
13968    new_path=`cmd //c echo $path`
13969  fi
13970
13971
13972  input_path="$new_path"
13973  # Check if we need to convert this using DOS-style short mode. If the path
13974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13975  # take no chances and rewrite it.
13976  # Note: m4 eats our [], so we need to use [ and ] instead.
13977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13978  if test "x$has_forbidden_chars" != x; then
13979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13981  fi
13982
13983
13984  windows_path="$new_path"
13985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13986    unix_path=`$CYGPATH -u "$windows_path"`
13987    new_path="$unix_path"
13988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13990    new_path="$unix_path"
13991  fi
13992
13993  if test "x$path" != "x$new_path"; then
13994    CURDIR="$new_path"
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
13996$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
13997  fi
13998
13999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14001
14002  else
14003    # We're on a posix platform. Hooray! :)
14004    path="$CURDIR"
14005    has_space=`$ECHO "$path" | $GREP " "`
14006    if test "x$has_space" != x; then
14007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14008$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14009      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14010    fi
14011
14012    # Use eval to expand a potential ~
14013    eval path="$path"
14014    if test ! -f "$path" && test ! -d "$path"; then
14015      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14016    fi
14017
14018    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14019  fi
14020
14021
14022  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14023    # Add extra search paths on solaris for utilities like ar and as etc...
14024    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14025  fi
14026
14027  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14028  # is not correct.
14029
14030# Check whether --with-sys-root was given.
14031if test "${with_sys_root+set}" = set; then :
14032  withval=$with_sys_root;
14033fi
14034
14035
14036  if test "x$with_sys_root" != x; then
14037    SYS_ROOT=$with_sys_root
14038  else
14039    SYS_ROOT=/
14040  fi
14041
14042
14043
14044# Check whether --with-tools-dir was given.
14045if test "${with_tools_dir+set}" = set; then :
14046  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14047
14048fi
14049
14050
14051
14052# Check whether --with-devkit was given.
14053if test "${with_devkit+set}" = set; then :
14054  withval=$with_devkit;
14055        if test "x$with_sys_root" != x; then
14056          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14057        fi
14058
14059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14060
14061  # Input might be given as Windows format, start by converting to
14062  # unix format.
14063  path="$with_devkit"
14064  new_path=`$CYGPATH -u "$path"`
14065
14066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14069  # "foo.exe" is OK but "foo" is an error.
14070  #
14071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14072  # It is also a way to make sure we got the proper file name for the real test later on.
14073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14074  if test "x$test_shortpath" = x; then
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14076$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14077    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14078  fi
14079
14080  # Call helper function which possibly converts this using DOS-style short mode.
14081  # If so, the updated path is stored in $new_path.
14082
14083  input_path="$new_path"
14084  # Check if we need to convert this using DOS-style short mode. If the path
14085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14086  # take no chances and rewrite it.
14087  # Note: m4 eats our [], so we need to use [ and ] instead.
14088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14089  if test "x$has_forbidden_chars" != x; then
14090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14094      # Going to short mode and back again did indeed matter. Since short mode is
14095      # case insensitive, let's make it lowercase to improve readability.
14096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14097      # Now convert it back to Unix-stile (cygpath)
14098      input_path=`$CYGPATH -u "$shortmode_path"`
14099      new_path="$input_path"
14100    fi
14101  fi
14102
14103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14104  if test "x$test_cygdrive_prefix" = x; then
14105    # As a simple fix, exclude /usr/bin since it's not a real path.
14106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14108      # a path prefixed by /cygdrive for fixpath to work.
14109      new_path="$CYGWIN_ROOT_PATH$input_path"
14110    fi
14111  fi
14112
14113
14114  if test "x$path" != "x$new_path"; then
14115    with_devkit="$new_path"
14116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14117$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14118  fi
14119
14120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14121
14122  path="$with_devkit"
14123  has_colon=`$ECHO $path | $GREP ^.:`
14124  new_path="$path"
14125  if test "x$has_colon" = x; then
14126    # Not in mixed or Windows style, start by that.
14127    new_path=`cmd //c echo $path`
14128  fi
14129
14130
14131  input_path="$new_path"
14132  # Check if we need to convert this using DOS-style short mode. If the path
14133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14134  # take no chances and rewrite it.
14135  # Note: m4 eats our [], so we need to use [ and ] instead.
14136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14137  if test "x$has_forbidden_chars" != x; then
14138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14140  fi
14141
14142
14143  windows_path="$new_path"
14144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14145    unix_path=`$CYGPATH -u "$windows_path"`
14146    new_path="$unix_path"
14147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14149    new_path="$unix_path"
14150  fi
14151
14152  if test "x$path" != "x$new_path"; then
14153    with_devkit="$new_path"
14154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14155$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14156  fi
14157
14158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14160
14161  else
14162    # We're on a posix platform. Hooray! :)
14163    path="$with_devkit"
14164    has_space=`$ECHO "$path" | $GREP " "`
14165    if test "x$has_space" != x; then
14166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14167$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14168      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14169    fi
14170
14171    # Use eval to expand a potential ~
14172    eval path="$path"
14173    if test ! -f "$path" && test ! -d "$path"; then
14174      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14175    fi
14176
14177    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14178  fi
14179
14180
14181  if test "x$TOOLS_DIR" = x; then
14182    TOOLS_DIR="$with_devkit/bin"
14183  else
14184    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14185  fi
14186
14187        if test -d "$with_devkit/$host_alias/libc"; then
14188          SYS_ROOT=$with_devkit/$host_alias/libc
14189        elif test -d "$with_devkit/$host/sys-root"; then
14190          SYS_ROOT=$with_devkit/$host/sys-root
14191        fi
14192
14193fi
14194
14195
14196
14197  # Setup default logging of stdout and stderr to build.log in the output root.
14198  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14199  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14200  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14201
14202
14203
14204
14205
14206# Check if it's a pure open build or if custom sources are to be used.
14207
14208  # Check whether --enable-openjdk-only was given.
14209if test "${enable_openjdk_only+set}" = set; then :
14210  enableval=$enable_openjdk_only;
14211else
14212  enable_openjdk_only="no"
14213fi
14214
14215
14216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14217$as_echo_n "checking for presence of closed sources... " >&6; }
14218  if test -d "$SRC_ROOT/jdk/src/closed"; then
14219    CLOSED_SOURCE_PRESENT=yes
14220  else
14221    CLOSED_SOURCE_PRESENT=no
14222  fi
14223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14224$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14225
14226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14227$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14228  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14230$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14231
14232  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14233    OPENJDK=true
14234    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14235      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14236$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14237    fi
14238  else
14239    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14240      OPENJDK=true
14241    else
14242      OPENJDK=false
14243    fi
14244  fi
14245
14246  if test "x$OPENJDK" = "xtrue"; then
14247    SET_OPENJDK="OPENJDK=true"
14248  fi
14249
14250
14251
14252
14253# These are needed to be able to create a configuration name (and thus the output directory)
14254
14255  ###############################################################################
14256  #
14257  # Check which variant of the JDK that we want to build.
14258  # Currently we have:
14259  #    normal:   standard edition
14260  # but the custom make system may add other variants
14261  #
14262  # Effectively the JDK variant gives a name to a specific set of
14263  # modules to compile into the JDK. In the future, these modules
14264  # might even be Jigsaw modules.
14265  #
14266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14267$as_echo_n "checking which variant of the JDK to build... " >&6; }
14268
14269# Check whether --with-jdk-variant was given.
14270if test "${with_jdk_variant+set}" = set; then :
14271  withval=$with_jdk_variant;
14272fi
14273
14274
14275  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14276    JDK_VARIANT="normal"
14277  else
14278    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14279  fi
14280
14281
14282
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14284$as_echo "$JDK_VARIANT" >&6; }
14285
14286
14287###############################################################################
14288#
14289# Check which interpreter of the JVM we want to build.
14290# Currently we have:
14291#    template: Template interpreter (the default)
14292#    cpp     : C++ interpreter
14293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14294$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14295
14296# Check whether --with-jvm-interpreter was given.
14297if test "${with_jvm_interpreter+set}" = set; then :
14298  withval=$with_jvm_interpreter;
14299fi
14300
14301
14302if test "x$with_jvm_interpreter" = x; then
14303     with_jvm_interpreter="template"
14304fi
14305
14306JVM_INTERPRETER="$with_jvm_interpreter"
14307
14308if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14309   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14310fi
14311
14312
14313
14314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14315$as_echo "$with_jvm_interpreter" >&6; }
14316
14317
14318
14319  ###############################################################################
14320  #
14321  # Check which variants of the JVM that we want to build.
14322  # Currently we have:
14323  #    server: normal interpreter and a tiered C1/C2 compiler
14324  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14325  #    minimal1: reduced form of client with optional VM services and features stripped out
14326  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14327  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14328  #    zero: no machine code interpreter, no compiler
14329  #    zeroshark: zero interpreter and shark/llvm compiler backend
14330#    core: interpreter only, no compiler (only works on some platforms)
14331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14332$as_echo_n "checking which variants of the JVM to build... " >&6; }
14333
14334# Check whether --with-jvm-variants was given.
14335if test "${with_jvm_variants+set}" = set; then :
14336  withval=$with_jvm_variants;
14337fi
14338
14339
14340  if test "x$with_jvm_variants" = x; then
14341    with_jvm_variants="server"
14342  fi
14343
14344  JVM_VARIANTS=",$with_jvm_variants,"
14345  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,//'`
14346
14347  if test "x$TEST_VARIANTS" != "x,"; then
14348     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14349  fi
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14351$as_echo "$with_jvm_variants" >&6; }
14352
14353  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14354  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14355  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14356  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14357  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14358  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14359  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14360
14361  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14362    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14363      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14364    fi
14365  fi
14366  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14367    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14368      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14369    fi
14370  fi
14371  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14372    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14373      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14374    fi
14375  fi
14376
14377  # Replace the commas with AND for use in the build directory name.
14378  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14379  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/'`
14380  if test "x$COUNT_VARIANTS" != "x,1"; then
14381    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14382  else
14383    BUILDING_MULTIPLE_JVM_VARIANTS=no
14384  fi
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395  INCLUDE_SA=true
14396  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14397    INCLUDE_SA=false
14398  fi
14399  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14400    INCLUDE_SA=false
14401  fi
14402  if test "x$VAR_CPU" = xppc64 ; then
14403    INCLUDE_SA=false
14404  fi
14405
14406
14407  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14408    MACOSX_UNIVERSAL="true"
14409  fi
14410
14411
14412
14413
14414  ###############################################################################
14415  #
14416  # Set the debug level
14417  #    release: no debug information, all optimizations, no asserts.
14418  #    fastdebug: debug information (-g), all optimizations, all asserts
14419  #    slowdebug: debug information (-g), no optimizations, all asserts
14420  #
14421  DEBUG_LEVEL="release"
14422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14423$as_echo_n "checking which debug level to use... " >&6; }
14424  # Check whether --enable-debug was given.
14425if test "${enable_debug+set}" = set; then :
14426  enableval=$enable_debug;
14427        ENABLE_DEBUG="${enableval}"
14428        DEBUG_LEVEL="fastdebug"
14429
14430else
14431  ENABLE_DEBUG="no"
14432fi
14433
14434
14435
14436# Check whether --with-debug-level was given.
14437if test "${with_debug_level+set}" = set; then :
14438  withval=$with_debug_level;
14439        DEBUG_LEVEL="${withval}"
14440        if test "x$ENABLE_DEBUG" = xyes; then
14441          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14442        fi
14443
14444fi
14445
14446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14447$as_echo "$DEBUG_LEVEL" >&6; }
14448
14449  if test "x$DEBUG_LEVEL" != xrelease && \
14450      test "x$DEBUG_LEVEL" != xfastdebug && \
14451      test "x$DEBUG_LEVEL" != xslowdebug; then
14452    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14453  fi
14454
14455
14456  ###############################################################################
14457  #
14458  # Setup legacy vars/targets and new vars to deal with different debug levels.
14459  #
14460
14461  case $DEBUG_LEVEL in
14462    release )
14463      VARIANT="OPT"
14464      FASTDEBUG="false"
14465      DEBUG_CLASSFILES="false"
14466      BUILD_VARIANT_RELEASE=""
14467      HOTSPOT_DEBUG_LEVEL="product"
14468      HOTSPOT_EXPORT="product"
14469      ;;
14470    fastdebug )
14471      VARIANT="DBG"
14472      FASTDEBUG="true"
14473      DEBUG_CLASSFILES="true"
14474      BUILD_VARIANT_RELEASE="-fastdebug"
14475      HOTSPOT_DEBUG_LEVEL="fastdebug"
14476      HOTSPOT_EXPORT="fastdebug"
14477      ;;
14478    slowdebug )
14479      VARIANT="DBG"
14480      FASTDEBUG="false"
14481      DEBUG_CLASSFILES="true"
14482      BUILD_VARIANT_RELEASE="-debug"
14483      HOTSPOT_DEBUG_LEVEL="jvmg"
14484      HOTSPOT_EXPORT="debug"
14485      ;;
14486  esac
14487
14488  #####
14489  # Generate the legacy makefile targets for hotspot.
14490  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14491  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14492  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14493  # But until then ...
14494  HOTSPOT_TARGET=""
14495
14496  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14497    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14498  fi
14499
14500  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14501    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14502  fi
14503
14504  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14505    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14506  fi
14507
14508  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14509    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14510  fi
14511
14512  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14513    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14514  fi
14515
14516  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14517    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14518  fi
14519
14520  if test "x$JVM_VARIANT_CORE" = xtrue; then
14521    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14522  fi
14523
14524  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14525
14526  # On Macosx universal binaries are produced, but they only contain
14527  # 64 bit intel. This invalidates control of which jvms are built
14528  # from configure, but only server is valid anyway. Fix this
14529  # when hotspot makefiles are rewritten.
14530  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14531    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14532  fi
14533
14534  #####
14535
14536
14537
14538
14539
14540
14541
14542
14543# With basic setup done, call the custom early hook.
14544
14545
14546# To properly create a configuration name, we need to have the OpenJDK target
14547# and options (variants and debug level) parsed.
14548
14549
14550
14551# Check whether --with-conf-name was given.
14552if test "${with_conf_name+set}" = set; then :
14553  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14554fi
14555
14556
14557  # Test from where we are running configure, in or outside of src root.
14558  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14559      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14560      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14561    # We are running configure from the src root.
14562    # Create a default ./build/target-variant-debuglevel output root.
14563    if test "x${CONF_NAME}" = x; then
14564      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14565    fi
14566    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14567    $MKDIR -p "$OUTPUT_ROOT"
14568    if test ! -d "$OUTPUT_ROOT"; then
14569      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14570    fi
14571  else
14572    # We are running configure from outside of the src dir.
14573    # Then use the current directory as output dir!
14574    # If configuration is situated in normal build directory, just use the build
14575    # directory name as configuration name, otherwise use the complete path.
14576    if test "x${CONF_NAME}" = x; then
14577      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14578    fi
14579    OUTPUT_ROOT="$CURDIR"
14580
14581    # WARNING: This might be a bad thing to do. You need to be sure you want to
14582    # have a configuration in this directory. Do some sanity checks!
14583
14584    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14585      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14586      # other files
14587      files_present=`$LS $OUTPUT_ROOT`
14588      # Configure has already touched config.log and confdefs.h in the current dir when this check
14589      # is performed.
14590      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14591      | $TR -d '\n'`
14592      if test "x$filtered_files" != x; then
14593        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14594$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14595        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14596$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14597        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14598$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14599        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14600$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14601        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14602$as_echo "$as_me: seriously mess up just about everything." >&6;}
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14604$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14606$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14607        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14608      fi
14609    fi
14610  fi
14611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14612$as_echo_n "checking what configuration name to use... " >&6; }
14613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14614$as_echo "$CONF_NAME" >&6; }
14615
14616
14617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14618
14619  # Input might be given as Windows format, start by converting to
14620  # unix format.
14621  path="$OUTPUT_ROOT"
14622  new_path=`$CYGPATH -u "$path"`
14623
14624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14627  # "foo.exe" is OK but "foo" is an error.
14628  #
14629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14630  # It is also a way to make sure we got the proper file name for the real test later on.
14631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14632  if test "x$test_shortpath" = x; then
14633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14634$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14635    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14636  fi
14637
14638  # Call helper function which possibly converts this using DOS-style short mode.
14639  # If so, the updated path is stored in $new_path.
14640
14641  input_path="$new_path"
14642  # Check if we need to convert this using DOS-style short mode. If the path
14643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14644  # take no chances and rewrite it.
14645  # Note: m4 eats our [], so we need to use [ and ] instead.
14646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14647  if test "x$has_forbidden_chars" != x; then
14648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14652      # Going to short mode and back again did indeed matter. Since short mode is
14653      # case insensitive, let's make it lowercase to improve readability.
14654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14655      # Now convert it back to Unix-stile (cygpath)
14656      input_path=`$CYGPATH -u "$shortmode_path"`
14657      new_path="$input_path"
14658    fi
14659  fi
14660
14661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14662  if test "x$test_cygdrive_prefix" = x; then
14663    # As a simple fix, exclude /usr/bin since it's not a real path.
14664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14666      # a path prefixed by /cygdrive for fixpath to work.
14667      new_path="$CYGWIN_ROOT_PATH$input_path"
14668    fi
14669  fi
14670
14671
14672  if test "x$path" != "x$new_path"; then
14673    OUTPUT_ROOT="$new_path"
14674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14675$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14676  fi
14677
14678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14679
14680  path="$OUTPUT_ROOT"
14681  has_colon=`$ECHO $path | $GREP ^.:`
14682  new_path="$path"
14683  if test "x$has_colon" = x; then
14684    # Not in mixed or Windows style, start by that.
14685    new_path=`cmd //c echo $path`
14686  fi
14687
14688
14689  input_path="$new_path"
14690  # Check if we need to convert this using DOS-style short mode. If the path
14691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14692  # take no chances and rewrite it.
14693  # Note: m4 eats our [], so we need to use [ and ] instead.
14694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14695  if test "x$has_forbidden_chars" != x; then
14696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14698  fi
14699
14700
14701  windows_path="$new_path"
14702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14703    unix_path=`$CYGPATH -u "$windows_path"`
14704    new_path="$unix_path"
14705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14707    new_path="$unix_path"
14708  fi
14709
14710  if test "x$path" != "x$new_path"; then
14711    OUTPUT_ROOT="$new_path"
14712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14713$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14714  fi
14715
14716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14718
14719  else
14720    # We're on a posix platform. Hooray! :)
14721    path="$OUTPUT_ROOT"
14722    has_space=`$ECHO "$path" | $GREP " "`
14723    if test "x$has_space" != x; then
14724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14725$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14726      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14727    fi
14728
14729    # Use eval to expand a potential ~
14730    eval path="$path"
14731    if test ! -f "$path" && test ! -d "$path"; then
14732      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14733    fi
14734
14735    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14736  fi
14737
14738
14739  SPEC=$OUTPUT_ROOT/spec.gmk
14740
14741  CONF_NAME=$CONF_NAME
14742
14743  OUTPUT_ROOT=$OUTPUT_ROOT
14744
14745
14746  # Most of the probed defines are put into config.h
14747  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14748
14749  # The spec.gmk file contains all variables for the make system.
14750  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14751
14752  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14753  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14754
14755  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14756  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14757
14758  # The compare.sh is used to compare the build output to other builds.
14759  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14760
14761  # Spec.sh is currently used by compare-objects.sh
14762  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14763
14764  # The generated Makefile knows where the spec.gmk is and where the source is.
14765  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14766  # which will look for generated configurations
14767  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14768
14769
14770  # Save the arguments given to us
14771  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
14772
14773
14774# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14775
14776  for ac_prog in apt-get yum port pkgutil pkgadd
14777do
14778  # Extract the first word of "$ac_prog", so it can be a program name with args.
14779set dummy $ac_prog; ac_word=$2
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14781$as_echo_n "checking for $ac_word... " >&6; }
14782if ${ac_cv_prog_PKGHANDLER+:} false; then :
14783  $as_echo_n "(cached) " >&6
14784else
14785  if test -n "$PKGHANDLER"; then
14786  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14787else
14788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14789for as_dir in $PATH
14790do
14791  IFS=$as_save_IFS
14792  test -z "$as_dir" && as_dir=.
14793    for ac_exec_ext in '' $ac_executable_extensions; do
14794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14795    ac_cv_prog_PKGHANDLER="$ac_prog"
14796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14797    break 2
14798  fi
14799done
14800  done
14801IFS=$as_save_IFS
14802
14803fi
14804fi
14805PKGHANDLER=$ac_cv_prog_PKGHANDLER
14806if test -n "$PKGHANDLER"; then
14807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14808$as_echo "$PKGHANDLER" >&6; }
14809else
14810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14811$as_echo "no" >&6; }
14812fi
14813
14814
14815  test -n "$PKGHANDLER" && break
14816done
14817
14818
14819
14820# Setup tools that requires more complex handling, or that is not needed by the configure script.
14821
14822
14823  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14824  if test "x$MAKE" != x; then
14825    # User has supplied a make, test it.
14826    if test ! -f "$MAKE"; then
14827      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14828    fi
14829
14830  MAKE_CANDIDATE=""$MAKE""
14831  DESCRIPTION="user supplied MAKE=$MAKE"
14832  if test "x$MAKE_CANDIDATE" != x; then
14833    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14834$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14835    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14836    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14837    if test "x$IS_GNU_MAKE" = x; then
14838      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14839$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14840    else
14841      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14842      if test "x$IS_MODERN_MAKE" = x; then
14843        { $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
14844$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;}
14845      else
14846        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14847          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14848            MAKE_EXPECTED_ENV='cygwin'
14849          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14850            MAKE_EXPECTED_ENV='msys'
14851          else
14852            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14853          fi
14854          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14855          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14856        else
14857          # Not relevant for non-Windows
14858          IS_MAKE_CORRECT_ENV=true
14859        fi
14860        if test "x$IS_MAKE_CORRECT_ENV" = x; then
14861          { $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
14862$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;}
14863        else
14864          FOUND_MAKE=$MAKE_CANDIDATE
14865
14866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14867
14868  # First separate the path from the arguments. This will split at the first
14869  # space.
14870  complete="$FOUND_MAKE"
14871  path="${complete%% *}"
14872  tmp="$complete EOL"
14873  arguments="${tmp#* }"
14874
14875  # Input might be given as Windows format, start by converting to
14876  # unix format.
14877  new_path=`$CYGPATH -u "$path"`
14878
14879  # Now try to locate executable using which
14880  new_path=`$WHICH "$new_path" 2> /dev/null`
14881  # bat and cmd files are not always considered executable in cygwin causing which
14882  # to not find them
14883  if test "x$new_path" = x \
14884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14886    new_path=`$CYGPATH -u "$path"`
14887  fi
14888  if test "x$new_path" = x; then
14889    # Oops. Which didn't find the executable.
14890    # The splitting of arguments from the executable at a space might have been incorrect,
14891    # since paths with space are more likely in Windows. Give it another try with the whole
14892    # argument.
14893    path="$complete"
14894    arguments="EOL"
14895    new_path=`$CYGPATH -u "$path"`
14896    new_path=`$WHICH "$new_path" 2> /dev/null`
14897    # bat and cmd files are not always considered executable in cygwin causing which
14898    # to not find them
14899    if test "x$new_path" = x \
14900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14902      new_path=`$CYGPATH -u "$path"`
14903    fi
14904    if test "x$new_path" = x; then
14905      # It's still not found. Now this is an unrecoverable error.
14906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14908      has_space=`$ECHO "$complete" | $GREP " "`
14909      if test "x$has_space" != x; then
14910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14912      fi
14913      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14914    fi
14915  fi
14916
14917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14920  # "foo.exe" is OK but "foo" is an error.
14921  #
14922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
14923  # It is also a way to make sure we got the proper file name for the real test later on.
14924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14925  if test "x$test_shortpath" = x; then
14926    # Short path failed, file does not exist as specified.
14927    # Try adding .exe or .cmd
14928    if test -f "${new_path}.exe"; then
14929      input_to_shortpath="${new_path}.exe"
14930    elif test -f "${new_path}.cmd"; then
14931      input_to_shortpath="${new_path}.cmd"
14932    else
14933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
14934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
14935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
14936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
14937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14938    fi
14939  else
14940    input_to_shortpath="$new_path"
14941  fi
14942
14943  # Call helper function which possibly converts this using DOS-style short mode.
14944  # If so, the updated path is stored in $new_path.
14945  new_path="$input_to_shortpath"
14946
14947  input_path="$input_to_shortpath"
14948  # Check if we need to convert this using DOS-style short mode. If the path
14949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14950  # take no chances and rewrite it.
14951  # Note: m4 eats our [], so we need to use [ and ] instead.
14952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14953  if test "x$has_forbidden_chars" != x; then
14954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14958      # Going to short mode and back again did indeed matter. Since short mode is
14959      # case insensitive, let's make it lowercase to improve readability.
14960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14961      # Now convert it back to Unix-stile (cygpath)
14962      input_path=`$CYGPATH -u "$shortmode_path"`
14963      new_path="$input_path"
14964    fi
14965  fi
14966
14967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14968  if test "x$test_cygdrive_prefix" = x; then
14969    # As a simple fix, exclude /usr/bin since it's not a real path.
14970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
14971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14972      # a path prefixed by /cygdrive for fixpath to work.
14973      new_path="$CYGWIN_ROOT_PATH$input_path"
14974    fi
14975  fi
14976
14977  # remove trailing .exe if any
14978  new_path="${new_path/%.exe/}"
14979
14980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14981
14982  # First separate the path from the arguments. This will split at the first
14983  # space.
14984  complete="$FOUND_MAKE"
14985  path="${complete%% *}"
14986  tmp="$complete EOL"
14987  arguments="${tmp#* }"
14988
14989  # Input might be given as Windows format, start by converting to
14990  # unix format.
14991  new_path="$path"
14992
14993  windows_path="$new_path"
14994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14995    unix_path=`$CYGPATH -u "$windows_path"`
14996    new_path="$unix_path"
14997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14999    new_path="$unix_path"
15000  fi
15001
15002
15003  # Now try to locate executable using which
15004  new_path=`$WHICH "$new_path" 2> /dev/null`
15005
15006  if test "x$new_path" = x; then
15007    # Oops. Which didn't find the executable.
15008    # The splitting of arguments from the executable at a space might have been incorrect,
15009    # since paths with space are more likely in Windows. Give it another try with the whole
15010    # argument.
15011    path="$complete"
15012    arguments="EOL"
15013    new_path="$path"
15014
15015  windows_path="$new_path"
15016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017    unix_path=`$CYGPATH -u "$windows_path"`
15018    new_path="$unix_path"
15019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15021    new_path="$unix_path"
15022  fi
15023
15024
15025    new_path=`$WHICH "$new_path" 2> /dev/null`
15026
15027    if test "x$new_path" = x; then
15028      # It's still not found. Now this is an unrecoverable error.
15029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15031      has_space=`$ECHO "$complete" | $GREP " "`
15032      if test "x$has_space" != x; then
15033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15035      fi
15036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15037    fi
15038  fi
15039
15040  # Now new_path has a complete unix path to the binary
15041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15042    # Keep paths in /bin as-is, but remove trailing .exe if any
15043    new_path="${new_path/%.exe/}"
15044    # Do not save /bin paths to all_fixpath_prefixes!
15045  else
15046    # Not in mixed or Windows style, start by that.
15047    new_path=`cmd //c echo $new_path`
15048
15049  input_path="$new_path"
15050  # Check if we need to convert this using DOS-style short mode. If the path
15051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15052  # take no chances and rewrite it.
15053  # Note: m4 eats our [], so we need to use [ and ] instead.
15054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15055  if test "x$has_forbidden_chars" != x; then
15056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15058  fi
15059
15060    # Output is in $new_path
15061
15062  windows_path="$new_path"
15063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15064    unix_path=`$CYGPATH -u "$windows_path"`
15065    new_path="$unix_path"
15066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15068    new_path="$unix_path"
15069  fi
15070
15071    # remove trailing .exe if any
15072    new_path="${new_path/%.exe/}"
15073
15074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15076  fi
15077
15078  else
15079    # We're on a posix platform. Hooray! :)
15080    # First separate the path from the arguments. This will split at the first
15081    # space.
15082    complete="$FOUND_MAKE"
15083    path="${complete%% *}"
15084    tmp="$complete EOL"
15085    arguments="${tmp#* }"
15086
15087    # Cannot rely on the command "which" here since it doesn't always work.
15088    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15089    if test -z "$is_absolute_path"; then
15090      # Path to executable is not absolute. Find it.
15091      IFS_save="$IFS"
15092      IFS=:
15093      for p in $PATH; do
15094        if test -f "$p/$path" && test -x "$p/$path"; then
15095          new_path="$p/$path"
15096          break
15097        fi
15098      done
15099      IFS="$IFS_save"
15100    else
15101      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15102$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15103      new_path="$path"
15104    fi
15105
15106    if test "x$new_path" = x; then
15107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15108$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15109      has_space=`$ECHO "$complete" | $GREP " "`
15110      if test "x$has_space" != x; then
15111        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15113      fi
15114      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15115    fi
15116  fi
15117
15118  # Now join together the path and the arguments once again
15119  if test "x$arguments" != xEOL; then
15120    new_complete="$new_path ${arguments% *}"
15121  else
15122    new_complete="$new_path"
15123  fi
15124
15125  if test "x$complete" != "x$new_complete"; then
15126    FOUND_MAKE="$new_complete"
15127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15128$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15129  fi
15130
15131        fi
15132      fi
15133    fi
15134  fi
15135
15136    if test "x$FOUND_MAKE" = x; then
15137      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15138    fi
15139  else
15140    # Try our hardest to locate a correct version of GNU make
15141    for ac_prog in gmake
15142do
15143  # Extract the first word of "$ac_prog", so it can be a program name with args.
15144set dummy $ac_prog; ac_word=$2
15145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15146$as_echo_n "checking for $ac_word... " >&6; }
15147if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15148  $as_echo_n "(cached) " >&6
15149else
15150  case $CHECK_GMAKE in
15151  [\\/]* | ?:[\\/]*)
15152  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15153  ;;
15154  *)
15155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15156for as_dir in $PATH
15157do
15158  IFS=$as_save_IFS
15159  test -z "$as_dir" && as_dir=.
15160    for ac_exec_ext in '' $ac_executable_extensions; do
15161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15162    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15164    break 2
15165  fi
15166done
15167  done
15168IFS=$as_save_IFS
15169
15170  ;;
15171esac
15172fi
15173CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15174if test -n "$CHECK_GMAKE"; then
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15176$as_echo "$CHECK_GMAKE" >&6; }
15177else
15178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15179$as_echo "no" >&6; }
15180fi
15181
15182
15183  test -n "$CHECK_GMAKE" && break
15184done
15185
15186
15187  MAKE_CANDIDATE=""$CHECK_GMAKE""
15188  DESCRIPTION="gmake in PATH"
15189  if test "x$MAKE_CANDIDATE" != x; then
15190    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15191$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15192    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15193    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15194    if test "x$IS_GNU_MAKE" = x; then
15195      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15196$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15197    else
15198      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15199      if test "x$IS_MODERN_MAKE" = x; then
15200        { $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
15201$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;}
15202      else
15203        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15204          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15205            MAKE_EXPECTED_ENV='cygwin'
15206          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15207            MAKE_EXPECTED_ENV='msys'
15208          else
15209            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15210          fi
15211          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15212          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15213        else
15214          # Not relevant for non-Windows
15215          IS_MAKE_CORRECT_ENV=true
15216        fi
15217        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15218          { $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
15219$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;}
15220        else
15221          FOUND_MAKE=$MAKE_CANDIDATE
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # First separate the path from the arguments. This will split at the first
15226  # space.
15227  complete="$FOUND_MAKE"
15228  path="${complete%% *}"
15229  tmp="$complete EOL"
15230  arguments="${tmp#* }"
15231
15232  # Input might be given as Windows format, start by converting to
15233  # unix format.
15234  new_path=`$CYGPATH -u "$path"`
15235
15236  # Now try to locate executable using which
15237  new_path=`$WHICH "$new_path" 2> /dev/null`
15238  # bat and cmd files are not always considered executable in cygwin causing which
15239  # to not find them
15240  if test "x$new_path" = x \
15241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15243    new_path=`$CYGPATH -u "$path"`
15244  fi
15245  if test "x$new_path" = x; then
15246    # Oops. Which didn't find the executable.
15247    # The splitting of arguments from the executable at a space might have been incorrect,
15248    # since paths with space are more likely in Windows. Give it another try with the whole
15249    # argument.
15250    path="$complete"
15251    arguments="EOL"
15252    new_path=`$CYGPATH -u "$path"`
15253    new_path=`$WHICH "$new_path" 2> /dev/null`
15254    # bat and cmd files are not always considered executable in cygwin causing which
15255    # to not find them
15256    if test "x$new_path" = x \
15257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15259      new_path=`$CYGPATH -u "$path"`
15260    fi
15261    if test "x$new_path" = x; then
15262      # It's still not found. Now this is an unrecoverable error.
15263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15264$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15265      has_space=`$ECHO "$complete" | $GREP " "`
15266      if test "x$has_space" != x; then
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15269      fi
15270      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15271    fi
15272  fi
15273
15274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15277  # "foo.exe" is OK but "foo" is an error.
15278  #
15279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15280  # It is also a way to make sure we got the proper file name for the real test later on.
15281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15282  if test "x$test_shortpath" = x; then
15283    # Short path failed, file does not exist as specified.
15284    # Try adding .exe or .cmd
15285    if test -f "${new_path}.exe"; then
15286      input_to_shortpath="${new_path}.exe"
15287    elif test -f "${new_path}.cmd"; then
15288      input_to_shortpath="${new_path}.cmd"
15289    else
15290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15291$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15294      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15295    fi
15296  else
15297    input_to_shortpath="$new_path"
15298  fi
15299
15300  # Call helper function which possibly converts this using DOS-style short mode.
15301  # If so, the updated path is stored in $new_path.
15302  new_path="$input_to_shortpath"
15303
15304  input_path="$input_to_shortpath"
15305  # Check if we need to convert this using DOS-style short mode. If the path
15306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15307  # take no chances and rewrite it.
15308  # Note: m4 eats our [], so we need to use [ and ] instead.
15309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15310  if test "x$has_forbidden_chars" != x; then
15311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15315      # Going to short mode and back again did indeed matter. Since short mode is
15316      # case insensitive, let's make it lowercase to improve readability.
15317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15318      # Now convert it back to Unix-stile (cygpath)
15319      input_path=`$CYGPATH -u "$shortmode_path"`
15320      new_path="$input_path"
15321    fi
15322  fi
15323
15324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15325  if test "x$test_cygdrive_prefix" = x; then
15326    # As a simple fix, exclude /usr/bin since it's not a real path.
15327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15329      # a path prefixed by /cygdrive for fixpath to work.
15330      new_path="$CYGWIN_ROOT_PATH$input_path"
15331    fi
15332  fi
15333
15334  # remove trailing .exe if any
15335  new_path="${new_path/%.exe/}"
15336
15337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338
15339  # First separate the path from the arguments. This will split at the first
15340  # space.
15341  complete="$FOUND_MAKE"
15342  path="${complete%% *}"
15343  tmp="$complete EOL"
15344  arguments="${tmp#* }"
15345
15346  # Input might be given as Windows format, start by converting to
15347  # unix format.
15348  new_path="$path"
15349
15350  windows_path="$new_path"
15351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15352    unix_path=`$CYGPATH -u "$windows_path"`
15353    new_path="$unix_path"
15354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15356    new_path="$unix_path"
15357  fi
15358
15359
15360  # Now try to locate executable using which
15361  new_path=`$WHICH "$new_path" 2> /dev/null`
15362
15363  if test "x$new_path" = x; then
15364    # Oops. Which didn't find the executable.
15365    # The splitting of arguments from the executable at a space might have been incorrect,
15366    # since paths with space are more likely in Windows. Give it another try with the whole
15367    # argument.
15368    path="$complete"
15369    arguments="EOL"
15370    new_path="$path"
15371
15372  windows_path="$new_path"
15373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15374    unix_path=`$CYGPATH -u "$windows_path"`
15375    new_path="$unix_path"
15376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15378    new_path="$unix_path"
15379  fi
15380
15381
15382    new_path=`$WHICH "$new_path" 2> /dev/null`
15383
15384    if test "x$new_path" = x; then
15385      # It's still not found. Now this is an unrecoverable error.
15386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15388      has_space=`$ECHO "$complete" | $GREP " "`
15389      if test "x$has_space" != x; then
15390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15392      fi
15393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15394    fi
15395  fi
15396
15397  # Now new_path has a complete unix path to the binary
15398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15399    # Keep paths in /bin as-is, but remove trailing .exe if any
15400    new_path="${new_path/%.exe/}"
15401    # Do not save /bin paths to all_fixpath_prefixes!
15402  else
15403    # Not in mixed or Windows style, start by that.
15404    new_path=`cmd //c echo $new_path`
15405
15406  input_path="$new_path"
15407  # Check if we need to convert this using DOS-style short mode. If the path
15408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15409  # take no chances and rewrite it.
15410  # Note: m4 eats our [], so we need to use [ and ] instead.
15411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15412  if test "x$has_forbidden_chars" != x; then
15413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15415  fi
15416
15417    # Output is in $new_path
15418
15419  windows_path="$new_path"
15420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15421    unix_path=`$CYGPATH -u "$windows_path"`
15422    new_path="$unix_path"
15423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15425    new_path="$unix_path"
15426  fi
15427
15428    # remove trailing .exe if any
15429    new_path="${new_path/%.exe/}"
15430
15431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15433  fi
15434
15435  else
15436    # We're on a posix platform. Hooray! :)
15437    # First separate the path from the arguments. This will split at the first
15438    # space.
15439    complete="$FOUND_MAKE"
15440    path="${complete%% *}"
15441    tmp="$complete EOL"
15442    arguments="${tmp#* }"
15443
15444    # Cannot rely on the command "which" here since it doesn't always work.
15445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15446    if test -z "$is_absolute_path"; then
15447      # Path to executable is not absolute. Find it.
15448      IFS_save="$IFS"
15449      IFS=:
15450      for p in $PATH; do
15451        if test -f "$p/$path" && test -x "$p/$path"; then
15452          new_path="$p/$path"
15453          break
15454        fi
15455      done
15456      IFS="$IFS_save"
15457    else
15458      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15459$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15460      new_path="$path"
15461    fi
15462
15463    if test "x$new_path" = x; then
15464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15466      has_space=`$ECHO "$complete" | $GREP " "`
15467      if test "x$has_space" != x; then
15468        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15470      fi
15471      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15472    fi
15473  fi
15474
15475  # Now join together the path and the arguments once again
15476  if test "x$arguments" != xEOL; then
15477    new_complete="$new_path ${arguments% *}"
15478  else
15479    new_complete="$new_path"
15480  fi
15481
15482  if test "x$complete" != "x$new_complete"; then
15483    FOUND_MAKE="$new_complete"
15484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15485$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15486  fi
15487
15488        fi
15489      fi
15490    fi
15491  fi
15492
15493
15494    if test "x$FOUND_MAKE" = x; then
15495      for ac_prog in make
15496do
15497  # Extract the first word of "$ac_prog", so it can be a program name with args.
15498set dummy $ac_prog; ac_word=$2
15499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15500$as_echo_n "checking for $ac_word... " >&6; }
15501if ${ac_cv_path_CHECK_MAKE+:} false; then :
15502  $as_echo_n "(cached) " >&6
15503else
15504  case $CHECK_MAKE in
15505  [\\/]* | ?:[\\/]*)
15506  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15507  ;;
15508  *)
15509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15510for as_dir in $PATH
15511do
15512  IFS=$as_save_IFS
15513  test -z "$as_dir" && as_dir=.
15514    for ac_exec_ext in '' $ac_executable_extensions; do
15515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15516    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15518    break 2
15519  fi
15520done
15521  done
15522IFS=$as_save_IFS
15523
15524  ;;
15525esac
15526fi
15527CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15528if test -n "$CHECK_MAKE"; then
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15530$as_echo "$CHECK_MAKE" >&6; }
15531else
15532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15533$as_echo "no" >&6; }
15534fi
15535
15536
15537  test -n "$CHECK_MAKE" && break
15538done
15539
15540
15541  MAKE_CANDIDATE=""$CHECK_MAKE""
15542  DESCRIPTION="make in PATH"
15543  if test "x$MAKE_CANDIDATE" != x; then
15544    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15545$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15546    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15547    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15548    if test "x$IS_GNU_MAKE" = x; then
15549      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15550$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15551    else
15552      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15553      if test "x$IS_MODERN_MAKE" = x; then
15554        { $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
15555$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;}
15556      else
15557        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15558          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15559            MAKE_EXPECTED_ENV='cygwin'
15560          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15561            MAKE_EXPECTED_ENV='msys'
15562          else
15563            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15564          fi
15565          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15566          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15567        else
15568          # Not relevant for non-Windows
15569          IS_MAKE_CORRECT_ENV=true
15570        fi
15571        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15572          { $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
15573$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;}
15574        else
15575          FOUND_MAKE=$MAKE_CANDIDATE
15576
15577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15578
15579  # First separate the path from the arguments. This will split at the first
15580  # space.
15581  complete="$FOUND_MAKE"
15582  path="${complete%% *}"
15583  tmp="$complete EOL"
15584  arguments="${tmp#* }"
15585
15586  # Input might be given as Windows format, start by converting to
15587  # unix format.
15588  new_path=`$CYGPATH -u "$path"`
15589
15590  # Now try to locate executable using which
15591  new_path=`$WHICH "$new_path" 2> /dev/null`
15592  # bat and cmd files are not always considered executable in cygwin causing which
15593  # to not find them
15594  if test "x$new_path" = x \
15595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15597    new_path=`$CYGPATH -u "$path"`
15598  fi
15599  if test "x$new_path" = x; then
15600    # Oops. Which didn't find the executable.
15601    # The splitting of arguments from the executable at a space might have been incorrect,
15602    # since paths with space are more likely in Windows. Give it another try with the whole
15603    # argument.
15604    path="$complete"
15605    arguments="EOL"
15606    new_path=`$CYGPATH -u "$path"`
15607    new_path=`$WHICH "$new_path" 2> /dev/null`
15608    # bat and cmd files are not always considered executable in cygwin causing which
15609    # to not find them
15610    if test "x$new_path" = x \
15611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15613      new_path=`$CYGPATH -u "$path"`
15614    fi
15615    if test "x$new_path" = x; then
15616      # It's still not found. Now this is an unrecoverable error.
15617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15619      has_space=`$ECHO "$complete" | $GREP " "`
15620      if test "x$has_space" != x; then
15621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15623      fi
15624      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15625    fi
15626  fi
15627
15628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15631  # "foo.exe" is OK but "foo" is an error.
15632  #
15633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15634  # It is also a way to make sure we got the proper file name for the real test later on.
15635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15636  if test "x$test_shortpath" = x; then
15637    # Short path failed, file does not exist as specified.
15638    # Try adding .exe or .cmd
15639    if test -f "${new_path}.exe"; then
15640      input_to_shortpath="${new_path}.exe"
15641    elif test -f "${new_path}.cmd"; then
15642      input_to_shortpath="${new_path}.cmd"
15643    else
15644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15648      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15649    fi
15650  else
15651    input_to_shortpath="$new_path"
15652  fi
15653
15654  # Call helper function which possibly converts this using DOS-style short mode.
15655  # If so, the updated path is stored in $new_path.
15656  new_path="$input_to_shortpath"
15657
15658  input_path="$input_to_shortpath"
15659  # Check if we need to convert this using DOS-style short mode. If the path
15660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15661  # take no chances and rewrite it.
15662  # Note: m4 eats our [], so we need to use [ and ] instead.
15663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15664  if test "x$has_forbidden_chars" != x; then
15665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15669      # Going to short mode and back again did indeed matter. Since short mode is
15670      # case insensitive, let's make it lowercase to improve readability.
15671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15672      # Now convert it back to Unix-stile (cygpath)
15673      input_path=`$CYGPATH -u "$shortmode_path"`
15674      new_path="$input_path"
15675    fi
15676  fi
15677
15678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15679  if test "x$test_cygdrive_prefix" = x; then
15680    # As a simple fix, exclude /usr/bin since it's not a real path.
15681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15683      # a path prefixed by /cygdrive for fixpath to work.
15684      new_path="$CYGWIN_ROOT_PATH$input_path"
15685    fi
15686  fi
15687
15688  # remove trailing .exe if any
15689  new_path="${new_path/%.exe/}"
15690
15691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15692
15693  # First separate the path from the arguments. This will split at the first
15694  # space.
15695  complete="$FOUND_MAKE"
15696  path="${complete%% *}"
15697  tmp="$complete EOL"
15698  arguments="${tmp#* }"
15699
15700  # Input might be given as Windows format, start by converting to
15701  # unix format.
15702  new_path="$path"
15703
15704  windows_path="$new_path"
15705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15706    unix_path=`$CYGPATH -u "$windows_path"`
15707    new_path="$unix_path"
15708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15710    new_path="$unix_path"
15711  fi
15712
15713
15714  # Now try to locate executable using which
15715  new_path=`$WHICH "$new_path" 2> /dev/null`
15716
15717  if test "x$new_path" = x; then
15718    # Oops. Which didn't find the executable.
15719    # The splitting of arguments from the executable at a space might have been incorrect,
15720    # since paths with space are more likely in Windows. Give it another try with the whole
15721    # argument.
15722    path="$complete"
15723    arguments="EOL"
15724    new_path="$path"
15725
15726  windows_path="$new_path"
15727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15728    unix_path=`$CYGPATH -u "$windows_path"`
15729    new_path="$unix_path"
15730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15732    new_path="$unix_path"
15733  fi
15734
15735
15736    new_path=`$WHICH "$new_path" 2> /dev/null`
15737
15738    if test "x$new_path" = x; then
15739      # It's still not found. Now this is an unrecoverable error.
15740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15742      has_space=`$ECHO "$complete" | $GREP " "`
15743      if test "x$has_space" != x; then
15744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15746      fi
15747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15748    fi
15749  fi
15750
15751  # Now new_path has a complete unix path to the binary
15752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15753    # Keep paths in /bin as-is, but remove trailing .exe if any
15754    new_path="${new_path/%.exe/}"
15755    # Do not save /bin paths to all_fixpath_prefixes!
15756  else
15757    # Not in mixed or Windows style, start by that.
15758    new_path=`cmd //c echo $new_path`
15759
15760  input_path="$new_path"
15761  # Check if we need to convert this using DOS-style short mode. If the path
15762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15763  # take no chances and rewrite it.
15764  # Note: m4 eats our [], so we need to use [ and ] instead.
15765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15766  if test "x$has_forbidden_chars" != x; then
15767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15769  fi
15770
15771    # Output is in $new_path
15772
15773  windows_path="$new_path"
15774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15775    unix_path=`$CYGPATH -u "$windows_path"`
15776    new_path="$unix_path"
15777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15779    new_path="$unix_path"
15780  fi
15781
15782    # remove trailing .exe if any
15783    new_path="${new_path/%.exe/}"
15784
15785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15787  fi
15788
15789  else
15790    # We're on a posix platform. Hooray! :)
15791    # First separate the path from the arguments. This will split at the first
15792    # space.
15793    complete="$FOUND_MAKE"
15794    path="${complete%% *}"
15795    tmp="$complete EOL"
15796    arguments="${tmp#* }"
15797
15798    # Cannot rely on the command "which" here since it doesn't always work.
15799    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15800    if test -z "$is_absolute_path"; then
15801      # Path to executable is not absolute. Find it.
15802      IFS_save="$IFS"
15803      IFS=:
15804      for p in $PATH; do
15805        if test -f "$p/$path" && test -x "$p/$path"; then
15806          new_path="$p/$path"
15807          break
15808        fi
15809      done
15810      IFS="$IFS_save"
15811    else
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15813$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15814      new_path="$path"
15815    fi
15816
15817    if test "x$new_path" = x; then
15818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15820      has_space=`$ECHO "$complete" | $GREP " "`
15821      if test "x$has_space" != x; then
15822        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15824      fi
15825      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15826    fi
15827  fi
15828
15829  # Now join together the path and the arguments once again
15830  if test "x$arguments" != xEOL; then
15831    new_complete="$new_path ${arguments% *}"
15832  else
15833    new_complete="$new_path"
15834  fi
15835
15836  if test "x$complete" != "x$new_complete"; then
15837    FOUND_MAKE="$new_complete"
15838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15839$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15840  fi
15841
15842        fi
15843      fi
15844    fi
15845  fi
15846
15847    fi
15848
15849    if test "x$FOUND_MAKE" = x; then
15850      if test "x$TOOLS_DIR" != x; then
15851        # We have a tools-dir, check that as well before giving up.
15852        OLD_PATH=$PATH
15853        PATH=$TOOLS_DIR:$PATH
15854        for ac_prog in gmake
15855do
15856  # Extract the first word of "$ac_prog", so it can be a program name with args.
15857set dummy $ac_prog; ac_word=$2
15858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15859$as_echo_n "checking for $ac_word... " >&6; }
15860if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15861  $as_echo_n "(cached) " >&6
15862else
15863  case $CHECK_TOOLSDIR_GMAKE in
15864  [\\/]* | ?:[\\/]*)
15865  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15866  ;;
15867  *)
15868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15869for as_dir in $PATH
15870do
15871  IFS=$as_save_IFS
15872  test -z "$as_dir" && as_dir=.
15873    for ac_exec_ext in '' $ac_executable_extensions; do
15874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15875    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15877    break 2
15878  fi
15879done
15880  done
15881IFS=$as_save_IFS
15882
15883  ;;
15884esac
15885fi
15886CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15887if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15889$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15890else
15891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15892$as_echo "no" >&6; }
15893fi
15894
15895
15896  test -n "$CHECK_TOOLSDIR_GMAKE" && break
15897done
15898
15899
15900  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15901  DESCRIPTION="gmake in tools-dir"
15902  if test "x$MAKE_CANDIDATE" != x; then
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15904$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15905    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15906    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15907    if test "x$IS_GNU_MAKE" = x; then
15908      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15909$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15910    else
15911      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15912      if test "x$IS_MODERN_MAKE" = x; then
15913        { $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
15914$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;}
15915      else
15916        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15917          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15918            MAKE_EXPECTED_ENV='cygwin'
15919          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15920            MAKE_EXPECTED_ENV='msys'
15921          else
15922            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15923          fi
15924          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15925          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15926        else
15927          # Not relevant for non-Windows
15928          IS_MAKE_CORRECT_ENV=true
15929        fi
15930        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15931          { $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
15932$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;}
15933        else
15934          FOUND_MAKE=$MAKE_CANDIDATE
15935
15936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15937
15938  # First separate the path from the arguments. This will split at the first
15939  # space.
15940  complete="$FOUND_MAKE"
15941  path="${complete%% *}"
15942  tmp="$complete EOL"
15943  arguments="${tmp#* }"
15944
15945  # Input might be given as Windows format, start by converting to
15946  # unix format.
15947  new_path=`$CYGPATH -u "$path"`
15948
15949  # Now try to locate executable using which
15950  new_path=`$WHICH "$new_path" 2> /dev/null`
15951  # bat and cmd files are not always considered executable in cygwin causing which
15952  # to not find them
15953  if test "x$new_path" = x \
15954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15956    new_path=`$CYGPATH -u "$path"`
15957  fi
15958  if test "x$new_path" = x; then
15959    # Oops. Which didn't find the executable.
15960    # The splitting of arguments from the executable at a space might have been incorrect,
15961    # since paths with space are more likely in Windows. Give it another try with the whole
15962    # argument.
15963    path="$complete"
15964    arguments="EOL"
15965    new_path=`$CYGPATH -u "$path"`
15966    new_path=`$WHICH "$new_path" 2> /dev/null`
15967    # bat and cmd files are not always considered executable in cygwin causing which
15968    # to not find them
15969    if test "x$new_path" = x \
15970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15972      new_path=`$CYGPATH -u "$path"`
15973    fi
15974    if test "x$new_path" = x; then
15975      # It's still not found. Now this is an unrecoverable error.
15976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15978      has_space=`$ECHO "$complete" | $GREP " "`
15979      if test "x$has_space" != x; then
15980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15982      fi
15983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15984    fi
15985  fi
15986
15987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15990  # "foo.exe" is OK but "foo" is an error.
15991  #
15992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15993  # It is also a way to make sure we got the proper file name for the real test later on.
15994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15995  if test "x$test_shortpath" = x; then
15996    # Short path failed, file does not exist as specified.
15997    # Try adding .exe or .cmd
15998    if test -f "${new_path}.exe"; then
15999      input_to_shortpath="${new_path}.exe"
16000    elif test -f "${new_path}.cmd"; then
16001      input_to_shortpath="${new_path}.cmd"
16002    else
16003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16007      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16008    fi
16009  else
16010    input_to_shortpath="$new_path"
16011  fi
16012
16013  # Call helper function which possibly converts this using DOS-style short mode.
16014  # If so, the updated path is stored in $new_path.
16015  new_path="$input_to_shortpath"
16016
16017  input_path="$input_to_shortpath"
16018  # Check if we need to convert this using DOS-style short mode. If the path
16019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16020  # take no chances and rewrite it.
16021  # Note: m4 eats our [], so we need to use [ and ] instead.
16022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16023  if test "x$has_forbidden_chars" != x; then
16024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16028      # Going to short mode and back again did indeed matter. Since short mode is
16029      # case insensitive, let's make it lowercase to improve readability.
16030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16031      # Now convert it back to Unix-stile (cygpath)
16032      input_path=`$CYGPATH -u "$shortmode_path"`
16033      new_path="$input_path"
16034    fi
16035  fi
16036
16037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16038  if test "x$test_cygdrive_prefix" = x; then
16039    # As a simple fix, exclude /usr/bin since it's not a real path.
16040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16042      # a path prefixed by /cygdrive for fixpath to work.
16043      new_path="$CYGWIN_ROOT_PATH$input_path"
16044    fi
16045  fi
16046
16047  # remove trailing .exe if any
16048  new_path="${new_path/%.exe/}"
16049
16050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16051
16052  # First separate the path from the arguments. This will split at the first
16053  # space.
16054  complete="$FOUND_MAKE"
16055  path="${complete%% *}"
16056  tmp="$complete EOL"
16057  arguments="${tmp#* }"
16058
16059  # Input might be given as Windows format, start by converting to
16060  # unix format.
16061  new_path="$path"
16062
16063  windows_path="$new_path"
16064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16065    unix_path=`$CYGPATH -u "$windows_path"`
16066    new_path="$unix_path"
16067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16069    new_path="$unix_path"
16070  fi
16071
16072
16073  # Now try to locate executable using which
16074  new_path=`$WHICH "$new_path" 2> /dev/null`
16075
16076  if test "x$new_path" = x; then
16077    # Oops. Which didn't find the executable.
16078    # The splitting of arguments from the executable at a space might have been incorrect,
16079    # since paths with space are more likely in Windows. Give it another try with the whole
16080    # argument.
16081    path="$complete"
16082    arguments="EOL"
16083    new_path="$path"
16084
16085  windows_path="$new_path"
16086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16087    unix_path=`$CYGPATH -u "$windows_path"`
16088    new_path="$unix_path"
16089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16091    new_path="$unix_path"
16092  fi
16093
16094
16095    new_path=`$WHICH "$new_path" 2> /dev/null`
16096
16097    if test "x$new_path" = x; then
16098      # It's still not found. Now this is an unrecoverable error.
16099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16100$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16101      has_space=`$ECHO "$complete" | $GREP " "`
16102      if test "x$has_space" != x; then
16103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16105      fi
16106      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16107    fi
16108  fi
16109
16110  # Now new_path has a complete unix path to the binary
16111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16112    # Keep paths in /bin as-is, but remove trailing .exe if any
16113    new_path="${new_path/%.exe/}"
16114    # Do not save /bin paths to all_fixpath_prefixes!
16115  else
16116    # Not in mixed or Windows style, start by that.
16117    new_path=`cmd //c echo $new_path`
16118
16119  input_path="$new_path"
16120  # Check if we need to convert this using DOS-style short mode. If the path
16121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16122  # take no chances and rewrite it.
16123  # Note: m4 eats our [], so we need to use [ and ] instead.
16124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16125  if test "x$has_forbidden_chars" != x; then
16126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16128  fi
16129
16130    # Output is in $new_path
16131
16132  windows_path="$new_path"
16133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16134    unix_path=`$CYGPATH -u "$windows_path"`
16135    new_path="$unix_path"
16136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16138    new_path="$unix_path"
16139  fi
16140
16141    # remove trailing .exe if any
16142    new_path="${new_path/%.exe/}"
16143
16144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16146  fi
16147
16148  else
16149    # We're on a posix platform. Hooray! :)
16150    # First separate the path from the arguments. This will split at the first
16151    # space.
16152    complete="$FOUND_MAKE"
16153    path="${complete%% *}"
16154    tmp="$complete EOL"
16155    arguments="${tmp#* }"
16156
16157    # Cannot rely on the command "which" here since it doesn't always work.
16158    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16159    if test -z "$is_absolute_path"; then
16160      # Path to executable is not absolute. Find it.
16161      IFS_save="$IFS"
16162      IFS=:
16163      for p in $PATH; do
16164        if test -f "$p/$path" && test -x "$p/$path"; then
16165          new_path="$p/$path"
16166          break
16167        fi
16168      done
16169      IFS="$IFS_save"
16170    else
16171      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16172$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16173      new_path="$path"
16174    fi
16175
16176    if test "x$new_path" = x; then
16177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16178$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16179      has_space=`$ECHO "$complete" | $GREP " "`
16180      if test "x$has_space" != x; then
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16183      fi
16184      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16185    fi
16186  fi
16187
16188  # Now join together the path and the arguments once again
16189  if test "x$arguments" != xEOL; then
16190    new_complete="$new_path ${arguments% *}"
16191  else
16192    new_complete="$new_path"
16193  fi
16194
16195  if test "x$complete" != "x$new_complete"; then
16196    FOUND_MAKE="$new_complete"
16197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16198$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16199  fi
16200
16201        fi
16202      fi
16203    fi
16204  fi
16205
16206        if test "x$FOUND_MAKE" = x; then
16207          for ac_prog in make
16208do
16209  # Extract the first word of "$ac_prog", so it can be a program name with args.
16210set dummy $ac_prog; ac_word=$2
16211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16212$as_echo_n "checking for $ac_word... " >&6; }
16213if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16214  $as_echo_n "(cached) " >&6
16215else
16216  case $CHECK_TOOLSDIR_MAKE in
16217  [\\/]* | ?:[\\/]*)
16218  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16219  ;;
16220  *)
16221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16222for as_dir in $PATH
16223do
16224  IFS=$as_save_IFS
16225  test -z "$as_dir" && as_dir=.
16226    for ac_exec_ext in '' $ac_executable_extensions; do
16227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16228    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16230    break 2
16231  fi
16232done
16233  done
16234IFS=$as_save_IFS
16235
16236  ;;
16237esac
16238fi
16239CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16240if test -n "$CHECK_TOOLSDIR_MAKE"; then
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16242$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16243else
16244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16245$as_echo "no" >&6; }
16246fi
16247
16248
16249  test -n "$CHECK_TOOLSDIR_MAKE" && break
16250done
16251
16252
16253  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16254  DESCRIPTION="make in tools-dir"
16255  if test "x$MAKE_CANDIDATE" != x; then
16256    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16257$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16258    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16259    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16260    if test "x$IS_GNU_MAKE" = x; then
16261      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16262$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16263    else
16264      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16265      if test "x$IS_MODERN_MAKE" = x; then
16266        { $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
16267$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;}
16268      else
16269        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16270          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16271            MAKE_EXPECTED_ENV='cygwin'
16272          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16273            MAKE_EXPECTED_ENV='msys'
16274          else
16275            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16276          fi
16277          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16278          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16279        else
16280          # Not relevant for non-Windows
16281          IS_MAKE_CORRECT_ENV=true
16282        fi
16283        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16284          { $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
16285$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;}
16286        else
16287          FOUND_MAKE=$MAKE_CANDIDATE
16288
16289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16290
16291  # First separate the path from the arguments. This will split at the first
16292  # space.
16293  complete="$FOUND_MAKE"
16294  path="${complete%% *}"
16295  tmp="$complete EOL"
16296  arguments="${tmp#* }"
16297
16298  # Input might be given as Windows format, start by converting to
16299  # unix format.
16300  new_path=`$CYGPATH -u "$path"`
16301
16302  # Now try to locate executable using which
16303  new_path=`$WHICH "$new_path" 2> /dev/null`
16304  # bat and cmd files are not always considered executable in cygwin causing which
16305  # to not find them
16306  if test "x$new_path" = x \
16307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16309    new_path=`$CYGPATH -u "$path"`
16310  fi
16311  if test "x$new_path" = x; then
16312    # Oops. Which didn't find the executable.
16313    # The splitting of arguments from the executable at a space might have been incorrect,
16314    # since paths with space are more likely in Windows. Give it another try with the whole
16315    # argument.
16316    path="$complete"
16317    arguments="EOL"
16318    new_path=`$CYGPATH -u "$path"`
16319    new_path=`$WHICH "$new_path" 2> /dev/null`
16320    # bat and cmd files are not always considered executable in cygwin causing which
16321    # to not find them
16322    if test "x$new_path" = x \
16323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16325      new_path=`$CYGPATH -u "$path"`
16326    fi
16327    if test "x$new_path" = x; then
16328      # It's still not found. Now this is an unrecoverable error.
16329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16331      has_space=`$ECHO "$complete" | $GREP " "`
16332      if test "x$has_space" != x; then
16333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16335      fi
16336      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16337    fi
16338  fi
16339
16340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16343  # "foo.exe" is OK but "foo" is an error.
16344  #
16345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16346  # It is also a way to make sure we got the proper file name for the real test later on.
16347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16348  if test "x$test_shortpath" = x; then
16349    # Short path failed, file does not exist as specified.
16350    # Try adding .exe or .cmd
16351    if test -f "${new_path}.exe"; then
16352      input_to_shortpath="${new_path}.exe"
16353    elif test -f "${new_path}.cmd"; then
16354      input_to_shortpath="${new_path}.cmd"
16355    else
16356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16360      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16361    fi
16362  else
16363    input_to_shortpath="$new_path"
16364  fi
16365
16366  # Call helper function which possibly converts this using DOS-style short mode.
16367  # If so, the updated path is stored in $new_path.
16368  new_path="$input_to_shortpath"
16369
16370  input_path="$input_to_shortpath"
16371  # Check if we need to convert this using DOS-style short mode. If the path
16372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16373  # take no chances and rewrite it.
16374  # Note: m4 eats our [], so we need to use [ and ] instead.
16375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16376  if test "x$has_forbidden_chars" != x; then
16377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16381      # Going to short mode and back again did indeed matter. Since short mode is
16382      # case insensitive, let's make it lowercase to improve readability.
16383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16384      # Now convert it back to Unix-stile (cygpath)
16385      input_path=`$CYGPATH -u "$shortmode_path"`
16386      new_path="$input_path"
16387    fi
16388  fi
16389
16390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16391  if test "x$test_cygdrive_prefix" = x; then
16392    # As a simple fix, exclude /usr/bin since it's not a real path.
16393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16395      # a path prefixed by /cygdrive for fixpath to work.
16396      new_path="$CYGWIN_ROOT_PATH$input_path"
16397    fi
16398  fi
16399
16400  # remove trailing .exe if any
16401  new_path="${new_path/%.exe/}"
16402
16403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16404
16405  # First separate the path from the arguments. This will split at the first
16406  # space.
16407  complete="$FOUND_MAKE"
16408  path="${complete%% *}"
16409  tmp="$complete EOL"
16410  arguments="${tmp#* }"
16411
16412  # Input might be given as Windows format, start by converting to
16413  # unix format.
16414  new_path="$path"
16415
16416  windows_path="$new_path"
16417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16418    unix_path=`$CYGPATH -u "$windows_path"`
16419    new_path="$unix_path"
16420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16422    new_path="$unix_path"
16423  fi
16424
16425
16426  # Now try to locate executable using which
16427  new_path=`$WHICH "$new_path" 2> /dev/null`
16428
16429  if test "x$new_path" = x; then
16430    # Oops. Which didn't find the executable.
16431    # The splitting of arguments from the executable at a space might have been incorrect,
16432    # since paths with space are more likely in Windows. Give it another try with the whole
16433    # argument.
16434    path="$complete"
16435    arguments="EOL"
16436    new_path="$path"
16437
16438  windows_path="$new_path"
16439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16440    unix_path=`$CYGPATH -u "$windows_path"`
16441    new_path="$unix_path"
16442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16444    new_path="$unix_path"
16445  fi
16446
16447
16448    new_path=`$WHICH "$new_path" 2> /dev/null`
16449
16450    if test "x$new_path" = x; then
16451      # It's still not found. Now this is an unrecoverable error.
16452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16454      has_space=`$ECHO "$complete" | $GREP " "`
16455      if test "x$has_space" != x; then
16456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16458      fi
16459      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16460    fi
16461  fi
16462
16463  # Now new_path has a complete unix path to the binary
16464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16465    # Keep paths in /bin as-is, but remove trailing .exe if any
16466    new_path="${new_path/%.exe/}"
16467    # Do not save /bin paths to all_fixpath_prefixes!
16468  else
16469    # Not in mixed or Windows style, start by that.
16470    new_path=`cmd //c echo $new_path`
16471
16472  input_path="$new_path"
16473  # Check if we need to convert this using DOS-style short mode. If the path
16474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16475  # take no chances and rewrite it.
16476  # Note: m4 eats our [], so we need to use [ and ] instead.
16477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16478  if test "x$has_forbidden_chars" != x; then
16479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16481  fi
16482
16483    # Output is in $new_path
16484
16485  windows_path="$new_path"
16486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16487    unix_path=`$CYGPATH -u "$windows_path"`
16488    new_path="$unix_path"
16489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16491    new_path="$unix_path"
16492  fi
16493
16494    # remove trailing .exe if any
16495    new_path="${new_path/%.exe/}"
16496
16497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16499  fi
16500
16501  else
16502    # We're on a posix platform. Hooray! :)
16503    # First separate the path from the arguments. This will split at the first
16504    # space.
16505    complete="$FOUND_MAKE"
16506    path="${complete%% *}"
16507    tmp="$complete EOL"
16508    arguments="${tmp#* }"
16509
16510    # Cannot rely on the command "which" here since it doesn't always work.
16511    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16512    if test -z "$is_absolute_path"; then
16513      # Path to executable is not absolute. Find it.
16514      IFS_save="$IFS"
16515      IFS=:
16516      for p in $PATH; do
16517        if test -f "$p/$path" && test -x "$p/$path"; then
16518          new_path="$p/$path"
16519          break
16520        fi
16521      done
16522      IFS="$IFS_save"
16523    else
16524      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16525$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16526      new_path="$path"
16527    fi
16528
16529    if test "x$new_path" = x; then
16530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16531$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16532      has_space=`$ECHO "$complete" | $GREP " "`
16533      if test "x$has_space" != x; then
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16536      fi
16537      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16538    fi
16539  fi
16540
16541  # Now join together the path and the arguments once again
16542  if test "x$arguments" != xEOL; then
16543    new_complete="$new_path ${arguments% *}"
16544  else
16545    new_complete="$new_path"
16546  fi
16547
16548  if test "x$complete" != "x$new_complete"; then
16549    FOUND_MAKE="$new_complete"
16550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16551$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16552  fi
16553
16554        fi
16555      fi
16556    fi
16557  fi
16558
16559        fi
16560        PATH=$OLD_PATH
16561      fi
16562    fi
16563
16564    if test "x$FOUND_MAKE" = x; then
16565      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
16566    fi
16567  fi
16568
16569  MAKE=$FOUND_MAKE
16570
16571  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16572$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16573
16574
16575
16576  # Test if find supports -delete
16577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16578$as_echo_n "checking if find supports -delete... " >&6; }
16579  FIND_DELETE="-delete"
16580
16581  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16582
16583  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16584
16585  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16586  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16587    # No, it does not.
16588    rm $DELETEDIR/TestIfFindSupportsDelete
16589    FIND_DELETE="-exec rm \{\} \+"
16590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16591$as_echo "no" >&6; }
16592  else
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16594$as_echo "yes" >&6; }
16595  fi
16596  rmdir $DELETEDIR
16597
16598
16599
16600  # These tools might not be installed by default,
16601  # need hint on how to install them.
16602
16603
16604
16605  # Publish this variable in the help.
16606
16607
16608  if test "x$UNZIP" = x; then
16609    # The variable is not set by user, try to locate tool using the code snippet
16610    for ac_prog in unzip
16611do
16612  # Extract the first word of "$ac_prog", so it can be a program name with args.
16613set dummy $ac_prog; ac_word=$2
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16615$as_echo_n "checking for $ac_word... " >&6; }
16616if ${ac_cv_path_UNZIP+:} false; then :
16617  $as_echo_n "(cached) " >&6
16618else
16619  case $UNZIP in
16620  [\\/]* | ?:[\\/]*)
16621  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16622  ;;
16623  *)
16624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16625for as_dir in $PATH
16626do
16627  IFS=$as_save_IFS
16628  test -z "$as_dir" && as_dir=.
16629    for ac_exec_ext in '' $ac_executable_extensions; do
16630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16631    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16633    break 2
16634  fi
16635done
16636  done
16637IFS=$as_save_IFS
16638
16639  ;;
16640esac
16641fi
16642UNZIP=$ac_cv_path_UNZIP
16643if test -n "$UNZIP"; then
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16645$as_echo "$UNZIP" >&6; }
16646else
16647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16648$as_echo "no" >&6; }
16649fi
16650
16651
16652  test -n "$UNZIP" && break
16653done
16654
16655  else
16656    # The variable is set, but is it from the command line or the environment?
16657
16658    # Try to remove the string !UNZIP! from our list.
16659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16661      # If it failed, the variable was not from the command line. Ignore it,
16662      # but warn the user (except for BASH, which is always set by the calling BASH).
16663      if test "xUNZIP" != xBASH; then
16664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16665$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16666      fi
16667      # Try to locate tool using the code snippet
16668      for ac_prog in unzip
16669do
16670  # Extract the first word of "$ac_prog", so it can be a program name with args.
16671set dummy $ac_prog; ac_word=$2
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16673$as_echo_n "checking for $ac_word... " >&6; }
16674if ${ac_cv_path_UNZIP+:} false; then :
16675  $as_echo_n "(cached) " >&6
16676else
16677  case $UNZIP in
16678  [\\/]* | ?:[\\/]*)
16679  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16680  ;;
16681  *)
16682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16683for as_dir in $PATH
16684do
16685  IFS=$as_save_IFS
16686  test -z "$as_dir" && as_dir=.
16687    for ac_exec_ext in '' $ac_executable_extensions; do
16688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16689    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16691    break 2
16692  fi
16693done
16694  done
16695IFS=$as_save_IFS
16696
16697  ;;
16698esac
16699fi
16700UNZIP=$ac_cv_path_UNZIP
16701if test -n "$UNZIP"; then
16702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16703$as_echo "$UNZIP" >&6; }
16704else
16705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16706$as_echo "no" >&6; }
16707fi
16708
16709
16710  test -n "$UNZIP" && break
16711done
16712
16713    else
16714      # If it succeeded, then it was overridden by the user. We will use it
16715      # for the tool.
16716
16717      # First remove it from the list of overridden variables, so we can test
16718      # for unknown variables in the end.
16719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16720
16721      # Check if the provided tool contains a complete path.
16722      tool_specified="$UNZIP"
16723      tool_basename="${tool_specified##*/}"
16724      if test "x$tool_basename" = "x$tool_specified"; then
16725        # A command without a complete path is provided, search $PATH.
16726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16727$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16728        # Extract the first word of "$tool_basename", so it can be a program name with args.
16729set dummy $tool_basename; ac_word=$2
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16731$as_echo_n "checking for $ac_word... " >&6; }
16732if ${ac_cv_path_UNZIP+:} false; then :
16733  $as_echo_n "(cached) " >&6
16734else
16735  case $UNZIP in
16736  [\\/]* | ?:[\\/]*)
16737  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16738  ;;
16739  *)
16740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16741for as_dir in $PATH
16742do
16743  IFS=$as_save_IFS
16744  test -z "$as_dir" && as_dir=.
16745    for ac_exec_ext in '' $ac_executable_extensions; do
16746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16747    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16749    break 2
16750  fi
16751done
16752  done
16753IFS=$as_save_IFS
16754
16755  ;;
16756esac
16757fi
16758UNZIP=$ac_cv_path_UNZIP
16759if test -n "$UNZIP"; then
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16761$as_echo "$UNZIP" >&6; }
16762else
16763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16764$as_echo "no" >&6; }
16765fi
16766
16767
16768        if test "x$UNZIP" = x; then
16769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16770        fi
16771      else
16772        # Otherwise we believe it is a complete path. Use it as it is.
16773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16774$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16776$as_echo_n "checking for UNZIP... " >&6; }
16777        if test ! -x "$tool_specified"; then
16778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16779$as_echo "not found" >&6; }
16780          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16781        fi
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16783$as_echo "$tool_specified" >&6; }
16784      fi
16785    fi
16786  fi
16787
16788
16789
16790  if test "x$UNZIP" = x; then
16791    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16792  fi
16793
16794
16795
16796
16797
16798  # Publish this variable in the help.
16799
16800
16801  if test "x$ZIP" = x; then
16802    # The variable is not set by user, try to locate tool using the code snippet
16803    for ac_prog in zip
16804do
16805  # Extract the first word of "$ac_prog", so it can be a program name with args.
16806set dummy $ac_prog; ac_word=$2
16807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16808$as_echo_n "checking for $ac_word... " >&6; }
16809if ${ac_cv_path_ZIP+:} false; then :
16810  $as_echo_n "(cached) " >&6
16811else
16812  case $ZIP in
16813  [\\/]* | ?:[\\/]*)
16814  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16815  ;;
16816  *)
16817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16818for as_dir in $PATH
16819do
16820  IFS=$as_save_IFS
16821  test -z "$as_dir" && as_dir=.
16822    for ac_exec_ext in '' $ac_executable_extensions; do
16823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16824    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16826    break 2
16827  fi
16828done
16829  done
16830IFS=$as_save_IFS
16831
16832  ;;
16833esac
16834fi
16835ZIP=$ac_cv_path_ZIP
16836if test -n "$ZIP"; then
16837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16838$as_echo "$ZIP" >&6; }
16839else
16840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16841$as_echo "no" >&6; }
16842fi
16843
16844
16845  test -n "$ZIP" && break
16846done
16847
16848  else
16849    # The variable is set, but is it from the command line or the environment?
16850
16851    # Try to remove the string !ZIP! from our list.
16852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16854      # If it failed, the variable was not from the command line. Ignore it,
16855      # but warn the user (except for BASH, which is always set by the calling BASH).
16856      if test "xZIP" != xBASH; then
16857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16858$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16859      fi
16860      # Try to locate tool using the code snippet
16861      for ac_prog in zip
16862do
16863  # Extract the first word of "$ac_prog", so it can be a program name with args.
16864set dummy $ac_prog; ac_word=$2
16865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16866$as_echo_n "checking for $ac_word... " >&6; }
16867if ${ac_cv_path_ZIP+:} false; then :
16868  $as_echo_n "(cached) " >&6
16869else
16870  case $ZIP in
16871  [\\/]* | ?:[\\/]*)
16872  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16873  ;;
16874  *)
16875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16876for as_dir in $PATH
16877do
16878  IFS=$as_save_IFS
16879  test -z "$as_dir" && as_dir=.
16880    for ac_exec_ext in '' $ac_executable_extensions; do
16881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16882    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16884    break 2
16885  fi
16886done
16887  done
16888IFS=$as_save_IFS
16889
16890  ;;
16891esac
16892fi
16893ZIP=$ac_cv_path_ZIP
16894if test -n "$ZIP"; then
16895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16896$as_echo "$ZIP" >&6; }
16897else
16898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16899$as_echo "no" >&6; }
16900fi
16901
16902
16903  test -n "$ZIP" && break
16904done
16905
16906    else
16907      # If it succeeded, then it was overridden by the user. We will use it
16908      # for the tool.
16909
16910      # First remove it from the list of overridden variables, so we can test
16911      # for unknown variables in the end.
16912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16913
16914      # Check if the provided tool contains a complete path.
16915      tool_specified="$ZIP"
16916      tool_basename="${tool_specified##*/}"
16917      if test "x$tool_basename" = "x$tool_specified"; then
16918        # A command without a complete path is provided, search $PATH.
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16920$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16921        # Extract the first word of "$tool_basename", so it can be a program name with args.
16922set dummy $tool_basename; ac_word=$2
16923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16924$as_echo_n "checking for $ac_word... " >&6; }
16925if ${ac_cv_path_ZIP+:} false; then :
16926  $as_echo_n "(cached) " >&6
16927else
16928  case $ZIP in
16929  [\\/]* | ?:[\\/]*)
16930  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16931  ;;
16932  *)
16933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16934for as_dir in $PATH
16935do
16936  IFS=$as_save_IFS
16937  test -z "$as_dir" && as_dir=.
16938    for ac_exec_ext in '' $ac_executable_extensions; do
16939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16940    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16942    break 2
16943  fi
16944done
16945  done
16946IFS=$as_save_IFS
16947
16948  ;;
16949esac
16950fi
16951ZIP=$ac_cv_path_ZIP
16952if test -n "$ZIP"; then
16953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16954$as_echo "$ZIP" >&6; }
16955else
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16957$as_echo "no" >&6; }
16958fi
16959
16960
16961        if test "x$ZIP" = x; then
16962          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16963        fi
16964      else
16965        # Otherwise we believe it is a complete path. Use it as it is.
16966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
16967$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
16968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
16969$as_echo_n "checking for ZIP... " >&6; }
16970        if test ! -x "$tool_specified"; then
16971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16972$as_echo "not found" >&6; }
16973          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16974        fi
16975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16976$as_echo "$tool_specified" >&6; }
16977      fi
16978    fi
16979  fi
16980
16981
16982
16983  if test "x$ZIP" = x; then
16984    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
16985  fi
16986
16987
16988
16989  # Non-required basic tools
16990
16991
16992
16993  # Publish this variable in the help.
16994
16995
16996  if test "x$LDD" = x; then
16997    # The variable is not set by user, try to locate tool using the code snippet
16998    for ac_prog in ldd
16999do
17000  # Extract the first word of "$ac_prog", so it can be a program name with args.
17001set dummy $ac_prog; ac_word=$2
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17003$as_echo_n "checking for $ac_word... " >&6; }
17004if ${ac_cv_path_LDD+:} false; then :
17005  $as_echo_n "(cached) " >&6
17006else
17007  case $LDD in
17008  [\\/]* | ?:[\\/]*)
17009  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17010  ;;
17011  *)
17012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17013for as_dir in $PATH
17014do
17015  IFS=$as_save_IFS
17016  test -z "$as_dir" && as_dir=.
17017    for ac_exec_ext in '' $ac_executable_extensions; do
17018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17019    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17021    break 2
17022  fi
17023done
17024  done
17025IFS=$as_save_IFS
17026
17027  ;;
17028esac
17029fi
17030LDD=$ac_cv_path_LDD
17031if test -n "$LDD"; then
17032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17033$as_echo "$LDD" >&6; }
17034else
17035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17036$as_echo "no" >&6; }
17037fi
17038
17039
17040  test -n "$LDD" && break
17041done
17042
17043  else
17044    # The variable is set, but is it from the command line or the environment?
17045
17046    # Try to remove the string !LDD! from our list.
17047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17049      # If it failed, the variable was not from the command line. Ignore it,
17050      # but warn the user (except for BASH, which is always set by the calling BASH).
17051      if test "xLDD" != xBASH; then
17052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17053$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17054      fi
17055      # Try to locate tool using the code snippet
17056      for ac_prog in ldd
17057do
17058  # Extract the first word of "$ac_prog", so it can be a program name with args.
17059set dummy $ac_prog; ac_word=$2
17060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17061$as_echo_n "checking for $ac_word... " >&6; }
17062if ${ac_cv_path_LDD+:} false; then :
17063  $as_echo_n "(cached) " >&6
17064else
17065  case $LDD in
17066  [\\/]* | ?:[\\/]*)
17067  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17068  ;;
17069  *)
17070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17071for as_dir in $PATH
17072do
17073  IFS=$as_save_IFS
17074  test -z "$as_dir" && as_dir=.
17075    for ac_exec_ext in '' $ac_executable_extensions; do
17076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17077    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17079    break 2
17080  fi
17081done
17082  done
17083IFS=$as_save_IFS
17084
17085  ;;
17086esac
17087fi
17088LDD=$ac_cv_path_LDD
17089if test -n "$LDD"; then
17090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17091$as_echo "$LDD" >&6; }
17092else
17093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17094$as_echo "no" >&6; }
17095fi
17096
17097
17098  test -n "$LDD" && break
17099done
17100
17101    else
17102      # If it succeeded, then it was overridden by the user. We will use it
17103      # for the tool.
17104
17105      # First remove it from the list of overridden variables, so we can test
17106      # for unknown variables in the end.
17107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17108
17109      # Check if the provided tool contains a complete path.
17110      tool_specified="$LDD"
17111      tool_basename="${tool_specified##*/}"
17112      if test "x$tool_basename" = "x$tool_specified"; then
17113        # A command without a complete path is provided, search $PATH.
17114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17115$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17116        # Extract the first word of "$tool_basename", so it can be a program name with args.
17117set dummy $tool_basename; ac_word=$2
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17119$as_echo_n "checking for $ac_word... " >&6; }
17120if ${ac_cv_path_LDD+:} false; then :
17121  $as_echo_n "(cached) " >&6
17122else
17123  case $LDD in
17124  [\\/]* | ?:[\\/]*)
17125  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17126  ;;
17127  *)
17128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17129for as_dir in $PATH
17130do
17131  IFS=$as_save_IFS
17132  test -z "$as_dir" && as_dir=.
17133    for ac_exec_ext in '' $ac_executable_extensions; do
17134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17135    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17137    break 2
17138  fi
17139done
17140  done
17141IFS=$as_save_IFS
17142
17143  ;;
17144esac
17145fi
17146LDD=$ac_cv_path_LDD
17147if test -n "$LDD"; then
17148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17149$as_echo "$LDD" >&6; }
17150else
17151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17152$as_echo "no" >&6; }
17153fi
17154
17155
17156        if test "x$LDD" = x; then
17157          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17158        fi
17159      else
17160        # Otherwise we believe it is a complete path. Use it as it is.
17161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17162$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17164$as_echo_n "checking for LDD... " >&6; }
17165        if test ! -x "$tool_specified"; then
17166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17167$as_echo "not found" >&6; }
17168          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17169        fi
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17171$as_echo "$tool_specified" >&6; }
17172      fi
17173    fi
17174  fi
17175
17176
17177  if test "x$LDD" = "x"; then
17178    # List shared lib dependencies is used for
17179    # debug output and checking for forbidden dependencies.
17180    # We can build without it.
17181    LDD="true"
17182  fi
17183
17184
17185  # Publish this variable in the help.
17186
17187
17188  if test "x$OTOOL" = x; then
17189    # The variable is not set by user, try to locate tool using the code snippet
17190    for ac_prog in otool
17191do
17192  # Extract the first word of "$ac_prog", so it can be a program name with args.
17193set dummy $ac_prog; ac_word=$2
17194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17195$as_echo_n "checking for $ac_word... " >&6; }
17196if ${ac_cv_path_OTOOL+:} false; then :
17197  $as_echo_n "(cached) " >&6
17198else
17199  case $OTOOL in
17200  [\\/]* | ?:[\\/]*)
17201  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17202  ;;
17203  *)
17204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17205for as_dir in $PATH
17206do
17207  IFS=$as_save_IFS
17208  test -z "$as_dir" && as_dir=.
17209    for ac_exec_ext in '' $ac_executable_extensions; do
17210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17211    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17213    break 2
17214  fi
17215done
17216  done
17217IFS=$as_save_IFS
17218
17219  ;;
17220esac
17221fi
17222OTOOL=$ac_cv_path_OTOOL
17223if test -n "$OTOOL"; then
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17225$as_echo "$OTOOL" >&6; }
17226else
17227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17228$as_echo "no" >&6; }
17229fi
17230
17231
17232  test -n "$OTOOL" && break
17233done
17234
17235  else
17236    # The variable is set, but is it from the command line or the environment?
17237
17238    # Try to remove the string !OTOOL! from our list.
17239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17241      # If it failed, the variable was not from the command line. Ignore it,
17242      # but warn the user (except for BASH, which is always set by the calling BASH).
17243      if test "xOTOOL" != xBASH; then
17244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17245$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17246      fi
17247      # Try to locate tool using the code snippet
17248      for ac_prog in otool
17249do
17250  # Extract the first word of "$ac_prog", so it can be a program name with args.
17251set dummy $ac_prog; ac_word=$2
17252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17253$as_echo_n "checking for $ac_word... " >&6; }
17254if ${ac_cv_path_OTOOL+:} false; then :
17255  $as_echo_n "(cached) " >&6
17256else
17257  case $OTOOL in
17258  [\\/]* | ?:[\\/]*)
17259  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17260  ;;
17261  *)
17262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17263for as_dir in $PATH
17264do
17265  IFS=$as_save_IFS
17266  test -z "$as_dir" && as_dir=.
17267    for ac_exec_ext in '' $ac_executable_extensions; do
17268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17269    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17271    break 2
17272  fi
17273done
17274  done
17275IFS=$as_save_IFS
17276
17277  ;;
17278esac
17279fi
17280OTOOL=$ac_cv_path_OTOOL
17281if test -n "$OTOOL"; then
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17283$as_echo "$OTOOL" >&6; }
17284else
17285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287fi
17288
17289
17290  test -n "$OTOOL" && break
17291done
17292
17293    else
17294      # If it succeeded, then it was overridden by the user. We will use it
17295      # for the tool.
17296
17297      # First remove it from the list of overridden variables, so we can test
17298      # for unknown variables in the end.
17299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17300
17301      # Check if the provided tool contains a complete path.
17302      tool_specified="$OTOOL"
17303      tool_basename="${tool_specified##*/}"
17304      if test "x$tool_basename" = "x$tool_specified"; then
17305        # A command without a complete path is provided, search $PATH.
17306        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17307$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17308        # Extract the first word of "$tool_basename", so it can be a program name with args.
17309set dummy $tool_basename; ac_word=$2
17310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17311$as_echo_n "checking for $ac_word... " >&6; }
17312if ${ac_cv_path_OTOOL+:} false; then :
17313  $as_echo_n "(cached) " >&6
17314else
17315  case $OTOOL in
17316  [\\/]* | ?:[\\/]*)
17317  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17318  ;;
17319  *)
17320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17321for as_dir in $PATH
17322do
17323  IFS=$as_save_IFS
17324  test -z "$as_dir" && as_dir=.
17325    for ac_exec_ext in '' $ac_executable_extensions; do
17326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17327    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17329    break 2
17330  fi
17331done
17332  done
17333IFS=$as_save_IFS
17334
17335  ;;
17336esac
17337fi
17338OTOOL=$ac_cv_path_OTOOL
17339if test -n "$OTOOL"; then
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17341$as_echo "$OTOOL" >&6; }
17342else
17343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17344$as_echo "no" >&6; }
17345fi
17346
17347
17348        if test "x$OTOOL" = x; then
17349          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17350        fi
17351      else
17352        # Otherwise we believe it is a complete path. Use it as it is.
17353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17354$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17356$as_echo_n "checking for OTOOL... " >&6; }
17357        if test ! -x "$tool_specified"; then
17358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17359$as_echo "not found" >&6; }
17360          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17361        fi
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17363$as_echo "$tool_specified" >&6; }
17364      fi
17365    fi
17366  fi
17367
17368
17369  if test "x$OTOOL" = "x"; then
17370    OTOOL="true"
17371  fi
17372
17373
17374  # Publish this variable in the help.
17375
17376
17377  if test "x$READELF" = x; then
17378    # The variable is not set by user, try to locate tool using the code snippet
17379    for ac_prog in greadelf readelf
17380do
17381  # Extract the first word of "$ac_prog", so it can be a program name with args.
17382set dummy $ac_prog; ac_word=$2
17383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17384$as_echo_n "checking for $ac_word... " >&6; }
17385if ${ac_cv_path_READELF+:} false; then :
17386  $as_echo_n "(cached) " >&6
17387else
17388  case $READELF in
17389  [\\/]* | ?:[\\/]*)
17390  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17391  ;;
17392  *)
17393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17394for as_dir in $PATH
17395do
17396  IFS=$as_save_IFS
17397  test -z "$as_dir" && as_dir=.
17398    for ac_exec_ext in '' $ac_executable_extensions; do
17399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17400    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17402    break 2
17403  fi
17404done
17405  done
17406IFS=$as_save_IFS
17407
17408  ;;
17409esac
17410fi
17411READELF=$ac_cv_path_READELF
17412if test -n "$READELF"; then
17413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17414$as_echo "$READELF" >&6; }
17415else
17416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17417$as_echo "no" >&6; }
17418fi
17419
17420
17421  test -n "$READELF" && break
17422done
17423
17424  else
17425    # The variable is set, but is it from the command line or the environment?
17426
17427    # Try to remove the string !READELF! from our list.
17428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17430      # If it failed, the variable was not from the command line. Ignore it,
17431      # but warn the user (except for BASH, which is always set by the calling BASH).
17432      if test "xREADELF" != xBASH; then
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17434$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17435      fi
17436      # Try to locate tool using the code snippet
17437      for ac_prog in greadelf readelf
17438do
17439  # Extract the first word of "$ac_prog", so it can be a program name with args.
17440set dummy $ac_prog; ac_word=$2
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17442$as_echo_n "checking for $ac_word... " >&6; }
17443if ${ac_cv_path_READELF+:} false; then :
17444  $as_echo_n "(cached) " >&6
17445else
17446  case $READELF in
17447  [\\/]* | ?:[\\/]*)
17448  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17449  ;;
17450  *)
17451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17452for as_dir in $PATH
17453do
17454  IFS=$as_save_IFS
17455  test -z "$as_dir" && as_dir=.
17456    for ac_exec_ext in '' $ac_executable_extensions; do
17457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17458    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17460    break 2
17461  fi
17462done
17463  done
17464IFS=$as_save_IFS
17465
17466  ;;
17467esac
17468fi
17469READELF=$ac_cv_path_READELF
17470if test -n "$READELF"; then
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17472$as_echo "$READELF" >&6; }
17473else
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17475$as_echo "no" >&6; }
17476fi
17477
17478
17479  test -n "$READELF" && break
17480done
17481
17482    else
17483      # If it succeeded, then it was overridden by the user. We will use it
17484      # for the tool.
17485
17486      # First remove it from the list of overridden variables, so we can test
17487      # for unknown variables in the end.
17488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17489
17490      # Check if the provided tool contains a complete path.
17491      tool_specified="$READELF"
17492      tool_basename="${tool_specified##*/}"
17493      if test "x$tool_basename" = "x$tool_specified"; then
17494        # A command without a complete path is provided, search $PATH.
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17496$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17497        # Extract the first word of "$tool_basename", so it can be a program name with args.
17498set dummy $tool_basename; ac_word=$2
17499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17500$as_echo_n "checking for $ac_word... " >&6; }
17501if ${ac_cv_path_READELF+:} false; then :
17502  $as_echo_n "(cached) " >&6
17503else
17504  case $READELF in
17505  [\\/]* | ?:[\\/]*)
17506  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17507  ;;
17508  *)
17509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17510for as_dir in $PATH
17511do
17512  IFS=$as_save_IFS
17513  test -z "$as_dir" && as_dir=.
17514    for ac_exec_ext in '' $ac_executable_extensions; do
17515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17516    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17518    break 2
17519  fi
17520done
17521  done
17522IFS=$as_save_IFS
17523
17524  ;;
17525esac
17526fi
17527READELF=$ac_cv_path_READELF
17528if test -n "$READELF"; then
17529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17530$as_echo "$READELF" >&6; }
17531else
17532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533$as_echo "no" >&6; }
17534fi
17535
17536
17537        if test "x$READELF" = x; then
17538          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17539        fi
17540      else
17541        # Otherwise we believe it is a complete path. Use it as it is.
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17543$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17545$as_echo_n "checking for READELF... " >&6; }
17546        if test ! -x "$tool_specified"; then
17547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17548$as_echo "not found" >&6; }
17549          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17550        fi
17551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17552$as_echo "$tool_specified" >&6; }
17553      fi
17554    fi
17555  fi
17556
17557
17558
17559
17560  # Publish this variable in the help.
17561
17562
17563  if test "x$HG" = x; then
17564    # The variable is not set by user, try to locate tool using the code snippet
17565    for ac_prog in hg
17566do
17567  # Extract the first word of "$ac_prog", so it can be a program name with args.
17568set dummy $ac_prog; ac_word=$2
17569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17570$as_echo_n "checking for $ac_word... " >&6; }
17571if ${ac_cv_path_HG+:} false; then :
17572  $as_echo_n "(cached) " >&6
17573else
17574  case $HG in
17575  [\\/]* | ?:[\\/]*)
17576  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17577  ;;
17578  *)
17579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17580for as_dir in $PATH
17581do
17582  IFS=$as_save_IFS
17583  test -z "$as_dir" && as_dir=.
17584    for ac_exec_ext in '' $ac_executable_extensions; do
17585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17586    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17588    break 2
17589  fi
17590done
17591  done
17592IFS=$as_save_IFS
17593
17594  ;;
17595esac
17596fi
17597HG=$ac_cv_path_HG
17598if test -n "$HG"; then
17599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17600$as_echo "$HG" >&6; }
17601else
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17603$as_echo "no" >&6; }
17604fi
17605
17606
17607  test -n "$HG" && break
17608done
17609
17610  else
17611    # The variable is set, but is it from the command line or the environment?
17612
17613    # Try to remove the string !HG! from our list.
17614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17616      # If it failed, the variable was not from the command line. Ignore it,
17617      # but warn the user (except for BASH, which is always set by the calling BASH).
17618      if test "xHG" != xBASH; then
17619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17620$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17621      fi
17622      # Try to locate tool using the code snippet
17623      for ac_prog in hg
17624do
17625  # Extract the first word of "$ac_prog", so it can be a program name with args.
17626set dummy $ac_prog; ac_word=$2
17627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17628$as_echo_n "checking for $ac_word... " >&6; }
17629if ${ac_cv_path_HG+:} false; then :
17630  $as_echo_n "(cached) " >&6
17631else
17632  case $HG in
17633  [\\/]* | ?:[\\/]*)
17634  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17635  ;;
17636  *)
17637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17638for as_dir in $PATH
17639do
17640  IFS=$as_save_IFS
17641  test -z "$as_dir" && as_dir=.
17642    for ac_exec_ext in '' $ac_executable_extensions; do
17643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17644    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17646    break 2
17647  fi
17648done
17649  done
17650IFS=$as_save_IFS
17651
17652  ;;
17653esac
17654fi
17655HG=$ac_cv_path_HG
17656if test -n "$HG"; then
17657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17658$as_echo "$HG" >&6; }
17659else
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17661$as_echo "no" >&6; }
17662fi
17663
17664
17665  test -n "$HG" && break
17666done
17667
17668    else
17669      # If it succeeded, then it was overridden by the user. We will use it
17670      # for the tool.
17671
17672      # First remove it from the list of overridden variables, so we can test
17673      # for unknown variables in the end.
17674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17675
17676      # Check if the provided tool contains a complete path.
17677      tool_specified="$HG"
17678      tool_basename="${tool_specified##*/}"
17679      if test "x$tool_basename" = "x$tool_specified"; then
17680        # A command without a complete path is provided, search $PATH.
17681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17682$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17683        # Extract the first word of "$tool_basename", so it can be a program name with args.
17684set dummy $tool_basename; ac_word=$2
17685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17686$as_echo_n "checking for $ac_word... " >&6; }
17687if ${ac_cv_path_HG+:} false; then :
17688  $as_echo_n "(cached) " >&6
17689else
17690  case $HG in
17691  [\\/]* | ?:[\\/]*)
17692  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17693  ;;
17694  *)
17695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17696for as_dir in $PATH
17697do
17698  IFS=$as_save_IFS
17699  test -z "$as_dir" && as_dir=.
17700    for ac_exec_ext in '' $ac_executable_extensions; do
17701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17702    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17704    break 2
17705  fi
17706done
17707  done
17708IFS=$as_save_IFS
17709
17710  ;;
17711esac
17712fi
17713HG=$ac_cv_path_HG
17714if test -n "$HG"; then
17715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17716$as_echo "$HG" >&6; }
17717else
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17719$as_echo "no" >&6; }
17720fi
17721
17722
17723        if test "x$HG" = x; then
17724          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17725        fi
17726      else
17727        # Otherwise we believe it is a complete path. Use it as it is.
17728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17729$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17731$as_echo_n "checking for HG... " >&6; }
17732        if test ! -x "$tool_specified"; then
17733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17734$as_echo "not found" >&6; }
17735          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17736        fi
17737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17738$as_echo "$tool_specified" >&6; }
17739      fi
17740    fi
17741  fi
17742
17743
17744
17745
17746  # Publish this variable in the help.
17747
17748
17749  if test "x$STAT" = x; then
17750    # The variable is not set by user, try to locate tool using the code snippet
17751    for ac_prog in stat
17752do
17753  # Extract the first word of "$ac_prog", so it can be a program name with args.
17754set dummy $ac_prog; ac_word=$2
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17756$as_echo_n "checking for $ac_word... " >&6; }
17757if ${ac_cv_path_STAT+:} false; then :
17758  $as_echo_n "(cached) " >&6
17759else
17760  case $STAT in
17761  [\\/]* | ?:[\\/]*)
17762  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17763  ;;
17764  *)
17765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17766for as_dir in $PATH
17767do
17768  IFS=$as_save_IFS
17769  test -z "$as_dir" && as_dir=.
17770    for ac_exec_ext in '' $ac_executable_extensions; do
17771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17772    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17774    break 2
17775  fi
17776done
17777  done
17778IFS=$as_save_IFS
17779
17780  ;;
17781esac
17782fi
17783STAT=$ac_cv_path_STAT
17784if test -n "$STAT"; then
17785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17786$as_echo "$STAT" >&6; }
17787else
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17789$as_echo "no" >&6; }
17790fi
17791
17792
17793  test -n "$STAT" && break
17794done
17795
17796  else
17797    # The variable is set, but is it from the command line or the environment?
17798
17799    # Try to remove the string !STAT! from our list.
17800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17802      # If it failed, the variable was not from the command line. Ignore it,
17803      # but warn the user (except for BASH, which is always set by the calling BASH).
17804      if test "xSTAT" != xBASH; then
17805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17806$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17807      fi
17808      # Try to locate tool using the code snippet
17809      for ac_prog in stat
17810do
17811  # Extract the first word of "$ac_prog", so it can be a program name with args.
17812set dummy $ac_prog; ac_word=$2
17813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17814$as_echo_n "checking for $ac_word... " >&6; }
17815if ${ac_cv_path_STAT+:} false; then :
17816  $as_echo_n "(cached) " >&6
17817else
17818  case $STAT in
17819  [\\/]* | ?:[\\/]*)
17820  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17821  ;;
17822  *)
17823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17824for as_dir in $PATH
17825do
17826  IFS=$as_save_IFS
17827  test -z "$as_dir" && as_dir=.
17828    for ac_exec_ext in '' $ac_executable_extensions; do
17829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17830    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17832    break 2
17833  fi
17834done
17835  done
17836IFS=$as_save_IFS
17837
17838  ;;
17839esac
17840fi
17841STAT=$ac_cv_path_STAT
17842if test -n "$STAT"; then
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17844$as_echo "$STAT" >&6; }
17845else
17846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17847$as_echo "no" >&6; }
17848fi
17849
17850
17851  test -n "$STAT" && break
17852done
17853
17854    else
17855      # If it succeeded, then it was overridden by the user. We will use it
17856      # for the tool.
17857
17858      # First remove it from the list of overridden variables, so we can test
17859      # for unknown variables in the end.
17860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17861
17862      # Check if the provided tool contains a complete path.
17863      tool_specified="$STAT"
17864      tool_basename="${tool_specified##*/}"
17865      if test "x$tool_basename" = "x$tool_specified"; then
17866        # A command without a complete path is provided, search $PATH.
17867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17868$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17869        # Extract the first word of "$tool_basename", so it can be a program name with args.
17870set dummy $tool_basename; ac_word=$2
17871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17872$as_echo_n "checking for $ac_word... " >&6; }
17873if ${ac_cv_path_STAT+:} false; then :
17874  $as_echo_n "(cached) " >&6
17875else
17876  case $STAT in
17877  [\\/]* | ?:[\\/]*)
17878  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17879  ;;
17880  *)
17881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882for as_dir in $PATH
17883do
17884  IFS=$as_save_IFS
17885  test -z "$as_dir" && as_dir=.
17886    for ac_exec_ext in '' $ac_executable_extensions; do
17887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17888    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890    break 2
17891  fi
17892done
17893  done
17894IFS=$as_save_IFS
17895
17896  ;;
17897esac
17898fi
17899STAT=$ac_cv_path_STAT
17900if test -n "$STAT"; then
17901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17902$as_echo "$STAT" >&6; }
17903else
17904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17905$as_echo "no" >&6; }
17906fi
17907
17908
17909        if test "x$STAT" = x; then
17910          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17911        fi
17912      else
17913        # Otherwise we believe it is a complete path. Use it as it is.
17914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17915$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17917$as_echo_n "checking for STAT... " >&6; }
17918        if test ! -x "$tool_specified"; then
17919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17920$as_echo "not found" >&6; }
17921          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
17922        fi
17923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17924$as_echo "$tool_specified" >&6; }
17925      fi
17926    fi
17927  fi
17928
17929
17930
17931
17932  # Publish this variable in the help.
17933
17934
17935  if test "x$TIME" = x; then
17936    # The variable is not set by user, try to locate tool using the code snippet
17937    for ac_prog in time
17938do
17939  # Extract the first word of "$ac_prog", so it can be a program name with args.
17940set dummy $ac_prog; ac_word=$2
17941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17942$as_echo_n "checking for $ac_word... " >&6; }
17943if ${ac_cv_path_TIME+:} false; then :
17944  $as_echo_n "(cached) " >&6
17945else
17946  case $TIME in
17947  [\\/]* | ?:[\\/]*)
17948  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
17949  ;;
17950  *)
17951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17952for as_dir in $PATH
17953do
17954  IFS=$as_save_IFS
17955  test -z "$as_dir" && as_dir=.
17956    for ac_exec_ext in '' $ac_executable_extensions; do
17957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17958    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
17959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17960    break 2
17961  fi
17962done
17963  done
17964IFS=$as_save_IFS
17965
17966  ;;
17967esac
17968fi
17969TIME=$ac_cv_path_TIME
17970if test -n "$TIME"; then
17971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
17972$as_echo "$TIME" >&6; }
17973else
17974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17975$as_echo "no" >&6; }
17976fi
17977
17978
17979  test -n "$TIME" && break
17980done
17981
17982  else
17983    # The variable is set, but is it from the command line or the environment?
17984
17985    # Try to remove the string !TIME! from our list.
17986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
17987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17988      # If it failed, the variable was not from the command line. Ignore it,
17989      # but warn the user (except for BASH, which is always set by the calling BASH).
17990      if test "xTIME" != xBASH; then
17991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
17992$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
17993      fi
17994      # Try to locate tool using the code snippet
17995      for ac_prog in time
17996do
17997  # Extract the first word of "$ac_prog", so it can be a program name with args.
17998set dummy $ac_prog; ac_word=$2
17999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18000$as_echo_n "checking for $ac_word... " >&6; }
18001if ${ac_cv_path_TIME+:} false; then :
18002  $as_echo_n "(cached) " >&6
18003else
18004  case $TIME in
18005  [\\/]* | ?:[\\/]*)
18006  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18007  ;;
18008  *)
18009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18010for as_dir in $PATH
18011do
18012  IFS=$as_save_IFS
18013  test -z "$as_dir" && as_dir=.
18014    for ac_exec_ext in '' $ac_executable_extensions; do
18015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18016    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18018    break 2
18019  fi
18020done
18021  done
18022IFS=$as_save_IFS
18023
18024  ;;
18025esac
18026fi
18027TIME=$ac_cv_path_TIME
18028if test -n "$TIME"; then
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18030$as_echo "$TIME" >&6; }
18031else
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18033$as_echo "no" >&6; }
18034fi
18035
18036
18037  test -n "$TIME" && break
18038done
18039
18040    else
18041      # If it succeeded, then it was overridden by the user. We will use it
18042      # for the tool.
18043
18044      # First remove it from the list of overridden variables, so we can test
18045      # for unknown variables in the end.
18046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18047
18048      # Check if the provided tool contains a complete path.
18049      tool_specified="$TIME"
18050      tool_basename="${tool_specified##*/}"
18051      if test "x$tool_basename" = "x$tool_specified"; then
18052        # A command without a complete path is provided, search $PATH.
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18054$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18055        # Extract the first word of "$tool_basename", so it can be a program name with args.
18056set dummy $tool_basename; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if ${ac_cv_path_TIME+:} false; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $TIME in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18074    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085TIME=$ac_cv_path_TIME
18086if test -n "$TIME"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18088$as_echo "$TIME" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095        if test "x$TIME" = x; then
18096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18097        fi
18098      else
18099        # Otherwise we believe it is a complete path. Use it as it is.
18100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18101$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18103$as_echo_n "checking for TIME... " >&6; }
18104        if test ! -x "$tool_specified"; then
18105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18106$as_echo "not found" >&6; }
18107          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18108        fi
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18110$as_echo "$tool_specified" >&6; }
18111      fi
18112    fi
18113  fi
18114
18115
18116  # Check if it's GNU time
18117  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18118  if test "x$IS_GNU_TIME" != x; then
18119    IS_GNU_TIME=yes
18120  else
18121    IS_GNU_TIME=no
18122  fi
18123
18124
18125  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18126
18127
18128
18129  # Publish this variable in the help.
18130
18131
18132  if test "x$COMM" = x; then
18133    # The variable is not set by user, try to locate tool using the code snippet
18134    for ac_prog in comm
18135do
18136  # Extract the first word of "$ac_prog", so it can be a program name with args.
18137set dummy $ac_prog; ac_word=$2
18138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18139$as_echo_n "checking for $ac_word... " >&6; }
18140if ${ac_cv_path_COMM+:} false; then :
18141  $as_echo_n "(cached) " >&6
18142else
18143  case $COMM in
18144  [\\/]* | ?:[\\/]*)
18145  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18146  ;;
18147  *)
18148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18149for as_dir in $PATH
18150do
18151  IFS=$as_save_IFS
18152  test -z "$as_dir" && as_dir=.
18153    for ac_exec_ext in '' $ac_executable_extensions; do
18154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18155    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18157    break 2
18158  fi
18159done
18160  done
18161IFS=$as_save_IFS
18162
18163  ;;
18164esac
18165fi
18166COMM=$ac_cv_path_COMM
18167if test -n "$COMM"; then
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18169$as_echo "$COMM" >&6; }
18170else
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18172$as_echo "no" >&6; }
18173fi
18174
18175
18176  test -n "$COMM" && break
18177done
18178
18179  else
18180    # The variable is set, but is it from the command line or the environment?
18181
18182    # Try to remove the string !COMM! from our list.
18183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18185      # If it failed, the variable was not from the command line. Ignore it,
18186      # but warn the user (except for BASH, which is always set by the calling BASH).
18187      if test "xCOMM" != xBASH; then
18188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18189$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18190      fi
18191      # Try to locate tool using the code snippet
18192      for ac_prog in comm
18193do
18194  # Extract the first word of "$ac_prog", so it can be a program name with args.
18195set dummy $ac_prog; ac_word=$2
18196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18197$as_echo_n "checking for $ac_word... " >&6; }
18198if ${ac_cv_path_COMM+:} false; then :
18199  $as_echo_n "(cached) " >&6
18200else
18201  case $COMM in
18202  [\\/]* | ?:[\\/]*)
18203  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18204  ;;
18205  *)
18206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in $PATH
18208do
18209  IFS=$as_save_IFS
18210  test -z "$as_dir" && as_dir=.
18211    for ac_exec_ext in '' $ac_executable_extensions; do
18212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18213    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18215    break 2
18216  fi
18217done
18218  done
18219IFS=$as_save_IFS
18220
18221  ;;
18222esac
18223fi
18224COMM=$ac_cv_path_COMM
18225if test -n "$COMM"; then
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18227$as_echo "$COMM" >&6; }
18228else
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18230$as_echo "no" >&6; }
18231fi
18232
18233
18234  test -n "$COMM" && break
18235done
18236
18237    else
18238      # If it succeeded, then it was overridden by the user. We will use it
18239      # for the tool.
18240
18241      # First remove it from the list of overridden variables, so we can test
18242      # for unknown variables in the end.
18243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18244
18245      # Check if the provided tool contains a complete path.
18246      tool_specified="$COMM"
18247      tool_basename="${tool_specified##*/}"
18248      if test "x$tool_basename" = "x$tool_specified"; then
18249        # A command without a complete path is provided, search $PATH.
18250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18251$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18252        # Extract the first word of "$tool_basename", so it can be a program name with args.
18253set dummy $tool_basename; ac_word=$2
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255$as_echo_n "checking for $ac_word... " >&6; }
18256if ${ac_cv_path_COMM+:} false; then :
18257  $as_echo_n "(cached) " >&6
18258else
18259  case $COMM in
18260  [\\/]* | ?:[\\/]*)
18261  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18262  ;;
18263  *)
18264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18265for as_dir in $PATH
18266do
18267  IFS=$as_save_IFS
18268  test -z "$as_dir" && as_dir=.
18269    for ac_exec_ext in '' $ac_executable_extensions; do
18270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18271    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18273    break 2
18274  fi
18275done
18276  done
18277IFS=$as_save_IFS
18278
18279  ;;
18280esac
18281fi
18282COMM=$ac_cv_path_COMM
18283if test -n "$COMM"; then
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18285$as_echo "$COMM" >&6; }
18286else
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18288$as_echo "no" >&6; }
18289fi
18290
18291
18292        if test "x$COMM" = x; then
18293          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18294        fi
18295      else
18296        # Otherwise we believe it is a complete path. Use it as it is.
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18298$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18300$as_echo_n "checking for COMM... " >&6; }
18301        if test ! -x "$tool_specified"; then
18302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18303$as_echo "not found" >&6; }
18304          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18305        fi
18306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18307$as_echo "$tool_specified" >&6; }
18308      fi
18309    fi
18310  fi
18311
18312
18313
18314  if test "x$COMM" = x; then
18315    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18316  fi
18317
18318
18319  fi
18320
18321  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18322
18323
18324
18325  # Publish this variable in the help.
18326
18327
18328  if test "x$DSYMUTIL" = x; then
18329    # The variable is not set by user, try to locate tool using the code snippet
18330    for ac_prog in dsymutil
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_DSYMUTIL+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $DSYMUTIL in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362DSYMUTIL=$ac_cv_path_DSYMUTIL
18363if test -n "$DSYMUTIL"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18365$as_echo "$DSYMUTIL" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$DSYMUTIL" && break
18373done
18374
18375  else
18376    # The variable is set, but is it from the command line or the environment?
18377
18378    # Try to remove the string !DSYMUTIL! from our list.
18379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18381      # If it failed, the variable was not from the command line. Ignore it,
18382      # but warn the user (except for BASH, which is always set by the calling BASH).
18383      if test "xDSYMUTIL" != xBASH; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18385$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18386      fi
18387      # Try to locate tool using the code snippet
18388      for ac_prog in dsymutil
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_DSYMUTIL+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $DSYMUTIL in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420DSYMUTIL=$ac_cv_path_DSYMUTIL
18421if test -n "$DSYMUTIL"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18423$as_echo "$DSYMUTIL" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$DSYMUTIL" && break
18431done
18432
18433    else
18434      # If it succeeded, then it was overridden by the user. We will use it
18435      # for the tool.
18436
18437      # First remove it from the list of overridden variables, so we can test
18438      # for unknown variables in the end.
18439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18440
18441      # Check if the provided tool contains a complete path.
18442      tool_specified="$DSYMUTIL"
18443      tool_basename="${tool_specified##*/}"
18444      if test "x$tool_basename" = "x$tool_specified"; then
18445        # A command without a complete path is provided, search $PATH.
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18447$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18448        # Extract the first word of "$tool_basename", so it can be a program name with args.
18449set dummy $tool_basename; ac_word=$2
18450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451$as_echo_n "checking for $ac_word... " >&6; }
18452if ${ac_cv_path_DSYMUTIL+:} false; then :
18453  $as_echo_n "(cached) " >&6
18454else
18455  case $DSYMUTIL in
18456  [\\/]* | ?:[\\/]*)
18457  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18458  ;;
18459  *)
18460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461for as_dir in $PATH
18462do
18463  IFS=$as_save_IFS
18464  test -z "$as_dir" && as_dir=.
18465    for ac_exec_ext in '' $ac_executable_extensions; do
18466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469    break 2
18470  fi
18471done
18472  done
18473IFS=$as_save_IFS
18474
18475  ;;
18476esac
18477fi
18478DSYMUTIL=$ac_cv_path_DSYMUTIL
18479if test -n "$DSYMUTIL"; then
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18481$as_echo "$DSYMUTIL" >&6; }
18482else
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484$as_echo "no" >&6; }
18485fi
18486
18487
18488        if test "x$DSYMUTIL" = x; then
18489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18490        fi
18491      else
18492        # Otherwise we believe it is a complete path. Use it as it is.
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18494$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18496$as_echo_n "checking for DSYMUTIL... " >&6; }
18497        if test ! -x "$tool_specified"; then
18498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18499$as_echo "not found" >&6; }
18500          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18501        fi
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18503$as_echo "$tool_specified" >&6; }
18504      fi
18505    fi
18506  fi
18507
18508
18509
18510  if test "x$DSYMUTIL" = x; then
18511    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18512  fi
18513
18514
18515
18516
18517
18518  # Publish this variable in the help.
18519
18520
18521  if test "x$XATTR" = x; then
18522    # The variable is not set by user, try to locate tool using the code snippet
18523    for ac_prog in xattr
18524do
18525  # Extract the first word of "$ac_prog", so it can be a program name with args.
18526set dummy $ac_prog; ac_word=$2
18527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18528$as_echo_n "checking for $ac_word... " >&6; }
18529if ${ac_cv_path_XATTR+:} false; then :
18530  $as_echo_n "(cached) " >&6
18531else
18532  case $XATTR in
18533  [\\/]* | ?:[\\/]*)
18534  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18535  ;;
18536  *)
18537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18538for as_dir in $PATH
18539do
18540  IFS=$as_save_IFS
18541  test -z "$as_dir" && as_dir=.
18542    for ac_exec_ext in '' $ac_executable_extensions; do
18543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18544    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18546    break 2
18547  fi
18548done
18549  done
18550IFS=$as_save_IFS
18551
18552  ;;
18553esac
18554fi
18555XATTR=$ac_cv_path_XATTR
18556if test -n "$XATTR"; then
18557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18558$as_echo "$XATTR" >&6; }
18559else
18560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18561$as_echo "no" >&6; }
18562fi
18563
18564
18565  test -n "$XATTR" && break
18566done
18567
18568  else
18569    # The variable is set, but is it from the command line or the environment?
18570
18571    # Try to remove the string !XATTR! from our list.
18572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18574      # If it failed, the variable was not from the command line. Ignore it,
18575      # but warn the user (except for BASH, which is always set by the calling BASH).
18576      if test "xXATTR" != xBASH; then
18577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18578$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18579      fi
18580      # Try to locate tool using the code snippet
18581      for ac_prog in xattr
18582do
18583  # Extract the first word of "$ac_prog", so it can be a program name with args.
18584set dummy $ac_prog; ac_word=$2
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586$as_echo_n "checking for $ac_word... " >&6; }
18587if ${ac_cv_path_XATTR+:} false; then :
18588  $as_echo_n "(cached) " >&6
18589else
18590  case $XATTR in
18591  [\\/]* | ?:[\\/]*)
18592  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18593  ;;
18594  *)
18595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596for as_dir in $PATH
18597do
18598  IFS=$as_save_IFS
18599  test -z "$as_dir" && as_dir=.
18600    for ac_exec_ext in '' $ac_executable_extensions; do
18601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604    break 2
18605  fi
18606done
18607  done
18608IFS=$as_save_IFS
18609
18610  ;;
18611esac
18612fi
18613XATTR=$ac_cv_path_XATTR
18614if test -n "$XATTR"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18616$as_echo "$XATTR" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623  test -n "$XATTR" && break
18624done
18625
18626    else
18627      # If it succeeded, then it was overridden by the user. We will use it
18628      # for the tool.
18629
18630      # First remove it from the list of overridden variables, so we can test
18631      # for unknown variables in the end.
18632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18633
18634      # Check if the provided tool contains a complete path.
18635      tool_specified="$XATTR"
18636      tool_basename="${tool_specified##*/}"
18637      if test "x$tool_basename" = "x$tool_specified"; then
18638        # A command without a complete path is provided, search $PATH.
18639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18640$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18641        # Extract the first word of "$tool_basename", so it can be a program name with args.
18642set dummy $tool_basename; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_XATTR+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $XATTR in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671XATTR=$ac_cv_path_XATTR
18672if test -n "$XATTR"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18674$as_echo "$XATTR" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681        if test "x$XATTR" = x; then
18682          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18683        fi
18684      else
18685        # Otherwise we believe it is a complete path. Use it as it is.
18686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18687$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18689$as_echo_n "checking for XATTR... " >&6; }
18690        if test ! -x "$tool_specified"; then
18691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18692$as_echo "not found" >&6; }
18693          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18694        fi
18695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18696$as_echo "$tool_specified" >&6; }
18697      fi
18698    fi
18699  fi
18700
18701
18702
18703  if test "x$XATTR" = x; then
18704    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18705  fi
18706
18707
18708
18709
18710  # Publish this variable in the help.
18711
18712
18713  if test "x$CODESIGN" = x; then
18714    # The variable is not set by user, try to locate tool using the code snippet
18715    for ac_prog in codesign
18716do
18717  # Extract the first word of "$ac_prog", so it can be a program name with args.
18718set dummy $ac_prog; ac_word=$2
18719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18720$as_echo_n "checking for $ac_word... " >&6; }
18721if ${ac_cv_path_CODESIGN+:} false; then :
18722  $as_echo_n "(cached) " >&6
18723else
18724  case $CODESIGN in
18725  [\\/]* | ?:[\\/]*)
18726  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18727  ;;
18728  *)
18729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18730for as_dir in $PATH
18731do
18732  IFS=$as_save_IFS
18733  test -z "$as_dir" && as_dir=.
18734    for ac_exec_ext in '' $ac_executable_extensions; do
18735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18736    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18738    break 2
18739  fi
18740done
18741  done
18742IFS=$as_save_IFS
18743
18744  ;;
18745esac
18746fi
18747CODESIGN=$ac_cv_path_CODESIGN
18748if test -n "$CODESIGN"; then
18749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18750$as_echo "$CODESIGN" >&6; }
18751else
18752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18753$as_echo "no" >&6; }
18754fi
18755
18756
18757  test -n "$CODESIGN" && break
18758done
18759
18760  else
18761    # The variable is set, but is it from the command line or the environment?
18762
18763    # Try to remove the string !CODESIGN! from our list.
18764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18766      # If it failed, the variable was not from the command line. Ignore it,
18767      # but warn the user (except for BASH, which is always set by the calling BASH).
18768      if test "xCODESIGN" != xBASH; then
18769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18770$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18771      fi
18772      # Try to locate tool using the code snippet
18773      for ac_prog in codesign
18774do
18775  # Extract the first word of "$ac_prog", so it can be a program name with args.
18776set dummy $ac_prog; ac_word=$2
18777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18778$as_echo_n "checking for $ac_word... " >&6; }
18779if ${ac_cv_path_CODESIGN+:} false; then :
18780  $as_echo_n "(cached) " >&6
18781else
18782  case $CODESIGN in
18783  [\\/]* | ?:[\\/]*)
18784  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18785  ;;
18786  *)
18787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18788for as_dir in $PATH
18789do
18790  IFS=$as_save_IFS
18791  test -z "$as_dir" && as_dir=.
18792    for ac_exec_ext in '' $ac_executable_extensions; do
18793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18794    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18796    break 2
18797  fi
18798done
18799  done
18800IFS=$as_save_IFS
18801
18802  ;;
18803esac
18804fi
18805CODESIGN=$ac_cv_path_CODESIGN
18806if test -n "$CODESIGN"; then
18807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18808$as_echo "$CODESIGN" >&6; }
18809else
18810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18811$as_echo "no" >&6; }
18812fi
18813
18814
18815  test -n "$CODESIGN" && break
18816done
18817
18818    else
18819      # If it succeeded, then it was overridden by the user. We will use it
18820      # for the tool.
18821
18822      # First remove it from the list of overridden variables, so we can test
18823      # for unknown variables in the end.
18824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18825
18826      # Check if the provided tool contains a complete path.
18827      tool_specified="$CODESIGN"
18828      tool_basename="${tool_specified##*/}"
18829      if test "x$tool_basename" = "x$tool_specified"; then
18830        # A command without a complete path is provided, search $PATH.
18831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18832$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18833        # Extract the first word of "$tool_basename", so it can be a program name with args.
18834set dummy $tool_basename; ac_word=$2
18835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18836$as_echo_n "checking for $ac_word... " >&6; }
18837if ${ac_cv_path_CODESIGN+:} false; then :
18838  $as_echo_n "(cached) " >&6
18839else
18840  case $CODESIGN in
18841  [\\/]* | ?:[\\/]*)
18842  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18843  ;;
18844  *)
18845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18846for as_dir in $PATH
18847do
18848  IFS=$as_save_IFS
18849  test -z "$as_dir" && as_dir=.
18850    for ac_exec_ext in '' $ac_executable_extensions; do
18851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18852    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18854    break 2
18855  fi
18856done
18857  done
18858IFS=$as_save_IFS
18859
18860  ;;
18861esac
18862fi
18863CODESIGN=$ac_cv_path_CODESIGN
18864if test -n "$CODESIGN"; then
18865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18866$as_echo "$CODESIGN" >&6; }
18867else
18868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18869$as_echo "no" >&6; }
18870fi
18871
18872
18873        if test "x$CODESIGN" = x; then
18874          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18875        fi
18876      else
18877        # Otherwise we believe it is a complete path. Use it as it is.
18878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18879$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18881$as_echo_n "checking for CODESIGN... " >&6; }
18882        if test ! -x "$tool_specified"; then
18883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18884$as_echo "not found" >&6; }
18885          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18886        fi
18887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18888$as_echo "$tool_specified" >&6; }
18889      fi
18890    fi
18891  fi
18892
18893
18894    if test "x$CODESIGN" != "x"; then
18895      # Verify that the openjdk_codesign certificate is present
18896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18897$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18898      rm -f codesign-testfile
18899      touch codesign-testfile
18900      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18901      rm -f codesign-testfile
18902      if test "x$CODESIGN" = x; then
18903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904$as_echo "no" >&6; }
18905      else
18906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18907$as_echo "yes" >&6; }
18908      fi
18909    fi
18910  fi
18911
18912
18913# Check if pkg-config is available.
18914
18915
18916if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18917	if test -n "$ac_tool_prefix"; then
18918  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18919set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18921$as_echo_n "checking for $ac_word... " >&6; }
18922if ${ac_cv_path_PKG_CONFIG+:} false; then :
18923  $as_echo_n "(cached) " >&6
18924else
18925  case $PKG_CONFIG in
18926  [\\/]* | ?:[\\/]*)
18927  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18928  ;;
18929  *)
18930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18931for as_dir in $PATH
18932do
18933  IFS=$as_save_IFS
18934  test -z "$as_dir" && as_dir=.
18935    for ac_exec_ext in '' $ac_executable_extensions; do
18936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18937    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18939    break 2
18940  fi
18941done
18942  done
18943IFS=$as_save_IFS
18944
18945  ;;
18946esac
18947fi
18948PKG_CONFIG=$ac_cv_path_PKG_CONFIG
18949if test -n "$PKG_CONFIG"; then
18950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
18951$as_echo "$PKG_CONFIG" >&6; }
18952else
18953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18954$as_echo "no" >&6; }
18955fi
18956
18957
18958fi
18959if test -z "$ac_cv_path_PKG_CONFIG"; then
18960  ac_pt_PKG_CONFIG=$PKG_CONFIG
18961  # Extract the first word of "pkg-config", so it can be a program name with args.
18962set dummy pkg-config; ac_word=$2
18963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18964$as_echo_n "checking for $ac_word... " >&6; }
18965if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
18966  $as_echo_n "(cached) " >&6
18967else
18968  case $ac_pt_PKG_CONFIG in
18969  [\\/]* | ?:[\\/]*)
18970  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
18971  ;;
18972  *)
18973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18974for as_dir in $PATH
18975do
18976  IFS=$as_save_IFS
18977  test -z "$as_dir" && as_dir=.
18978    for ac_exec_ext in '' $ac_executable_extensions; do
18979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18980    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18982    break 2
18983  fi
18984done
18985  done
18986IFS=$as_save_IFS
18987
18988  ;;
18989esac
18990fi
18991ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
18992if test -n "$ac_pt_PKG_CONFIG"; then
18993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
18994$as_echo "$ac_pt_PKG_CONFIG" >&6; }
18995else
18996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18997$as_echo "no" >&6; }
18998fi
18999
19000  if test "x$ac_pt_PKG_CONFIG" = x; then
19001    PKG_CONFIG=""
19002  else
19003    case $cross_compiling:$ac_tool_warned in
19004yes:)
19005{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19006$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19007ac_tool_warned=yes ;;
19008esac
19009    PKG_CONFIG=$ac_pt_PKG_CONFIG
19010  fi
19011else
19012  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19013fi
19014
19015fi
19016if test -n "$PKG_CONFIG"; then
19017	_pkg_min_version=0.9.0
19018	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19019$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19020	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19021		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19022$as_echo "yes" >&6; }
19023	else
19024		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19025$as_echo "no" >&6; }
19026		PKG_CONFIG=""
19027	fi
19028
19029fi
19030
19031# After basic tools have been setup, we can check build os specific details.
19032
19033  ###############################################################################
19034
19035  # Note that this is the build platform OS version!
19036
19037  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19038  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19039  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19040  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19041
19042
19043
19044
19045
19046# Setup builddeps, for automatic downloading of tools we need.
19047# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19048# boot-jdk setup, but we need to have basic tools setup first.
19049
19050
19051# Check whether --with-builddeps-conf was given.
19052if test "${with_builddeps_conf+set}" = set; then :
19053  withval=$with_builddeps_conf;
19054fi
19055
19056
19057
19058# Check whether --with-builddeps-server was given.
19059if test "${with_builddeps_server+set}" = set; then :
19060  withval=$with_builddeps_server;
19061fi
19062
19063
19064
19065# Check whether --with-builddeps-dir was given.
19066if test "${with_builddeps_dir+set}" = set; then :
19067  withval=$with_builddeps_dir;
19068else
19069  with_builddeps_dir=/localhome/builddeps
19070fi
19071
19072
19073
19074# Check whether --with-builddeps-group was given.
19075if test "${with_builddeps_group+set}" = set; then :
19076  withval=$with_builddeps_group;
19077fi
19078
19079
19080
19081
19082  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19083    if test "x$with_builddeps_conf" != x; then
19084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19085$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19086      builddepsfile=$with_builddeps_conf
19087      if test -s $builddepsfile; then
19088        . $builddepsfile
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19090$as_echo "loaded!" >&6; }
19091      else
19092        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19093      fi
19094    else
19095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19096$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19097      builddepsfile=`mktemp`
19098      touch $builddepsfile
19099      # Put all found confs into a single file.
19100      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19101      # Source the file to acquire the variables
19102      if test -s $builddepsfile; then
19103        . $builddepsfile
19104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19105$as_echo "found at least one!" >&6; }
19106      else
19107        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19108      fi
19109    fi
19110    # Create build and target names that use _ instead of "-" and ".".
19111    # This is necessary to use them in variable names.
19112    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19113    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19114    # Extract rewrite information for build and target
19115    eval rewritten_build=\${REWRITE_${build_var}}
19116    if test "x$rewritten_build" = x; then
19117      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19118      echo Build stays the same $rewritten_build
19119    else
19120      echo Rewriting build for builddeps into $rewritten_build
19121    fi
19122    eval rewritten_target=\${REWRITE_${target_var}}
19123    if test "x$rewritten_target" = x; then
19124      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19125      echo Target stays the same $rewritten_target
19126    else
19127      echo Rewriting target for builddeps into $rewritten_target
19128    fi
19129    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19130    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19131  fi
19132  for ac_prog in 7z unzip
19133do
19134  # Extract the first word of "$ac_prog", so it can be a program name with args.
19135set dummy $ac_prog; ac_word=$2
19136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19137$as_echo_n "checking for $ac_word... " >&6; }
19138if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19139  $as_echo_n "(cached) " >&6
19140else
19141  if test -n "$BDEPS_UNZIP"; then
19142  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19143else
19144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19145for as_dir in $PATH
19146do
19147  IFS=$as_save_IFS
19148  test -z "$as_dir" && as_dir=.
19149    for ac_exec_ext in '' $ac_executable_extensions; do
19150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19151    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19153    break 2
19154  fi
19155done
19156  done
19157IFS=$as_save_IFS
19158
19159fi
19160fi
19161BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19162if test -n "$BDEPS_UNZIP"; then
19163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19164$as_echo "$BDEPS_UNZIP" >&6; }
19165else
19166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19167$as_echo "no" >&6; }
19168fi
19169
19170
19171  test -n "$BDEPS_UNZIP" && break
19172done
19173
19174  if test "x$BDEPS_UNZIP" = x7z; then
19175    BDEPS_UNZIP="7z x"
19176  fi
19177
19178  for ac_prog in wget lftp ftp
19179do
19180  # Extract the first word of "$ac_prog", so it can be a program name with args.
19181set dummy $ac_prog; ac_word=$2
19182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19183$as_echo_n "checking for $ac_word... " >&6; }
19184if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19185  $as_echo_n "(cached) " >&6
19186else
19187  if test -n "$BDEPS_FTP"; then
19188  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19189else
19190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19191for as_dir in $PATH
19192do
19193  IFS=$as_save_IFS
19194  test -z "$as_dir" && as_dir=.
19195    for ac_exec_ext in '' $ac_executable_extensions; do
19196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19197    ac_cv_prog_BDEPS_FTP="$ac_prog"
19198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19199    break 2
19200  fi
19201done
19202  done
19203IFS=$as_save_IFS
19204
19205fi
19206fi
19207BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19208if test -n "$BDEPS_FTP"; then
19209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19210$as_echo "$BDEPS_FTP" >&6; }
19211else
19212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19213$as_echo "no" >&6; }
19214fi
19215
19216
19217  test -n "$BDEPS_FTP" && break
19218done
19219
19220
19221
19222###############################################################################
19223#
19224# Determine OpenJDK variants, options and version numbers.
19225#
19226###############################################################################
19227
19228# We need build & target for this.
19229
19230
19231  ###############################################################################
19232  #
19233  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19234  # We always build headless support.
19235  #
19236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19237$as_echo_n "checking headful support... " >&6; }
19238  # Check whether --enable-headful was given.
19239if test "${enable_headful+set}" = set; then :
19240  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19241else
19242  SUPPORT_HEADFUL=yes
19243fi
19244
19245
19246  SUPPORT_HEADLESS=yes
19247  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19248
19249  if test "x$SUPPORT_HEADFUL" = xyes; then
19250    # We are building both headful and headless.
19251    headful_msg="include support for both headful and headless"
19252  fi
19253
19254  if test "x$SUPPORT_HEADFUL" = xno; then
19255    # Thus we are building headless only.
19256    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19257    headful_msg="headless only"
19258  fi
19259
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19261$as_echo "$headful_msg" >&6; }
19262
19263
19264
19265
19266
19267  # Control wether Hotspot runs Queens test after build.
19268  # Check whether --enable-hotspot-test-in-build was given.
19269if test "${enable_hotspot_test_in_build+set}" = set; then :
19270  enableval=$enable_hotspot_test_in_build;
19271else
19272  enable_hotspot_test_in_build=no
19273fi
19274
19275  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19276    TEST_IN_BUILD=true
19277  else
19278    TEST_IN_BUILD=false
19279  fi
19280
19281
19282  ###############################################################################
19283  #
19284  # Choose cacerts source file
19285  #
19286
19287# Check whether --with-cacerts-file was given.
19288if test "${with_cacerts_file+set}" = set; then :
19289  withval=$with_cacerts_file;
19290fi
19291
19292  if test "x$with_cacerts_file" != x; then
19293    CACERTS_FILE=$with_cacerts_file
19294  else
19295    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19296  fi
19297
19298
19299  ###############################################################################
19300  #
19301  # Enable or disable unlimited crypto
19302  #
19303  # Check whether --enable-unlimited-crypto was given.
19304if test "${enable_unlimited_crypto+set}" = set; then :
19305  enableval=$enable_unlimited_crypto;
19306else
19307  enable_unlimited_crypto=no
19308fi
19309
19310  if test "x$enable_unlimited_crypto" = "xyes"; then
19311    UNLIMITED_CRYPTO=true
19312  else
19313    UNLIMITED_CRYPTO=false
19314  fi
19315
19316
19317  ###############################################################################
19318  #
19319  # Enable or disable the elliptic curve crypto implementation
19320  #
19321
19322
19323  ###############################################################################
19324  #
19325  # Compress jars
19326  #
19327  COMPRESS_JARS=false
19328
19329
19330
19331
19332  # Source the version numbers
19333  . $AUTOCONF_DIR/version-numbers
19334
19335  # Get the settings from parameters
19336
19337# Check whether --with-milestone was given.
19338if test "${with_milestone+set}" = set; then :
19339  withval=$with_milestone;
19340fi
19341
19342  if test "x$with_milestone" = xyes; then
19343    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19344  elif test "x$with_milestone" != x; then
19345    MILESTONE="$with_milestone"
19346  fi
19347  if test "x$MILESTONE" = x; then
19348    MILESTONE=internal
19349  fi
19350
19351
19352# Check whether --with-update-version was given.
19353if test "${with_update_version+set}" = set; then :
19354  withval=$with_update_version;
19355fi
19356
19357  if test "x$with_update_version" = xyes; then
19358    as_fn_error $? "Update version must have a value" "$LINENO" 5
19359  elif test "x$with_update_version" != x; then
19360    JDK_UPDATE_VERSION="$with_update_version"
19361    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19362    # to a bug in expr (which reduces it to just X). To work around this, we
19363    # always add a 0 to one digit update versions.
19364    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19365      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19366    fi
19367  fi
19368
19369
19370# Check whether --with-user-release-suffix was given.
19371if test "${with_user_release_suffix+set}" = set; then :
19372  withval=$with_user_release_suffix;
19373fi
19374
19375  if test "x$with_user_release_suffix" = xyes; then
19376    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19377  elif test "x$with_user_release_suffix" != x; then
19378    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19379  fi
19380
19381
19382# Check whether --with-build-number was given.
19383if test "${with_build_number+set}" = set; then :
19384  withval=$with_build_number;
19385fi
19386
19387  if test "x$with_build_number" = xyes; then
19388    as_fn_error $? "Build number must have a value" "$LINENO" 5
19389  elif test "x$with_build_number" != x; then
19390    JDK_BUILD_NUMBER="$with_build_number"
19391  fi
19392  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19393  if test "x$JDK_BUILD_NUMBER" = x; then
19394    JDK_BUILD_NUMBER=b00
19395    if test "x$USER_RELEASE_SUFFIX" = x; then
19396      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19397      # Avoid [:alnum:] since it depends on the locale.
19398      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19399      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19400    fi
19401  fi
19402
19403  # Now set the JDK version, milestone, build number etc.
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419  COPYRIGHT_YEAR=`date +'%Y'`
19420
19421
19422  if test "x$JDK_UPDATE_VERSION" != x; then
19423    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19424  else
19425    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19426  fi
19427
19428
19429  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19430
19431
19432
19433###############################################################################
19434#
19435# Setup BootJDK, used to bootstrap the build.
19436#
19437###############################################################################
19438
19439
19440  BOOT_JDK_FOUND=no
19441
19442# Check whether --with-boot-jdk was given.
19443if test "${with_boot_jdk+set}" = set; then :
19444  withval=$with_boot_jdk;
19445fi
19446
19447
19448  # We look for the Boot JDK through various means, going from more certain to
19449  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19450  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19451  # must check if this is indeed valid; otherwise we'll continue looking.
19452
19453  # Test: Is bootjdk explicitely set by command line arguments?
19454
19455  if test "x$BOOT_JDK_FOUND" = xno; then
19456    # Now execute the test
19457
19458  if test "x$with_boot_jdk" != x; then
19459    BOOT_JDK=$with_boot_jdk
19460    BOOT_JDK_FOUND=maybe
19461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19462$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19463  fi
19464
19465
19466    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19467    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19468      # Do we have a bin/java?
19469      if test ! -x "$BOOT_JDK/bin/java"; then
19470        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19472        BOOT_JDK_FOUND=no
19473      else
19474        # Do we have a bin/javac?
19475        if test ! -x "$BOOT_JDK/bin/javac"; then
19476          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19478          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19479$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19480          BOOT_JDK_FOUND=no
19481        else
19482          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19483          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19484            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19486            BOOT_JDK_FOUND=no
19487          else
19488            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19490
19491            # Extra M4 quote needed to protect [] in grep expression.
19492            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19493            if test "x$FOUND_VERSION_78" = x; then
19494              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19496              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19497$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19498              BOOT_JDK_FOUND=no
19499            else
19500              # We're done! :-)
19501              BOOT_JDK_FOUND=yes
19502
19503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19504
19505  # Input might be given as Windows format, start by converting to
19506  # unix format.
19507  path="$BOOT_JDK"
19508  new_path=`$CYGPATH -u "$path"`
19509
19510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19513  # "foo.exe" is OK but "foo" is an error.
19514  #
19515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19516  # It is also a way to make sure we got the proper file name for the real test later on.
19517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19518  if test "x$test_shortpath" = x; then
19519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19521    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19522  fi
19523
19524  # Call helper function which possibly converts this using DOS-style short mode.
19525  # If so, the updated path is stored in $new_path.
19526
19527  input_path="$new_path"
19528  # Check if we need to convert this using DOS-style short mode. If the path
19529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19530  # take no chances and rewrite it.
19531  # Note: m4 eats our [], so we need to use [ and ] instead.
19532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19533  if test "x$has_forbidden_chars" != x; then
19534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19538      # Going to short mode and back again did indeed matter. Since short mode is
19539      # case insensitive, let's make it lowercase to improve readability.
19540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19541      # Now convert it back to Unix-stile (cygpath)
19542      input_path=`$CYGPATH -u "$shortmode_path"`
19543      new_path="$input_path"
19544    fi
19545  fi
19546
19547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19548  if test "x$test_cygdrive_prefix" = x; then
19549    # As a simple fix, exclude /usr/bin since it's not a real path.
19550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19552      # a path prefixed by /cygdrive for fixpath to work.
19553      new_path="$CYGWIN_ROOT_PATH$input_path"
19554    fi
19555  fi
19556
19557
19558  if test "x$path" != "x$new_path"; then
19559    BOOT_JDK="$new_path"
19560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19562  fi
19563
19564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19565
19566  path="$BOOT_JDK"
19567  has_colon=`$ECHO $path | $GREP ^.:`
19568  new_path="$path"
19569  if test "x$has_colon" = x; then
19570    # Not in mixed or Windows style, start by that.
19571    new_path=`cmd //c echo $path`
19572  fi
19573
19574
19575  input_path="$new_path"
19576  # Check if we need to convert this using DOS-style short mode. If the path
19577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19578  # take no chances and rewrite it.
19579  # Note: m4 eats our [], so we need to use [ and ] instead.
19580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19581  if test "x$has_forbidden_chars" != x; then
19582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19584  fi
19585
19586
19587  windows_path="$new_path"
19588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19589    unix_path=`$CYGPATH -u "$windows_path"`
19590    new_path="$unix_path"
19591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19593    new_path="$unix_path"
19594  fi
19595
19596  if test "x$path" != "x$new_path"; then
19597    BOOT_JDK="$new_path"
19598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19600  fi
19601
19602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19604
19605  else
19606    # We're on a posix platform. Hooray! :)
19607    path="$BOOT_JDK"
19608    has_space=`$ECHO "$path" | $GREP " "`
19609    if test "x$has_space" != x; then
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19612      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19613    fi
19614
19615    # Use eval to expand a potential ~
19616    eval path="$path"
19617    if test ! -f "$path" && test ! -d "$path"; then
19618      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19619    fi
19620
19621    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19622  fi
19623
19624              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19625$as_echo_n "checking for Boot JDK... " >&6; }
19626              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19627$as_echo "$BOOT_JDK" >&6; }
19628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19629$as_echo_n "checking Boot JDK version... " >&6; }
19630              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19631              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19632$as_echo "$BOOT_JDK_VERSION" >&6; }
19633            fi # end check jdk version
19634          fi # end check rt.jar
19635        fi # end check javac
19636      fi # end check java
19637    fi # end check boot jdk found
19638  fi
19639
19640  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19641    # Having specified an argument which is incorrect will produce an instant failure;
19642    # we should not go on looking
19643    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19644  fi
19645
19646  # Test: Is bootjdk available from builddeps?
19647
19648  if test "x$BOOT_JDK_FOUND" = xno; then
19649    # Now execute the test
19650
19651
19652
19653  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19654    # Source the builddeps file again, to make sure it uses the latest variables!
19655    . $builddepsfile
19656    # Look for a target and build machine specific resource!
19657    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19658    if test "x$resource" = x; then
19659      # Ok, lets instead look for a target specific resource
19660      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19661    fi
19662    if test "x$resource" = x; then
19663      # Ok, lets instead look for a build specific resource
19664      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19665    fi
19666    if test "x$resource" = x; then
19667      # Ok, lets instead look for a generic resource
19668      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19669      resource=${builddep_bootjdk}
19670    fi
19671    if test "x$resource" != x; then
19672      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19673$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19674      # If the resource in the builddeps.conf file is an existing directory,
19675      # for example /java/linux/cups
19676      if test -d ${resource}; then
19677        depdir=${resource}
19678      else
19679
19680  # bootjdk is for example mymodule
19681  # $resource is for example libs/general/libmymod_1_2_3.zip
19682  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19683  # $with_builddeps_dir is for example /localhome/builddeps
19684  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19685  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19686  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19687  filename=`basename $resource`
19688  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19689  filebase=${filename%%.*}
19690  extension=${filename#*.}
19691  installdir=$with_builddeps_dir/$filebase
19692  if test ! -f $installdir/$filename.unpacked; then
19693    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19694$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19695    if test ! -d $installdir; then
19696      mkdir -p $installdir
19697    fi
19698    if test ! -d $installdir; then
19699      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19700    fi
19701    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19702    touch $tmpfile
19703    if test ! -f $tmpfile; then
19704      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19705    fi
19706
19707  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19708  # $tmpfile is the local file name for the downloaded file.
19709  VALID_TOOL=no
19710  if test "x$BDEPS_FTP" = xwget; then
19711    VALID_TOOL=yes
19712    wget -O $tmpfile $with_builddeps_server/$resource
19713  fi
19714  if test "x$BDEPS_FTP" = xlftp; then
19715    VALID_TOOL=yes
19716    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19717  fi
19718  if test "x$BDEPS_FTP" = xftp; then
19719    VALID_TOOL=yes
19720    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19721    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19722    FTPUSERPWD=${FTPSERVER%%@*}
19723    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19724      FTPUSER=${userpwd%%:*}
19725      FTPPWD=${userpwd#*@}
19726      FTPSERVER=${FTPSERVER#*@}
19727    else
19728      FTPUSER=ftp
19729      FTPPWD=ftp
19730    fi
19731    # the "pass" command does not work on some
19732    # ftp clients (read ftp.exe) but if it works,
19733    # passive mode is better!
19734    ( \
19735        echo "user $FTPUSER $FTPPWD"        ; \
19736        echo "pass"                         ; \
19737        echo "bin"                          ; \
19738        echo "get $FTPPATH $tmpfile"              ; \
19739    ) | ftp -in $FTPSERVER
19740  fi
19741  if test "x$VALID_TOOL" != xyes; then
19742    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19743  fi
19744
19745    mv $tmpfile $installdir/$filename
19746    if test ! -s $installdir/$filename; then
19747      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19748    fi
19749    case "$extension" in
19750      zip)  echo "Unzipping $installdir/$filename..."
19751        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19752        ;;
19753      tar.gz) echo "Untaring $installdir/$filename..."
19754        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19755        ;;
19756      tgz) echo "Untaring $installdir/$filename..."
19757        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19758        ;;
19759      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19760        ;;
19761    esac
19762  fi
19763  if test -f $installdir/$filename.unpacked; then
19764    depdir=$installdir
19765  fi
19766
19767      fi
19768      # Source the builddeps file again, because in the previous command, the depdir
19769      # was updated to point at the current build dependency install directory.
19770      . $builddepsfile
19771      # Now extract variables from the builddeps.conf files.
19772      theroot=${builddep_bootjdk_ROOT}
19773      thecflags=${builddep_bootjdk_CFLAGS}
19774      thelibs=${builddep_bootjdk_LIBS}
19775      if test "x$depdir" = x; then
19776        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19777      fi
19778      BOOT_JDK=$depdir
19779      if test "x$theroot" != x; then
19780        BOOT_JDK="$theroot"
19781      fi
19782      if test "x$thecflags" != x; then
19783        BOOT_JDK_CFLAGS="$thecflags"
19784      fi
19785      if test "x$thelibs" != x; then
19786        BOOT_JDK_LIBS="$thelibs"
19787      fi
19788      BOOT_JDK_FOUND=maybe
19789      else BOOT_JDK_FOUND=no
19790
19791    fi
19792    else BOOT_JDK_FOUND=no
19793
19794  fi
19795
19796
19797
19798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19800      # Do we have a bin/java?
19801      if test ! -x "$BOOT_JDK/bin/java"; then
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19804        BOOT_JDK_FOUND=no
19805      else
19806        # Do we have a bin/javac?
19807        if test ! -x "$BOOT_JDK/bin/javac"; then
19808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19812          BOOT_JDK_FOUND=no
19813        else
19814          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19815          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19818            BOOT_JDK_FOUND=no
19819          else
19820            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19821            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19822
19823            # Extra M4 quote needed to protect [] in grep expression.
19824            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19825            if test "x$FOUND_VERSION_78" = x; then
19826              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19828              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19829$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19830              BOOT_JDK_FOUND=no
19831            else
19832              # We're done! :-)
19833              BOOT_JDK_FOUND=yes
19834
19835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19836
19837  # Input might be given as Windows format, start by converting to
19838  # unix format.
19839  path="$BOOT_JDK"
19840  new_path=`$CYGPATH -u "$path"`
19841
19842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19845  # "foo.exe" is OK but "foo" is an error.
19846  #
19847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19848  # It is also a way to make sure we got the proper file name for the real test later on.
19849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19850  if test "x$test_shortpath" = x; then
19851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19854  fi
19855
19856  # Call helper function which possibly converts this using DOS-style short mode.
19857  # If so, the updated path is stored in $new_path.
19858
19859  input_path="$new_path"
19860  # Check if we need to convert this using DOS-style short mode. If the path
19861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19862  # take no chances and rewrite it.
19863  # Note: m4 eats our [], so we need to use [ and ] instead.
19864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19865  if test "x$has_forbidden_chars" != x; then
19866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19870      # Going to short mode and back again did indeed matter. Since short mode is
19871      # case insensitive, let's make it lowercase to improve readability.
19872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19873      # Now convert it back to Unix-stile (cygpath)
19874      input_path=`$CYGPATH -u "$shortmode_path"`
19875      new_path="$input_path"
19876    fi
19877  fi
19878
19879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19880  if test "x$test_cygdrive_prefix" = x; then
19881    # As a simple fix, exclude /usr/bin since it's not a real path.
19882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19884      # a path prefixed by /cygdrive for fixpath to work.
19885      new_path="$CYGWIN_ROOT_PATH$input_path"
19886    fi
19887  fi
19888
19889
19890  if test "x$path" != "x$new_path"; then
19891    BOOT_JDK="$new_path"
19892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19894  fi
19895
19896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19897
19898  path="$BOOT_JDK"
19899  has_colon=`$ECHO $path | $GREP ^.:`
19900  new_path="$path"
19901  if test "x$has_colon" = x; then
19902    # Not in mixed or Windows style, start by that.
19903    new_path=`cmd //c echo $path`
19904  fi
19905
19906
19907  input_path="$new_path"
19908  # Check if we need to convert this using DOS-style short mode. If the path
19909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19910  # take no chances and rewrite it.
19911  # Note: m4 eats our [], so we need to use [ and ] instead.
19912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19913  if test "x$has_forbidden_chars" != x; then
19914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19916  fi
19917
19918
19919  windows_path="$new_path"
19920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19921    unix_path=`$CYGPATH -u "$windows_path"`
19922    new_path="$unix_path"
19923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19925    new_path="$unix_path"
19926  fi
19927
19928  if test "x$path" != "x$new_path"; then
19929    BOOT_JDK="$new_path"
19930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19932  fi
19933
19934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19936
19937  else
19938    # We're on a posix platform. Hooray! :)
19939    path="$BOOT_JDK"
19940    has_space=`$ECHO "$path" | $GREP " "`
19941    if test "x$has_space" != x; then
19942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19944      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19945    fi
19946
19947    # Use eval to expand a potential ~
19948    eval path="$path"
19949    if test ! -f "$path" && test ! -d "$path"; then
19950      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19951    fi
19952
19953    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19954  fi
19955
19956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19957$as_echo_n "checking for Boot JDK... " >&6; }
19958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19959$as_echo "$BOOT_JDK" >&6; }
19960              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19961$as_echo_n "checking Boot JDK version... " >&6; }
19962              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19964$as_echo "$BOOT_JDK_VERSION" >&6; }
19965            fi # end check jdk version
19966          fi # end check rt.jar
19967        fi # end check javac
19968      fi # end check java
19969    fi # end check boot jdk found
19970  fi
19971
19972
19973  # Test: Is $JAVA_HOME set?
19974
19975  if test "x$BOOT_JDK_FOUND" = xno; then
19976    # Now execute the test
19977
19978  if test "x$JAVA_HOME" != x; then
19979    JAVA_HOME_PROCESSED="$JAVA_HOME"
19980
19981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982
19983  # Input might be given as Windows format, start by converting to
19984  # unix format.
19985  path="$JAVA_HOME_PROCESSED"
19986  new_path=`$CYGPATH -u "$path"`
19987
19988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19991  # "foo.exe" is OK but "foo" is an error.
19992  #
19993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19994  # It is also a way to make sure we got the proper file name for the real test later on.
19995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19996  if test "x$test_shortpath" = x; then
19997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
19998$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
19999    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20000  fi
20001
20002  # Call helper function which possibly converts this using DOS-style short mode.
20003  # If so, the updated path is stored in $new_path.
20004
20005  input_path="$new_path"
20006  # Check if we need to convert this using DOS-style short mode. If the path
20007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20008  # take no chances and rewrite it.
20009  # Note: m4 eats our [], so we need to use [ and ] instead.
20010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20011  if test "x$has_forbidden_chars" != x; then
20012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20016      # Going to short mode and back again did indeed matter. Since short mode is
20017      # case insensitive, let's make it lowercase to improve readability.
20018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20019      # Now convert it back to Unix-stile (cygpath)
20020      input_path=`$CYGPATH -u "$shortmode_path"`
20021      new_path="$input_path"
20022    fi
20023  fi
20024
20025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20026  if test "x$test_cygdrive_prefix" = x; then
20027    # As a simple fix, exclude /usr/bin since it's not a real path.
20028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20030      # a path prefixed by /cygdrive for fixpath to work.
20031      new_path="$CYGWIN_ROOT_PATH$input_path"
20032    fi
20033  fi
20034
20035
20036  if test "x$path" != "x$new_path"; then
20037    JAVA_HOME_PROCESSED="$new_path"
20038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20039$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20040  fi
20041
20042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20043
20044  path="$JAVA_HOME_PROCESSED"
20045  has_colon=`$ECHO $path | $GREP ^.:`
20046  new_path="$path"
20047  if test "x$has_colon" = x; then
20048    # Not in mixed or Windows style, start by that.
20049    new_path=`cmd //c echo $path`
20050  fi
20051
20052
20053  input_path="$new_path"
20054  # Check if we need to convert this using DOS-style short mode. If the path
20055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20056  # take no chances and rewrite it.
20057  # Note: m4 eats our [], so we need to use [ and ] instead.
20058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20059  if test "x$has_forbidden_chars" != x; then
20060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20062  fi
20063
20064
20065  windows_path="$new_path"
20066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20067    unix_path=`$CYGPATH -u "$windows_path"`
20068    new_path="$unix_path"
20069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20071    new_path="$unix_path"
20072  fi
20073
20074  if test "x$path" != "x$new_path"; then
20075    JAVA_HOME_PROCESSED="$new_path"
20076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20077$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20078  fi
20079
20080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20082
20083  else
20084    # We're on a posix platform. Hooray! :)
20085    path="$JAVA_HOME_PROCESSED"
20086    has_space=`$ECHO "$path" | $GREP " "`
20087    if test "x$has_space" != x; then
20088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20089$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20091    fi
20092
20093    # Use eval to expand a potential ~
20094    eval path="$path"
20095    if test ! -f "$path" && test ! -d "$path"; then
20096      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20097    fi
20098
20099    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20100  fi
20101
20102    if test ! -d "$JAVA_HOME_PROCESSED"; then
20103      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20104$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20105    else
20106      # Aha, the user has set a JAVA_HOME
20107      # let us use that as the Boot JDK.
20108      BOOT_JDK="$JAVA_HOME_PROCESSED"
20109      BOOT_JDK_FOUND=maybe
20110      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20111$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20112    fi
20113  fi
20114
20115
20116    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20117    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20118      # Do we have a bin/java?
20119      if test ! -x "$BOOT_JDK/bin/java"; then
20120        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20122        BOOT_JDK_FOUND=no
20123      else
20124        # Do we have a bin/javac?
20125        if test ! -x "$BOOT_JDK/bin/javac"; then
20126          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20128          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20129$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20130          BOOT_JDK_FOUND=no
20131        else
20132          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20133          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20134            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20136            BOOT_JDK_FOUND=no
20137          else
20138            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20139            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20140
20141            # Extra M4 quote needed to protect [] in grep expression.
20142            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20143            if test "x$FOUND_VERSION_78" = x; then
20144              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20146              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20147$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20148              BOOT_JDK_FOUND=no
20149            else
20150              # We're done! :-)
20151              BOOT_JDK_FOUND=yes
20152
20153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20154
20155  # Input might be given as Windows format, start by converting to
20156  # unix format.
20157  path="$BOOT_JDK"
20158  new_path=`$CYGPATH -u "$path"`
20159
20160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20163  # "foo.exe" is OK but "foo" is an error.
20164  #
20165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20166  # It is also a way to make sure we got the proper file name for the real test later on.
20167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20168  if test "x$test_shortpath" = x; then
20169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20171    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20172  fi
20173
20174  # Call helper function which possibly converts this using DOS-style short mode.
20175  # If so, the updated path is stored in $new_path.
20176
20177  input_path="$new_path"
20178  # Check if we need to convert this using DOS-style short mode. If the path
20179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20180  # take no chances and rewrite it.
20181  # Note: m4 eats our [], so we need to use [ and ] instead.
20182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20183  if test "x$has_forbidden_chars" != x; then
20184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20188      # Going to short mode and back again did indeed matter. Since short mode is
20189      # case insensitive, let's make it lowercase to improve readability.
20190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20191      # Now convert it back to Unix-stile (cygpath)
20192      input_path=`$CYGPATH -u "$shortmode_path"`
20193      new_path="$input_path"
20194    fi
20195  fi
20196
20197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20198  if test "x$test_cygdrive_prefix" = x; then
20199    # As a simple fix, exclude /usr/bin since it's not a real path.
20200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20202      # a path prefixed by /cygdrive for fixpath to work.
20203      new_path="$CYGWIN_ROOT_PATH$input_path"
20204    fi
20205  fi
20206
20207
20208  if test "x$path" != "x$new_path"; then
20209    BOOT_JDK="$new_path"
20210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20211$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20212  fi
20213
20214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20215
20216  path="$BOOT_JDK"
20217  has_colon=`$ECHO $path | $GREP ^.:`
20218  new_path="$path"
20219  if test "x$has_colon" = x; then
20220    # Not in mixed or Windows style, start by that.
20221    new_path=`cmd //c echo $path`
20222  fi
20223
20224
20225  input_path="$new_path"
20226  # Check if we need to convert this using DOS-style short mode. If the path
20227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20228  # take no chances and rewrite it.
20229  # Note: m4 eats our [], so we need to use [ and ] instead.
20230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20231  if test "x$has_forbidden_chars" != x; then
20232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20234  fi
20235
20236
20237  windows_path="$new_path"
20238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20239    unix_path=`$CYGPATH -u "$windows_path"`
20240    new_path="$unix_path"
20241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20243    new_path="$unix_path"
20244  fi
20245
20246  if test "x$path" != "x$new_path"; then
20247    BOOT_JDK="$new_path"
20248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20250  fi
20251
20252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20254
20255  else
20256    # We're on a posix platform. Hooray! :)
20257    path="$BOOT_JDK"
20258    has_space=`$ECHO "$path" | $GREP " "`
20259    if test "x$has_space" != x; then
20260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20262      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20263    fi
20264
20265    # Use eval to expand a potential ~
20266    eval path="$path"
20267    if test ! -f "$path" && test ! -d "$path"; then
20268      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20269    fi
20270
20271    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20272  fi
20273
20274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20275$as_echo_n "checking for Boot JDK... " >&6; }
20276              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20277$as_echo "$BOOT_JDK" >&6; }
20278              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20279$as_echo_n "checking Boot JDK version... " >&6; }
20280              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20281              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20282$as_echo "$BOOT_JDK_VERSION" >&6; }
20283            fi # end check jdk version
20284          fi # end check rt.jar
20285        fi # end check javac
20286      fi # end check java
20287    fi # end check boot jdk found
20288  fi
20289
20290
20291  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20292
20293  if test "x$BOOT_JDK_FOUND" = xno; then
20294    # Now execute the test
20295
20296  if test -x /usr/libexec/java_home; then
20297    BOOT_JDK=`/usr/libexec/java_home`
20298    BOOT_JDK_FOUND=maybe
20299    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20300$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20301  fi
20302
20303
20304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20306      # Do we have a bin/java?
20307      if test ! -x "$BOOT_JDK/bin/java"; then
20308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20310        BOOT_JDK_FOUND=no
20311      else
20312        # Do we have a bin/javac?
20313        if test ! -x "$BOOT_JDK/bin/javac"; then
20314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20318          BOOT_JDK_FOUND=no
20319        else
20320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20324            BOOT_JDK_FOUND=no
20325          else
20326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20328
20329            # Extra M4 quote needed to protect [] in grep expression.
20330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20331            if test "x$FOUND_VERSION_78" = x; then
20332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20336              BOOT_JDK_FOUND=no
20337            else
20338              # We're done! :-)
20339              BOOT_JDK_FOUND=yes
20340
20341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20342
20343  # Input might be given as Windows format, start by converting to
20344  # unix format.
20345  path="$BOOT_JDK"
20346  new_path=`$CYGPATH -u "$path"`
20347
20348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20351  # "foo.exe" is OK but "foo" is an error.
20352  #
20353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20354  # It is also a way to make sure we got the proper file name for the real test later on.
20355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20356  if test "x$test_shortpath" = x; then
20357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20360  fi
20361
20362  # Call helper function which possibly converts this using DOS-style short mode.
20363  # If so, the updated path is stored in $new_path.
20364
20365  input_path="$new_path"
20366  # Check if we need to convert this using DOS-style short mode. If the path
20367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20368  # take no chances and rewrite it.
20369  # Note: m4 eats our [], so we need to use [ and ] instead.
20370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20371  if test "x$has_forbidden_chars" != x; then
20372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20376      # Going to short mode and back again did indeed matter. Since short mode is
20377      # case insensitive, let's make it lowercase to improve readability.
20378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20379      # Now convert it back to Unix-stile (cygpath)
20380      input_path=`$CYGPATH -u "$shortmode_path"`
20381      new_path="$input_path"
20382    fi
20383  fi
20384
20385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20386  if test "x$test_cygdrive_prefix" = x; then
20387    # As a simple fix, exclude /usr/bin since it's not a real path.
20388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20390      # a path prefixed by /cygdrive for fixpath to work.
20391      new_path="$CYGWIN_ROOT_PATH$input_path"
20392    fi
20393  fi
20394
20395
20396  if test "x$path" != "x$new_path"; then
20397    BOOT_JDK="$new_path"
20398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20400  fi
20401
20402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20403
20404  path="$BOOT_JDK"
20405  has_colon=`$ECHO $path | $GREP ^.:`
20406  new_path="$path"
20407  if test "x$has_colon" = x; then
20408    # Not in mixed or Windows style, start by that.
20409    new_path=`cmd //c echo $path`
20410  fi
20411
20412
20413  input_path="$new_path"
20414  # Check if we need to convert this using DOS-style short mode. If the path
20415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20416  # take no chances and rewrite it.
20417  # Note: m4 eats our [], so we need to use [ and ] instead.
20418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20419  if test "x$has_forbidden_chars" != x; then
20420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20422  fi
20423
20424
20425  windows_path="$new_path"
20426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20427    unix_path=`$CYGPATH -u "$windows_path"`
20428    new_path="$unix_path"
20429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20431    new_path="$unix_path"
20432  fi
20433
20434  if test "x$path" != "x$new_path"; then
20435    BOOT_JDK="$new_path"
20436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20438  fi
20439
20440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20442
20443  else
20444    # We're on a posix platform. Hooray! :)
20445    path="$BOOT_JDK"
20446    has_space=`$ECHO "$path" | $GREP " "`
20447    if test "x$has_space" != x; then
20448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20451    fi
20452
20453    # Use eval to expand a potential ~
20454    eval path="$path"
20455    if test ! -f "$path" && test ! -d "$path"; then
20456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20457    fi
20458
20459    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20460  fi
20461
20462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20463$as_echo_n "checking for Boot JDK... " >&6; }
20464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20465$as_echo "$BOOT_JDK" >&6; }
20466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20467$as_echo_n "checking Boot JDK version... " >&6; }
20468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20470$as_echo "$BOOT_JDK_VERSION" >&6; }
20471            fi # end check jdk version
20472          fi # end check rt.jar
20473        fi # end check javac
20474      fi # end check java
20475    fi # end check boot jdk found
20476  fi
20477
20478
20479  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
20480
20481  if test "x$BOOT_JDK_FOUND" = xno; then
20482    # Now execute the test
20483
20484  # Extract the first word of "javac", so it can be a program name with args.
20485set dummy javac; ac_word=$2
20486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20487$as_echo_n "checking for $ac_word... " >&6; }
20488if ${ac_cv_path_JAVAC_CHECK+:} false; then :
20489  $as_echo_n "(cached) " >&6
20490else
20491  case $JAVAC_CHECK in
20492  [\\/]* | ?:[\\/]*)
20493  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
20494  ;;
20495  *)
20496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20497for as_dir in $PATH
20498do
20499  IFS=$as_save_IFS
20500  test -z "$as_dir" && as_dir=.
20501    for ac_exec_ext in '' $ac_executable_extensions; do
20502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20503    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
20504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20505    break 2
20506  fi
20507done
20508  done
20509IFS=$as_save_IFS
20510
20511  ;;
20512esac
20513fi
20514JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
20515if test -n "$JAVAC_CHECK"; then
20516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
20517$as_echo "$JAVAC_CHECK" >&6; }
20518else
20519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20520$as_echo "no" >&6; }
20521fi
20522
20523
20524  # Extract the first word of "java", so it can be a program name with args.
20525set dummy java; ac_word=$2
20526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20527$as_echo_n "checking for $ac_word... " >&6; }
20528if ${ac_cv_path_JAVA_CHECK+:} false; then :
20529  $as_echo_n "(cached) " >&6
20530else
20531  case $JAVA_CHECK in
20532  [\\/]* | ?:[\\/]*)
20533  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
20534  ;;
20535  *)
20536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20537for as_dir in $PATH
20538do
20539  IFS=$as_save_IFS
20540  test -z "$as_dir" && as_dir=.
20541    for ac_exec_ext in '' $ac_executable_extensions; do
20542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20543    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
20544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20545    break 2
20546  fi
20547done
20548  done
20549IFS=$as_save_IFS
20550
20551  ;;
20552esac
20553fi
20554JAVA_CHECK=$ac_cv_path_JAVA_CHECK
20555if test -n "$JAVA_CHECK"; then
20556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
20557$as_echo "$JAVA_CHECK" >&6; }
20558else
20559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20560$as_echo "no" >&6; }
20561fi
20562
20563
20564  BINARY="$JAVAC_CHECK"
20565  if test "x$JAVAC_CHECK" = x; then
20566    BINARY="$JAVA_CHECK"
20567  fi
20568  if test "x$BINARY" != x; then
20569    # So there is a java(c) binary, it might be part of a JDK.
20570    # Lets find the JDK/JRE directory by following symbolic links.
20571    # Linux/GNU systems often have links from /usr/bin/java to
20572    # /etc/alternatives/java to the real JDK binary.
20573
20574  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20575    # Follow a chain of symbolic links. Use readlink
20576    # where it exists, else fall back to horribly
20577    # complicated shell code.
20578    if test "x$READLINK_TESTED" != yes; then
20579      # On MacOSX there is a readlink tool with a different
20580      # purpose than the GNU readlink tool. Check the found readlink.
20581      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20582      if test "x$ISGNU" = x; then
20583        # A readlink that we do not know how to use.
20584        # Are there other non-GNU readlinks out there?
20585        READLINK_TESTED=yes
20586        READLINK=
20587      fi
20588    fi
20589
20590    if test "x$READLINK" != x; then
20591      BINARY=`$READLINK -f $BINARY`
20592    else
20593      # Save the current directory for restoring afterwards
20594      STARTDIR=$PWD
20595      COUNTER=0
20596      sym_link_dir=`$DIRNAME $BINARY`
20597      sym_link_file=`$BASENAME $BINARY`
20598      cd $sym_link_dir
20599      # Use -P flag to resolve symlinks in directories.
20600      cd `$THEPWDCMD -P`
20601      sym_link_dir=`$THEPWDCMD -P`
20602      # Resolve file symlinks
20603      while test $COUNTER -lt 20; do
20604        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20605        if test "x$ISLINK" == x; then
20606          # This is not a symbolic link! We are done!
20607          break
20608        fi
20609        # Again resolve directory symlinks since the target of the just found
20610        # link could be in a different directory
20611        cd `$DIRNAME $ISLINK`
20612        sym_link_dir=`$THEPWDCMD -P`
20613        sym_link_file=`$BASENAME $ISLINK`
20614        let COUNTER=COUNTER+1
20615      done
20616      cd $STARTDIR
20617      BINARY=$sym_link_dir/$sym_link_file
20618    fi
20619  fi
20620
20621    BOOT_JDK=`dirname "$BINARY"`
20622    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
20623    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
20624      # Looks like we found ourselves an JDK
20625      BOOT_JDK_FOUND=maybe
20626      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
20627$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
20628    fi
20629  fi
20630
20631
20632    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20633    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20634      # Do we have a bin/java?
20635      if test ! -x "$BOOT_JDK/bin/java"; then
20636        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20638        BOOT_JDK_FOUND=no
20639      else
20640        # Do we have a bin/javac?
20641        if test ! -x "$BOOT_JDK/bin/javac"; then
20642          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20644          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20645$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20646          BOOT_JDK_FOUND=no
20647        else
20648          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20649          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20652            BOOT_JDK_FOUND=no
20653          else
20654            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20656
20657            # Extra M4 quote needed to protect [] in grep expression.
20658            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20659            if test "x$FOUND_VERSION_78" = x; then
20660              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20662              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20663$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20664              BOOT_JDK_FOUND=no
20665            else
20666              # We're done! :-)
20667              BOOT_JDK_FOUND=yes
20668
20669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20670
20671  # Input might be given as Windows format, start by converting to
20672  # unix format.
20673  path="$BOOT_JDK"
20674  new_path=`$CYGPATH -u "$path"`
20675
20676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20679  # "foo.exe" is OK but "foo" is an error.
20680  #
20681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20682  # It is also a way to make sure we got the proper file name for the real test later on.
20683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20684  if test "x$test_shortpath" = x; then
20685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20688  fi
20689
20690  # Call helper function which possibly converts this using DOS-style short mode.
20691  # If so, the updated path is stored in $new_path.
20692
20693  input_path="$new_path"
20694  # Check if we need to convert this using DOS-style short mode. If the path
20695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20696  # take no chances and rewrite it.
20697  # Note: m4 eats our [], so we need to use [ and ] instead.
20698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20699  if test "x$has_forbidden_chars" != x; then
20700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20704      # Going to short mode and back again did indeed matter. Since short mode is
20705      # case insensitive, let's make it lowercase to improve readability.
20706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707      # Now convert it back to Unix-stile (cygpath)
20708      input_path=`$CYGPATH -u "$shortmode_path"`
20709      new_path="$input_path"
20710    fi
20711  fi
20712
20713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20714  if test "x$test_cygdrive_prefix" = x; then
20715    # As a simple fix, exclude /usr/bin since it's not a real path.
20716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20718      # a path prefixed by /cygdrive for fixpath to work.
20719      new_path="$CYGWIN_ROOT_PATH$input_path"
20720    fi
20721  fi
20722
20723
20724  if test "x$path" != "x$new_path"; then
20725    BOOT_JDK="$new_path"
20726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20728  fi
20729
20730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20731
20732  path="$BOOT_JDK"
20733  has_colon=`$ECHO $path | $GREP ^.:`
20734  new_path="$path"
20735  if test "x$has_colon" = x; then
20736    # Not in mixed or Windows style, start by that.
20737    new_path=`cmd //c echo $path`
20738  fi
20739
20740
20741  input_path="$new_path"
20742  # Check if we need to convert this using DOS-style short mode. If the path
20743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20744  # take no chances and rewrite it.
20745  # Note: m4 eats our [], so we need to use [ and ] instead.
20746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20747  if test "x$has_forbidden_chars" != x; then
20748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20750  fi
20751
20752
20753  windows_path="$new_path"
20754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20755    unix_path=`$CYGPATH -u "$windows_path"`
20756    new_path="$unix_path"
20757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20759    new_path="$unix_path"
20760  fi
20761
20762  if test "x$path" != "x$new_path"; then
20763    BOOT_JDK="$new_path"
20764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20766  fi
20767
20768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20770
20771  else
20772    # We're on a posix platform. Hooray! :)
20773    path="$BOOT_JDK"
20774    has_space=`$ECHO "$path" | $GREP " "`
20775    if test "x$has_space" != x; then
20776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20779    fi
20780
20781    # Use eval to expand a potential ~
20782    eval path="$path"
20783    if test ! -f "$path" && test ! -d "$path"; then
20784      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20785    fi
20786
20787    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20788  fi
20789
20790              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20791$as_echo_n "checking for Boot JDK... " >&6; }
20792              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20793$as_echo "$BOOT_JDK" >&6; }
20794              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20795$as_echo_n "checking Boot JDK version... " >&6; }
20796              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20797              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20798$as_echo "$BOOT_JDK_VERSION" >&6; }
20799            fi # end check jdk version
20800          fi # end check rt.jar
20801        fi # end check javac
20802      fi # end check java
20803    fi # end check boot jdk found
20804  fi
20805
20806
20807  # Test: Is there a JDK installed in default, well-known locations?
20808
20809  if test "x$BOOT_JDK_FOUND" = xno; then
20810    # Now execute the test
20811
20812  if test "x$OPENJDK_TARGET_OS" = xwindows; then
20813
20814  if test "x$BOOT_JDK_FOUND" = xno; then
20815    # Now execute the test
20816
20817  if test "x$ProgramW6432" != x; then
20818    VIRTUAL_DIR="$ProgramW6432/Java"
20819
20820  windows_path="$VIRTUAL_DIR"
20821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20822    unix_path=`$CYGPATH -u "$windows_path"`
20823    VIRTUAL_DIR="$unix_path"
20824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20826    VIRTUAL_DIR="$unix_path"
20827  fi
20828
20829
20830  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
20831  BOOT_JDK_SUFFIX=""
20832  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
20833  if test "x$ALL_JDKS_FOUND" != x; then
20834    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
20835
20836  if test "x$BOOT_JDK_FOUND" = xno; then
20837    # Now execute the test
20838
20839        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
20840        if test -d "$BOOT_JDK"; then
20841          BOOT_JDK_FOUND=maybe
20842          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
20843$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
20844        fi
20845
20846
20847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20849      # Do we have a bin/java?
20850      if test ! -x "$BOOT_JDK/bin/java"; then
20851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20853        BOOT_JDK_FOUND=no
20854      else
20855        # Do we have a bin/javac?
20856        if test ! -x "$BOOT_JDK/bin/javac"; then
20857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20861          BOOT_JDK_FOUND=no
20862        else
20863          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20864          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20867            BOOT_JDK_FOUND=no
20868          else
20869            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20870            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20871
20872            # Extra M4 quote needed to protect [] in grep expression.
20873            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20874            if test "x$FOUND_VERSION_78" = x; then
20875              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20877              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20878$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20879              BOOT_JDK_FOUND=no
20880            else
20881              # We're done! :-)
20882              BOOT_JDK_FOUND=yes
20883
20884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20885
20886  # Input might be given as Windows format, start by converting to
20887  # unix format.
20888  path="$BOOT_JDK"
20889  new_path=`$CYGPATH -u "$path"`
20890
20891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20894  # "foo.exe" is OK but "foo" is an error.
20895  #
20896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20897  # It is also a way to make sure we got the proper file name for the real test later on.
20898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20899  if test "x$test_shortpath" = x; then
20900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20902    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20903  fi
20904
20905  # Call helper function which possibly converts this using DOS-style short mode.
20906  # If so, the updated path is stored in $new_path.
20907
20908  input_path="$new_path"
20909  # Check if we need to convert this using DOS-style short mode. If the path
20910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20911  # take no chances and rewrite it.
20912  # Note: m4 eats our [], so we need to use [ and ] instead.
20913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20914  if test "x$has_forbidden_chars" != x; then
20915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20919      # Going to short mode and back again did indeed matter. Since short mode is
20920      # case insensitive, let's make it lowercase to improve readability.
20921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20922      # Now convert it back to Unix-stile (cygpath)
20923      input_path=`$CYGPATH -u "$shortmode_path"`
20924      new_path="$input_path"
20925    fi
20926  fi
20927
20928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20929  if test "x$test_cygdrive_prefix" = x; then
20930    # As a simple fix, exclude /usr/bin since it's not a real path.
20931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20933      # a path prefixed by /cygdrive for fixpath to work.
20934      new_path="$CYGWIN_ROOT_PATH$input_path"
20935    fi
20936  fi
20937
20938
20939  if test "x$path" != "x$new_path"; then
20940    BOOT_JDK="$new_path"
20941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20943  fi
20944
20945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20946
20947  path="$BOOT_JDK"
20948  has_colon=`$ECHO $path | $GREP ^.:`
20949  new_path="$path"
20950  if test "x$has_colon" = x; then
20951    # Not in mixed or Windows style, start by that.
20952    new_path=`cmd //c echo $path`
20953  fi
20954
20955
20956  input_path="$new_path"
20957  # Check if we need to convert this using DOS-style short mode. If the path
20958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20959  # take no chances and rewrite it.
20960  # Note: m4 eats our [], so we need to use [ and ] instead.
20961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20962  if test "x$has_forbidden_chars" != x; then
20963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20965  fi
20966
20967
20968  windows_path="$new_path"
20969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20970    unix_path=`$CYGPATH -u "$windows_path"`
20971    new_path="$unix_path"
20972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20974    new_path="$unix_path"
20975  fi
20976
20977  if test "x$path" != "x$new_path"; then
20978    BOOT_JDK="$new_path"
20979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20981  fi
20982
20983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20985
20986  else
20987    # We're on a posix platform. Hooray! :)
20988    path="$BOOT_JDK"
20989    has_space=`$ECHO "$path" | $GREP " "`
20990    if test "x$has_space" != x; then
20991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20993      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20994    fi
20995
20996    # Use eval to expand a potential ~
20997    eval path="$path"
20998    if test ! -f "$path" && test ! -d "$path"; then
20999      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21000    fi
21001
21002    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21003  fi
21004
21005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21006$as_echo_n "checking for Boot JDK... " >&6; }
21007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21008$as_echo "$BOOT_JDK" >&6; }
21009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21010$as_echo_n "checking Boot JDK version... " >&6; }
21011              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21013$as_echo "$BOOT_JDK_VERSION" >&6; }
21014            fi # end check jdk version
21015          fi # end check rt.jar
21016        fi # end check javac
21017      fi # end check java
21018    fi # end check boot jdk found
21019  fi
21020
21021    done
21022  fi
21023
21024  fi
21025
21026
21027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21029      # Do we have a bin/java?
21030      if test ! -x "$BOOT_JDK/bin/java"; then
21031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21033        BOOT_JDK_FOUND=no
21034      else
21035        # Do we have a bin/javac?
21036        if test ! -x "$BOOT_JDK/bin/javac"; then
21037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21041          BOOT_JDK_FOUND=no
21042        else
21043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21047            BOOT_JDK_FOUND=no
21048          else
21049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21051
21052            # Extra M4 quote needed to protect [] in grep expression.
21053            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21054            if test "x$FOUND_VERSION_78" = x; then
21055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21058$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21059              BOOT_JDK_FOUND=no
21060            else
21061              # We're done! :-)
21062              BOOT_JDK_FOUND=yes
21063
21064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21065
21066  # Input might be given as Windows format, start by converting to
21067  # unix format.
21068  path="$BOOT_JDK"
21069  new_path=`$CYGPATH -u "$path"`
21070
21071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21074  # "foo.exe" is OK but "foo" is an error.
21075  #
21076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21077  # It is also a way to make sure we got the proper file name for the real test later on.
21078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21079  if test "x$test_shortpath" = x; then
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21083  fi
21084
21085  # Call helper function which possibly converts this using DOS-style short mode.
21086  # If so, the updated path is stored in $new_path.
21087
21088  input_path="$new_path"
21089  # Check if we need to convert this using DOS-style short mode. If the path
21090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21091  # take no chances and rewrite it.
21092  # Note: m4 eats our [], so we need to use [ and ] instead.
21093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21094  if test "x$has_forbidden_chars" != x; then
21095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21099      # Going to short mode and back again did indeed matter. Since short mode is
21100      # case insensitive, let's make it lowercase to improve readability.
21101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21102      # Now convert it back to Unix-stile (cygpath)
21103      input_path=`$CYGPATH -u "$shortmode_path"`
21104      new_path="$input_path"
21105    fi
21106  fi
21107
21108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21109  if test "x$test_cygdrive_prefix" = x; then
21110    # As a simple fix, exclude /usr/bin since it's not a real path.
21111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21113      # a path prefixed by /cygdrive for fixpath to work.
21114      new_path="$CYGWIN_ROOT_PATH$input_path"
21115    fi
21116  fi
21117
21118
21119  if test "x$path" != "x$new_path"; then
21120    BOOT_JDK="$new_path"
21121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21123  fi
21124
21125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21126
21127  path="$BOOT_JDK"
21128  has_colon=`$ECHO $path | $GREP ^.:`
21129  new_path="$path"
21130  if test "x$has_colon" = x; then
21131    # Not in mixed or Windows style, start by that.
21132    new_path=`cmd //c echo $path`
21133  fi
21134
21135
21136  input_path="$new_path"
21137  # Check if we need to convert this using DOS-style short mode. If the path
21138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21139  # take no chances and rewrite it.
21140  # Note: m4 eats our [], so we need to use [ and ] instead.
21141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21142  if test "x$has_forbidden_chars" != x; then
21143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21145  fi
21146
21147
21148  windows_path="$new_path"
21149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21150    unix_path=`$CYGPATH -u "$windows_path"`
21151    new_path="$unix_path"
21152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21154    new_path="$unix_path"
21155  fi
21156
21157  if test "x$path" != "x$new_path"; then
21158    BOOT_JDK="$new_path"
21159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21161  fi
21162
21163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21165
21166  else
21167    # We're on a posix platform. Hooray! :)
21168    path="$BOOT_JDK"
21169    has_space=`$ECHO "$path" | $GREP " "`
21170    if test "x$has_space" != x; then
21171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21173      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21174    fi
21175
21176    # Use eval to expand a potential ~
21177    eval path="$path"
21178    if test ! -f "$path" && test ! -d "$path"; then
21179      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21180    fi
21181
21182    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21183  fi
21184
21185              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21186$as_echo_n "checking for Boot JDK... " >&6; }
21187              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21188$as_echo "$BOOT_JDK" >&6; }
21189              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21190$as_echo_n "checking Boot JDK version... " >&6; }
21191              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21192              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21193$as_echo "$BOOT_JDK_VERSION" >&6; }
21194            fi # end check jdk version
21195          fi # end check rt.jar
21196        fi # end check javac
21197      fi # end check java
21198    fi # end check boot jdk found
21199  fi
21200
21201
21202  if test "x$BOOT_JDK_FOUND" = xno; then
21203    # Now execute the test
21204
21205  if test "x$PROGRAMW6432" != x; then
21206    VIRTUAL_DIR="$PROGRAMW6432/Java"
21207
21208  windows_path="$VIRTUAL_DIR"
21209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21210    unix_path=`$CYGPATH -u "$windows_path"`
21211    VIRTUAL_DIR="$unix_path"
21212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21214    VIRTUAL_DIR="$unix_path"
21215  fi
21216
21217
21218  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21219  BOOT_JDK_SUFFIX=""
21220  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21221  if test "x$ALL_JDKS_FOUND" != x; then
21222    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21223
21224  if test "x$BOOT_JDK_FOUND" = xno; then
21225    # Now execute the test
21226
21227        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21228        if test -d "$BOOT_JDK"; then
21229          BOOT_JDK_FOUND=maybe
21230          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21231$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21232        fi
21233
21234
21235    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21236    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21237      # Do we have a bin/java?
21238      if test ! -x "$BOOT_JDK/bin/java"; then
21239        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21241        BOOT_JDK_FOUND=no
21242      else
21243        # Do we have a bin/javac?
21244        if test ! -x "$BOOT_JDK/bin/javac"; then
21245          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21247          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21248$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21249          BOOT_JDK_FOUND=no
21250        else
21251          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21252          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21253            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21255            BOOT_JDK_FOUND=no
21256          else
21257            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21258            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21259
21260            # Extra M4 quote needed to protect [] in grep expression.
21261            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21262            if test "x$FOUND_VERSION_78" = x; then
21263              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21265              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21266$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21267              BOOT_JDK_FOUND=no
21268            else
21269              # We're done! :-)
21270              BOOT_JDK_FOUND=yes
21271
21272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21273
21274  # Input might be given as Windows format, start by converting to
21275  # unix format.
21276  path="$BOOT_JDK"
21277  new_path=`$CYGPATH -u "$path"`
21278
21279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21282  # "foo.exe" is OK but "foo" is an error.
21283  #
21284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21285  # It is also a way to make sure we got the proper file name for the real test later on.
21286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21287  if test "x$test_shortpath" = x; then
21288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21291  fi
21292
21293  # Call helper function which possibly converts this using DOS-style short mode.
21294  # If so, the updated path is stored in $new_path.
21295
21296  input_path="$new_path"
21297  # Check if we need to convert this using DOS-style short mode. If the path
21298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21299  # take no chances and rewrite it.
21300  # Note: m4 eats our [], so we need to use [ and ] instead.
21301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21302  if test "x$has_forbidden_chars" != x; then
21303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21307      # Going to short mode and back again did indeed matter. Since short mode is
21308      # case insensitive, let's make it lowercase to improve readability.
21309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21310      # Now convert it back to Unix-stile (cygpath)
21311      input_path=`$CYGPATH -u "$shortmode_path"`
21312      new_path="$input_path"
21313    fi
21314  fi
21315
21316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21317  if test "x$test_cygdrive_prefix" = x; then
21318    # As a simple fix, exclude /usr/bin since it's not a real path.
21319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21321      # a path prefixed by /cygdrive for fixpath to work.
21322      new_path="$CYGWIN_ROOT_PATH$input_path"
21323    fi
21324  fi
21325
21326
21327  if test "x$path" != "x$new_path"; then
21328    BOOT_JDK="$new_path"
21329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21331  fi
21332
21333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21334
21335  path="$BOOT_JDK"
21336  has_colon=`$ECHO $path | $GREP ^.:`
21337  new_path="$path"
21338  if test "x$has_colon" = x; then
21339    # Not in mixed or Windows style, start by that.
21340    new_path=`cmd //c echo $path`
21341  fi
21342
21343
21344  input_path="$new_path"
21345  # Check if we need to convert this using DOS-style short mode. If the path
21346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21347  # take no chances and rewrite it.
21348  # Note: m4 eats our [], so we need to use [ and ] instead.
21349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21350  if test "x$has_forbidden_chars" != x; then
21351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21353  fi
21354
21355
21356  windows_path="$new_path"
21357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21358    unix_path=`$CYGPATH -u "$windows_path"`
21359    new_path="$unix_path"
21360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21362    new_path="$unix_path"
21363  fi
21364
21365  if test "x$path" != "x$new_path"; then
21366    BOOT_JDK="$new_path"
21367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21369  fi
21370
21371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21373
21374  else
21375    # We're on a posix platform. Hooray! :)
21376    path="$BOOT_JDK"
21377    has_space=`$ECHO "$path" | $GREP " "`
21378    if test "x$has_space" != x; then
21379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21381      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21382    fi
21383
21384    # Use eval to expand a potential ~
21385    eval path="$path"
21386    if test ! -f "$path" && test ! -d "$path"; then
21387      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21388    fi
21389
21390    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21391  fi
21392
21393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21394$as_echo_n "checking for Boot JDK... " >&6; }
21395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21396$as_echo "$BOOT_JDK" >&6; }
21397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21398$as_echo_n "checking Boot JDK version... " >&6; }
21399              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21401$as_echo "$BOOT_JDK_VERSION" >&6; }
21402            fi # end check jdk version
21403          fi # end check rt.jar
21404        fi # end check javac
21405      fi # end check java
21406    fi # end check boot jdk found
21407  fi
21408
21409    done
21410  fi
21411
21412  fi
21413
21414
21415    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21416    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21417      # Do we have a bin/java?
21418      if test ! -x "$BOOT_JDK/bin/java"; then
21419        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21421        BOOT_JDK_FOUND=no
21422      else
21423        # Do we have a bin/javac?
21424        if test ! -x "$BOOT_JDK/bin/javac"; then
21425          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21427          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21428$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21429          BOOT_JDK_FOUND=no
21430        else
21431          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21432          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21433            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21435            BOOT_JDK_FOUND=no
21436          else
21437            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21438            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21439
21440            # Extra M4 quote needed to protect [] in grep expression.
21441            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21442            if test "x$FOUND_VERSION_78" = x; then
21443              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21445              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21446$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21447              BOOT_JDK_FOUND=no
21448            else
21449              # We're done! :-)
21450              BOOT_JDK_FOUND=yes
21451
21452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21453
21454  # Input might be given as Windows format, start by converting to
21455  # unix format.
21456  path="$BOOT_JDK"
21457  new_path=`$CYGPATH -u "$path"`
21458
21459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21462  # "foo.exe" is OK but "foo" is an error.
21463  #
21464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21465  # It is also a way to make sure we got the proper file name for the real test later on.
21466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21467  if test "x$test_shortpath" = x; then
21468    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21470    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21471  fi
21472
21473  # Call helper function which possibly converts this using DOS-style short mode.
21474  # If so, the updated path is stored in $new_path.
21475
21476  input_path="$new_path"
21477  # Check if we need to convert this using DOS-style short mode. If the path
21478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21479  # take no chances and rewrite it.
21480  # Note: m4 eats our [], so we need to use [ and ] instead.
21481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21482  if test "x$has_forbidden_chars" != x; then
21483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21487      # Going to short mode and back again did indeed matter. Since short mode is
21488      # case insensitive, let's make it lowercase to improve readability.
21489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21490      # Now convert it back to Unix-stile (cygpath)
21491      input_path=`$CYGPATH -u "$shortmode_path"`
21492      new_path="$input_path"
21493    fi
21494  fi
21495
21496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21497  if test "x$test_cygdrive_prefix" = x; then
21498    # As a simple fix, exclude /usr/bin since it's not a real path.
21499    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21501      # a path prefixed by /cygdrive for fixpath to work.
21502      new_path="$CYGWIN_ROOT_PATH$input_path"
21503    fi
21504  fi
21505
21506
21507  if test "x$path" != "x$new_path"; then
21508    BOOT_JDK="$new_path"
21509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21511  fi
21512
21513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21514
21515  path="$BOOT_JDK"
21516  has_colon=`$ECHO $path | $GREP ^.:`
21517  new_path="$path"
21518  if test "x$has_colon" = x; then
21519    # Not in mixed or Windows style, start by that.
21520    new_path=`cmd //c echo $path`
21521  fi
21522
21523
21524  input_path="$new_path"
21525  # Check if we need to convert this using DOS-style short mode. If the path
21526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21527  # take no chances and rewrite it.
21528  # Note: m4 eats our [], so we need to use [ and ] instead.
21529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21530  if test "x$has_forbidden_chars" != x; then
21531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21533  fi
21534
21535
21536  windows_path="$new_path"
21537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21538    unix_path=`$CYGPATH -u "$windows_path"`
21539    new_path="$unix_path"
21540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21542    new_path="$unix_path"
21543  fi
21544
21545  if test "x$path" != "x$new_path"; then
21546    BOOT_JDK="$new_path"
21547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21548$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21549  fi
21550
21551  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21552  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21553
21554  else
21555    # We're on a posix platform. Hooray! :)
21556    path="$BOOT_JDK"
21557    has_space=`$ECHO "$path" | $GREP " "`
21558    if test "x$has_space" != x; then
21559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21561      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21562    fi
21563
21564    # Use eval to expand a potential ~
21565    eval path="$path"
21566    if test ! -f "$path" && test ! -d "$path"; then
21567      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21568    fi
21569
21570    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21571  fi
21572
21573              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21574$as_echo_n "checking for Boot JDK... " >&6; }
21575              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21576$as_echo "$BOOT_JDK" >&6; }
21577              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21578$as_echo_n "checking Boot JDK version... " >&6; }
21579              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21580              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21581$as_echo "$BOOT_JDK_VERSION" >&6; }
21582            fi # end check jdk version
21583          fi # end check rt.jar
21584        fi # end check javac
21585      fi # end check java
21586    fi # end check boot jdk found
21587  fi
21588
21589
21590  if test "x$BOOT_JDK_FOUND" = xno; then
21591    # Now execute the test
21592
21593  if test "x$PROGRAMFILES" != x; then
21594    VIRTUAL_DIR="$PROGRAMFILES/Java"
21595
21596  windows_path="$VIRTUAL_DIR"
21597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21598    unix_path=`$CYGPATH -u "$windows_path"`
21599    VIRTUAL_DIR="$unix_path"
21600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21602    VIRTUAL_DIR="$unix_path"
21603  fi
21604
21605
21606  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21607  BOOT_JDK_SUFFIX=""
21608  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21609  if test "x$ALL_JDKS_FOUND" != x; then
21610    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21611
21612  if test "x$BOOT_JDK_FOUND" = xno; then
21613    # Now execute the test
21614
21615        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21616        if test -d "$BOOT_JDK"; then
21617          BOOT_JDK_FOUND=maybe
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21619$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21620        fi
21621
21622
21623    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21624    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21625      # Do we have a bin/java?
21626      if test ! -x "$BOOT_JDK/bin/java"; then
21627        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21629        BOOT_JDK_FOUND=no
21630      else
21631        # Do we have a bin/javac?
21632        if test ! -x "$BOOT_JDK/bin/javac"; then
21633          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21635          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21636$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21637          BOOT_JDK_FOUND=no
21638        else
21639          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21640          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21641            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21643            BOOT_JDK_FOUND=no
21644          else
21645            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21646            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21647
21648            # Extra M4 quote needed to protect [] in grep expression.
21649            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21650            if test "x$FOUND_VERSION_78" = x; then
21651              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21653              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21654$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21655              BOOT_JDK_FOUND=no
21656            else
21657              # We're done! :-)
21658              BOOT_JDK_FOUND=yes
21659
21660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21661
21662  # Input might be given as Windows format, start by converting to
21663  # unix format.
21664  path="$BOOT_JDK"
21665  new_path=`$CYGPATH -u "$path"`
21666
21667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21670  # "foo.exe" is OK but "foo" is an error.
21671  #
21672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21673  # It is also a way to make sure we got the proper file name for the real test later on.
21674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21675  if test "x$test_shortpath" = x; then
21676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21677$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21678    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21679  fi
21680
21681  # Call helper function which possibly converts this using DOS-style short mode.
21682  # If so, the updated path is stored in $new_path.
21683
21684  input_path="$new_path"
21685  # Check if we need to convert this using DOS-style short mode. If the path
21686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21687  # take no chances and rewrite it.
21688  # Note: m4 eats our [], so we need to use [ and ] instead.
21689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21690  if test "x$has_forbidden_chars" != x; then
21691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21695      # Going to short mode and back again did indeed matter. Since short mode is
21696      # case insensitive, let's make it lowercase to improve readability.
21697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21698      # Now convert it back to Unix-stile (cygpath)
21699      input_path=`$CYGPATH -u "$shortmode_path"`
21700      new_path="$input_path"
21701    fi
21702  fi
21703
21704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21705  if test "x$test_cygdrive_prefix" = x; then
21706    # As a simple fix, exclude /usr/bin since it's not a real path.
21707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21709      # a path prefixed by /cygdrive for fixpath to work.
21710      new_path="$CYGWIN_ROOT_PATH$input_path"
21711    fi
21712  fi
21713
21714
21715  if test "x$path" != "x$new_path"; then
21716    BOOT_JDK="$new_path"
21717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21719  fi
21720
21721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21722
21723  path="$BOOT_JDK"
21724  has_colon=`$ECHO $path | $GREP ^.:`
21725  new_path="$path"
21726  if test "x$has_colon" = x; then
21727    # Not in mixed or Windows style, start by that.
21728    new_path=`cmd //c echo $path`
21729  fi
21730
21731
21732  input_path="$new_path"
21733  # Check if we need to convert this using DOS-style short mode. If the path
21734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21735  # take no chances and rewrite it.
21736  # Note: m4 eats our [], so we need to use [ and ] instead.
21737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21738  if test "x$has_forbidden_chars" != x; then
21739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21741  fi
21742
21743
21744  windows_path="$new_path"
21745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21746    unix_path=`$CYGPATH -u "$windows_path"`
21747    new_path="$unix_path"
21748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21750    new_path="$unix_path"
21751  fi
21752
21753  if test "x$path" != "x$new_path"; then
21754    BOOT_JDK="$new_path"
21755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21757  fi
21758
21759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21761
21762  else
21763    # We're on a posix platform. Hooray! :)
21764    path="$BOOT_JDK"
21765    has_space=`$ECHO "$path" | $GREP " "`
21766    if test "x$has_space" != x; then
21767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21770    fi
21771
21772    # Use eval to expand a potential ~
21773    eval path="$path"
21774    if test ! -f "$path" && test ! -d "$path"; then
21775      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21776    fi
21777
21778    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21779  fi
21780
21781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21782$as_echo_n "checking for Boot JDK... " >&6; }
21783              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21784$as_echo "$BOOT_JDK" >&6; }
21785              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21786$as_echo_n "checking Boot JDK version... " >&6; }
21787              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21788              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21789$as_echo "$BOOT_JDK_VERSION" >&6; }
21790            fi # end check jdk version
21791          fi # end check rt.jar
21792        fi # end check javac
21793      fi # end check java
21794    fi # end check boot jdk found
21795  fi
21796
21797    done
21798  fi
21799
21800  fi
21801
21802
21803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21805      # Do we have a bin/java?
21806      if test ! -x "$BOOT_JDK/bin/java"; then
21807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21809        BOOT_JDK_FOUND=no
21810      else
21811        # Do we have a bin/javac?
21812        if test ! -x "$BOOT_JDK/bin/javac"; then
21813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21817          BOOT_JDK_FOUND=no
21818        else
21819          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21820          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21823            BOOT_JDK_FOUND=no
21824          else
21825            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21826            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21827
21828            # Extra M4 quote needed to protect [] in grep expression.
21829            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21830            if test "x$FOUND_VERSION_78" = x; then
21831              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21833              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21834$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21835              BOOT_JDK_FOUND=no
21836            else
21837              # We're done! :-)
21838              BOOT_JDK_FOUND=yes
21839
21840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21841
21842  # Input might be given as Windows format, start by converting to
21843  # unix format.
21844  path="$BOOT_JDK"
21845  new_path=`$CYGPATH -u "$path"`
21846
21847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21850  # "foo.exe" is OK but "foo" is an error.
21851  #
21852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21853  # It is also a way to make sure we got the proper file name for the real test later on.
21854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21855  if test "x$test_shortpath" = x; then
21856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21859  fi
21860
21861  # Call helper function which possibly converts this using DOS-style short mode.
21862  # If so, the updated path is stored in $new_path.
21863
21864  input_path="$new_path"
21865  # Check if we need to convert this using DOS-style short mode. If the path
21866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21867  # take no chances and rewrite it.
21868  # Note: m4 eats our [], so we need to use [ and ] instead.
21869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21870  if test "x$has_forbidden_chars" != x; then
21871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21875      # Going to short mode and back again did indeed matter. Since short mode is
21876      # case insensitive, let's make it lowercase to improve readability.
21877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21878      # Now convert it back to Unix-stile (cygpath)
21879      input_path=`$CYGPATH -u "$shortmode_path"`
21880      new_path="$input_path"
21881    fi
21882  fi
21883
21884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21885  if test "x$test_cygdrive_prefix" = x; then
21886    # As a simple fix, exclude /usr/bin since it's not a real path.
21887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21889      # a path prefixed by /cygdrive for fixpath to work.
21890      new_path="$CYGWIN_ROOT_PATH$input_path"
21891    fi
21892  fi
21893
21894
21895  if test "x$path" != "x$new_path"; then
21896    BOOT_JDK="$new_path"
21897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21899  fi
21900
21901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21902
21903  path="$BOOT_JDK"
21904  has_colon=`$ECHO $path | $GREP ^.:`
21905  new_path="$path"
21906  if test "x$has_colon" = x; then
21907    # Not in mixed or Windows style, start by that.
21908    new_path=`cmd //c echo $path`
21909  fi
21910
21911
21912  input_path="$new_path"
21913  # Check if we need to convert this using DOS-style short mode. If the path
21914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21915  # take no chances and rewrite it.
21916  # Note: m4 eats our [], so we need to use [ and ] instead.
21917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21918  if test "x$has_forbidden_chars" != x; then
21919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21921  fi
21922
21923
21924  windows_path="$new_path"
21925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21926    unix_path=`$CYGPATH -u "$windows_path"`
21927    new_path="$unix_path"
21928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21930    new_path="$unix_path"
21931  fi
21932
21933  if test "x$path" != "x$new_path"; then
21934    BOOT_JDK="$new_path"
21935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21937  fi
21938
21939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21941
21942  else
21943    # We're on a posix platform. Hooray! :)
21944    path="$BOOT_JDK"
21945    has_space=`$ECHO "$path" | $GREP " "`
21946    if test "x$has_space" != x; then
21947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21949      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21950    fi
21951
21952    # Use eval to expand a potential ~
21953    eval path="$path"
21954    if test ! -f "$path" && test ! -d "$path"; then
21955      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21956    fi
21957
21958    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21959  fi
21960
21961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21962$as_echo_n "checking for Boot JDK... " >&6; }
21963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21964$as_echo "$BOOT_JDK" >&6; }
21965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21966$as_echo_n "checking Boot JDK version... " >&6; }
21967              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21968              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21969$as_echo "$BOOT_JDK_VERSION" >&6; }
21970            fi # end check jdk version
21971          fi # end check rt.jar
21972        fi # end check javac
21973      fi # end check java
21974    fi # end check boot jdk found
21975  fi
21976
21977
21978  if test "x$BOOT_JDK_FOUND" = xno; then
21979    # Now execute the test
21980
21981  if test "x$ProgramFiles" != x; then
21982    VIRTUAL_DIR="$ProgramFiles/Java"
21983
21984  windows_path="$VIRTUAL_DIR"
21985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21986    unix_path=`$CYGPATH -u "$windows_path"`
21987    VIRTUAL_DIR="$unix_path"
21988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21990    VIRTUAL_DIR="$unix_path"
21991  fi
21992
21993
21994  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21995  BOOT_JDK_SUFFIX=""
21996  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21997  if test "x$ALL_JDKS_FOUND" != x; then
21998    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21999
22000  if test "x$BOOT_JDK_FOUND" = xno; then
22001    # Now execute the test
22002
22003        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22004        if test -d "$BOOT_JDK"; then
22005          BOOT_JDK_FOUND=maybe
22006          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22007$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22008        fi
22009
22010
22011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22013      # Do we have a bin/java?
22014      if test ! -x "$BOOT_JDK/bin/java"; then
22015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22017        BOOT_JDK_FOUND=no
22018      else
22019        # Do we have a bin/javac?
22020        if test ! -x "$BOOT_JDK/bin/javac"; then
22021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22025          BOOT_JDK_FOUND=no
22026        else
22027          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22028          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22031            BOOT_JDK_FOUND=no
22032          else
22033            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22034            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22035
22036            # Extra M4 quote needed to protect [] in grep expression.
22037            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22038            if test "x$FOUND_VERSION_78" = x; then
22039              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22041              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22042$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22043              BOOT_JDK_FOUND=no
22044            else
22045              # We're done! :-)
22046              BOOT_JDK_FOUND=yes
22047
22048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22049
22050  # Input might be given as Windows format, start by converting to
22051  # unix format.
22052  path="$BOOT_JDK"
22053  new_path=`$CYGPATH -u "$path"`
22054
22055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22058  # "foo.exe" is OK but "foo" is an error.
22059  #
22060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22061  # It is also a way to make sure we got the proper file name for the real test later on.
22062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22063  if test "x$test_shortpath" = x; then
22064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22066    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22067  fi
22068
22069  # Call helper function which possibly converts this using DOS-style short mode.
22070  # If so, the updated path is stored in $new_path.
22071
22072  input_path="$new_path"
22073  # Check if we need to convert this using DOS-style short mode. If the path
22074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22075  # take no chances and rewrite it.
22076  # Note: m4 eats our [], so we need to use [ and ] instead.
22077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22078  if test "x$has_forbidden_chars" != x; then
22079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22083      # Going to short mode and back again did indeed matter. Since short mode is
22084      # case insensitive, let's make it lowercase to improve readability.
22085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22086      # Now convert it back to Unix-stile (cygpath)
22087      input_path=`$CYGPATH -u "$shortmode_path"`
22088      new_path="$input_path"
22089    fi
22090  fi
22091
22092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22093  if test "x$test_cygdrive_prefix" = x; then
22094    # As a simple fix, exclude /usr/bin since it's not a real path.
22095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22097      # a path prefixed by /cygdrive for fixpath to work.
22098      new_path="$CYGWIN_ROOT_PATH$input_path"
22099    fi
22100  fi
22101
22102
22103  if test "x$path" != "x$new_path"; then
22104    BOOT_JDK="$new_path"
22105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22107  fi
22108
22109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22110
22111  path="$BOOT_JDK"
22112  has_colon=`$ECHO $path | $GREP ^.:`
22113  new_path="$path"
22114  if test "x$has_colon" = x; then
22115    # Not in mixed or Windows style, start by that.
22116    new_path=`cmd //c echo $path`
22117  fi
22118
22119
22120  input_path="$new_path"
22121  # Check if we need to convert this using DOS-style short mode. If the path
22122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22123  # take no chances and rewrite it.
22124  # Note: m4 eats our [], so we need to use [ and ] instead.
22125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22126  if test "x$has_forbidden_chars" != x; then
22127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22129  fi
22130
22131
22132  windows_path="$new_path"
22133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22134    unix_path=`$CYGPATH -u "$windows_path"`
22135    new_path="$unix_path"
22136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22138    new_path="$unix_path"
22139  fi
22140
22141  if test "x$path" != "x$new_path"; then
22142    BOOT_JDK="$new_path"
22143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22145  fi
22146
22147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22149
22150  else
22151    # We're on a posix platform. Hooray! :)
22152    path="$BOOT_JDK"
22153    has_space=`$ECHO "$path" | $GREP " "`
22154    if test "x$has_space" != x; then
22155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22158    fi
22159
22160    # Use eval to expand a potential ~
22161    eval path="$path"
22162    if test ! -f "$path" && test ! -d "$path"; then
22163      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22164    fi
22165
22166    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22167  fi
22168
22169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22170$as_echo_n "checking for Boot JDK... " >&6; }
22171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22172$as_echo "$BOOT_JDK" >&6; }
22173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22174$as_echo_n "checking Boot JDK version... " >&6; }
22175              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22176              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22177$as_echo "$BOOT_JDK_VERSION" >&6; }
22178            fi # end check jdk version
22179          fi # end check rt.jar
22180        fi # end check javac
22181      fi # end check java
22182    fi # end check boot jdk found
22183  fi
22184
22185    done
22186  fi
22187
22188  fi
22189
22190
22191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22193      # Do we have a bin/java?
22194      if test ! -x "$BOOT_JDK/bin/java"; then
22195        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22197        BOOT_JDK_FOUND=no
22198      else
22199        # Do we have a bin/javac?
22200        if test ! -x "$BOOT_JDK/bin/javac"; then
22201          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22203          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22205          BOOT_JDK_FOUND=no
22206        else
22207          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22208          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22209            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22211            BOOT_JDK_FOUND=no
22212          else
22213            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22214            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22215
22216            # Extra M4 quote needed to protect [] in grep expression.
22217            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22218            if test "x$FOUND_VERSION_78" = x; then
22219              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22221              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22222$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22223              BOOT_JDK_FOUND=no
22224            else
22225              # We're done! :-)
22226              BOOT_JDK_FOUND=yes
22227
22228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22229
22230  # Input might be given as Windows format, start by converting to
22231  # unix format.
22232  path="$BOOT_JDK"
22233  new_path=`$CYGPATH -u "$path"`
22234
22235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22238  # "foo.exe" is OK but "foo" is an error.
22239  #
22240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22241  # It is also a way to make sure we got the proper file name for the real test later on.
22242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22243  if test "x$test_shortpath" = x; then
22244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22247  fi
22248
22249  # Call helper function which possibly converts this using DOS-style short mode.
22250  # If so, the updated path is stored in $new_path.
22251
22252  input_path="$new_path"
22253  # Check if we need to convert this using DOS-style short mode. If the path
22254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22255  # take no chances and rewrite it.
22256  # Note: m4 eats our [], so we need to use [ and ] instead.
22257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22258  if test "x$has_forbidden_chars" != x; then
22259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22263      # Going to short mode and back again did indeed matter. Since short mode is
22264      # case insensitive, let's make it lowercase to improve readability.
22265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22266      # Now convert it back to Unix-stile (cygpath)
22267      input_path=`$CYGPATH -u "$shortmode_path"`
22268      new_path="$input_path"
22269    fi
22270  fi
22271
22272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22273  if test "x$test_cygdrive_prefix" = x; then
22274    # As a simple fix, exclude /usr/bin since it's not a real path.
22275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22277      # a path prefixed by /cygdrive for fixpath to work.
22278      new_path="$CYGWIN_ROOT_PATH$input_path"
22279    fi
22280  fi
22281
22282
22283  if test "x$path" != "x$new_path"; then
22284    BOOT_JDK="$new_path"
22285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22287  fi
22288
22289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290
22291  path="$BOOT_JDK"
22292  has_colon=`$ECHO $path | $GREP ^.:`
22293  new_path="$path"
22294  if test "x$has_colon" = x; then
22295    # Not in mixed or Windows style, start by that.
22296    new_path=`cmd //c echo $path`
22297  fi
22298
22299
22300  input_path="$new_path"
22301  # Check if we need to convert this using DOS-style short mode. If the path
22302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22303  # take no chances and rewrite it.
22304  # Note: m4 eats our [], so we need to use [ and ] instead.
22305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22306  if test "x$has_forbidden_chars" != x; then
22307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22309  fi
22310
22311
22312  windows_path="$new_path"
22313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22314    unix_path=`$CYGPATH -u "$windows_path"`
22315    new_path="$unix_path"
22316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22318    new_path="$unix_path"
22319  fi
22320
22321  if test "x$path" != "x$new_path"; then
22322    BOOT_JDK="$new_path"
22323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22325  fi
22326
22327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22329
22330  else
22331    # We're on a posix platform. Hooray! :)
22332    path="$BOOT_JDK"
22333    has_space=`$ECHO "$path" | $GREP " "`
22334    if test "x$has_space" != x; then
22335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22338    fi
22339
22340    # Use eval to expand a potential ~
22341    eval path="$path"
22342    if test ! -f "$path" && test ! -d "$path"; then
22343      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22344    fi
22345
22346    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22347  fi
22348
22349              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22350$as_echo_n "checking for Boot JDK... " >&6; }
22351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22352$as_echo "$BOOT_JDK" >&6; }
22353              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22354$as_echo_n "checking Boot JDK version... " >&6; }
22355              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22356              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22357$as_echo "$BOOT_JDK_VERSION" >&6; }
22358            fi # end check jdk version
22359          fi # end check rt.jar
22360        fi # end check javac
22361      fi # end check java
22362    fi # end check boot jdk found
22363  fi
22364
22365
22366  if test "x$BOOT_JDK_FOUND" = xno; then
22367    # Now execute the test
22368
22369  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22370  BOOT_JDK_SUFFIX=""
22371  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22372  if test "x$ALL_JDKS_FOUND" != x; then
22373    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22374
22375  if test "x$BOOT_JDK_FOUND" = xno; then
22376    # Now execute the test
22377
22378        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22379        if test -d "$BOOT_JDK"; then
22380          BOOT_JDK_FOUND=maybe
22381          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22382$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22383        fi
22384
22385
22386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22388      # Do we have a bin/java?
22389      if test ! -x "$BOOT_JDK/bin/java"; then
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22392        BOOT_JDK_FOUND=no
22393      else
22394        # Do we have a bin/javac?
22395        if test ! -x "$BOOT_JDK/bin/javac"; then
22396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22400          BOOT_JDK_FOUND=no
22401        else
22402          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22403          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22404            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22406            BOOT_JDK_FOUND=no
22407          else
22408            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22410
22411            # Extra M4 quote needed to protect [] in grep expression.
22412            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22413            if test "x$FOUND_VERSION_78" = x; then
22414              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22416              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22417$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22418              BOOT_JDK_FOUND=no
22419            else
22420              # We're done! :-)
22421              BOOT_JDK_FOUND=yes
22422
22423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22424
22425  # Input might be given as Windows format, start by converting to
22426  # unix format.
22427  path="$BOOT_JDK"
22428  new_path=`$CYGPATH -u "$path"`
22429
22430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22433  # "foo.exe" is OK but "foo" is an error.
22434  #
22435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22436  # It is also a way to make sure we got the proper file name for the real test later on.
22437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22438  if test "x$test_shortpath" = x; then
22439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22441    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22442  fi
22443
22444  # Call helper function which possibly converts this using DOS-style short mode.
22445  # If so, the updated path is stored in $new_path.
22446
22447  input_path="$new_path"
22448  # Check if we need to convert this using DOS-style short mode. If the path
22449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22450  # take no chances and rewrite it.
22451  # Note: m4 eats our [], so we need to use [ and ] instead.
22452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22453  if test "x$has_forbidden_chars" != x; then
22454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22458      # Going to short mode and back again did indeed matter. Since short mode is
22459      # case insensitive, let's make it lowercase to improve readability.
22460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22461      # Now convert it back to Unix-stile (cygpath)
22462      input_path=`$CYGPATH -u "$shortmode_path"`
22463      new_path="$input_path"
22464    fi
22465  fi
22466
22467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22468  if test "x$test_cygdrive_prefix" = x; then
22469    # As a simple fix, exclude /usr/bin since it's not a real path.
22470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22472      # a path prefixed by /cygdrive for fixpath to work.
22473      new_path="$CYGWIN_ROOT_PATH$input_path"
22474    fi
22475  fi
22476
22477
22478  if test "x$path" != "x$new_path"; then
22479    BOOT_JDK="$new_path"
22480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22482  fi
22483
22484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22485
22486  path="$BOOT_JDK"
22487  has_colon=`$ECHO $path | $GREP ^.:`
22488  new_path="$path"
22489  if test "x$has_colon" = x; then
22490    # Not in mixed or Windows style, start by that.
22491    new_path=`cmd //c echo $path`
22492  fi
22493
22494
22495  input_path="$new_path"
22496  # Check if we need to convert this using DOS-style short mode. If the path
22497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22498  # take no chances and rewrite it.
22499  # Note: m4 eats our [], so we need to use [ and ] instead.
22500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22501  if test "x$has_forbidden_chars" != x; then
22502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22504  fi
22505
22506
22507  windows_path="$new_path"
22508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22509    unix_path=`$CYGPATH -u "$windows_path"`
22510    new_path="$unix_path"
22511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22513    new_path="$unix_path"
22514  fi
22515
22516  if test "x$path" != "x$new_path"; then
22517    BOOT_JDK="$new_path"
22518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22520  fi
22521
22522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22524
22525  else
22526    # We're on a posix platform. Hooray! :)
22527    path="$BOOT_JDK"
22528    has_space=`$ECHO "$path" | $GREP " "`
22529    if test "x$has_space" != x; then
22530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22532      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22533    fi
22534
22535    # Use eval to expand a potential ~
22536    eval path="$path"
22537    if test ! -f "$path" && test ! -d "$path"; then
22538      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22539    fi
22540
22541    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22542  fi
22543
22544              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22545$as_echo_n "checking for Boot JDK... " >&6; }
22546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22547$as_echo "$BOOT_JDK" >&6; }
22548              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22549$as_echo_n "checking Boot JDK version... " >&6; }
22550              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22552$as_echo "$BOOT_JDK_VERSION" >&6; }
22553            fi # end check jdk version
22554          fi # end check rt.jar
22555        fi # end check javac
22556      fi # end check java
22557    fi # end check boot jdk found
22558  fi
22559
22560    done
22561  fi
22562
22563
22564    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22565    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22566      # Do we have a bin/java?
22567      if test ! -x "$BOOT_JDK/bin/java"; then
22568        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22570        BOOT_JDK_FOUND=no
22571      else
22572        # Do we have a bin/javac?
22573        if test ! -x "$BOOT_JDK/bin/javac"; then
22574          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22576          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22577$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22578          BOOT_JDK_FOUND=no
22579        else
22580          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22581          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22584            BOOT_JDK_FOUND=no
22585          else
22586            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22587            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22588
22589            # Extra M4 quote needed to protect [] in grep expression.
22590            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22591            if test "x$FOUND_VERSION_78" = x; then
22592              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22594              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22595$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22596              BOOT_JDK_FOUND=no
22597            else
22598              # We're done! :-)
22599              BOOT_JDK_FOUND=yes
22600
22601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22602
22603  # Input might be given as Windows format, start by converting to
22604  # unix format.
22605  path="$BOOT_JDK"
22606  new_path=`$CYGPATH -u "$path"`
22607
22608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22611  # "foo.exe" is OK but "foo" is an error.
22612  #
22613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22614  # It is also a way to make sure we got the proper file name for the real test later on.
22615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22616  if test "x$test_shortpath" = x; then
22617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22619    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22620  fi
22621
22622  # Call helper function which possibly converts this using DOS-style short mode.
22623  # If so, the updated path is stored in $new_path.
22624
22625  input_path="$new_path"
22626  # Check if we need to convert this using DOS-style short mode. If the path
22627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22628  # take no chances and rewrite it.
22629  # Note: m4 eats our [], so we need to use [ and ] instead.
22630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22631  if test "x$has_forbidden_chars" != x; then
22632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22636      # Going to short mode and back again did indeed matter. Since short mode is
22637      # case insensitive, let's make it lowercase to improve readability.
22638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22639      # Now convert it back to Unix-stile (cygpath)
22640      input_path=`$CYGPATH -u "$shortmode_path"`
22641      new_path="$input_path"
22642    fi
22643  fi
22644
22645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22646  if test "x$test_cygdrive_prefix" = x; then
22647    # As a simple fix, exclude /usr/bin since it's not a real path.
22648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22650      # a path prefixed by /cygdrive for fixpath to work.
22651      new_path="$CYGWIN_ROOT_PATH$input_path"
22652    fi
22653  fi
22654
22655
22656  if test "x$path" != "x$new_path"; then
22657    BOOT_JDK="$new_path"
22658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22660  fi
22661
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663
22664  path="$BOOT_JDK"
22665  has_colon=`$ECHO $path | $GREP ^.:`
22666  new_path="$path"
22667  if test "x$has_colon" = x; then
22668    # Not in mixed or Windows style, start by that.
22669    new_path=`cmd //c echo $path`
22670  fi
22671
22672
22673  input_path="$new_path"
22674  # Check if we need to convert this using DOS-style short mode. If the path
22675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22676  # take no chances and rewrite it.
22677  # Note: m4 eats our [], so we need to use [ and ] instead.
22678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22679  if test "x$has_forbidden_chars" != x; then
22680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22682  fi
22683
22684
22685  windows_path="$new_path"
22686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687    unix_path=`$CYGPATH -u "$windows_path"`
22688    new_path="$unix_path"
22689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691    new_path="$unix_path"
22692  fi
22693
22694  if test "x$path" != "x$new_path"; then
22695    BOOT_JDK="$new_path"
22696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22698  fi
22699
22700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22702
22703  else
22704    # We're on a posix platform. Hooray! :)
22705    path="$BOOT_JDK"
22706    has_space=`$ECHO "$path" | $GREP " "`
22707    if test "x$has_space" != x; then
22708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22710      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22711    fi
22712
22713    # Use eval to expand a potential ~
22714    eval path="$path"
22715    if test ! -f "$path" && test ! -d "$path"; then
22716      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22717    fi
22718
22719    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22720  fi
22721
22722              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22723$as_echo_n "checking for Boot JDK... " >&6; }
22724              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22725$as_echo "$BOOT_JDK" >&6; }
22726              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22727$as_echo_n "checking Boot JDK version... " >&6; }
22728              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22730$as_echo "$BOOT_JDK_VERSION" >&6; }
22731            fi # end check jdk version
22732          fi # end check rt.jar
22733        fi # end check javac
22734      fi # end check java
22735    fi # end check boot jdk found
22736  fi
22737
22738  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
22739
22740  if test "x$BOOT_JDK_FOUND" = xno; then
22741    # Now execute the test
22742
22743  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
22744  BOOT_JDK_SUFFIX="/Contents/Home"
22745  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22746  if test "x$ALL_JDKS_FOUND" != x; then
22747    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22748
22749  if test "x$BOOT_JDK_FOUND" = xno; then
22750    # Now execute the test
22751
22752        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22753        if test -d "$BOOT_JDK"; then
22754          BOOT_JDK_FOUND=maybe
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22756$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22757        fi
22758
22759
22760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22762      # Do we have a bin/java?
22763      if test ! -x "$BOOT_JDK/bin/java"; then
22764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22766        BOOT_JDK_FOUND=no
22767      else
22768        # Do we have a bin/javac?
22769        if test ! -x "$BOOT_JDK/bin/javac"; then
22770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22774          BOOT_JDK_FOUND=no
22775        else
22776          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22777          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22780            BOOT_JDK_FOUND=no
22781          else
22782            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22784
22785            # Extra M4 quote needed to protect [] in grep expression.
22786            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22787            if test "x$FOUND_VERSION_78" = x; then
22788              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22790              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22791$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22792              BOOT_JDK_FOUND=no
22793            else
22794              # We're done! :-)
22795              BOOT_JDK_FOUND=yes
22796
22797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22798
22799  # Input might be given as Windows format, start by converting to
22800  # unix format.
22801  path="$BOOT_JDK"
22802  new_path=`$CYGPATH -u "$path"`
22803
22804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22807  # "foo.exe" is OK but "foo" is an error.
22808  #
22809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22810  # It is also a way to make sure we got the proper file name for the real test later on.
22811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22812  if test "x$test_shortpath" = x; then
22813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22816  fi
22817
22818  # Call helper function which possibly converts this using DOS-style short mode.
22819  # If so, the updated path is stored in $new_path.
22820
22821  input_path="$new_path"
22822  # Check if we need to convert this using DOS-style short mode. If the path
22823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22824  # take no chances and rewrite it.
22825  # Note: m4 eats our [], so we need to use [ and ] instead.
22826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22827  if test "x$has_forbidden_chars" != x; then
22828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22832      # Going to short mode and back again did indeed matter. Since short mode is
22833      # case insensitive, let's make it lowercase to improve readability.
22834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22835      # Now convert it back to Unix-stile (cygpath)
22836      input_path=`$CYGPATH -u "$shortmode_path"`
22837      new_path="$input_path"
22838    fi
22839  fi
22840
22841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22842  if test "x$test_cygdrive_prefix" = x; then
22843    # As a simple fix, exclude /usr/bin since it's not a real path.
22844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22846      # a path prefixed by /cygdrive for fixpath to work.
22847      new_path="$CYGWIN_ROOT_PATH$input_path"
22848    fi
22849  fi
22850
22851
22852  if test "x$path" != "x$new_path"; then
22853    BOOT_JDK="$new_path"
22854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22856  fi
22857
22858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22859
22860  path="$BOOT_JDK"
22861  has_colon=`$ECHO $path | $GREP ^.:`
22862  new_path="$path"
22863  if test "x$has_colon" = x; then
22864    # Not in mixed or Windows style, start by that.
22865    new_path=`cmd //c echo $path`
22866  fi
22867
22868
22869  input_path="$new_path"
22870  # Check if we need to convert this using DOS-style short mode. If the path
22871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22872  # take no chances and rewrite it.
22873  # Note: m4 eats our [], so we need to use [ and ] instead.
22874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22875  if test "x$has_forbidden_chars" != x; then
22876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22878  fi
22879
22880
22881  windows_path="$new_path"
22882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22883    unix_path=`$CYGPATH -u "$windows_path"`
22884    new_path="$unix_path"
22885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22887    new_path="$unix_path"
22888  fi
22889
22890  if test "x$path" != "x$new_path"; then
22891    BOOT_JDK="$new_path"
22892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22894  fi
22895
22896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22898
22899  else
22900    # We're on a posix platform. Hooray! :)
22901    path="$BOOT_JDK"
22902    has_space=`$ECHO "$path" | $GREP " "`
22903    if test "x$has_space" != x; then
22904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22906      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22907    fi
22908
22909    # Use eval to expand a potential ~
22910    eval path="$path"
22911    if test ! -f "$path" && test ! -d "$path"; then
22912      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22913    fi
22914
22915    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22916  fi
22917
22918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22919$as_echo_n "checking for Boot JDK... " >&6; }
22920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22921$as_echo "$BOOT_JDK" >&6; }
22922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22923$as_echo_n "checking Boot JDK version... " >&6; }
22924              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22926$as_echo "$BOOT_JDK_VERSION" >&6; }
22927            fi # end check jdk version
22928          fi # end check rt.jar
22929        fi # end check javac
22930      fi # end check java
22931    fi # end check boot jdk found
22932  fi
22933
22934    done
22935  fi
22936
22937
22938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22940      # Do we have a bin/java?
22941      if test ! -x "$BOOT_JDK/bin/java"; then
22942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22944        BOOT_JDK_FOUND=no
22945      else
22946        # Do we have a bin/javac?
22947        if test ! -x "$BOOT_JDK/bin/javac"; then
22948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22952          BOOT_JDK_FOUND=no
22953        else
22954          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22955          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22956            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22958            BOOT_JDK_FOUND=no
22959          else
22960            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22962
22963            # Extra M4 quote needed to protect [] in grep expression.
22964            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22965            if test "x$FOUND_VERSION_78" = x; then
22966              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22968              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22969$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22970              BOOT_JDK_FOUND=no
22971            else
22972              # We're done! :-)
22973              BOOT_JDK_FOUND=yes
22974
22975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22976
22977  # Input might be given as Windows format, start by converting to
22978  # unix format.
22979  path="$BOOT_JDK"
22980  new_path=`$CYGPATH -u "$path"`
22981
22982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22985  # "foo.exe" is OK but "foo" is an error.
22986  #
22987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22988  # It is also a way to make sure we got the proper file name for the real test later on.
22989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22990  if test "x$test_shortpath" = x; then
22991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22994  fi
22995
22996  # Call helper function which possibly converts this using DOS-style short mode.
22997  # If so, the updated path is stored in $new_path.
22998
22999  input_path="$new_path"
23000  # Check if we need to convert this using DOS-style short mode. If the path
23001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23002  # take no chances and rewrite it.
23003  # Note: m4 eats our [], so we need to use [ and ] instead.
23004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23005  if test "x$has_forbidden_chars" != x; then
23006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23010      # Going to short mode and back again did indeed matter. Since short mode is
23011      # case insensitive, let's make it lowercase to improve readability.
23012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23013      # Now convert it back to Unix-stile (cygpath)
23014      input_path=`$CYGPATH -u "$shortmode_path"`
23015      new_path="$input_path"
23016    fi
23017  fi
23018
23019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23020  if test "x$test_cygdrive_prefix" = x; then
23021    # As a simple fix, exclude /usr/bin since it's not a real path.
23022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23024      # a path prefixed by /cygdrive for fixpath to work.
23025      new_path="$CYGWIN_ROOT_PATH$input_path"
23026    fi
23027  fi
23028
23029
23030  if test "x$path" != "x$new_path"; then
23031    BOOT_JDK="$new_path"
23032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23034  fi
23035
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037
23038  path="$BOOT_JDK"
23039  has_colon=`$ECHO $path | $GREP ^.:`
23040  new_path="$path"
23041  if test "x$has_colon" = x; then
23042    # Not in mixed or Windows style, start by that.
23043    new_path=`cmd //c echo $path`
23044  fi
23045
23046
23047  input_path="$new_path"
23048  # Check if we need to convert this using DOS-style short mode. If the path
23049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23050  # take no chances and rewrite it.
23051  # Note: m4 eats our [], so we need to use [ and ] instead.
23052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23053  if test "x$has_forbidden_chars" != x; then
23054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23056  fi
23057
23058
23059  windows_path="$new_path"
23060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23061    unix_path=`$CYGPATH -u "$windows_path"`
23062    new_path="$unix_path"
23063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23065    new_path="$unix_path"
23066  fi
23067
23068  if test "x$path" != "x$new_path"; then
23069    BOOT_JDK="$new_path"
23070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23072  fi
23073
23074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23076
23077  else
23078    # We're on a posix platform. Hooray! :)
23079    path="$BOOT_JDK"
23080    has_space=`$ECHO "$path" | $GREP " "`
23081    if test "x$has_space" != x; then
23082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23084      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23085    fi
23086
23087    # Use eval to expand a potential ~
23088    eval path="$path"
23089    if test ! -f "$path" && test ! -d "$path"; then
23090      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23091    fi
23092
23093    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23094  fi
23095
23096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23097$as_echo_n "checking for Boot JDK... " >&6; }
23098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23099$as_echo "$BOOT_JDK" >&6; }
23100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23101$as_echo_n "checking Boot JDK version... " >&6; }
23102              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23104$as_echo "$BOOT_JDK_VERSION" >&6; }
23105            fi # end check jdk version
23106          fi # end check rt.jar
23107        fi # end check javac
23108      fi # end check java
23109    fi # end check boot jdk found
23110  fi
23111
23112
23113  if test "x$BOOT_JDK_FOUND" = xno; then
23114    # Now execute the test
23115
23116  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23117  BOOT_JDK_SUFFIX="/Contents/Home"
23118  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23119  if test "x$ALL_JDKS_FOUND" != x; then
23120    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23121
23122  if test "x$BOOT_JDK_FOUND" = xno; then
23123    # Now execute the test
23124
23125        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23126        if test -d "$BOOT_JDK"; then
23127          BOOT_JDK_FOUND=maybe
23128          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23129$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23130        fi
23131
23132
23133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23135      # Do we have a bin/java?
23136      if test ! -x "$BOOT_JDK/bin/java"; then
23137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23139        BOOT_JDK_FOUND=no
23140      else
23141        # Do we have a bin/javac?
23142        if test ! -x "$BOOT_JDK/bin/javac"; then
23143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23147          BOOT_JDK_FOUND=no
23148        else
23149          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23150          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23153            BOOT_JDK_FOUND=no
23154          else
23155            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23157
23158            # Extra M4 quote needed to protect [] in grep expression.
23159            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23160            if test "x$FOUND_VERSION_78" = x; then
23161              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23163              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23164$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23165              BOOT_JDK_FOUND=no
23166            else
23167              # We're done! :-)
23168              BOOT_JDK_FOUND=yes
23169
23170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23171
23172  # Input might be given as Windows format, start by converting to
23173  # unix format.
23174  path="$BOOT_JDK"
23175  new_path=`$CYGPATH -u "$path"`
23176
23177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23180  # "foo.exe" is OK but "foo" is an error.
23181  #
23182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23183  # It is also a way to make sure we got the proper file name for the real test later on.
23184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23185  if test "x$test_shortpath" = x; then
23186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23189  fi
23190
23191  # Call helper function which possibly converts this using DOS-style short mode.
23192  # If so, the updated path is stored in $new_path.
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23205      # Going to short mode and back again did indeed matter. Since short mode is
23206      # case insensitive, let's make it lowercase to improve readability.
23207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208      # Now convert it back to Unix-stile (cygpath)
23209      input_path=`$CYGPATH -u "$shortmode_path"`
23210      new_path="$input_path"
23211    fi
23212  fi
23213
23214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23215  if test "x$test_cygdrive_prefix" = x; then
23216    # As a simple fix, exclude /usr/bin since it's not a real path.
23217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23219      # a path prefixed by /cygdrive for fixpath to work.
23220      new_path="$CYGWIN_ROOT_PATH$input_path"
23221    fi
23222  fi
23223
23224
23225  if test "x$path" != "x$new_path"; then
23226    BOOT_JDK="$new_path"
23227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23229  fi
23230
23231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232
23233  path="$BOOT_JDK"
23234  has_colon=`$ECHO $path | $GREP ^.:`
23235  new_path="$path"
23236  if test "x$has_colon" = x; then
23237    # Not in mixed or Windows style, start by that.
23238    new_path=`cmd //c echo $path`
23239  fi
23240
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23251  fi
23252
23253
23254  windows_path="$new_path"
23255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23256    unix_path=`$CYGPATH -u "$windows_path"`
23257    new_path="$unix_path"
23258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23260    new_path="$unix_path"
23261  fi
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23271
23272  else
23273    # We're on a posix platform. Hooray! :)
23274    path="$BOOT_JDK"
23275    has_space=`$ECHO "$path" | $GREP " "`
23276    if test "x$has_space" != x; then
23277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23280    fi
23281
23282    # Use eval to expand a potential ~
23283    eval path="$path"
23284    if test ! -f "$path" && test ! -d "$path"; then
23285      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23286    fi
23287
23288    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23289  fi
23290
23291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23292$as_echo_n "checking for Boot JDK... " >&6; }
23293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23294$as_echo "$BOOT_JDK" >&6; }
23295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23296$as_echo_n "checking Boot JDK version... " >&6; }
23297              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23299$as_echo "$BOOT_JDK_VERSION" >&6; }
23300            fi # end check jdk version
23301          fi # end check rt.jar
23302        fi # end check javac
23303      fi # end check java
23304    fi # end check boot jdk found
23305  fi
23306
23307    done
23308  fi
23309
23310
23311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23313      # Do we have a bin/java?
23314      if test ! -x "$BOOT_JDK/bin/java"; then
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23317        BOOT_JDK_FOUND=no
23318      else
23319        # Do we have a bin/javac?
23320        if test ! -x "$BOOT_JDK/bin/javac"; then
23321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23325          BOOT_JDK_FOUND=no
23326        else
23327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23331            BOOT_JDK_FOUND=no
23332          else
23333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23335
23336            # Extra M4 quote needed to protect [] in grep expression.
23337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23338            if test "x$FOUND_VERSION_78" = x; then
23339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23343              BOOT_JDK_FOUND=no
23344            else
23345              # We're done! :-)
23346              BOOT_JDK_FOUND=yes
23347
23348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349
23350  # Input might be given as Windows format, start by converting to
23351  # unix format.
23352  path="$BOOT_JDK"
23353  new_path=`$CYGPATH -u "$path"`
23354
23355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23358  # "foo.exe" is OK but "foo" is an error.
23359  #
23360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23361  # It is also a way to make sure we got the proper file name for the real test later on.
23362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23363  if test "x$test_shortpath" = x; then
23364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23367  fi
23368
23369  # Call helper function which possibly converts this using DOS-style short mode.
23370  # If so, the updated path is stored in $new_path.
23371
23372  input_path="$new_path"
23373  # Check if we need to convert this using DOS-style short mode. If the path
23374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23375  # take no chances and rewrite it.
23376  # Note: m4 eats our [], so we need to use [ and ] instead.
23377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23378  if test "x$has_forbidden_chars" != x; then
23379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23383      # Going to short mode and back again did indeed matter. Since short mode is
23384      # case insensitive, let's make it lowercase to improve readability.
23385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23386      # Now convert it back to Unix-stile (cygpath)
23387      input_path=`$CYGPATH -u "$shortmode_path"`
23388      new_path="$input_path"
23389    fi
23390  fi
23391
23392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23393  if test "x$test_cygdrive_prefix" = x; then
23394    # As a simple fix, exclude /usr/bin since it's not a real path.
23395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23397      # a path prefixed by /cygdrive for fixpath to work.
23398      new_path="$CYGWIN_ROOT_PATH$input_path"
23399    fi
23400  fi
23401
23402
23403  if test "x$path" != "x$new_path"; then
23404    BOOT_JDK="$new_path"
23405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23407  fi
23408
23409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410
23411  path="$BOOT_JDK"
23412  has_colon=`$ECHO $path | $GREP ^.:`
23413  new_path="$path"
23414  if test "x$has_colon" = x; then
23415    # Not in mixed or Windows style, start by that.
23416    new_path=`cmd //c echo $path`
23417  fi
23418
23419
23420  input_path="$new_path"
23421  # Check if we need to convert this using DOS-style short mode. If the path
23422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23423  # take no chances and rewrite it.
23424  # Note: m4 eats our [], so we need to use [ and ] instead.
23425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23426  if test "x$has_forbidden_chars" != x; then
23427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23429  fi
23430
23431
23432  windows_path="$new_path"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    unix_path=`$CYGPATH -u "$windows_path"`
23435    new_path="$unix_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23438    new_path="$unix_path"
23439  fi
23440
23441  if test "x$path" != "x$new_path"; then
23442    BOOT_JDK="$new_path"
23443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23445  fi
23446
23447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23449
23450  else
23451    # We're on a posix platform. Hooray! :)
23452    path="$BOOT_JDK"
23453    has_space=`$ECHO "$path" | $GREP " "`
23454    if test "x$has_space" != x; then
23455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23458    fi
23459
23460    # Use eval to expand a potential ~
23461    eval path="$path"
23462    if test ! -f "$path" && test ! -d "$path"; then
23463      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23464    fi
23465
23466    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23467  fi
23468
23469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23470$as_echo_n "checking for Boot JDK... " >&6; }
23471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23472$as_echo "$BOOT_JDK" >&6; }
23473              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23474$as_echo_n "checking Boot JDK version... " >&6; }
23475              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23477$as_echo "$BOOT_JDK_VERSION" >&6; }
23478            fi # end check jdk version
23479          fi # end check rt.jar
23480        fi # end check javac
23481      fi # end check java
23482    fi # end check boot jdk found
23483  fi
23484
23485  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
23486
23487  if test "x$BOOT_JDK_FOUND" = xno; then
23488    # Now execute the test
23489
23490  BOOT_JDK_PREFIX="/usr/lib/jvm"
23491  BOOT_JDK_SUFFIX=""
23492  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23493  if test "x$ALL_JDKS_FOUND" != x; then
23494    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23495
23496  if test "x$BOOT_JDK_FOUND" = xno; then
23497    # Now execute the test
23498
23499        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23500        if test -d "$BOOT_JDK"; then
23501          BOOT_JDK_FOUND=maybe
23502          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23503$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23504        fi
23505
23506
23507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23509      # Do we have a bin/java?
23510      if test ! -x "$BOOT_JDK/bin/java"; then
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23513        BOOT_JDK_FOUND=no
23514      else
23515        # Do we have a bin/javac?
23516        if test ! -x "$BOOT_JDK/bin/javac"; then
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23521          BOOT_JDK_FOUND=no
23522        else
23523          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23524          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23527            BOOT_JDK_FOUND=no
23528          else
23529            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23531
23532            # Extra M4 quote needed to protect [] in grep expression.
23533            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23534            if test "x$FOUND_VERSION_78" = x; then
23535              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23537              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23538$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23539              BOOT_JDK_FOUND=no
23540            else
23541              # We're done! :-)
23542              BOOT_JDK_FOUND=yes
23543
23544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23545
23546  # Input might be given as Windows format, start by converting to
23547  # unix format.
23548  path="$BOOT_JDK"
23549  new_path=`$CYGPATH -u "$path"`
23550
23551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23554  # "foo.exe" is OK but "foo" is an error.
23555  #
23556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23557  # It is also a way to make sure we got the proper file name for the real test later on.
23558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23559  if test "x$test_shortpath" = x; then
23560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23563  fi
23564
23565  # Call helper function which possibly converts this using DOS-style short mode.
23566  # If so, the updated path is stored in $new_path.
23567
23568  input_path="$new_path"
23569  # Check if we need to convert this using DOS-style short mode. If the path
23570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23571  # take no chances and rewrite it.
23572  # Note: m4 eats our [], so we need to use [ and ] instead.
23573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23574  if test "x$has_forbidden_chars" != x; then
23575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23579      # Going to short mode and back again did indeed matter. Since short mode is
23580      # case insensitive, let's make it lowercase to improve readability.
23581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23582      # Now convert it back to Unix-stile (cygpath)
23583      input_path=`$CYGPATH -u "$shortmode_path"`
23584      new_path="$input_path"
23585    fi
23586  fi
23587
23588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23589  if test "x$test_cygdrive_prefix" = x; then
23590    # As a simple fix, exclude /usr/bin since it's not a real path.
23591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23593      # a path prefixed by /cygdrive for fixpath to work.
23594      new_path="$CYGWIN_ROOT_PATH$input_path"
23595    fi
23596  fi
23597
23598
23599  if test "x$path" != "x$new_path"; then
23600    BOOT_JDK="$new_path"
23601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23603  fi
23604
23605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23606
23607  path="$BOOT_JDK"
23608  has_colon=`$ECHO $path | $GREP ^.:`
23609  new_path="$path"
23610  if test "x$has_colon" = x; then
23611    # Not in mixed or Windows style, start by that.
23612    new_path=`cmd //c echo $path`
23613  fi
23614
23615
23616  input_path="$new_path"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23625  fi
23626
23627
23628  windows_path="$new_path"
23629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23630    unix_path=`$CYGPATH -u "$windows_path"`
23631    new_path="$unix_path"
23632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23634    new_path="$unix_path"
23635  fi
23636
23637  if test "x$path" != "x$new_path"; then
23638    BOOT_JDK="$new_path"
23639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23641  fi
23642
23643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23645
23646  else
23647    # We're on a posix platform. Hooray! :)
23648    path="$BOOT_JDK"
23649    has_space=`$ECHO "$path" | $GREP " "`
23650    if test "x$has_space" != x; then
23651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23653      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23654    fi
23655
23656    # Use eval to expand a potential ~
23657    eval path="$path"
23658    if test ! -f "$path" && test ! -d "$path"; then
23659      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23660    fi
23661
23662    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23663  fi
23664
23665              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23666$as_echo_n "checking for Boot JDK... " >&6; }
23667              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23668$as_echo "$BOOT_JDK" >&6; }
23669              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23670$as_echo_n "checking Boot JDK version... " >&6; }
23671              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23673$as_echo "$BOOT_JDK_VERSION" >&6; }
23674            fi # end check jdk version
23675          fi # end check rt.jar
23676        fi # end check javac
23677      fi # end check java
23678    fi # end check boot jdk found
23679  fi
23680
23681    done
23682  fi
23683
23684
23685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23687      # Do we have a bin/java?
23688      if test ! -x "$BOOT_JDK/bin/java"; then
23689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23691        BOOT_JDK_FOUND=no
23692      else
23693        # Do we have a bin/javac?
23694        if test ! -x "$BOOT_JDK/bin/javac"; then
23695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23699          BOOT_JDK_FOUND=no
23700        else
23701          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23702          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23705            BOOT_JDK_FOUND=no
23706          else
23707            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23708            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23709
23710            # Extra M4 quote needed to protect [] in grep expression.
23711            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23712            if test "x$FOUND_VERSION_78" = x; then
23713              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23715              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23716$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23717              BOOT_JDK_FOUND=no
23718            else
23719              # We're done! :-)
23720              BOOT_JDK_FOUND=yes
23721
23722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23723
23724  # Input might be given as Windows format, start by converting to
23725  # unix format.
23726  path="$BOOT_JDK"
23727  new_path=`$CYGPATH -u "$path"`
23728
23729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23732  # "foo.exe" is OK but "foo" is an error.
23733  #
23734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23735  # It is also a way to make sure we got the proper file name for the real test later on.
23736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23737  if test "x$test_shortpath" = x; then
23738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23740    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23741  fi
23742
23743  # Call helper function which possibly converts this using DOS-style short mode.
23744  # If so, the updated path is stored in $new_path.
23745
23746  input_path="$new_path"
23747  # Check if we need to convert this using DOS-style short mode. If the path
23748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23749  # take no chances and rewrite it.
23750  # Note: m4 eats our [], so we need to use [ and ] instead.
23751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23752  if test "x$has_forbidden_chars" != x; then
23753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23757      # Going to short mode and back again did indeed matter. Since short mode is
23758      # case insensitive, let's make it lowercase to improve readability.
23759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23760      # Now convert it back to Unix-stile (cygpath)
23761      input_path=`$CYGPATH -u "$shortmode_path"`
23762      new_path="$input_path"
23763    fi
23764  fi
23765
23766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23767  if test "x$test_cygdrive_prefix" = x; then
23768    # As a simple fix, exclude /usr/bin since it's not a real path.
23769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23771      # a path prefixed by /cygdrive for fixpath to work.
23772      new_path="$CYGWIN_ROOT_PATH$input_path"
23773    fi
23774  fi
23775
23776
23777  if test "x$path" != "x$new_path"; then
23778    BOOT_JDK="$new_path"
23779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23781  fi
23782
23783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23784
23785  path="$BOOT_JDK"
23786  has_colon=`$ECHO $path | $GREP ^.:`
23787  new_path="$path"
23788  if test "x$has_colon" = x; then
23789    # Not in mixed or Windows style, start by that.
23790    new_path=`cmd //c echo $path`
23791  fi
23792
23793
23794  input_path="$new_path"
23795  # Check if we need to convert this using DOS-style short mode. If the path
23796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23797  # take no chances and rewrite it.
23798  # Note: m4 eats our [], so we need to use [ and ] instead.
23799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23800  if test "x$has_forbidden_chars" != x; then
23801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23803  fi
23804
23805
23806  windows_path="$new_path"
23807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808    unix_path=`$CYGPATH -u "$windows_path"`
23809    new_path="$unix_path"
23810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23812    new_path="$unix_path"
23813  fi
23814
23815  if test "x$path" != "x$new_path"; then
23816    BOOT_JDK="$new_path"
23817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23819  fi
23820
23821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23823
23824  else
23825    # We're on a posix platform. Hooray! :)
23826    path="$BOOT_JDK"
23827    has_space=`$ECHO "$path" | $GREP " "`
23828    if test "x$has_space" != x; then
23829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23831      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23832    fi
23833
23834    # Use eval to expand a potential ~
23835    eval path="$path"
23836    if test ! -f "$path" && test ! -d "$path"; then
23837      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23838    fi
23839
23840    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23841  fi
23842
23843              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23844$as_echo_n "checking for Boot JDK... " >&6; }
23845              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23846$as_echo "$BOOT_JDK" >&6; }
23847              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23848$as_echo_n "checking Boot JDK version... " >&6; }
23849              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23851$as_echo "$BOOT_JDK_VERSION" >&6; }
23852            fi # end check jdk version
23853          fi # end check rt.jar
23854        fi # end check javac
23855      fi # end check java
23856    fi # end check boot jdk found
23857  fi
23858
23859  fi
23860
23861
23862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23864      # Do we have a bin/java?
23865      if test ! -x "$BOOT_JDK/bin/java"; then
23866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23868        BOOT_JDK_FOUND=no
23869      else
23870        # Do we have a bin/javac?
23871        if test ! -x "$BOOT_JDK/bin/javac"; then
23872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23876          BOOT_JDK_FOUND=no
23877        else
23878          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23879          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23882            BOOT_JDK_FOUND=no
23883          else
23884            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23885            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23886
23887            # Extra M4 quote needed to protect [] in grep expression.
23888            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23889            if test "x$FOUND_VERSION_78" = x; then
23890              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23892              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23893$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23894              BOOT_JDK_FOUND=no
23895            else
23896              # We're done! :-)
23897              BOOT_JDK_FOUND=yes
23898
23899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23900
23901  # Input might be given as Windows format, start by converting to
23902  # unix format.
23903  path="$BOOT_JDK"
23904  new_path=`$CYGPATH -u "$path"`
23905
23906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23909  # "foo.exe" is OK but "foo" is an error.
23910  #
23911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23912  # It is also a way to make sure we got the proper file name for the real test later on.
23913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23914  if test "x$test_shortpath" = x; then
23915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23917    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23918  fi
23919
23920  # Call helper function which possibly converts this using DOS-style short mode.
23921  # If so, the updated path is stored in $new_path.
23922
23923  input_path="$new_path"
23924  # Check if we need to convert this using DOS-style short mode. If the path
23925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23926  # take no chances and rewrite it.
23927  # Note: m4 eats our [], so we need to use [ and ] instead.
23928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23929  if test "x$has_forbidden_chars" != x; then
23930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23934      # Going to short mode and back again did indeed matter. Since short mode is
23935      # case insensitive, let's make it lowercase to improve readability.
23936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23937      # Now convert it back to Unix-stile (cygpath)
23938      input_path=`$CYGPATH -u "$shortmode_path"`
23939      new_path="$input_path"
23940    fi
23941  fi
23942
23943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23944  if test "x$test_cygdrive_prefix" = x; then
23945    # As a simple fix, exclude /usr/bin since it's not a real path.
23946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23948      # a path prefixed by /cygdrive for fixpath to work.
23949      new_path="$CYGWIN_ROOT_PATH$input_path"
23950    fi
23951  fi
23952
23953
23954  if test "x$path" != "x$new_path"; then
23955    BOOT_JDK="$new_path"
23956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23958  fi
23959
23960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23961
23962  path="$BOOT_JDK"
23963  has_colon=`$ECHO $path | $GREP ^.:`
23964  new_path="$path"
23965  if test "x$has_colon" = x; then
23966    # Not in mixed or Windows style, start by that.
23967    new_path=`cmd //c echo $path`
23968  fi
23969
23970
23971  input_path="$new_path"
23972  # Check if we need to convert this using DOS-style short mode. If the path
23973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23974  # take no chances and rewrite it.
23975  # Note: m4 eats our [], so we need to use [ and ] instead.
23976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23977  if test "x$has_forbidden_chars" != x; then
23978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23980  fi
23981
23982
23983  windows_path="$new_path"
23984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23985    unix_path=`$CYGPATH -u "$windows_path"`
23986    new_path="$unix_path"
23987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23989    new_path="$unix_path"
23990  fi
23991
23992  if test "x$path" != "x$new_path"; then
23993    BOOT_JDK="$new_path"
23994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23996  fi
23997
23998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24000
24001  else
24002    # We're on a posix platform. Hooray! :)
24003    path="$BOOT_JDK"
24004    has_space=`$ECHO "$path" | $GREP " "`
24005    if test "x$has_space" != x; then
24006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24008      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24009    fi
24010
24011    # Use eval to expand a potential ~
24012    eval path="$path"
24013    if test ! -f "$path" && test ! -d "$path"; then
24014      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24015    fi
24016
24017    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24018  fi
24019
24020              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24021$as_echo_n "checking for Boot JDK... " >&6; }
24022              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24023$as_echo "$BOOT_JDK" >&6; }
24024              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24025$as_echo_n "checking Boot JDK version... " >&6; }
24026              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24027              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24028$as_echo "$BOOT_JDK_VERSION" >&6; }
24029            fi # end check jdk version
24030          fi # end check rt.jar
24031        fi # end check javac
24032      fi # end check java
24033    fi # end check boot jdk found
24034  fi
24035
24036
24037  # If we haven't found anything yet, we've truly lost. Give up.
24038  if test "x$BOOT_JDK_FOUND" = xno; then
24039
24040  # Print a helpful message on how to acquire the necessary build dependency.
24041  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24042  MISSING_DEPENDENCY=openjdk
24043
24044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24045    cygwin_help $MISSING_DEPENDENCY
24046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24047    msys_help $MISSING_DEPENDENCY
24048  else
24049    PKGHANDLER_COMMAND=
24050
24051    case $PKGHANDLER in
24052      apt-get)
24053        apt_help     $MISSING_DEPENDENCY ;;
24054      yum)
24055        yum_help     $MISSING_DEPENDENCY ;;
24056      port)
24057        port_help    $MISSING_DEPENDENCY ;;
24058      pkgutil)
24059        pkgutil_help $MISSING_DEPENDENCY ;;
24060      pkgadd)
24061        pkgadd_help  $MISSING_DEPENDENCY ;;
24062    esac
24063
24064    if test "x$PKGHANDLER_COMMAND" != x; then
24065      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24066    fi
24067  fi
24068
24069    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24070$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24071    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24072$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24073    as_fn_error $? "Cannot continue" "$LINENO" 5
24074  fi
24075
24076  # Setup proper paths for what we found
24077  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24078  if test ! -f "$BOOT_RTJAR"; then
24079    # On MacOSX it is called classes.jar
24080    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24081    if test -f "$BOOT_RTJAR"; then
24082      # Remove the ..
24083      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24084    fi
24085  fi
24086  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24087  BOOT_JDK="$BOOT_JDK"
24088
24089
24090
24091
24092  # Setup tools from the Boot JDK.
24093
24094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24095$as_echo_n "checking for java in Boot JDK... " >&6; }
24096  JAVA=$BOOT_JDK/bin/java
24097  if test ! -x $JAVA; then
24098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24099$as_echo "not found" >&6; }
24100    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24101$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24102    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24103  fi
24104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24105$as_echo "ok" >&6; }
24106
24107
24108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24109$as_echo_n "checking for javac in Boot JDK... " >&6; }
24110  JAVAC=$BOOT_JDK/bin/javac
24111  if test ! -x $JAVAC; then
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24113$as_echo "not found" >&6; }
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24115$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24116    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24117  fi
24118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24119$as_echo "ok" >&6; }
24120
24121
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24123$as_echo_n "checking for javah in Boot JDK... " >&6; }
24124  JAVAH=$BOOT_JDK/bin/javah
24125  if test ! -x $JAVAH; then
24126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24127$as_echo "not found" >&6; }
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24129$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24130    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24131  fi
24132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24133$as_echo "ok" >&6; }
24134
24135
24136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24137$as_echo_n "checking for javap in Boot JDK... " >&6; }
24138  JAVAP=$BOOT_JDK/bin/javap
24139  if test ! -x $JAVAP; then
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24141$as_echo "not found" >&6; }
24142    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24143$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24144    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24145  fi
24146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24147$as_echo "ok" >&6; }
24148
24149
24150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24151$as_echo_n "checking for jar in Boot JDK... " >&6; }
24152  JAR=$BOOT_JDK/bin/jar
24153  if test ! -x $JAR; then
24154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24155$as_echo "not found" >&6; }
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24157$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24158    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24159  fi
24160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24161$as_echo "ok" >&6; }
24162
24163
24164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24165$as_echo_n "checking for rmic in Boot JDK... " >&6; }
24166  RMIC=$BOOT_JDK/bin/rmic
24167  if test ! -x $RMIC; then
24168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24169$as_echo "not found" >&6; }
24170    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24171$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24172    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24173  fi
24174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24175$as_echo "ok" >&6; }
24176
24177
24178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24179$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24180  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24181  if test ! -x $NATIVE2ASCII; then
24182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24183$as_echo "not found" >&6; }
24184    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24185$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24186    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24187  fi
24188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24189$as_echo "ok" >&6; }
24190
24191
24192  # Finally, set some other options...
24193
24194  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24195  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24196
24197
24198
24199
24200  ##############################################################################
24201  #
24202  # Specify options for anything that is run with the Boot JDK.
24203  #
24204
24205# Check whether --with-boot-jdk-jvmargs was given.
24206if test "${with_boot_jdk_jvmargs+set}" = set; then :
24207  withval=$with_boot_jdk_jvmargs;
24208fi
24209
24210
24211  if test "x$with_boot_jdk_jvmargs" = x; then
24212    # Not all JVM:s accept the same arguments on the command line.
24213    # OpenJDK specific increase in thread stack for JDK build,
24214    # well more specifically, when running javac.
24215    if test "x$BUILD_NUM_BITS" = x32; then
24216      STACK_SIZE=768
24217    else
24218      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
24219      # since 64-bit pointers are pushed on the stach. Apparently, we need
24220      # to increase the stack space when javacing the JDK....
24221      STACK_SIZE=1536
24222    fi
24223
24224    # Minimum amount of heap memory.
24225
24226  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24227  $ECHO "Command: $JAVA -Xms64M -version" >&5
24228  OUTPUT=`$JAVA -Xms64M -version 2>&1`
24229  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24230  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24231  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24232    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
24233    JVM_ARG_OK=true
24234  else
24235    $ECHO "Arg failed:" >&5
24236    $ECHO "$OUTPUT" >&5
24237    JVM_ARG_OK=false
24238  fi
24239
24240    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
24241      # Why does macosx need more heap? Its the huge JDK batch.
24242
24243  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
24244  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
24245  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
24246  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24247  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24248  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24249    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
24250    JVM_ARG_OK=true
24251  else
24252    $ECHO "Arg failed:" >&5
24253    $ECHO "$OUTPUT" >&5
24254    JVM_ARG_OK=false
24255  fi
24256
24257    else
24258
24259  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
24260  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
24261  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
24262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24265    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
24266    JVM_ARG_OK=true
24267  else
24268    $ECHO "Arg failed:" >&5
24269    $ECHO "$OUTPUT" >&5
24270    JVM_ARG_OK=false
24271  fi
24272
24273    fi
24274    # When is adding -client something that speeds up the JVM?
24275    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
24276
24277  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24278  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24279  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24280  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24281  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24282  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24283    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
24284    JVM_ARG_OK=true
24285  else
24286    $ECHO "Arg failed:" >&5
24287    $ECHO "$OUTPUT" >&5
24288    JVM_ARG_OK=false
24289  fi
24290
24291    # Disable special log output when a debug build is used as Boot JDK...
24292
24293  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24294  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24295  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24296  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24297  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24298  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24299    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24300    JVM_ARG_OK=true
24301  else
24302    $ECHO "Arg failed:" >&5
24303    $ECHO "$OUTPUT" >&5
24304    JVM_ARG_OK=false
24305  fi
24306
24307  fi
24308
24309  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
24310
24311
24312
24313###############################################################################
24314#
24315# Configure the sources to use. We can add or override individual directories.
24316#
24317###############################################################################
24318
24319
24320  # Where are the sources. Any of these can be overridden
24321  # using --with-override-corba and the likes.
24322  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
24323  CORBA_TOPDIR="$SRC_ROOT/corba"
24324  JAXP_TOPDIR="$SRC_ROOT/jaxp"
24325  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
24326  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
24327  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
24328  JDK_TOPDIR="$SRC_ROOT/jdk"
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339  ###############################################################################
24340  #
24341  # Pickup additional source for a component from outside of the source root
24342  # or override source for a component.
24343  #
24344
24345# Check whether --with-add-source-root was given.
24346if test "${with_add_source_root+set}" = set; then :
24347  withval=$with_add_source_root;
24348fi
24349
24350
24351
24352# Check whether --with-override-source-root was given.
24353if test "${with_override_source_root+set}" = set; then :
24354  withval=$with_override_source_root;
24355fi
24356
24357
24358
24359# Check whether --with-adds-and-overrides was given.
24360if test "${with_adds_and_overrides+set}" = set; then :
24361  withval=$with_adds_and_overrides;
24362fi
24363
24364
24365  if test "x$with_adds_and_overrides" != x; then
24366    with_add_source_root="$with_adds_and_overrides/adds"
24367    with_override_source_root="$with_adds_and_overrides/overrides"
24368  fi
24369
24370  if test "x$with_add_source_root" != x; then
24371    if ! test -d $with_add_source_root; then
24372      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
24373    fi
24374    CURDIR="$PWD"
24375    cd "$with_add_source_root"
24376    ADD_SRC_ROOT="`pwd`"
24377    cd "$CURDIR"
24378    # Verify that the addon source root does not have any root makefiles.
24379    # If it does, then it is usually an error, prevent this.
24380    if test -f $with_add_source_root/langtools/make/Makefile; then
24381      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
24382    fi
24383    if test -f $with_add_source_root/corba/make/Makefile; then
24384      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
24385    fi
24386    if test -f $with_add_source_root/jaxp/make/Makefile; then
24387      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
24388    fi
24389    if test -f $with_add_source_root/jaxws/make/Makefile; then
24390      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
24391    fi
24392    if test -f $with_add_source_root/hotspot/make/Makefile; then
24393      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
24394    fi
24395    if test -f $with_add_source_root/nashorn/make/Makefile; then
24396      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
24397    fi
24398    if test -f $with_add_source_root/jdk/make/Makefile; then
24399      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
24400    fi
24401  fi
24402
24403
24404  if test "x$with_override_source_root" != x; then
24405    if ! test -d $with_override_source_root; then
24406      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
24407    fi
24408    CURDIR="$PWD"
24409    cd "$with_override_source_root"
24410    OVERRIDE_SRC_ROOT="`pwd`"
24411    cd "$CURDIR"
24412    if test -f $with_override_source_root/langtools/make/Makefile; then
24413      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
24414    fi
24415    if test -f $with_override_source_root/corba/make/Makefile; then
24416      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
24417    fi
24418    if test -f $with_override_source_root/jaxp/make/Makefile; then
24419      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
24420    fi
24421    if test -f $with_override_source_root/jaxws/make/Makefile; then
24422      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
24423    fi
24424    if test -f $with_override_source_root/hotspot/make/Makefile; then
24425      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
24426    fi
24427    if test -f $with_override_source_root/nashorn/make/Makefile; then
24428      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
24429    fi
24430    if test -f $with_override_source_root/jdk/make/Makefile; then
24431      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
24432    fi
24433  fi
24434
24435
24436  ###############################################################################
24437  #
24438  # Override a repo completely, this is used for example when you have 3 small
24439  # development sandboxes of the langtools sources and want to avoid having 3 full
24440  # OpenJDK sources checked out on disk.
24441  #
24442  # Assuming that the 3 langtools sandboxes are located here:
24443  # /home/fredrik/sandbox1/langtools
24444  # /home/fredrik/sandbox2/langtools
24445  # /home/fredrik/sandbox3/langtools
24446  #
24447  # From the source root you create build subdirs manually:
24448  #     mkdir -p build1 build2 build3
24449  # in each build directory run:
24450  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
24451  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
24452  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
24453  #
24454
24455
24456# Check whether --with-override-langtools was given.
24457if test "${with_override_langtools+set}" = set; then :
24458  withval=$with_override_langtools;
24459fi
24460
24461
24462
24463# Check whether --with-override-corba was given.
24464if test "${with_override_corba+set}" = set; then :
24465  withval=$with_override_corba;
24466fi
24467
24468
24469
24470# Check whether --with-override-jaxp was given.
24471if test "${with_override_jaxp+set}" = set; then :
24472  withval=$with_override_jaxp;
24473fi
24474
24475
24476
24477# Check whether --with-override-jaxws was given.
24478if test "${with_override_jaxws+set}" = set; then :
24479  withval=$with_override_jaxws;
24480fi
24481
24482
24483
24484# Check whether --with-override-hotspot was given.
24485if test "${with_override_hotspot+set}" = set; then :
24486  withval=$with_override_hotspot;
24487fi
24488
24489
24490
24491# Check whether --with-override-nashorn was given.
24492if test "${with_override_nashorn+set}" = set; then :
24493  withval=$with_override_nashorn;
24494fi
24495
24496
24497
24498# Check whether --with-override-jdk was given.
24499if test "${with_override_jdk+set}" = set; then :
24500  withval=$with_override_jdk;
24501fi
24502
24503
24504  if test "x$with_override_langtools" != x; then
24505    CURDIR="$PWD"
24506    cd "$with_override_langtools"
24507    LANGTOOLS_TOPDIR="`pwd`"
24508    cd "$CURDIR"
24509    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
24510      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
24511    fi
24512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
24513$as_echo_n "checking if langtools should be overridden... " >&6; }
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
24515$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
24516  fi
24517  if test "x$with_override_corba" != x; then
24518    CURDIR="$PWD"
24519    cd "$with_override_corba"
24520    CORBA_TOPDIR="`pwd`"
24521    cd "$CURDIR"
24522    if ! test -f $CORBA_TOPDIR/make/Makefile; then
24523      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
24524    fi
24525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
24526$as_echo_n "checking if corba should be overridden... " >&6; }
24527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
24528$as_echo "yes with $CORBA_TOPDIR" >&6; }
24529  fi
24530  if test "x$with_override_jaxp" != x; then
24531    CURDIR="$PWD"
24532    cd "$with_override_jaxp"
24533    JAXP_TOPDIR="`pwd`"
24534    cd "$CURDIR"
24535    if ! test -f $JAXP_TOPDIR/make/Makefile; then
24536      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
24537    fi
24538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
24539$as_echo_n "checking if jaxp should be overridden... " >&6; }
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
24541$as_echo "yes with $JAXP_TOPDIR" >&6; }
24542  fi
24543  if test "x$with_override_jaxws" != x; then
24544    CURDIR="$PWD"
24545    cd "$with_override_jaxws"
24546    JAXWS_TOPDIR="`pwd`"
24547    cd "$CURDIR"
24548    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
24549      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
24550    fi
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
24552$as_echo_n "checking if jaxws should be overridden... " >&6; }
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
24554$as_echo "yes with $JAXWS_TOPDIR" >&6; }
24555  fi
24556  if test "x$with_override_hotspot" != x; then
24557    CURDIR="$PWD"
24558    cd "$with_override_hotspot"
24559    HOTSPOT_TOPDIR="`pwd`"
24560    cd "$CURDIR"
24561    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
24562      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
24563    fi
24564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
24565$as_echo_n "checking if hotspot should be overridden... " >&6; }
24566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
24567$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
24568  fi
24569  if test "x$with_override_nashorn" != x; then
24570    CURDIR="$PWD"
24571    cd "$with_override_nashorn"
24572    NASHORN_TOPDIR="`pwd`"
24573    cd "$CURDIR"
24574    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
24575      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
24576    fi
24577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
24578$as_echo_n "checking if nashorn should be overridden... " >&6; }
24579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
24580$as_echo "yes with $NASHORN_TOPDIR" >&6; }
24581  fi
24582  if test "x$with_override_jdk" != x; then
24583    CURDIR="$PWD"
24584    cd "$with_override_jdk"
24585    JDK_TOPDIR="`pwd`"
24586    cd "$CURDIR"
24587    if ! test -f $JDK_TOPDIR/make/Makefile; then
24588      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
24589    fi
24590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
24591$as_echo_n "checking if JDK should be overridden... " >&6; }
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
24593$as_echo "yes with $JDK_TOPDIR" >&6; }
24594  fi
24595
24596
24597  BUILD_OUTPUT="$OUTPUT_ROOT"
24598
24599
24600  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
24601  BUILD_HOTSPOT=true
24602
24603
24604
24605# Check whether --with-import-hotspot was given.
24606if test "${with_import_hotspot+set}" = set; then :
24607  withval=$with_import_hotspot;
24608fi
24609
24610  if test "x$with_import_hotspot" != x; then
24611    CURDIR="$PWD"
24612    cd "$with_import_hotspot"
24613    HOTSPOT_DIST="`pwd`"
24614    cd "$CURDIR"
24615    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
24616      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
24617    fi
24618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
24619$as_echo_n "checking if hotspot should be imported... " >&6; }
24620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
24621$as_echo "yes from $HOTSPOT_DIST" >&6; }
24622    BUILD_HOTSPOT=false
24623  fi
24624
24625  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
24626
24627
24628###############################################################################
24629#
24630# Setup the toolchain (compilers etc), i.e. the tools that need to be
24631# cross-compilation aware.
24632#
24633###############################################################################
24634
24635
24636  ###############################################################################
24637  #
24638  # Configure the development tool paths and potential sysroot.
24639  #
24640  ac_ext=cpp
24641ac_cpp='$CXXCPP $CPPFLAGS'
24642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24645
24646
24647  # The option used to specify the target .o,.a or .so file.
24648  # When compiling, how to specify the to be created object file.
24649  CC_OUT_OPTION='-o$(SPACE)'
24650  # When linking, how to specify the to be created executable.
24651  EXE_OUT_OPTION='-o$(SPACE)'
24652  # When linking, how to specify the to be created dynamically linkable library.
24653  LD_OUT_OPTION='-o$(SPACE)'
24654  # When archiving, how to specify the to be create static archive for object files.
24655  AR_OUT_OPTION='rcs$(SPACE)'
24656
24657
24658
24659
24660
24661# Locate the actual tools
24662
24663
24664# Check whether --with-jtreg was given.
24665if test "${with_jtreg+set}" = set; then :
24666  withval=$with_jtreg;
24667else
24668  with_jtreg=no
24669fi
24670
24671
24672  if test "x$with_jtreg" = xno; then
24673    # jtreg disabled
24674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
24675$as_echo_n "checking for jtreg... " >&6; }
24676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24677$as_echo "no" >&6; }
24678  else
24679    if test "x$with_jtreg" != xyes; then
24680      # with path specified.
24681      JT_HOME="$with_jtreg"
24682    fi
24683
24684    if test "x$JT_HOME" != x; then
24685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
24686$as_echo_n "checking for jtreg... " >&6; }
24687
24688      # use JT_HOME enviroment var.
24689
24690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24691
24692  # Input might be given as Windows format, start by converting to
24693  # unix format.
24694  path="$JT_HOME"
24695  new_path=`$CYGPATH -u "$path"`
24696
24697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24700  # "foo.exe" is OK but "foo" is an error.
24701  #
24702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24703  # It is also a way to make sure we got the proper file name for the real test later on.
24704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24705  if test "x$test_shortpath" = x; then
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
24707$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
24708    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
24709  fi
24710
24711  # Call helper function which possibly converts this using DOS-style short mode.
24712  # If so, the updated path is stored in $new_path.
24713
24714  input_path="$new_path"
24715  # Check if we need to convert this using DOS-style short mode. If the path
24716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24717  # take no chances and rewrite it.
24718  # Note: m4 eats our [], so we need to use [ and ] instead.
24719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24720  if test "x$has_forbidden_chars" != x; then
24721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24725      # Going to short mode and back again did indeed matter. Since short mode is
24726      # case insensitive, let's make it lowercase to improve readability.
24727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24728      # Now convert it back to Unix-stile (cygpath)
24729      input_path=`$CYGPATH -u "$shortmode_path"`
24730      new_path="$input_path"
24731    fi
24732  fi
24733
24734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24735  if test "x$test_cygdrive_prefix" = x; then
24736    # As a simple fix, exclude /usr/bin since it's not a real path.
24737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24739      # a path prefixed by /cygdrive for fixpath to work.
24740      new_path="$CYGWIN_ROOT_PATH$input_path"
24741    fi
24742  fi
24743
24744
24745  if test "x$path" != "x$new_path"; then
24746    JT_HOME="$new_path"
24747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
24748$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
24749  fi
24750
24751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24752
24753  path="$JT_HOME"
24754  has_colon=`$ECHO $path | $GREP ^.:`
24755  new_path="$path"
24756  if test "x$has_colon" = x; then
24757    # Not in mixed or Windows style, start by that.
24758    new_path=`cmd //c echo $path`
24759  fi
24760
24761
24762  input_path="$new_path"
24763  # Check if we need to convert this using DOS-style short mode. If the path
24764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24765  # take no chances and rewrite it.
24766  # Note: m4 eats our [], so we need to use [ and ] instead.
24767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24768  if test "x$has_forbidden_chars" != x; then
24769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24771  fi
24772
24773
24774  windows_path="$new_path"
24775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24776    unix_path=`$CYGPATH -u "$windows_path"`
24777    new_path="$unix_path"
24778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24780    new_path="$unix_path"
24781  fi
24782
24783  if test "x$path" != "x$new_path"; then
24784    JT_HOME="$new_path"
24785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
24786$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
24787  fi
24788
24789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24791
24792  else
24793    # We're on a posix platform. Hooray! :)
24794    path="$JT_HOME"
24795    has_space=`$ECHO "$path" | $GREP " "`
24796    if test "x$has_space" != x; then
24797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
24798$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
24799      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24800    fi
24801
24802    # Use eval to expand a potential ~
24803    eval path="$path"
24804    if test ! -f "$path" && test ! -d "$path"; then
24805      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
24806    fi
24807
24808    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
24809  fi
24810
24811
24812      # jtreg win32 script works for everybody
24813      JTREGEXE="$JT_HOME/win32/bin/jtreg"
24814
24815      if test ! -f "$JTREGEXE"; then
24816        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
24817      fi
24818
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24820$as_echo "$JTREGEXE" >&6; }
24821    else
24822      # try to find jtreg on path
24823
24824
24825
24826  # Publish this variable in the help.
24827
24828
24829  if test "x$JTREGEXE" = x; then
24830    # The variable is not set by user, try to locate tool using the code snippet
24831    for ac_prog in jtreg
24832do
24833  # Extract the first word of "$ac_prog", so it can be a program name with args.
24834set dummy $ac_prog; ac_word=$2
24835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24836$as_echo_n "checking for $ac_word... " >&6; }
24837if ${ac_cv_path_JTREGEXE+:} false; then :
24838  $as_echo_n "(cached) " >&6
24839else
24840  case $JTREGEXE in
24841  [\\/]* | ?:[\\/]*)
24842  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24843  ;;
24844  *)
24845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24846for as_dir in $PATH
24847do
24848  IFS=$as_save_IFS
24849  test -z "$as_dir" && as_dir=.
24850    for ac_exec_ext in '' $ac_executable_extensions; do
24851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24852    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24854    break 2
24855  fi
24856done
24857  done
24858IFS=$as_save_IFS
24859
24860  ;;
24861esac
24862fi
24863JTREGEXE=$ac_cv_path_JTREGEXE
24864if test -n "$JTREGEXE"; then
24865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24866$as_echo "$JTREGEXE" >&6; }
24867else
24868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24869$as_echo "no" >&6; }
24870fi
24871
24872
24873  test -n "$JTREGEXE" && break
24874done
24875
24876  else
24877    # The variable is set, but is it from the command line or the environment?
24878
24879    # Try to remove the string !JTREGEXE! from our list.
24880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
24881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24882      # If it failed, the variable was not from the command line. Ignore it,
24883      # but warn the user (except for BASH, which is always set by the calling BASH).
24884      if test "xJTREGEXE" != xBASH; then
24885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
24886$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
24887      fi
24888      # Try to locate tool using the code snippet
24889      for ac_prog in jtreg
24890do
24891  # Extract the first word of "$ac_prog", so it can be a program name with args.
24892set dummy $ac_prog; ac_word=$2
24893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24894$as_echo_n "checking for $ac_word... " >&6; }
24895if ${ac_cv_path_JTREGEXE+:} false; then :
24896  $as_echo_n "(cached) " >&6
24897else
24898  case $JTREGEXE in
24899  [\\/]* | ?:[\\/]*)
24900  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24901  ;;
24902  *)
24903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24904for as_dir in $PATH
24905do
24906  IFS=$as_save_IFS
24907  test -z "$as_dir" && as_dir=.
24908    for ac_exec_ext in '' $ac_executable_extensions; do
24909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24910    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24912    break 2
24913  fi
24914done
24915  done
24916IFS=$as_save_IFS
24917
24918  ;;
24919esac
24920fi
24921JTREGEXE=$ac_cv_path_JTREGEXE
24922if test -n "$JTREGEXE"; then
24923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24924$as_echo "$JTREGEXE" >&6; }
24925else
24926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24927$as_echo "no" >&6; }
24928fi
24929
24930
24931  test -n "$JTREGEXE" && break
24932done
24933
24934    else
24935      # If it succeeded, then it was overridden by the user. We will use it
24936      # for the tool.
24937
24938      # First remove it from the list of overridden variables, so we can test
24939      # for unknown variables in the end.
24940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24941
24942      # Check if the provided tool contains a complete path.
24943      tool_specified="$JTREGEXE"
24944      tool_basename="${tool_specified##*/}"
24945      if test "x$tool_basename" = "x$tool_specified"; then
24946        # A command without a complete path is provided, search $PATH.
24947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
24948$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
24949        # Extract the first word of "$tool_basename", so it can be a program name with args.
24950set dummy $tool_basename; ac_word=$2
24951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24952$as_echo_n "checking for $ac_word... " >&6; }
24953if ${ac_cv_path_JTREGEXE+:} false; then :
24954  $as_echo_n "(cached) " >&6
24955else
24956  case $JTREGEXE in
24957  [\\/]* | ?:[\\/]*)
24958  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24959  ;;
24960  *)
24961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24962for as_dir in $PATH
24963do
24964  IFS=$as_save_IFS
24965  test -z "$as_dir" && as_dir=.
24966    for ac_exec_ext in '' $ac_executable_extensions; do
24967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24968    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24970    break 2
24971  fi
24972done
24973  done
24974IFS=$as_save_IFS
24975
24976  ;;
24977esac
24978fi
24979JTREGEXE=$ac_cv_path_JTREGEXE
24980if test -n "$JTREGEXE"; then
24981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24982$as_echo "$JTREGEXE" >&6; }
24983else
24984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24985$as_echo "no" >&6; }
24986fi
24987
24988
24989        if test "x$JTREGEXE" = x; then
24990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24991        fi
24992      else
24993        # Otherwise we believe it is a complete path. Use it as it is.
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
24995$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
24996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
24997$as_echo_n "checking for JTREGEXE... " >&6; }
24998        if test ! -x "$tool_specified"; then
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25000$as_echo "not found" >&6; }
25001          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
25002        fi
25003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25004$as_echo "$tool_specified" >&6; }
25005      fi
25006    fi
25007  fi
25008
25009
25010
25011  if test "x$JTREGEXE" = x; then
25012    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
25013  fi
25014
25015
25016      JT_HOME="`$DIRNAME $JTREGEXE`"
25017    fi
25018  fi
25019
25020
25021
25022
25023
25024  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
25025
25026  # Store path to cygwin link.exe to help excluding it when searching for
25027  # VS linker. This must be done before changing the PATH when looking for VS.
25028  # Extract the first word of "link", so it can be a program name with args.
25029set dummy link; ac_word=$2
25030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25031$as_echo_n "checking for $ac_word... " >&6; }
25032if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25033  $as_echo_n "(cached) " >&6
25034else
25035  case $CYGWIN_LINK in
25036  [\\/]* | ?:[\\/]*)
25037  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25038  ;;
25039  *)
25040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25041for as_dir in $PATH
25042do
25043  IFS=$as_save_IFS
25044  test -z "$as_dir" && as_dir=.
25045    for ac_exec_ext in '' $ac_executable_extensions; do
25046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25047    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25049    break 2
25050  fi
25051done
25052  done
25053IFS=$as_save_IFS
25054
25055  ;;
25056esac
25057fi
25058CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25059if test -n "$CYGWIN_LINK"; then
25060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25061$as_echo "$CYGWIN_LINK" >&6; }
25062else
25063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25064$as_echo "no" >&6; }
25065fi
25066
25067
25068  if test "x$CYGWIN_LINK" != x; then
25069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25070$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25071    "$CYGWIN_LINK" --version > /dev/null
25072    if test $? -eq 0 ; then
25073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25074$as_echo "yes" >&6; }
25075    else
25076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25077$as_echo "no" >&6; }
25078      # This might be the VS linker. Don't exclude it later on.
25079      CYGWIN_LINK=""
25080    fi
25081  fi
25082
25083  # First-hand choice is to locate and run the vsvars bat file.
25084
25085  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25086    VCVARSFILE="vc/bin/vcvars32.bat"
25087  else
25088    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25089  fi
25090
25091  VS_ENV_CMD=""
25092  VS_ENV_ARGS=""
25093  if test "x$with_toolsdir" != x; then
25094
25095  if test "x$VS_ENV_CMD" = x; then
25096    VS100BASE="$with_toolsdir/../.."
25097    METHOD="--with-tools-dir"
25098
25099  windows_path="$VS100BASE"
25100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101    unix_path=`$CYGPATH -u "$windows_path"`
25102    VS100BASE="$unix_path"
25103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25105    VS100BASE="$unix_path"
25106  fi
25107
25108    if test -d "$VS100BASE"; then
25109      if test -f "$VS100BASE/$VCVARSFILE"; then
25110        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25111$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25112        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25113      else
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25115$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25117$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25118      fi
25119    fi
25120  fi
25121
25122  fi
25123
25124  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
25125    # Having specified an argument which is incorrect will produce an instant failure;
25126    # we should not go on looking
25127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
25128$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
25129    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
25130$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
25131    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25132  fi
25133
25134  if test "x$VS100COMNTOOLS" != x; then
25135
25136  if test "x$VS_ENV_CMD" = x; then
25137    VS100BASE="$VS100COMNTOOLS/../.."
25138    METHOD="VS100COMNTOOLS variable"
25139
25140  windows_path="$VS100BASE"
25141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25142    unix_path=`$CYGPATH -u "$windows_path"`
25143    VS100BASE="$unix_path"
25144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25146    VS100BASE="$unix_path"
25147  fi
25148
25149    if test -d "$VS100BASE"; then
25150      if test -f "$VS100BASE/$VCVARSFILE"; then
25151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25152$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25153        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25154      else
25155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25156$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25158$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25159      fi
25160    fi
25161  fi
25162
25163  fi
25164  if test "x$PROGRAMFILES" != x; then
25165
25166  if test "x$VS_ENV_CMD" = x; then
25167    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
25168    METHOD="well-known name"
25169
25170  windows_path="$VS100BASE"
25171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25172    unix_path=`$CYGPATH -u "$windows_path"`
25173    VS100BASE="$unix_path"
25174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25176    VS100BASE="$unix_path"
25177  fi
25178
25179    if test -d "$VS100BASE"; then
25180      if test -f "$VS100BASE/$VCVARSFILE"; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25182$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25183        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25184      else
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25186$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25188$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25189      fi
25190    fi
25191  fi
25192
25193  fi
25194
25195  if test "x$VS_ENV_CMD" = x; then
25196    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
25197    METHOD="well-known name"
25198
25199  windows_path="$VS100BASE"
25200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25201    unix_path=`$CYGPATH -u "$windows_path"`
25202    VS100BASE="$unix_path"
25203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25205    VS100BASE="$unix_path"
25206  fi
25207
25208    if test -d "$VS100BASE"; then
25209      if test -f "$VS100BASE/$VCVARSFILE"; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25211$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25212        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25213      else
25214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25215$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25217$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25218      fi
25219    fi
25220  fi
25221
25222
25223  if test "x$VS_ENV_CMD" = x; then
25224    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
25225    METHOD="well-known name"
25226
25227  windows_path="$VS100BASE"
25228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25229    unix_path=`$CYGPATH -u "$windows_path"`
25230    VS100BASE="$unix_path"
25231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25233    VS100BASE="$unix_path"
25234  fi
25235
25236    if test -d "$VS100BASE"; then
25237      if test -f "$VS100BASE/$VCVARSFILE"; then
25238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25239$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25240        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25241      else
25242        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25243$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25244        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25245$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25246      fi
25247    fi
25248  fi
25249
25250
25251  if test "x$ProgramW6432" != x; then
25252
25253  if test "x$VS_ENV_CMD" = x; then
25254    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
25255    METHOD="well-known name"
25256
25257  windows_path="$WIN_SDK_BASE"
25258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25259    unix_path=`$CYGPATH -u "$windows_path"`
25260    WIN_SDK_BASE="$unix_path"
25261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25263    WIN_SDK_BASE="$unix_path"
25264  fi
25265
25266    if test -d "$WIN_SDK_BASE"; then
25267      # There have been cases of partial or broken SDK installations. A missing
25268      # lib dir is not going to work.
25269      if test ! -d "$WIN_SDK_BASE/../lib"; then
25270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25271$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25272        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25273$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25274      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25275        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25276$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25277        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25278        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25279          VS_ENV_ARGS="/x86"
25280        else
25281          VS_ENV_ARGS="/x64"
25282        fi
25283      else
25284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25285$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25286        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25287$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25288      fi
25289    fi
25290  fi
25291
25292  fi
25293  if test "x$PROGRAMW6432" != x; then
25294
25295  if test "x$VS_ENV_CMD" = x; then
25296    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
25297    METHOD="well-known name"
25298
25299  windows_path="$WIN_SDK_BASE"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    WIN_SDK_BASE="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    WIN_SDK_BASE="$unix_path"
25306  fi
25307
25308    if test -d "$WIN_SDK_BASE"; then
25309      # There have been cases of partial or broken SDK installations. A missing
25310      # lib dir is not going to work.
25311      if test ! -d "$WIN_SDK_BASE/../lib"; then
25312        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25313$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25314        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25315$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25316      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25317        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25318$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25319        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25320        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25321          VS_ENV_ARGS="/x86"
25322        else
25323          VS_ENV_ARGS="/x64"
25324        fi
25325      else
25326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25327$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25328        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25329$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25330      fi
25331    fi
25332  fi
25333
25334  fi
25335  if test "x$PROGRAMFILES" != x; then
25336
25337  if test "x$VS_ENV_CMD" = x; then
25338    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
25339    METHOD="well-known name"
25340
25341  windows_path="$WIN_SDK_BASE"
25342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25343    unix_path=`$CYGPATH -u "$windows_path"`
25344    WIN_SDK_BASE="$unix_path"
25345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25347    WIN_SDK_BASE="$unix_path"
25348  fi
25349
25350    if test -d "$WIN_SDK_BASE"; then
25351      # There have been cases of partial or broken SDK installations. A missing
25352      # lib dir is not going to work.
25353      if test ! -d "$WIN_SDK_BASE/../lib"; then
25354        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25355$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25356        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25357$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25358      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25360$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25361        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25362        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25363          VS_ENV_ARGS="/x86"
25364        else
25365          VS_ENV_ARGS="/x64"
25366        fi
25367      else
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25369$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25371$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25372      fi
25373    fi
25374  fi
25375
25376  fi
25377
25378  if test "x$VS_ENV_CMD" = x; then
25379    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
25380    METHOD="well-known name"
25381
25382  windows_path="$WIN_SDK_BASE"
25383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25384    unix_path=`$CYGPATH -u "$windows_path"`
25385    WIN_SDK_BASE="$unix_path"
25386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25388    WIN_SDK_BASE="$unix_path"
25389  fi
25390
25391    if test -d "$WIN_SDK_BASE"; then
25392      # There have been cases of partial or broken SDK installations. A missing
25393      # lib dir is not going to work.
25394      if test ! -d "$WIN_SDK_BASE/../lib"; then
25395        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25396$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25397        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25398$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25399      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25401$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25402        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25403        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25404          VS_ENV_ARGS="/x86"
25405        else
25406          VS_ENV_ARGS="/x64"
25407        fi
25408      else
25409        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25410$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25412$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25413      fi
25414    fi
25415  fi
25416
25417
25418  if test "x$VS_ENV_CMD" = x; then
25419    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
25420    METHOD="well-known name"
25421
25422  windows_path="$WIN_SDK_BASE"
25423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25424    unix_path=`$CYGPATH -u "$windows_path"`
25425    WIN_SDK_BASE="$unix_path"
25426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25428    WIN_SDK_BASE="$unix_path"
25429  fi
25430
25431    if test -d "$WIN_SDK_BASE"; then
25432      # There have been cases of partial or broken SDK installations. A missing
25433      # lib dir is not going to work.
25434      if test ! -d "$WIN_SDK_BASE/../lib"; then
25435        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25436$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25438$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25439      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25440        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25441$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25442        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25443        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25444          VS_ENV_ARGS="/x86"
25445        else
25446          VS_ENV_ARGS="/x64"
25447        fi
25448      else
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25450$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25451        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25452$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25453      fi
25454    fi
25455  fi
25456
25457
25458  if test "x$VS_ENV_CMD" != x; then
25459    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
25460
25461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25462
25463  # First separate the path from the arguments. This will split at the first
25464  # space.
25465  complete="$VS_ENV_CMD"
25466  path="${complete%% *}"
25467  tmp="$complete EOL"
25468  arguments="${tmp#* }"
25469
25470  # Input might be given as Windows format, start by converting to
25471  # unix format.
25472  new_path=`$CYGPATH -u "$path"`
25473
25474  # Now try to locate executable using which
25475  new_path=`$WHICH "$new_path" 2> /dev/null`
25476  # bat and cmd files are not always considered executable in cygwin causing which
25477  # to not find them
25478  if test "x$new_path" = x \
25479      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25480      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25481    new_path=`$CYGPATH -u "$path"`
25482  fi
25483  if test "x$new_path" = x; then
25484    # Oops. Which didn't find the executable.
25485    # The splitting of arguments from the executable at a space might have been incorrect,
25486    # since paths with space are more likely in Windows. Give it another try with the whole
25487    # argument.
25488    path="$complete"
25489    arguments="EOL"
25490    new_path=`$CYGPATH -u "$path"`
25491    new_path=`$WHICH "$new_path" 2> /dev/null`
25492    # bat and cmd files are not always considered executable in cygwin causing which
25493    # to not find them
25494    if test "x$new_path" = x \
25495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25497      new_path=`$CYGPATH -u "$path"`
25498    fi
25499    if test "x$new_path" = x; then
25500      # It's still not found. Now this is an unrecoverable error.
25501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25502$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25503      has_space=`$ECHO "$complete" | $GREP " "`
25504      if test "x$has_space" != x; then
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25507      fi
25508      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25509    fi
25510  fi
25511
25512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25515  # "foo.exe" is OK but "foo" is an error.
25516  #
25517  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25518  # It is also a way to make sure we got the proper file name for the real test later on.
25519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25520  if test "x$test_shortpath" = x; then
25521    # Short path failed, file does not exist as specified.
25522    # Try adding .exe or .cmd
25523    if test -f "${new_path}.exe"; then
25524      input_to_shortpath="${new_path}.exe"
25525    elif test -f "${new_path}.cmd"; then
25526      input_to_shortpath="${new_path}.cmd"
25527    else
25528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
25529$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
25530      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25531$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25532      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25533    fi
25534  else
25535    input_to_shortpath="$new_path"
25536  fi
25537
25538  # Call helper function which possibly converts this using DOS-style short mode.
25539  # If so, the updated path is stored in $new_path.
25540  new_path="$input_to_shortpath"
25541
25542  input_path="$input_to_shortpath"
25543  # Check if we need to convert this using DOS-style short mode. If the path
25544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25545  # take no chances and rewrite it.
25546  # Note: m4 eats our [], so we need to use [ and ] instead.
25547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25548  if test "x$has_forbidden_chars" != x; then
25549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25553      # Going to short mode and back again did indeed matter. Since short mode is
25554      # case insensitive, let's make it lowercase to improve readability.
25555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25556      # Now convert it back to Unix-stile (cygpath)
25557      input_path=`$CYGPATH -u "$shortmode_path"`
25558      new_path="$input_path"
25559    fi
25560  fi
25561
25562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25563  if test "x$test_cygdrive_prefix" = x; then
25564    # As a simple fix, exclude /usr/bin since it's not a real path.
25565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25567      # a path prefixed by /cygdrive for fixpath to work.
25568      new_path="$CYGWIN_ROOT_PATH$input_path"
25569    fi
25570  fi
25571
25572  # remove trailing .exe if any
25573  new_path="${new_path/%.exe/}"
25574
25575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25576
25577  # First separate the path from the arguments. This will split at the first
25578  # space.
25579  complete="$VS_ENV_CMD"
25580  path="${complete%% *}"
25581  tmp="$complete EOL"
25582  arguments="${tmp#* }"
25583
25584  # Input might be given as Windows format, start by converting to
25585  # unix format.
25586  new_path="$path"
25587
25588  windows_path="$new_path"
25589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25590    unix_path=`$CYGPATH -u "$windows_path"`
25591    new_path="$unix_path"
25592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25594    new_path="$unix_path"
25595  fi
25596
25597
25598  # Now try to locate executable using which
25599  new_path=`$WHICH "$new_path" 2> /dev/null`
25600
25601  if test "x$new_path" = x; then
25602    # Oops. Which didn't find the executable.
25603    # The splitting of arguments from the executable at a space might have been incorrect,
25604    # since paths with space are more likely in Windows. Give it another try with the whole
25605    # argument.
25606    path="$complete"
25607    arguments="EOL"
25608    new_path="$path"
25609
25610  windows_path="$new_path"
25611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25612    unix_path=`$CYGPATH -u "$windows_path"`
25613    new_path="$unix_path"
25614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25616    new_path="$unix_path"
25617  fi
25618
25619
25620    new_path=`$WHICH "$new_path" 2> /dev/null`
25621
25622    if test "x$new_path" = x; then
25623      # It's still not found. Now this is an unrecoverable error.
25624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25625$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25626      has_space=`$ECHO "$complete" | $GREP " "`
25627      if test "x$has_space" != x; then
25628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25630      fi
25631      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25632    fi
25633  fi
25634
25635  # Now new_path has a complete unix path to the binary
25636  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25637    # Keep paths in /bin as-is, but remove trailing .exe if any
25638    new_path="${new_path/%.exe/}"
25639    # Do not save /bin paths to all_fixpath_prefixes!
25640  else
25641    # Not in mixed or Windows style, start by that.
25642    new_path=`cmd //c echo $new_path`
25643
25644  input_path="$new_path"
25645  # Check if we need to convert this using DOS-style short mode. If the path
25646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25647  # take no chances and rewrite it.
25648  # Note: m4 eats our [], so we need to use [ and ] instead.
25649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25650  if test "x$has_forbidden_chars" != x; then
25651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25653  fi
25654
25655    # Output is in $new_path
25656
25657  windows_path="$new_path"
25658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25659    unix_path=`$CYGPATH -u "$windows_path"`
25660    new_path="$unix_path"
25661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25663    new_path="$unix_path"
25664  fi
25665
25666    # remove trailing .exe if any
25667    new_path="${new_path/%.exe/}"
25668
25669    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25670    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25671  fi
25672
25673  else
25674    # We're on a posix platform. Hooray! :)
25675    # First separate the path from the arguments. This will split at the first
25676    # space.
25677    complete="$VS_ENV_CMD"
25678    path="${complete%% *}"
25679    tmp="$complete EOL"
25680    arguments="${tmp#* }"
25681
25682    # Cannot rely on the command "which" here since it doesn't always work.
25683    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25684    if test -z "$is_absolute_path"; then
25685      # Path to executable is not absolute. Find it.
25686      IFS_save="$IFS"
25687      IFS=:
25688      for p in $PATH; do
25689        if test -f "$p/$path" && test -x "$p/$path"; then
25690          new_path="$p/$path"
25691          break
25692        fi
25693      done
25694      IFS="$IFS_save"
25695    else
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
25697$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
25698      new_path="$path"
25699    fi
25700
25701    if test "x$new_path" = x; then
25702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25703$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25704      has_space=`$ECHO "$complete" | $GREP " "`
25705      if test "x$has_space" != x; then
25706        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25707$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25708      fi
25709      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25710    fi
25711  fi
25712
25713  # Now join together the path and the arguments once again
25714  if test "x$arguments" != xEOL; then
25715    new_complete="$new_path ${arguments% *}"
25716  else
25717    new_complete="$new_path"
25718  fi
25719
25720  if test "x$complete" != "x$new_complete"; then
25721    VS_ENV_CMD="$new_complete"
25722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
25723$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
25724  fi
25725
25726
25727    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
25728    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
25729$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
25730    cd $OUTPUT_ROOT
25731    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
25732    # to autoconf standards.
25733
25734    #----
25735
25736    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
25737    # but calculate the difference in Cygwin environment before/after running it and then
25738    # apply the diff.
25739
25740    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
25741      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
25742      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
25743      _dosbash=`cygpath -a -w -s \`which bash\`.*`
25744    else
25745      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
25746      _dosbash=`cmd //c echo \`which bash\``
25747    fi
25748
25749    # generate the set of exported vars before/after the vs10 setup
25750    $ECHO "@echo off"                                           >  localdevenvtmp.bat
25751    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
25752    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
25753    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
25754
25755    # Now execute the newly created bat file.
25756    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
25757    cmd /c localdevenvtmp.bat | cat
25758
25759    # apply the diff (less some non-vs10 vars named by "!")
25760    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
25761    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
25762    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
25763
25764    # cleanup
25765    $RM localdevenvtmp*
25766    #----
25767    cd $CURDIR
25768    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
25769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25770$as_echo "no" >&6; }
25771      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
25772$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
25773      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
25774$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
25775      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
25776$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
25777      as_fn_error $? "Cannot continue" "$LINENO" 5
25778    fi
25779
25780    # Now set all paths and other env variables. This will allow the rest of
25781    # the configure script to find and run the compiler in the proper way.
25782    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
25783$as_echo "$as_me: Setting extracted environment variables" >&6;}
25784    . $OUTPUT_ROOT/localdevenv.sh
25785  else
25786    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
25787    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
25788$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
25789  fi
25790
25791  # At this point, we should have corrent variables in the environment, or we can't continue.
25792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
25793$as_echo_n "checking for Visual Studio variables... " >&6; }
25794
25795  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
25796    if test "x$INCLUDE" = x || test "x$LIB" = x; then
25797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
25798$as_echo "present but broken" >&6; }
25799      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
25800    else
25801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25802$as_echo "ok" >&6; }
25803      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
25804      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
25805      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
25806      # Remove any paths containing # (typically F#) as that messes up make
25807      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
25808      VS_PATH="$PATH"
25809
25810
25811
25812    fi
25813  else
25814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25815$as_echo "not found" >&6; }
25816
25817    if test "x$VS_ENV_CMD" = x; then
25818      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
25819$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
25821$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
25822    else
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
25824$as_echo "$as_me: Running the extraction script failed." >&6;}
25825    fi
25826    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
25827$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
25829$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
25830    as_fn_error $? "Cannot continue" "$LINENO" 5
25831  fi
25832
25833
25834
25835# Check whether --with-msvcr-dll was given.
25836if test "${with_msvcr_dll+set}" = set; then :
25837  withval=$with_msvcr_dll;
25838fi
25839
25840
25841  if test "x$with_msvcr_dll" != x; then
25842    # If given explicitely by user, do not probe. If not present, fail directly.
25843
25844  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
25845  METHOD="--with-msvcr-dll"
25846  if test -e "$POSSIBLE_MSVCR_DLL"; then
25847    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25848$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25849
25850    # Need to check if the found msvcr is correct architecture
25851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25852$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25853    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25854    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25855      CORRECT_MSVCR_ARCH=386
25856    else
25857      CORRECT_MSVCR_ARCH=x86-64
25858    fi
25859    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25861$as_echo "ok" >&6; }
25862      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25864$as_echo_n "checking for msvcr100.dll... " >&6; }
25865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25866$as_echo "$MSVCR_DLL" >&6; }
25867    else
25868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25869$as_echo "incorrect, ignoring" >&6; }
25870      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25871$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25872    fi
25873  fi
25874
25875    if test "x$MSVCR_DLL" = x; then
25876      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
25877    fi
25878  fi
25879
25880  if test "x$MSVCR_DLL" = x; then
25881    # Probe: Using well-known location from Visual Studio 10.0
25882    if test "x$VCINSTALLDIR" != x; then
25883      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
25884
25885  windows_path="$CYGWIN_VC_INSTALL_DIR"
25886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25887    unix_path=`$CYGPATH -u "$windows_path"`
25888    CYGWIN_VC_INSTALL_DIR="$unix_path"
25889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25891    CYGWIN_VC_INSTALL_DIR="$unix_path"
25892  fi
25893
25894      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
25895        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
25896      else
25897        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
25898      fi
25899
25900  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25901  METHOD="well-known location in VCINSTALLDIR"
25902  if test -e "$POSSIBLE_MSVCR_DLL"; then
25903    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25904$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25905
25906    # Need to check if the found msvcr is correct architecture
25907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25908$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25909    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25910    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25911      CORRECT_MSVCR_ARCH=386
25912    else
25913      CORRECT_MSVCR_ARCH=x86-64
25914    fi
25915    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25917$as_echo "ok" >&6; }
25918      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25919      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25920$as_echo_n "checking for msvcr100.dll... " >&6; }
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25922$as_echo "$MSVCR_DLL" >&6; }
25923    else
25924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25925$as_echo "incorrect, ignoring" >&6; }
25926      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25927$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25928    fi
25929  fi
25930
25931    fi
25932  fi
25933
25934  if test "x$MSVCR_DLL" = x; then
25935    # Probe: Check in the Boot JDK directory.
25936    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
25937
25938  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25939  METHOD="well-known location in Boot JDK"
25940  if test -e "$POSSIBLE_MSVCR_DLL"; then
25941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25942$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25943
25944    # Need to check if the found msvcr is correct architecture
25945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25946$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25947    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25948    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25949      CORRECT_MSVCR_ARCH=386
25950    else
25951      CORRECT_MSVCR_ARCH=x86-64
25952    fi
25953    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25955$as_echo "ok" >&6; }
25956      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25958$as_echo_n "checking for msvcr100.dll... " >&6; }
25959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25960$as_echo "$MSVCR_DLL" >&6; }
25961    else
25962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25963$as_echo "incorrect, ignoring" >&6; }
25964      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25965$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25966    fi
25967  fi
25968
25969  fi
25970
25971  if test "x$MSVCR_DLL" = x; then
25972    # Probe: Look in the Windows system32 directory
25973    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
25974
25975  windows_path="$CYGWIN_SYSTEMROOT"
25976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25977    unix_path=`$CYGPATH -u "$windows_path"`
25978    CYGWIN_SYSTEMROOT="$unix_path"
25979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25981    CYGWIN_SYSTEMROOT="$unix_path"
25982  fi
25983
25984    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
25985
25986  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25987  METHOD="well-known location in SYSTEMROOT"
25988  if test -e "$POSSIBLE_MSVCR_DLL"; then
25989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25990$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25991
25992    # Need to check if the found msvcr is correct architecture
25993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25994$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25995    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25996    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25997      CORRECT_MSVCR_ARCH=386
25998    else
25999      CORRECT_MSVCR_ARCH=x86-64
26000    fi
26001    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26003$as_echo "ok" >&6; }
26004      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26005      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26006$as_echo_n "checking for msvcr100.dll... " >&6; }
26007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26008$as_echo "$MSVCR_DLL" >&6; }
26009    else
26010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26011$as_echo "incorrect, ignoring" >&6; }
26012      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26013$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26014    fi
26015  fi
26016
26017  fi
26018
26019  if test "x$MSVCR_DLL" = x; then
26020    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
26021    if test "x$VS100COMNTOOLS" != x; then
26022      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
26023
26024  windows_path="$CYGWIN_VS_TOOLS_DIR"
26025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26026    unix_path=`$CYGPATH -u "$windows_path"`
26027    CYGWIN_VS_TOOLS_DIR="$unix_path"
26028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26030    CYGWIN_VS_TOOLS_DIR="$unix_path"
26031  fi
26032
26033      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
26034        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
26035      else
26036        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
26037      fi
26038
26039  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26040  METHOD="search of VS100COMNTOOLS"
26041  if test -e "$POSSIBLE_MSVCR_DLL"; then
26042    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
26043$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
26044
26045    # Need to check if the found msvcr is correct architecture
26046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
26047$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
26048    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
26049    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26050      CORRECT_MSVCR_ARCH=386
26051    else
26052      CORRECT_MSVCR_ARCH=x86-64
26053    fi
26054    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26056$as_echo "ok" >&6; }
26057      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26059$as_echo_n "checking for msvcr100.dll... " >&6; }
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26061$as_echo "$MSVCR_DLL" >&6; }
26062    else
26063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26064$as_echo "incorrect, ignoring" >&6; }
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26066$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26067    fi
26068  fi
26069
26070    fi
26071  fi
26072
26073  if test "x$MSVCR_DLL" = x; then
26074    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
26075    # (This was the original behaviour; kept since it might turn up something)
26076    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
26077      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
26078        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
26079      else
26080        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
26081        if test "x$POSSIBLE_MSVCR_DLL" = x; then
26082          # We're grasping at straws now...
26083          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
26084        fi
26085      fi
26086
26087
26088  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26089  METHOD="search of VCINSTALLDIR"
26090  if test -e "$POSSIBLE_MSVCR_DLL"; then
26091    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
26092$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
26093
26094    # Need to check if the found msvcr is correct architecture
26095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
26096$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
26097    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
26098    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26099      CORRECT_MSVCR_ARCH=386
26100    else
26101      CORRECT_MSVCR_ARCH=x86-64
26102    fi
26103    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26105$as_echo "ok" >&6; }
26106      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26108$as_echo_n "checking for msvcr100.dll... " >&6; }
26109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26110$as_echo "$MSVCR_DLL" >&6; }
26111    else
26112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26113$as_echo "incorrect, ignoring" >&6; }
26114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26115$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26116    fi
26117  fi
26118
26119    fi
26120  fi
26121
26122  if test "x$MSVCR_DLL" = x; then
26123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26124$as_echo_n "checking for msvcr100.dll... " >&6; }
26125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26126$as_echo "no" >&6; }
26127    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
26128  fi
26129
26130
26131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26132
26133  # Input might be given as Windows format, start by converting to
26134  # unix format.
26135  path="$MSVCR_DLL"
26136  new_path=`$CYGPATH -u "$path"`
26137
26138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26141  # "foo.exe" is OK but "foo" is an error.
26142  #
26143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26144  # It is also a way to make sure we got the proper file name for the real test later on.
26145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26146  if test "x$test_shortpath" = x; then
26147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
26148$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
26149    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
26150  fi
26151
26152  # Call helper function which possibly converts this using DOS-style short mode.
26153  # If so, the updated path is stored in $new_path.
26154
26155  input_path="$new_path"
26156  # Check if we need to convert this using DOS-style short mode. If the path
26157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26158  # take no chances and rewrite it.
26159  # Note: m4 eats our [], so we need to use [ and ] instead.
26160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26161  if test "x$has_forbidden_chars" != x; then
26162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26166      # Going to short mode and back again did indeed matter. Since short mode is
26167      # case insensitive, let's make it lowercase to improve readability.
26168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26169      # Now convert it back to Unix-stile (cygpath)
26170      input_path=`$CYGPATH -u "$shortmode_path"`
26171      new_path="$input_path"
26172    fi
26173  fi
26174
26175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26176  if test "x$test_cygdrive_prefix" = x; then
26177    # As a simple fix, exclude /usr/bin since it's not a real path.
26178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26180      # a path prefixed by /cygdrive for fixpath to work.
26181      new_path="$CYGWIN_ROOT_PATH$input_path"
26182    fi
26183  fi
26184
26185
26186  if test "x$path" != "x$new_path"; then
26187    MSVCR_DLL="$new_path"
26188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
26189$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
26190  fi
26191
26192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26193
26194  path="$MSVCR_DLL"
26195  has_colon=`$ECHO $path | $GREP ^.:`
26196  new_path="$path"
26197  if test "x$has_colon" = x; then
26198    # Not in mixed or Windows style, start by that.
26199    new_path=`cmd //c echo $path`
26200  fi
26201
26202
26203  input_path="$new_path"
26204  # Check if we need to convert this using DOS-style short mode. If the path
26205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26206  # take no chances and rewrite it.
26207  # Note: m4 eats our [], so we need to use [ and ] instead.
26208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26209  if test "x$has_forbidden_chars" != x; then
26210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26212  fi
26213
26214
26215  windows_path="$new_path"
26216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26217    unix_path=`$CYGPATH -u "$windows_path"`
26218    new_path="$unix_path"
26219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26221    new_path="$unix_path"
26222  fi
26223
26224  if test "x$path" != "x$new_path"; then
26225    MSVCR_DLL="$new_path"
26226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
26227$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
26228  fi
26229
26230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26232
26233  else
26234    # We're on a posix platform. Hooray! :)
26235    path="$MSVCR_DLL"
26236    has_space=`$ECHO "$path" | $GREP " "`
26237    if test "x$has_space" != x; then
26238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
26239$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
26240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26241    fi
26242
26243    # Use eval to expand a potential ~
26244    eval path="$path"
26245    if test ! -f "$path" && test ! -d "$path"; then
26246      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
26247    fi
26248
26249    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
26250  fi
26251
26252
26253
26254
26255# Check whether --with-dxsdk was given.
26256if test "${with_dxsdk+set}" = set; then :
26257  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
26258$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
26259fi
26260
26261
26262
26263
26264# Check whether --with-dxsdk-lib was given.
26265if test "${with_dxsdk_lib+set}" = set; then :
26266  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
26267$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
26268fi
26269
26270
26271
26272
26273# Check whether --with-dxsdk-include was given.
26274if test "${with_dxsdk_include+set}" = set; then :
26275  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
26276$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
26277fi
26278
26279
26280  fi
26281
26282
26283
26284  # If --build AND --host is set, then the configure script will find any
26285  # cross compilation tools in the PATH. Cross compilation tools
26286  # follows the cross compilation standard where they are prefixed with ${host}.
26287  # For example the binary i686-sun-solaris2.10-gcc
26288  # will cross compile for i686-sun-solaris2.10
26289  # If neither of build and host is not set, then build=host and the
26290  # default compiler found in the path will be used.
26291  # Setting only --host, does not seem to be really supported.
26292  # Please set both --build and --host if you want to cross compile.
26293
26294  if test "x$COMPILE_TYPE" = "xcross"; then
26295    # Now we to find a C/C++ compiler that can build executables for the build
26296    # platform. We can't use the AC_PROG_CC macro, since it can only be used
26297    # once. Also, we need to do this before adding a tools dir to the path,
26298    # otherwise we might pick up cross-compilers which don't use standard naming.
26299    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
26300    # to wait until they are properly discovered.
26301
26302
26303  # Publish this variable in the help.
26304
26305
26306  if test "x$BUILD_CC" = x; then
26307    # The variable is not set by user, try to locate tool using the code snippet
26308    for ac_prog in cl cc gcc
26309do
26310  # Extract the first word of "$ac_prog", so it can be a program name with args.
26311set dummy $ac_prog; ac_word=$2
26312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26313$as_echo_n "checking for $ac_word... " >&6; }
26314if ${ac_cv_path_BUILD_CC+:} false; then :
26315  $as_echo_n "(cached) " >&6
26316else
26317  case $BUILD_CC in
26318  [\\/]* | ?:[\\/]*)
26319  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26320  ;;
26321  *)
26322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26323for as_dir in $PATH
26324do
26325  IFS=$as_save_IFS
26326  test -z "$as_dir" && as_dir=.
26327    for ac_exec_ext in '' $ac_executable_extensions; do
26328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26329    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26331    break 2
26332  fi
26333done
26334  done
26335IFS=$as_save_IFS
26336
26337  ;;
26338esac
26339fi
26340BUILD_CC=$ac_cv_path_BUILD_CC
26341if test -n "$BUILD_CC"; then
26342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26343$as_echo "$BUILD_CC" >&6; }
26344else
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26346$as_echo "no" >&6; }
26347fi
26348
26349
26350  test -n "$BUILD_CC" && break
26351done
26352
26353  else
26354    # The variable is set, but is it from the command line or the environment?
26355
26356    # Try to remove the string !BUILD_CC! from our list.
26357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
26358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26359      # If it failed, the variable was not from the command line. Ignore it,
26360      # but warn the user (except for BASH, which is always set by the calling BASH).
26361      if test "xBUILD_CC" != xBASH; then
26362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
26363$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
26364      fi
26365      # Try to locate tool using the code snippet
26366      for ac_prog in cl cc gcc
26367do
26368  # Extract the first word of "$ac_prog", so it can be a program name with args.
26369set dummy $ac_prog; ac_word=$2
26370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26371$as_echo_n "checking for $ac_word... " >&6; }
26372if ${ac_cv_path_BUILD_CC+:} false; then :
26373  $as_echo_n "(cached) " >&6
26374else
26375  case $BUILD_CC in
26376  [\\/]* | ?:[\\/]*)
26377  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26378  ;;
26379  *)
26380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26381for as_dir in $PATH
26382do
26383  IFS=$as_save_IFS
26384  test -z "$as_dir" && as_dir=.
26385    for ac_exec_ext in '' $ac_executable_extensions; do
26386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26387    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26389    break 2
26390  fi
26391done
26392  done
26393IFS=$as_save_IFS
26394
26395  ;;
26396esac
26397fi
26398BUILD_CC=$ac_cv_path_BUILD_CC
26399if test -n "$BUILD_CC"; then
26400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26401$as_echo "$BUILD_CC" >&6; }
26402else
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26404$as_echo "no" >&6; }
26405fi
26406
26407
26408  test -n "$BUILD_CC" && break
26409done
26410
26411    else
26412      # If it succeeded, then it was overridden by the user. We will use it
26413      # for the tool.
26414
26415      # First remove it from the list of overridden variables, so we can test
26416      # for unknown variables in the end.
26417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26418
26419      # Check if the provided tool contains a complete path.
26420      tool_specified="$BUILD_CC"
26421      tool_basename="${tool_specified##*/}"
26422      if test "x$tool_basename" = "x$tool_specified"; then
26423        # A command without a complete path is provided, search $PATH.
26424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
26425$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
26426        # Extract the first word of "$tool_basename", so it can be a program name with args.
26427set dummy $tool_basename; ac_word=$2
26428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26429$as_echo_n "checking for $ac_word... " >&6; }
26430if ${ac_cv_path_BUILD_CC+:} false; then :
26431  $as_echo_n "(cached) " >&6
26432else
26433  case $BUILD_CC in
26434  [\\/]* | ?:[\\/]*)
26435  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26436  ;;
26437  *)
26438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26439for as_dir in $PATH
26440do
26441  IFS=$as_save_IFS
26442  test -z "$as_dir" && as_dir=.
26443    for ac_exec_ext in '' $ac_executable_extensions; do
26444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26445    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26447    break 2
26448  fi
26449done
26450  done
26451IFS=$as_save_IFS
26452
26453  ;;
26454esac
26455fi
26456BUILD_CC=$ac_cv_path_BUILD_CC
26457if test -n "$BUILD_CC"; then
26458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26459$as_echo "$BUILD_CC" >&6; }
26460else
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26462$as_echo "no" >&6; }
26463fi
26464
26465
26466        if test "x$BUILD_CC" = x; then
26467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26468        fi
26469      else
26470        # Otherwise we believe it is a complete path. Use it as it is.
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
26472$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
26474$as_echo_n "checking for BUILD_CC... " >&6; }
26475        if test ! -x "$tool_specified"; then
26476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26477$as_echo "not found" >&6; }
26478          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
26479        fi
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26481$as_echo "$tool_specified" >&6; }
26482      fi
26483    fi
26484  fi
26485
26486
26487
26488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26489
26490  # First separate the path from the arguments. This will split at the first
26491  # space.
26492  complete="$BUILD_CC"
26493  path="${complete%% *}"
26494  tmp="$complete EOL"
26495  arguments="${tmp#* }"
26496
26497  # Input might be given as Windows format, start by converting to
26498  # unix format.
26499  new_path=`$CYGPATH -u "$path"`
26500
26501  # Now try to locate executable using which
26502  new_path=`$WHICH "$new_path" 2> /dev/null`
26503  # bat and cmd files are not always considered executable in cygwin causing which
26504  # to not find them
26505  if test "x$new_path" = x \
26506      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26507      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26508    new_path=`$CYGPATH -u "$path"`
26509  fi
26510  if test "x$new_path" = x; then
26511    # Oops. Which didn't find the executable.
26512    # The splitting of arguments from the executable at a space might have been incorrect,
26513    # since paths with space are more likely in Windows. Give it another try with the whole
26514    # argument.
26515    path="$complete"
26516    arguments="EOL"
26517    new_path=`$CYGPATH -u "$path"`
26518    new_path=`$WHICH "$new_path" 2> /dev/null`
26519    # bat and cmd files are not always considered executable in cygwin causing which
26520    # to not find them
26521    if test "x$new_path" = x \
26522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26524      new_path=`$CYGPATH -u "$path"`
26525    fi
26526    if test "x$new_path" = x; then
26527      # It's still not found. Now this is an unrecoverable error.
26528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26529$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26530      has_space=`$ECHO "$complete" | $GREP " "`
26531      if test "x$has_space" != x; then
26532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26534      fi
26535      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26536    fi
26537  fi
26538
26539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26542  # "foo.exe" is OK but "foo" is an error.
26543  #
26544  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26545  # It is also a way to make sure we got the proper file name for the real test later on.
26546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26547  if test "x$test_shortpath" = x; then
26548    # Short path failed, file does not exist as specified.
26549    # Try adding .exe or .cmd
26550    if test -f "${new_path}.exe"; then
26551      input_to_shortpath="${new_path}.exe"
26552    elif test -f "${new_path}.cmd"; then
26553      input_to_shortpath="${new_path}.cmd"
26554    else
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
26556$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
26557      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26558$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26559      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26560    fi
26561  else
26562    input_to_shortpath="$new_path"
26563  fi
26564
26565  # Call helper function which possibly converts this using DOS-style short mode.
26566  # If so, the updated path is stored in $new_path.
26567  new_path="$input_to_shortpath"
26568
26569  input_path="$input_to_shortpath"
26570  # Check if we need to convert this using DOS-style short mode. If the path
26571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26572  # take no chances and rewrite it.
26573  # Note: m4 eats our [], so we need to use [ and ] instead.
26574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26575  if test "x$has_forbidden_chars" != x; then
26576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26580      # Going to short mode and back again did indeed matter. Since short mode is
26581      # case insensitive, let's make it lowercase to improve readability.
26582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26583      # Now convert it back to Unix-stile (cygpath)
26584      input_path=`$CYGPATH -u "$shortmode_path"`
26585      new_path="$input_path"
26586    fi
26587  fi
26588
26589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26590  if test "x$test_cygdrive_prefix" = x; then
26591    # As a simple fix, exclude /usr/bin since it's not a real path.
26592    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26594      # a path prefixed by /cygdrive for fixpath to work.
26595      new_path="$CYGWIN_ROOT_PATH$input_path"
26596    fi
26597  fi
26598
26599  # remove trailing .exe if any
26600  new_path="${new_path/%.exe/}"
26601
26602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603
26604  # First separate the path from the arguments. This will split at the first
26605  # space.
26606  complete="$BUILD_CC"
26607  path="${complete%% *}"
26608  tmp="$complete EOL"
26609  arguments="${tmp#* }"
26610
26611  # Input might be given as Windows format, start by converting to
26612  # unix format.
26613  new_path="$path"
26614
26615  windows_path="$new_path"
26616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26617    unix_path=`$CYGPATH -u "$windows_path"`
26618    new_path="$unix_path"
26619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26621    new_path="$unix_path"
26622  fi
26623
26624
26625  # Now try to locate executable using which
26626  new_path=`$WHICH "$new_path" 2> /dev/null`
26627
26628  if test "x$new_path" = x; then
26629    # Oops. Which didn't find the executable.
26630    # The splitting of arguments from the executable at a space might have been incorrect,
26631    # since paths with space are more likely in Windows. Give it another try with the whole
26632    # argument.
26633    path="$complete"
26634    arguments="EOL"
26635    new_path="$path"
26636
26637  windows_path="$new_path"
26638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26639    unix_path=`$CYGPATH -u "$windows_path"`
26640    new_path="$unix_path"
26641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26643    new_path="$unix_path"
26644  fi
26645
26646
26647    new_path=`$WHICH "$new_path" 2> /dev/null`
26648
26649    if test "x$new_path" = x; then
26650      # It's still not found. Now this is an unrecoverable error.
26651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26652$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26653      has_space=`$ECHO "$complete" | $GREP " "`
26654      if test "x$has_space" != x; then
26655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26657      fi
26658      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26659    fi
26660  fi
26661
26662  # Now new_path has a complete unix path to the binary
26663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26664    # Keep paths in /bin as-is, but remove trailing .exe if any
26665    new_path="${new_path/%.exe/}"
26666    # Do not save /bin paths to all_fixpath_prefixes!
26667  else
26668    # Not in mixed or Windows style, start by that.
26669    new_path=`cmd //c echo $new_path`
26670
26671  input_path="$new_path"
26672  # Check if we need to convert this using DOS-style short mode. If the path
26673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674  # take no chances and rewrite it.
26675  # Note: m4 eats our [], so we need to use [ and ] instead.
26676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26677  if test "x$has_forbidden_chars" != x; then
26678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26680  fi
26681
26682    # Output is in $new_path
26683
26684  windows_path="$new_path"
26685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26686    unix_path=`$CYGPATH -u "$windows_path"`
26687    new_path="$unix_path"
26688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26690    new_path="$unix_path"
26691  fi
26692
26693    # remove trailing .exe if any
26694    new_path="${new_path/%.exe/}"
26695
26696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26698  fi
26699
26700  else
26701    # We're on a posix platform. Hooray! :)
26702    # First separate the path from the arguments. This will split at the first
26703    # space.
26704    complete="$BUILD_CC"
26705    path="${complete%% *}"
26706    tmp="$complete EOL"
26707    arguments="${tmp#* }"
26708
26709    # Cannot rely on the command "which" here since it doesn't always work.
26710    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26711    if test -z "$is_absolute_path"; then
26712      # Path to executable is not absolute. Find it.
26713      IFS_save="$IFS"
26714      IFS=:
26715      for p in $PATH; do
26716        if test -f "$p/$path" && test -x "$p/$path"; then
26717          new_path="$p/$path"
26718          break
26719        fi
26720      done
26721      IFS="$IFS_save"
26722    else
26723      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
26724$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
26725      new_path="$path"
26726    fi
26727
26728    if test "x$new_path" = x; then
26729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26730$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26731      has_space=`$ECHO "$complete" | $GREP " "`
26732      if test "x$has_space" != x; then
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26735      fi
26736      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26737    fi
26738  fi
26739
26740  # Now join together the path and the arguments once again
26741  if test "x$arguments" != xEOL; then
26742    new_complete="$new_path ${arguments% *}"
26743  else
26744    new_complete="$new_path"
26745  fi
26746
26747  if test "x$complete" != "x$new_complete"; then
26748    BUILD_CC="$new_complete"
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
26750$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
26751  fi
26752
26753
26754
26755  # Publish this variable in the help.
26756
26757
26758  if test "x$BUILD_CXX" = x; then
26759    # The variable is not set by user, try to locate tool using the code snippet
26760    for ac_prog in cl CC g++
26761do
26762  # Extract the first word of "$ac_prog", so it can be a program name with args.
26763set dummy $ac_prog; ac_word=$2
26764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26765$as_echo_n "checking for $ac_word... " >&6; }
26766if ${ac_cv_path_BUILD_CXX+:} false; then :
26767  $as_echo_n "(cached) " >&6
26768else
26769  case $BUILD_CXX in
26770  [\\/]* | ?:[\\/]*)
26771  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26772  ;;
26773  *)
26774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26775for as_dir in $PATH
26776do
26777  IFS=$as_save_IFS
26778  test -z "$as_dir" && as_dir=.
26779    for ac_exec_ext in '' $ac_executable_extensions; do
26780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26781    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26783    break 2
26784  fi
26785done
26786  done
26787IFS=$as_save_IFS
26788
26789  ;;
26790esac
26791fi
26792BUILD_CXX=$ac_cv_path_BUILD_CXX
26793if test -n "$BUILD_CXX"; then
26794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26795$as_echo "$BUILD_CXX" >&6; }
26796else
26797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26798$as_echo "no" >&6; }
26799fi
26800
26801
26802  test -n "$BUILD_CXX" && break
26803done
26804
26805  else
26806    # The variable is set, but is it from the command line or the environment?
26807
26808    # Try to remove the string !BUILD_CXX! from our list.
26809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
26810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26811      # If it failed, the variable was not from the command line. Ignore it,
26812      # but warn the user (except for BASH, which is always set by the calling BASH).
26813      if test "xBUILD_CXX" != xBASH; then
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
26815$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
26816      fi
26817      # Try to locate tool using the code snippet
26818      for ac_prog in cl CC g++
26819do
26820  # Extract the first word of "$ac_prog", so it can be a program name with args.
26821set dummy $ac_prog; ac_word=$2
26822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26823$as_echo_n "checking for $ac_word... " >&6; }
26824if ${ac_cv_path_BUILD_CXX+:} false; then :
26825  $as_echo_n "(cached) " >&6
26826else
26827  case $BUILD_CXX in
26828  [\\/]* | ?:[\\/]*)
26829  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26830  ;;
26831  *)
26832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26833for as_dir in $PATH
26834do
26835  IFS=$as_save_IFS
26836  test -z "$as_dir" && as_dir=.
26837    for ac_exec_ext in '' $ac_executable_extensions; do
26838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26839    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26841    break 2
26842  fi
26843done
26844  done
26845IFS=$as_save_IFS
26846
26847  ;;
26848esac
26849fi
26850BUILD_CXX=$ac_cv_path_BUILD_CXX
26851if test -n "$BUILD_CXX"; then
26852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26853$as_echo "$BUILD_CXX" >&6; }
26854else
26855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26856$as_echo "no" >&6; }
26857fi
26858
26859
26860  test -n "$BUILD_CXX" && break
26861done
26862
26863    else
26864      # If it succeeded, then it was overridden by the user. We will use it
26865      # for the tool.
26866
26867      # First remove it from the list of overridden variables, so we can test
26868      # for unknown variables in the end.
26869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26870
26871      # Check if the provided tool contains a complete path.
26872      tool_specified="$BUILD_CXX"
26873      tool_basename="${tool_specified##*/}"
26874      if test "x$tool_basename" = "x$tool_specified"; then
26875        # A command without a complete path is provided, search $PATH.
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
26877$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
26878        # Extract the first word of "$tool_basename", so it can be a program name with args.
26879set dummy $tool_basename; ac_word=$2
26880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26881$as_echo_n "checking for $ac_word... " >&6; }
26882if ${ac_cv_path_BUILD_CXX+:} false; then :
26883  $as_echo_n "(cached) " >&6
26884else
26885  case $BUILD_CXX in
26886  [\\/]* | ?:[\\/]*)
26887  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26888  ;;
26889  *)
26890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26891for as_dir in $PATH
26892do
26893  IFS=$as_save_IFS
26894  test -z "$as_dir" && as_dir=.
26895    for ac_exec_ext in '' $ac_executable_extensions; do
26896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26897    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26899    break 2
26900  fi
26901done
26902  done
26903IFS=$as_save_IFS
26904
26905  ;;
26906esac
26907fi
26908BUILD_CXX=$ac_cv_path_BUILD_CXX
26909if test -n "$BUILD_CXX"; then
26910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26911$as_echo "$BUILD_CXX" >&6; }
26912else
26913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26914$as_echo "no" >&6; }
26915fi
26916
26917
26918        if test "x$BUILD_CXX" = x; then
26919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26920        fi
26921      else
26922        # Otherwise we believe it is a complete path. Use it as it is.
26923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
26924$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
26926$as_echo_n "checking for BUILD_CXX... " >&6; }
26927        if test ! -x "$tool_specified"; then
26928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26929$as_echo "not found" >&6; }
26930          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
26931        fi
26932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26933$as_echo "$tool_specified" >&6; }
26934      fi
26935    fi
26936  fi
26937
26938
26939
26940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941
26942  # First separate the path from the arguments. This will split at the first
26943  # space.
26944  complete="$BUILD_CXX"
26945  path="${complete%% *}"
26946  tmp="$complete EOL"
26947  arguments="${tmp#* }"
26948
26949  # Input might be given as Windows format, start by converting to
26950  # unix format.
26951  new_path=`$CYGPATH -u "$path"`
26952
26953  # Now try to locate executable using which
26954  new_path=`$WHICH "$new_path" 2> /dev/null`
26955  # bat and cmd files are not always considered executable in cygwin causing which
26956  # to not find them
26957  if test "x$new_path" = x \
26958      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26959      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26960    new_path=`$CYGPATH -u "$path"`
26961  fi
26962  if test "x$new_path" = x; then
26963    # Oops. Which didn't find the executable.
26964    # The splitting of arguments from the executable at a space might have been incorrect,
26965    # since paths with space are more likely in Windows. Give it another try with the whole
26966    # argument.
26967    path="$complete"
26968    arguments="EOL"
26969    new_path=`$CYGPATH -u "$path"`
26970    new_path=`$WHICH "$new_path" 2> /dev/null`
26971    # bat and cmd files are not always considered executable in cygwin causing which
26972    # to not find them
26973    if test "x$new_path" = x \
26974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26976      new_path=`$CYGPATH -u "$path"`
26977    fi
26978    if test "x$new_path" = x; then
26979      # It's still not found. Now this is an unrecoverable error.
26980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
26981$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
26982      has_space=`$ECHO "$complete" | $GREP " "`
26983      if test "x$has_space" != x; then
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26986      fi
26987      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
26988    fi
26989  fi
26990
26991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26994  # "foo.exe" is OK but "foo" is an error.
26995  #
26996  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26997  # It is also a way to make sure we got the proper file name for the real test later on.
26998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26999  if test "x$test_shortpath" = x; then
27000    # Short path failed, file does not exist as specified.
27001    # Try adding .exe or .cmd
27002    if test -f "${new_path}.exe"; then
27003      input_to_shortpath="${new_path}.exe"
27004    elif test -f "${new_path}.cmd"; then
27005      input_to_shortpath="${new_path}.cmd"
27006    else
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
27008$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27011      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27012    fi
27013  else
27014    input_to_shortpath="$new_path"
27015  fi
27016
27017  # Call helper function which possibly converts this using DOS-style short mode.
27018  # If so, the updated path is stored in $new_path.
27019  new_path="$input_to_shortpath"
27020
27021  input_path="$input_to_shortpath"
27022  # Check if we need to convert this using DOS-style short mode. If the path
27023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27024  # take no chances and rewrite it.
27025  # Note: m4 eats our [], so we need to use [ and ] instead.
27026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27027  if test "x$has_forbidden_chars" != x; then
27028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27032      # Going to short mode and back again did indeed matter. Since short mode is
27033      # case insensitive, let's make it lowercase to improve readability.
27034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27035      # Now convert it back to Unix-stile (cygpath)
27036      input_path=`$CYGPATH -u "$shortmode_path"`
27037      new_path="$input_path"
27038    fi
27039  fi
27040
27041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27042  if test "x$test_cygdrive_prefix" = x; then
27043    # As a simple fix, exclude /usr/bin since it's not a real path.
27044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27046      # a path prefixed by /cygdrive for fixpath to work.
27047      new_path="$CYGWIN_ROOT_PATH$input_path"
27048    fi
27049  fi
27050
27051  # remove trailing .exe if any
27052  new_path="${new_path/%.exe/}"
27053
27054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27055
27056  # First separate the path from the arguments. This will split at the first
27057  # space.
27058  complete="$BUILD_CXX"
27059  path="${complete%% *}"
27060  tmp="$complete EOL"
27061  arguments="${tmp#* }"
27062
27063  # Input might be given as Windows format, start by converting to
27064  # unix format.
27065  new_path="$path"
27066
27067  windows_path="$new_path"
27068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27069    unix_path=`$CYGPATH -u "$windows_path"`
27070    new_path="$unix_path"
27071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27073    new_path="$unix_path"
27074  fi
27075
27076
27077  # Now try to locate executable using which
27078  new_path=`$WHICH "$new_path" 2> /dev/null`
27079
27080  if test "x$new_path" = x; then
27081    # Oops. Which didn't find the executable.
27082    # The splitting of arguments from the executable at a space might have been incorrect,
27083    # since paths with space are more likely in Windows. Give it another try with the whole
27084    # argument.
27085    path="$complete"
27086    arguments="EOL"
27087    new_path="$path"
27088
27089  windows_path="$new_path"
27090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27091    unix_path=`$CYGPATH -u "$windows_path"`
27092    new_path="$unix_path"
27093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27095    new_path="$unix_path"
27096  fi
27097
27098
27099    new_path=`$WHICH "$new_path" 2> /dev/null`
27100
27101    if test "x$new_path" = x; then
27102      # It's still not found. Now this is an unrecoverable error.
27103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
27104$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
27105      has_space=`$ECHO "$complete" | $GREP " "`
27106      if test "x$has_space" != x; then
27107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27109      fi
27110      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27111    fi
27112  fi
27113
27114  # Now new_path has a complete unix path to the binary
27115  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27116    # Keep paths in /bin as-is, but remove trailing .exe if any
27117    new_path="${new_path/%.exe/}"
27118    # Do not save /bin paths to all_fixpath_prefixes!
27119  else
27120    # Not in mixed or Windows style, start by that.
27121    new_path=`cmd //c echo $new_path`
27122
27123  input_path="$new_path"
27124  # Check if we need to convert this using DOS-style short mode. If the path
27125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27126  # take no chances and rewrite it.
27127  # Note: m4 eats our [], so we need to use [ and ] instead.
27128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27129  if test "x$has_forbidden_chars" != x; then
27130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27132  fi
27133
27134    # Output is in $new_path
27135
27136  windows_path="$new_path"
27137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27138    unix_path=`$CYGPATH -u "$windows_path"`
27139    new_path="$unix_path"
27140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27142    new_path="$unix_path"
27143  fi
27144
27145    # remove trailing .exe if any
27146    new_path="${new_path/%.exe/}"
27147
27148    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27149    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27150  fi
27151
27152  else
27153    # We're on a posix platform. Hooray! :)
27154    # First separate the path from the arguments. This will split at the first
27155    # space.
27156    complete="$BUILD_CXX"
27157    path="${complete%% *}"
27158    tmp="$complete EOL"
27159    arguments="${tmp#* }"
27160
27161    # Cannot rely on the command "which" here since it doesn't always work.
27162    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27163    if test -z "$is_absolute_path"; then
27164      # Path to executable is not absolute. Find it.
27165      IFS_save="$IFS"
27166      IFS=:
27167      for p in $PATH; do
27168        if test -f "$p/$path" && test -x "$p/$path"; then
27169          new_path="$p/$path"
27170          break
27171        fi
27172      done
27173      IFS="$IFS_save"
27174    else
27175      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
27176$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
27177      new_path="$path"
27178    fi
27179
27180    if test "x$new_path" = x; then
27181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
27182$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
27183      has_space=`$ECHO "$complete" | $GREP " "`
27184      if test "x$has_space" != x; then
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27186$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27187      fi
27188      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27189    fi
27190  fi
27191
27192  # Now join together the path and the arguments once again
27193  if test "x$arguments" != xEOL; then
27194    new_complete="$new_path ${arguments% *}"
27195  else
27196    new_complete="$new_path"
27197  fi
27198
27199  if test "x$complete" != "x$new_complete"; then
27200    BUILD_CXX="$new_complete"
27201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
27202$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
27203  fi
27204
27205
27206
27207  # Publish this variable in the help.
27208
27209
27210  if test "x$BUILD_LD" = x; then
27211    # The variable is not set by user, try to locate tool using the code snippet
27212    for ac_prog in ld
27213do
27214  # Extract the first word of "$ac_prog", so it can be a program name with args.
27215set dummy $ac_prog; ac_word=$2
27216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27217$as_echo_n "checking for $ac_word... " >&6; }
27218if ${ac_cv_path_BUILD_LD+:} false; then :
27219  $as_echo_n "(cached) " >&6
27220else
27221  case $BUILD_LD in
27222  [\\/]* | ?:[\\/]*)
27223  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27224  ;;
27225  *)
27226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27227for as_dir in $PATH
27228do
27229  IFS=$as_save_IFS
27230  test -z "$as_dir" && as_dir=.
27231    for ac_exec_ext in '' $ac_executable_extensions; do
27232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27233    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27235    break 2
27236  fi
27237done
27238  done
27239IFS=$as_save_IFS
27240
27241  ;;
27242esac
27243fi
27244BUILD_LD=$ac_cv_path_BUILD_LD
27245if test -n "$BUILD_LD"; then
27246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27247$as_echo "$BUILD_LD" >&6; }
27248else
27249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27250$as_echo "no" >&6; }
27251fi
27252
27253
27254  test -n "$BUILD_LD" && break
27255done
27256
27257  else
27258    # The variable is set, but is it from the command line or the environment?
27259
27260    # Try to remove the string !BUILD_LD! from our list.
27261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
27262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27263      # If it failed, the variable was not from the command line. Ignore it,
27264      # but warn the user (except for BASH, which is always set by the calling BASH).
27265      if test "xBUILD_LD" != xBASH; then
27266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
27267$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
27268      fi
27269      # Try to locate tool using the code snippet
27270      for ac_prog in ld
27271do
27272  # Extract the first word of "$ac_prog", so it can be a program name with args.
27273set dummy $ac_prog; ac_word=$2
27274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27275$as_echo_n "checking for $ac_word... " >&6; }
27276if ${ac_cv_path_BUILD_LD+:} false; then :
27277  $as_echo_n "(cached) " >&6
27278else
27279  case $BUILD_LD in
27280  [\\/]* | ?:[\\/]*)
27281  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27282  ;;
27283  *)
27284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27285for as_dir in $PATH
27286do
27287  IFS=$as_save_IFS
27288  test -z "$as_dir" && as_dir=.
27289    for ac_exec_ext in '' $ac_executable_extensions; do
27290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27291    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27293    break 2
27294  fi
27295done
27296  done
27297IFS=$as_save_IFS
27298
27299  ;;
27300esac
27301fi
27302BUILD_LD=$ac_cv_path_BUILD_LD
27303if test -n "$BUILD_LD"; then
27304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27305$as_echo "$BUILD_LD" >&6; }
27306else
27307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27308$as_echo "no" >&6; }
27309fi
27310
27311
27312  test -n "$BUILD_LD" && break
27313done
27314
27315    else
27316      # If it succeeded, then it was overridden by the user. We will use it
27317      # for the tool.
27318
27319      # First remove it from the list of overridden variables, so we can test
27320      # for unknown variables in the end.
27321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27322
27323      # Check if the provided tool contains a complete path.
27324      tool_specified="$BUILD_LD"
27325      tool_basename="${tool_specified##*/}"
27326      if test "x$tool_basename" = "x$tool_specified"; then
27327        # A command without a complete path is provided, search $PATH.
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
27329$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
27330        # Extract the first word of "$tool_basename", so it can be a program name with args.
27331set dummy $tool_basename; ac_word=$2
27332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27333$as_echo_n "checking for $ac_word... " >&6; }
27334if ${ac_cv_path_BUILD_LD+:} false; then :
27335  $as_echo_n "(cached) " >&6
27336else
27337  case $BUILD_LD in
27338  [\\/]* | ?:[\\/]*)
27339  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27340  ;;
27341  *)
27342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27343for as_dir in $PATH
27344do
27345  IFS=$as_save_IFS
27346  test -z "$as_dir" && as_dir=.
27347    for ac_exec_ext in '' $ac_executable_extensions; do
27348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27349    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27351    break 2
27352  fi
27353done
27354  done
27355IFS=$as_save_IFS
27356
27357  ;;
27358esac
27359fi
27360BUILD_LD=$ac_cv_path_BUILD_LD
27361if test -n "$BUILD_LD"; then
27362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27363$as_echo "$BUILD_LD" >&6; }
27364else
27365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27366$as_echo "no" >&6; }
27367fi
27368
27369
27370        if test "x$BUILD_LD" = x; then
27371          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27372        fi
27373      else
27374        # Otherwise we believe it is a complete path. Use it as it is.
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
27376$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
27377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
27378$as_echo_n "checking for BUILD_LD... " >&6; }
27379        if test ! -x "$tool_specified"; then
27380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27381$as_echo "not found" >&6; }
27382          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
27383        fi
27384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27385$as_echo "$tool_specified" >&6; }
27386      fi
27387    fi
27388  fi
27389
27390
27391
27392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27393
27394  # First separate the path from the arguments. This will split at the first
27395  # space.
27396  complete="$BUILD_LD"
27397  path="${complete%% *}"
27398  tmp="$complete EOL"
27399  arguments="${tmp#* }"
27400
27401  # Input might be given as Windows format, start by converting to
27402  # unix format.
27403  new_path=`$CYGPATH -u "$path"`
27404
27405  # Now try to locate executable using which
27406  new_path=`$WHICH "$new_path" 2> /dev/null`
27407  # bat and cmd files are not always considered executable in cygwin causing which
27408  # to not find them
27409  if test "x$new_path" = x \
27410      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27411      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27412    new_path=`$CYGPATH -u "$path"`
27413  fi
27414  if test "x$new_path" = x; then
27415    # Oops. Which didn't find the executable.
27416    # The splitting of arguments from the executable at a space might have been incorrect,
27417    # since paths with space are more likely in Windows. Give it another try with the whole
27418    # argument.
27419    path="$complete"
27420    arguments="EOL"
27421    new_path=`$CYGPATH -u "$path"`
27422    new_path=`$WHICH "$new_path" 2> /dev/null`
27423    # bat and cmd files are not always considered executable in cygwin causing which
27424    # to not find them
27425    if test "x$new_path" = x \
27426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27428      new_path=`$CYGPATH -u "$path"`
27429    fi
27430    if test "x$new_path" = x; then
27431      # It's still not found. Now this is an unrecoverable error.
27432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27433$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27434      has_space=`$ECHO "$complete" | $GREP " "`
27435      if test "x$has_space" != x; then
27436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27438      fi
27439      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27440    fi
27441  fi
27442
27443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27446  # "foo.exe" is OK but "foo" is an error.
27447  #
27448  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27449  # It is also a way to make sure we got the proper file name for the real test later on.
27450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27451  if test "x$test_shortpath" = x; then
27452    # Short path failed, file does not exist as specified.
27453    # Try adding .exe or .cmd
27454    if test -f "${new_path}.exe"; then
27455      input_to_shortpath="${new_path}.exe"
27456    elif test -f "${new_path}.cmd"; then
27457      input_to_shortpath="${new_path}.cmd"
27458    else
27459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
27460$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
27461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27463      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27464    fi
27465  else
27466    input_to_shortpath="$new_path"
27467  fi
27468
27469  # Call helper function which possibly converts this using DOS-style short mode.
27470  # If so, the updated path is stored in $new_path.
27471  new_path="$input_to_shortpath"
27472
27473  input_path="$input_to_shortpath"
27474  # Check if we need to convert this using DOS-style short mode. If the path
27475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27476  # take no chances and rewrite it.
27477  # Note: m4 eats our [], so we need to use [ and ] instead.
27478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27479  if test "x$has_forbidden_chars" != x; then
27480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27484      # Going to short mode and back again did indeed matter. Since short mode is
27485      # case insensitive, let's make it lowercase to improve readability.
27486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27487      # Now convert it back to Unix-stile (cygpath)
27488      input_path=`$CYGPATH -u "$shortmode_path"`
27489      new_path="$input_path"
27490    fi
27491  fi
27492
27493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27494  if test "x$test_cygdrive_prefix" = x; then
27495    # As a simple fix, exclude /usr/bin since it's not a real path.
27496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27498      # a path prefixed by /cygdrive for fixpath to work.
27499      new_path="$CYGWIN_ROOT_PATH$input_path"
27500    fi
27501  fi
27502
27503  # remove trailing .exe if any
27504  new_path="${new_path/%.exe/}"
27505
27506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27507
27508  # First separate the path from the arguments. This will split at the first
27509  # space.
27510  complete="$BUILD_LD"
27511  path="${complete%% *}"
27512  tmp="$complete EOL"
27513  arguments="${tmp#* }"
27514
27515  # Input might be given as Windows format, start by converting to
27516  # unix format.
27517  new_path="$path"
27518
27519  windows_path="$new_path"
27520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521    unix_path=`$CYGPATH -u "$windows_path"`
27522    new_path="$unix_path"
27523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27525    new_path="$unix_path"
27526  fi
27527
27528
27529  # Now try to locate executable using which
27530  new_path=`$WHICH "$new_path" 2> /dev/null`
27531
27532  if test "x$new_path" = x; then
27533    # Oops. Which didn't find the executable.
27534    # The splitting of arguments from the executable at a space might have been incorrect,
27535    # since paths with space are more likely in Windows. Give it another try with the whole
27536    # argument.
27537    path="$complete"
27538    arguments="EOL"
27539    new_path="$path"
27540
27541  windows_path="$new_path"
27542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27543    unix_path=`$CYGPATH -u "$windows_path"`
27544    new_path="$unix_path"
27545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27547    new_path="$unix_path"
27548  fi
27549
27550
27551    new_path=`$WHICH "$new_path" 2> /dev/null`
27552
27553    if test "x$new_path" = x; then
27554      # It's still not found. Now this is an unrecoverable error.
27555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27556$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27557      has_space=`$ECHO "$complete" | $GREP " "`
27558      if test "x$has_space" != x; then
27559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27561      fi
27562      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27563    fi
27564  fi
27565
27566  # Now new_path has a complete unix path to the binary
27567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27568    # Keep paths in /bin as-is, but remove trailing .exe if any
27569    new_path="${new_path/%.exe/}"
27570    # Do not save /bin paths to all_fixpath_prefixes!
27571  else
27572    # Not in mixed or Windows style, start by that.
27573    new_path=`cmd //c echo $new_path`
27574
27575  input_path="$new_path"
27576  # Check if we need to convert this using DOS-style short mode. If the path
27577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27578  # take no chances and rewrite it.
27579  # Note: m4 eats our [], so we need to use [ and ] instead.
27580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27581  if test "x$has_forbidden_chars" != x; then
27582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27584  fi
27585
27586    # Output is in $new_path
27587
27588  windows_path="$new_path"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    unix_path=`$CYGPATH -u "$windows_path"`
27591    new_path="$unix_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27594    new_path="$unix_path"
27595  fi
27596
27597    # remove trailing .exe if any
27598    new_path="${new_path/%.exe/}"
27599
27600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27602  fi
27603
27604  else
27605    # We're on a posix platform. Hooray! :)
27606    # First separate the path from the arguments. This will split at the first
27607    # space.
27608    complete="$BUILD_LD"
27609    path="${complete%% *}"
27610    tmp="$complete EOL"
27611    arguments="${tmp#* }"
27612
27613    # Cannot rely on the command "which" here since it doesn't always work.
27614    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27615    if test -z "$is_absolute_path"; then
27616      # Path to executable is not absolute. Find it.
27617      IFS_save="$IFS"
27618      IFS=:
27619      for p in $PATH; do
27620        if test -f "$p/$path" && test -x "$p/$path"; then
27621          new_path="$p/$path"
27622          break
27623        fi
27624      done
27625      IFS="$IFS_save"
27626    else
27627      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
27628$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
27629      new_path="$path"
27630    fi
27631
27632    if test "x$new_path" = x; then
27633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27634$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27635      has_space=`$ECHO "$complete" | $GREP " "`
27636      if test "x$has_space" != x; then
27637        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27639      fi
27640      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27641    fi
27642  fi
27643
27644  # Now join together the path and the arguments once again
27645  if test "x$arguments" != xEOL; then
27646    new_complete="$new_path ${arguments% *}"
27647  else
27648    new_complete="$new_path"
27649  fi
27650
27651  if test "x$complete" != "x$new_complete"; then
27652    BUILD_LD="$new_complete"
27653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
27654$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
27655  fi
27656
27657  fi
27658
27659
27660
27661
27662  # If a devkit is found on the builddeps server, then prepend its path to the
27663  # PATH variable. If there are cross compilers available in the devkit, these
27664  # will be found by AC_PROG_CC et al.
27665  DEVKIT=
27666
27667
27668  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27669    # Source the builddeps file again, to make sure it uses the latest variables!
27670    . $builddepsfile
27671    # Look for a target and build machine specific resource!
27672    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27673    if test "x$resource" = x; then
27674      # Ok, lets instead look for a target specific resource
27675      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27676    fi
27677    if test "x$resource" = x; then
27678      # Ok, lets instead look for a build specific resource
27679      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27680    fi
27681    if test "x$resource" = x; then
27682      # Ok, lets instead look for a generic resource
27683      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27684      resource=${builddep_devkit}
27685    fi
27686    if test "x$resource" != x; then
27687      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27688$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27689      # If the resource in the builddeps.conf file is an existing directory,
27690      # for example /java/linux/cups
27691      if test -d ${resource}; then
27692        depdir=${resource}
27693      else
27694
27695  # devkit is for example mymodule
27696  # $resource is for example libs/general/libmymod_1_2_3.zip
27697  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27698  # $with_builddeps_dir is for example /localhome/builddeps
27699  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27700  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27701  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27702  filename=`basename $resource`
27703  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27704  filebase=${filename%%.*}
27705  extension=${filename#*.}
27706  installdir=$with_builddeps_dir/$filebase
27707  if test ! -f $installdir/$filename.unpacked; then
27708    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27709$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27710    if test ! -d $installdir; then
27711      mkdir -p $installdir
27712    fi
27713    if test ! -d $installdir; then
27714      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27715    fi
27716    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27717    touch $tmpfile
27718    if test ! -f $tmpfile; then
27719      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27720    fi
27721
27722  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27723  # $tmpfile is the local file name for the downloaded file.
27724  VALID_TOOL=no
27725  if test "x$BDEPS_FTP" = xwget; then
27726    VALID_TOOL=yes
27727    wget -O $tmpfile $with_builddeps_server/$resource
27728  fi
27729  if test "x$BDEPS_FTP" = xlftp; then
27730    VALID_TOOL=yes
27731    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27732  fi
27733  if test "x$BDEPS_FTP" = xftp; then
27734    VALID_TOOL=yes
27735    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27736    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27737    FTPUSERPWD=${FTPSERVER%%@*}
27738    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27739      FTPUSER=${userpwd%%:*}
27740      FTPPWD=${userpwd#*@}
27741      FTPSERVER=${FTPSERVER#*@}
27742    else
27743      FTPUSER=ftp
27744      FTPPWD=ftp
27745    fi
27746    # the "pass" command does not work on some
27747    # ftp clients (read ftp.exe) but if it works,
27748    # passive mode is better!
27749    ( \
27750        echo "user $FTPUSER $FTPPWD"        ; \
27751        echo "pass"                         ; \
27752        echo "bin"                          ; \
27753        echo "get $FTPPATH $tmpfile"              ; \
27754    ) | ftp -in $FTPSERVER
27755  fi
27756  if test "x$VALID_TOOL" != xyes; then
27757    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27758  fi
27759
27760    mv $tmpfile $installdir/$filename
27761    if test ! -s $installdir/$filename; then
27762      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27763    fi
27764    case "$extension" in
27765      zip)  echo "Unzipping $installdir/$filename..."
27766        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27767        ;;
27768      tar.gz) echo "Untaring $installdir/$filename..."
27769        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27770        ;;
27771      tgz) echo "Untaring $installdir/$filename..."
27772        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27773        ;;
27774      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27775        ;;
27776    esac
27777  fi
27778  if test -f $installdir/$filename.unpacked; then
27779    depdir=$installdir
27780  fi
27781
27782      fi
27783      # Source the builddeps file again, because in the previous command, the depdir
27784      # was updated to point at the current build dependency install directory.
27785      . $builddepsfile
27786      # Now extract variables from the builddeps.conf files.
27787      theroot=${builddep_devkit_ROOT}
27788      thecflags=${builddep_devkit_CFLAGS}
27789      thelibs=${builddep_devkit_LIBS}
27790      if test "x$depdir" = x; then
27791        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27792      fi
27793      DEVKIT=$depdir
27794      if test "x$theroot" != x; then
27795        DEVKIT="$theroot"
27796      fi
27797      if test "x$thecflags" != x; then
27798        DEVKIT_CFLAGS="$thecflags"
27799      fi
27800      if test "x$thelibs" != x; then
27801        DEVKIT_LIBS="$thelibs"
27802      fi
27803
27804        # Found devkit
27805        PATH="$DEVKIT/bin:$PATH"
27806        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27807        if test "x$x_includes" = "xNONE"; then
27808          x_includes="$SYS_ROOT/usr/include/X11"
27809        fi
27810        if test "x$x_libraries" = "xNONE"; then
27811          x_libraries="$SYS_ROOT/usr/lib"
27812        fi
27813
27814
27815    fi
27816
27817  fi
27818
27819
27820  # Store the CFLAGS etal passed to the configure script.
27821  ORG_CFLAGS="$CFLAGS"
27822  ORG_CXXFLAGS="$CXXFLAGS"
27823  ORG_OBJCFLAGS="$OBJCFLAGS"
27824
27825  # autoconf magic only relies on PATH, so update it if tools dir is specified
27826  OLD_PATH="$PATH"
27827  if test "x$TOOLS_DIR" != x; then
27828    PATH=$TOOLS_DIR:$PATH
27829  fi
27830
27831
27832  ### Locate C compiler (CC)
27833
27834  # On windows, only cl.exe is supported.
27835  # On Solaris, cc is preferred to gcc.
27836  # Elsewhere, gcc is preferred to cc.
27837
27838  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
27839    COMPILER_CHECK_LIST="cl"
27840  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
27841    COMPILER_CHECK_LIST="cc gcc"
27842  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
27843    # Do not probe for cc on AIX.
27844    COMPILER_CHECK_LIST="xlc_r"
27845  else
27846    COMPILER_CHECK_LIST="gcc cc"
27847  fi
27848
27849
27850  COMPILER_NAME=C
27851  SEARCH_LIST="$COMPILER_CHECK_LIST"
27852
27853  if test "x$CC" != x; then
27854    # User has supplied compiler name already, always let that override.
27855    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27856$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27857    if test "x`basename $CC`" = "x$CC"; then
27858      # A command without a complete path is provided, search $PATH.
27859
27860      for ac_prog in $CC
27861do
27862  # Extract the first word of "$ac_prog", so it can be a program name with args.
27863set dummy $ac_prog; ac_word=$2
27864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27865$as_echo_n "checking for $ac_word... " >&6; }
27866if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27867  $as_echo_n "(cached) " >&6
27868else
27869  case $POTENTIAL_CC in
27870  [\\/]* | ?:[\\/]*)
27871  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27872  ;;
27873  *)
27874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27875for as_dir in $PATH
27876do
27877  IFS=$as_save_IFS
27878  test -z "$as_dir" && as_dir=.
27879    for ac_exec_ext in '' $ac_executable_extensions; do
27880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27881    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27883    break 2
27884  fi
27885done
27886  done
27887IFS=$as_save_IFS
27888
27889  ;;
27890esac
27891fi
27892POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27893if test -n "$POTENTIAL_CC"; then
27894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27895$as_echo "$POTENTIAL_CC" >&6; }
27896else
27897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27898$as_echo "no" >&6; }
27899fi
27900
27901
27902  test -n "$POTENTIAL_CC" && break
27903done
27904
27905      if test "x$POTENTIAL_CC" != x; then
27906        CC=$POTENTIAL_CC
27907      else
27908        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27909      fi
27910    else
27911      # Otherwise it might already be a complete path
27912      if test ! -x "$CC"; then
27913        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27914      fi
27915    fi
27916  else
27917    # No user supplied value. Locate compiler ourselves
27918    CC=
27919    # If TOOLS_DIR is set, check for all compiler names in there first
27920    # before checking the rest of the PATH.
27921    if test -n "$TOOLS_DIR"; then
27922      PATH_save="$PATH"
27923      PATH="$TOOLS_DIR"
27924      for ac_prog in $SEARCH_LIST
27925do
27926  # Extract the first word of "$ac_prog", so it can be a program name with args.
27927set dummy $ac_prog; ac_word=$2
27928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27929$as_echo_n "checking for $ac_word... " >&6; }
27930if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27931  $as_echo_n "(cached) " >&6
27932else
27933  case $TOOLS_DIR_CC in
27934  [\\/]* | ?:[\\/]*)
27935  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27936  ;;
27937  *)
27938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27939for as_dir in $PATH
27940do
27941  IFS=$as_save_IFS
27942  test -z "$as_dir" && as_dir=.
27943    for ac_exec_ext in '' $ac_executable_extensions; do
27944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27945    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27947    break 2
27948  fi
27949done
27950  done
27951IFS=$as_save_IFS
27952
27953  ;;
27954esac
27955fi
27956TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27957if test -n "$TOOLS_DIR_CC"; then
27958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27959$as_echo "$TOOLS_DIR_CC" >&6; }
27960else
27961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27962$as_echo "no" >&6; }
27963fi
27964
27965
27966  test -n "$TOOLS_DIR_CC" && break
27967done
27968
27969      CC=$TOOLS_DIR_CC
27970      PATH="$PATH_save"
27971    fi
27972
27973    # AC_PATH_PROGS can't be run multiple times with the same variable,
27974    # so create a new name for this run.
27975    if test "x$CC" = x; then
27976      for ac_prog in $SEARCH_LIST
27977do
27978  # Extract the first word of "$ac_prog", so it can be a program name with args.
27979set dummy $ac_prog; ac_word=$2
27980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27981$as_echo_n "checking for $ac_word... " >&6; }
27982if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27983  $as_echo_n "(cached) " >&6
27984else
27985  case $POTENTIAL_CC in
27986  [\\/]* | ?:[\\/]*)
27987  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27988  ;;
27989  *)
27990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27991for as_dir in $PATH
27992do
27993  IFS=$as_save_IFS
27994  test -z "$as_dir" && as_dir=.
27995    for ac_exec_ext in '' $ac_executable_extensions; do
27996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27997    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27999    break 2
28000  fi
28001done
28002  done
28003IFS=$as_save_IFS
28004
28005  ;;
28006esac
28007fi
28008POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28009if test -n "$POTENTIAL_CC"; then
28010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28011$as_echo "$POTENTIAL_CC" >&6; }
28012else
28013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28014$as_echo "no" >&6; }
28015fi
28016
28017
28018  test -n "$POTENTIAL_CC" && break
28019done
28020
28021      CC=$POTENTIAL_CC
28022    fi
28023
28024    if test "x$CC" = x; then
28025
28026  # Print a helpful message on how to acquire the necessary build dependency.
28027  # devkit is the help tag: freetype, cups, pulse, alsa etc
28028  MISSING_DEPENDENCY=devkit
28029
28030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28031    cygwin_help $MISSING_DEPENDENCY
28032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28033    msys_help $MISSING_DEPENDENCY
28034  else
28035    PKGHANDLER_COMMAND=
28036
28037    case $PKGHANDLER in
28038      apt-get)
28039        apt_help     $MISSING_DEPENDENCY ;;
28040      yum)
28041        yum_help     $MISSING_DEPENDENCY ;;
28042      port)
28043        port_help    $MISSING_DEPENDENCY ;;
28044      pkgutil)
28045        pkgutil_help $MISSING_DEPENDENCY ;;
28046      pkgadd)
28047        pkgadd_help  $MISSING_DEPENDENCY ;;
28048    esac
28049
28050    if test "x$PKGHANDLER_COMMAND" != x; then
28051      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28052    fi
28053  fi
28054
28055      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28056    fi
28057  fi
28058
28059  # Now we have a compiler binary in CC. Make sure it's okay.
28060
28061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28062
28063  # First separate the path from the arguments. This will split at the first
28064  # space.
28065  complete="$CC"
28066  path="${complete%% *}"
28067  tmp="$complete EOL"
28068  arguments="${tmp#* }"
28069
28070  # Input might be given as Windows format, start by converting to
28071  # unix format.
28072  new_path=`$CYGPATH -u "$path"`
28073
28074  # Now try to locate executable using which
28075  new_path=`$WHICH "$new_path" 2> /dev/null`
28076  # bat and cmd files are not always considered executable in cygwin causing which
28077  # to not find them
28078  if test "x$new_path" = x \
28079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28081    new_path=`$CYGPATH -u "$path"`
28082  fi
28083  if test "x$new_path" = x; then
28084    # Oops. Which didn't find the executable.
28085    # The splitting of arguments from the executable at a space might have been incorrect,
28086    # since paths with space are more likely in Windows. Give it another try with the whole
28087    # argument.
28088    path="$complete"
28089    arguments="EOL"
28090    new_path=`$CYGPATH -u "$path"`
28091    new_path=`$WHICH "$new_path" 2> /dev/null`
28092    # bat and cmd files are not always considered executable in cygwin causing which
28093    # to not find them
28094    if test "x$new_path" = x \
28095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28097      new_path=`$CYGPATH -u "$path"`
28098    fi
28099    if test "x$new_path" = x; then
28100      # It's still not found. Now this is an unrecoverable error.
28101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28102$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28103      has_space=`$ECHO "$complete" | $GREP " "`
28104      if test "x$has_space" != x; then
28105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28107      fi
28108      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28109    fi
28110  fi
28111
28112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28115  # "foo.exe" is OK but "foo" is an error.
28116  #
28117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28118  # It is also a way to make sure we got the proper file name for the real test later on.
28119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28120  if test "x$test_shortpath" = x; then
28121    # Short path failed, file does not exist as specified.
28122    # Try adding .exe or .cmd
28123    if test -f "${new_path}.exe"; then
28124      input_to_shortpath="${new_path}.exe"
28125    elif test -f "${new_path}.cmd"; then
28126      input_to_shortpath="${new_path}.cmd"
28127    else
28128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28129$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28132      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28133    fi
28134  else
28135    input_to_shortpath="$new_path"
28136  fi
28137
28138  # Call helper function which possibly converts this using DOS-style short mode.
28139  # If so, the updated path is stored in $new_path.
28140  new_path="$input_to_shortpath"
28141
28142  input_path="$input_to_shortpath"
28143  # Check if we need to convert this using DOS-style short mode. If the path
28144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28145  # take no chances and rewrite it.
28146  # Note: m4 eats our [], so we need to use [ and ] instead.
28147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28148  if test "x$has_forbidden_chars" != x; then
28149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28153      # Going to short mode and back again did indeed matter. Since short mode is
28154      # case insensitive, let's make it lowercase to improve readability.
28155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28156      # Now convert it back to Unix-stile (cygpath)
28157      input_path=`$CYGPATH -u "$shortmode_path"`
28158      new_path="$input_path"
28159    fi
28160  fi
28161
28162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28163  if test "x$test_cygdrive_prefix" = x; then
28164    # As a simple fix, exclude /usr/bin since it's not a real path.
28165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28167      # a path prefixed by /cygdrive for fixpath to work.
28168      new_path="$CYGWIN_ROOT_PATH$input_path"
28169    fi
28170  fi
28171
28172  # remove trailing .exe if any
28173  new_path="${new_path/%.exe/}"
28174
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176
28177  # First separate the path from the arguments. This will split at the first
28178  # space.
28179  complete="$CC"
28180  path="${complete%% *}"
28181  tmp="$complete EOL"
28182  arguments="${tmp#* }"
28183
28184  # Input might be given as Windows format, start by converting to
28185  # unix format.
28186  new_path="$path"
28187
28188  windows_path="$new_path"
28189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28190    unix_path=`$CYGPATH -u "$windows_path"`
28191    new_path="$unix_path"
28192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28194    new_path="$unix_path"
28195  fi
28196
28197
28198  # Now try to locate executable using which
28199  new_path=`$WHICH "$new_path" 2> /dev/null`
28200
28201  if test "x$new_path" = x; then
28202    # Oops. Which didn't find the executable.
28203    # The splitting of arguments from the executable at a space might have been incorrect,
28204    # since paths with space are more likely in Windows. Give it another try with the whole
28205    # argument.
28206    path="$complete"
28207    arguments="EOL"
28208    new_path="$path"
28209
28210  windows_path="$new_path"
28211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28212    unix_path=`$CYGPATH -u "$windows_path"`
28213    new_path="$unix_path"
28214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28216    new_path="$unix_path"
28217  fi
28218
28219
28220    new_path=`$WHICH "$new_path" 2> /dev/null`
28221
28222    if test "x$new_path" = x; then
28223      # It's still not found. Now this is an unrecoverable error.
28224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28225$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28226      has_space=`$ECHO "$complete" | $GREP " "`
28227      if test "x$has_space" != x; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28230      fi
28231      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28232    fi
28233  fi
28234
28235  # Now new_path has a complete unix path to the binary
28236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28237    # Keep paths in /bin as-is, but remove trailing .exe if any
28238    new_path="${new_path/%.exe/}"
28239    # Do not save /bin paths to all_fixpath_prefixes!
28240  else
28241    # Not in mixed or Windows style, start by that.
28242    new_path=`cmd //c echo $new_path`
28243
28244  input_path="$new_path"
28245  # Check if we need to convert this using DOS-style short mode. If the path
28246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28247  # take no chances and rewrite it.
28248  # Note: m4 eats our [], so we need to use [ and ] instead.
28249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28250  if test "x$has_forbidden_chars" != x; then
28251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28253  fi
28254
28255    # Output is in $new_path
28256
28257  windows_path="$new_path"
28258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28259    unix_path=`$CYGPATH -u "$windows_path"`
28260    new_path="$unix_path"
28261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28263    new_path="$unix_path"
28264  fi
28265
28266    # remove trailing .exe if any
28267    new_path="${new_path/%.exe/}"
28268
28269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28271  fi
28272
28273  else
28274    # We're on a posix platform. Hooray! :)
28275    # First separate the path from the arguments. This will split at the first
28276    # space.
28277    complete="$CC"
28278    path="${complete%% *}"
28279    tmp="$complete EOL"
28280    arguments="${tmp#* }"
28281
28282    # Cannot rely on the command "which" here since it doesn't always work.
28283    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28284    if test -z "$is_absolute_path"; then
28285      # Path to executable is not absolute. Find it.
28286      IFS_save="$IFS"
28287      IFS=:
28288      for p in $PATH; do
28289        if test -f "$p/$path" && test -x "$p/$path"; then
28290          new_path="$p/$path"
28291          break
28292        fi
28293      done
28294      IFS="$IFS_save"
28295    else
28296      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
28297$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
28298      new_path="$path"
28299    fi
28300
28301    if test "x$new_path" = x; then
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28303$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28304      has_space=`$ECHO "$complete" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28308      fi
28309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28310    fi
28311  fi
28312
28313  # Now join together the path and the arguments once again
28314  if test "x$arguments" != xEOL; then
28315    new_complete="$new_path ${arguments% *}"
28316  else
28317    new_complete="$new_path"
28318  fi
28319
28320  if test "x$complete" != "x$new_complete"; then
28321    CC="$new_complete"
28322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28323$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28324  fi
28325
28326  TEST_COMPILER="$CC"
28327  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28328  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28329  if test "x$OPENJDK_BUILD_OS" != xaix; then
28330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28331$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28332
28333  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28334    # Follow a chain of symbolic links. Use readlink
28335    # where it exists, else fall back to horribly
28336    # complicated shell code.
28337    if test "x$READLINK_TESTED" != yes; then
28338      # On MacOSX there is a readlink tool with a different
28339      # purpose than the GNU readlink tool. Check the found readlink.
28340      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28341      if test "x$ISGNU" = x; then
28342        # A readlink that we do not know how to use.
28343        # Are there other non-GNU readlinks out there?
28344        READLINK_TESTED=yes
28345        READLINK=
28346      fi
28347    fi
28348
28349    if test "x$READLINK" != x; then
28350      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28351    else
28352      # Save the current directory for restoring afterwards
28353      STARTDIR=$PWD
28354      COUNTER=0
28355      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28356      sym_link_file=`$BASENAME $TEST_COMPILER`
28357      cd $sym_link_dir
28358      # Use -P flag to resolve symlinks in directories.
28359      cd `$THEPWDCMD -P`
28360      sym_link_dir=`$THEPWDCMD -P`
28361      # Resolve file symlinks
28362      while test $COUNTER -lt 20; do
28363        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28364        if test "x$ISLINK" == x; then
28365          # This is not a symbolic link! We are done!
28366          break
28367        fi
28368        # Again resolve directory symlinks since the target of the just found
28369        # link could be in a different directory
28370        cd `$DIRNAME $ISLINK`
28371        sym_link_dir=`$THEPWDCMD -P`
28372        sym_link_file=`$BASENAME $ISLINK`
28373        let COUNTER=COUNTER+1
28374      done
28375      cd $STARTDIR
28376      TEST_COMPILER=$sym_link_dir/$sym_link_file
28377    fi
28378  fi
28379
28380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28381$as_echo "$TEST_COMPILER" >&6; }
28382  fi
28383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28384$as_echo_n "checking if CC is disguised ccache... " >&6; }
28385
28386  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28387  if test "x$COMPILER_BASENAME" = "xccache"; then
28388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28389$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28390    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28391    # We want to control ccache invocation ourselves, so ignore this cc and try
28392    # searching again.
28393
28394    # Remove the path to the fake ccache cc from the PATH
28395    RETRY_COMPILER_SAVED_PATH="$PATH"
28396    COMPILER_DIRNAME=`$DIRNAME $CC`
28397    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28398
28399    # Try again looking for our compiler
28400    if test -n "$ac_tool_prefix"; then
28401  for ac_prog in $COMPILER_CHECK_LIST
28402  do
28403    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28404set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28406$as_echo_n "checking for $ac_word... " >&6; }
28407if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28408  $as_echo_n "(cached) " >&6
28409else
28410  if test -n "$PROPER_COMPILER_CC"; then
28411  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28412else
28413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28414for as_dir in $PATH
28415do
28416  IFS=$as_save_IFS
28417  test -z "$as_dir" && as_dir=.
28418    for ac_exec_ext in '' $ac_executable_extensions; do
28419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28420    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28422    break 2
28423  fi
28424done
28425  done
28426IFS=$as_save_IFS
28427
28428fi
28429fi
28430PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28431if test -n "$PROPER_COMPILER_CC"; then
28432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28433$as_echo "$PROPER_COMPILER_CC" >&6; }
28434else
28435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28436$as_echo "no" >&6; }
28437fi
28438
28439
28440    test -n "$PROPER_COMPILER_CC" && break
28441  done
28442fi
28443if test -z "$PROPER_COMPILER_CC"; then
28444  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28445  for ac_prog in $COMPILER_CHECK_LIST
28446do
28447  # Extract the first word of "$ac_prog", so it can be a program name with args.
28448set dummy $ac_prog; ac_word=$2
28449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28450$as_echo_n "checking for $ac_word... " >&6; }
28451if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28452  $as_echo_n "(cached) " >&6
28453else
28454  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28455  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28456else
28457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28458for as_dir in $PATH
28459do
28460  IFS=$as_save_IFS
28461  test -z "$as_dir" && as_dir=.
28462    for ac_exec_ext in '' $ac_executable_extensions; do
28463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28464    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28466    break 2
28467  fi
28468done
28469  done
28470IFS=$as_save_IFS
28471
28472fi
28473fi
28474ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28475if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28477$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28478else
28479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28480$as_echo "no" >&6; }
28481fi
28482
28483
28484  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28485done
28486
28487  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28488    PROPER_COMPILER_CC=""
28489  else
28490    case $cross_compiling:$ac_tool_warned in
28491yes:)
28492{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28493$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28494ac_tool_warned=yes ;;
28495esac
28496    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28497  fi
28498fi
28499
28500
28501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # First separate the path from the arguments. This will split at the first
28504  # space.
28505  complete="$PROPER_COMPILER_CC"
28506  path="${complete%% *}"
28507  tmp="$complete EOL"
28508  arguments="${tmp#* }"
28509
28510  # Input might be given as Windows format, start by converting to
28511  # unix format.
28512  new_path=`$CYGPATH -u "$path"`
28513
28514  # Now try to locate executable using which
28515  new_path=`$WHICH "$new_path" 2> /dev/null`
28516  # bat and cmd files are not always considered executable in cygwin causing which
28517  # to not find them
28518  if test "x$new_path" = x \
28519      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28520      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28521    new_path=`$CYGPATH -u "$path"`
28522  fi
28523  if test "x$new_path" = x; then
28524    # Oops. Which didn't find the executable.
28525    # The splitting of arguments from the executable at a space might have been incorrect,
28526    # since paths with space are more likely in Windows. Give it another try with the whole
28527    # argument.
28528    path="$complete"
28529    arguments="EOL"
28530    new_path=`$CYGPATH -u "$path"`
28531    new_path=`$WHICH "$new_path" 2> /dev/null`
28532    # bat and cmd files are not always considered executable in cygwin causing which
28533    # to not find them
28534    if test "x$new_path" = x \
28535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28537      new_path=`$CYGPATH -u "$path"`
28538    fi
28539    if test "x$new_path" = x; then
28540      # It's still not found. Now this is an unrecoverable error.
28541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28542$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28543      has_space=`$ECHO "$complete" | $GREP " "`
28544      if test "x$has_space" != x; then
28545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28547      fi
28548      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28549    fi
28550  fi
28551
28552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28555  # "foo.exe" is OK but "foo" is an error.
28556  #
28557  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28558  # It is also a way to make sure we got the proper file name for the real test later on.
28559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28560  if test "x$test_shortpath" = x; then
28561    # Short path failed, file does not exist as specified.
28562    # Try adding .exe or .cmd
28563    if test -f "${new_path}.exe"; then
28564      input_to_shortpath="${new_path}.exe"
28565    elif test -f "${new_path}.cmd"; then
28566      input_to_shortpath="${new_path}.cmd"
28567    else
28568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28569$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28570      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28571$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28572      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28573    fi
28574  else
28575    input_to_shortpath="$new_path"
28576  fi
28577
28578  # Call helper function which possibly converts this using DOS-style short mode.
28579  # If so, the updated path is stored in $new_path.
28580  new_path="$input_to_shortpath"
28581
28582  input_path="$input_to_shortpath"
28583  # Check if we need to convert this using DOS-style short mode. If the path
28584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28585  # take no chances and rewrite it.
28586  # Note: m4 eats our [], so we need to use [ and ] instead.
28587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28588  if test "x$has_forbidden_chars" != x; then
28589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28593      # Going to short mode and back again did indeed matter. Since short mode is
28594      # case insensitive, let's make it lowercase to improve readability.
28595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28596      # Now convert it back to Unix-stile (cygpath)
28597      input_path=`$CYGPATH -u "$shortmode_path"`
28598      new_path="$input_path"
28599    fi
28600  fi
28601
28602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28603  if test "x$test_cygdrive_prefix" = x; then
28604    # As a simple fix, exclude /usr/bin since it's not a real path.
28605    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28607      # a path prefixed by /cygdrive for fixpath to work.
28608      new_path="$CYGWIN_ROOT_PATH$input_path"
28609    fi
28610  fi
28611
28612  # remove trailing .exe if any
28613  new_path="${new_path/%.exe/}"
28614
28615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28616
28617  # First separate the path from the arguments. This will split at the first
28618  # space.
28619  complete="$PROPER_COMPILER_CC"
28620  path="${complete%% *}"
28621  tmp="$complete EOL"
28622  arguments="${tmp#* }"
28623
28624  # Input might be given as Windows format, start by converting to
28625  # unix format.
28626  new_path="$path"
28627
28628  windows_path="$new_path"
28629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28630    unix_path=`$CYGPATH -u "$windows_path"`
28631    new_path="$unix_path"
28632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28634    new_path="$unix_path"
28635  fi
28636
28637
28638  # Now try to locate executable using which
28639  new_path=`$WHICH "$new_path" 2> /dev/null`
28640
28641  if test "x$new_path" = x; then
28642    # Oops. Which didn't find the executable.
28643    # The splitting of arguments from the executable at a space might have been incorrect,
28644    # since paths with space are more likely in Windows. Give it another try with the whole
28645    # argument.
28646    path="$complete"
28647    arguments="EOL"
28648    new_path="$path"
28649
28650  windows_path="$new_path"
28651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28652    unix_path=`$CYGPATH -u "$windows_path"`
28653    new_path="$unix_path"
28654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28656    new_path="$unix_path"
28657  fi
28658
28659
28660    new_path=`$WHICH "$new_path" 2> /dev/null`
28661
28662    if test "x$new_path" = x; then
28663      # It's still not found. Now this is an unrecoverable error.
28664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28665$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28666      has_space=`$ECHO "$complete" | $GREP " "`
28667      if test "x$has_space" != x; then
28668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28670      fi
28671      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28672    fi
28673  fi
28674
28675  # Now new_path has a complete unix path to the binary
28676  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28677    # Keep paths in /bin as-is, but remove trailing .exe if any
28678    new_path="${new_path/%.exe/}"
28679    # Do not save /bin paths to all_fixpath_prefixes!
28680  else
28681    # Not in mixed or Windows style, start by that.
28682    new_path=`cmd //c echo $new_path`
28683
28684  input_path="$new_path"
28685  # Check if we need to convert this using DOS-style short mode. If the path
28686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28687  # take no chances and rewrite it.
28688  # Note: m4 eats our [], so we need to use [ and ] instead.
28689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28690  if test "x$has_forbidden_chars" != x; then
28691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28693  fi
28694
28695    # Output is in $new_path
28696
28697  windows_path="$new_path"
28698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28699    unix_path=`$CYGPATH -u "$windows_path"`
28700    new_path="$unix_path"
28701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28703    new_path="$unix_path"
28704  fi
28705
28706    # remove trailing .exe if any
28707    new_path="${new_path/%.exe/}"
28708
28709    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28710    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28711  fi
28712
28713  else
28714    # We're on a posix platform. Hooray! :)
28715    # First separate the path from the arguments. This will split at the first
28716    # space.
28717    complete="$PROPER_COMPILER_CC"
28718    path="${complete%% *}"
28719    tmp="$complete EOL"
28720    arguments="${tmp#* }"
28721
28722    # Cannot rely on the command "which" here since it doesn't always work.
28723    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28724    if test -z "$is_absolute_path"; then
28725      # Path to executable is not absolute. Find it.
28726      IFS_save="$IFS"
28727      IFS=:
28728      for p in $PATH; do
28729        if test -f "$p/$path" && test -x "$p/$path"; then
28730          new_path="$p/$path"
28731          break
28732        fi
28733      done
28734      IFS="$IFS_save"
28735    else
28736      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
28737$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
28738      new_path="$path"
28739    fi
28740
28741    if test "x$new_path" = x; then
28742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28743$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28744      has_space=`$ECHO "$complete" | $GREP " "`
28745      if test "x$has_space" != x; then
28746        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28748      fi
28749      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28750    fi
28751  fi
28752
28753  # Now join together the path and the arguments once again
28754  if test "x$arguments" != xEOL; then
28755    new_complete="$new_path ${arguments% *}"
28756  else
28757    new_complete="$new_path"
28758  fi
28759
28760  if test "x$complete" != "x$new_complete"; then
28761    PROPER_COMPILER_CC="$new_complete"
28762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28763$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28764  fi
28765
28766    PATH="$RETRY_COMPILER_SAVED_PATH"
28767
28768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28769$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28770
28771  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28772    # Follow a chain of symbolic links. Use readlink
28773    # where it exists, else fall back to horribly
28774    # complicated shell code.
28775    if test "x$READLINK_TESTED" != yes; then
28776      # On MacOSX there is a readlink tool with a different
28777      # purpose than the GNU readlink tool. Check the found readlink.
28778      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28779      if test "x$ISGNU" = x; then
28780        # A readlink that we do not know how to use.
28781        # Are there other non-GNU readlinks out there?
28782        READLINK_TESTED=yes
28783        READLINK=
28784      fi
28785    fi
28786
28787    if test "x$READLINK" != x; then
28788      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28789    else
28790      # Save the current directory for restoring afterwards
28791      STARTDIR=$PWD
28792      COUNTER=0
28793      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28794      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28795      cd $sym_link_dir
28796      # Use -P flag to resolve symlinks in directories.
28797      cd `$THEPWDCMD -P`
28798      sym_link_dir=`$THEPWDCMD -P`
28799      # Resolve file symlinks
28800      while test $COUNTER -lt 20; do
28801        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28802        if test "x$ISLINK" == x; then
28803          # This is not a symbolic link! We are done!
28804          break
28805        fi
28806        # Again resolve directory symlinks since the target of the just found
28807        # link could be in a different directory
28808        cd `$DIRNAME $ISLINK`
28809        sym_link_dir=`$THEPWDCMD -P`
28810        sym_link_file=`$BASENAME $ISLINK`
28811        let COUNTER=COUNTER+1
28812      done
28813      cd $STARTDIR
28814      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28815    fi
28816  fi
28817
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28819$as_echo "$PROPER_COMPILER_CC" >&6; }
28820    CC="$PROPER_COMPILER_CC"
28821  else
28822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28823$as_echo "no, keeping CC" >&6; }
28824  fi
28825
28826
28827  COMPILER=$CC
28828  COMPILER_NAME=$COMPILER_NAME
28829
28830  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28831    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
28832    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
28833    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28834    if test $? -ne 0; then
28835      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
28836
28837      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
28838$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
28839      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
28840$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
28841      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28842    else
28843      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
28844      COMPILER_VENDOR="Sun Studio"
28845    fi
28846  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
28847      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
28848      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
28849      if test $? -ne 0; then
28850        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
28851      else
28852        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
28853        COMPILER_VENDOR='IBM'
28854      fi
28855  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
28856    # First line typically looks something like:
28857    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28858    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28859    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
28860    COMPILER_VENDOR="Microsoft CL.EXE"
28861    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
28862    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
28863      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
28864        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
28865      fi
28866    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
28867      if test "x$COMPILER_CPU_TEST" != "xx64"; then
28868        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
28869      fi
28870    fi
28871  else
28872    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
28873    # Check that this is likely to be GCC.
28874    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
28875    if test $? -ne 0; then
28876      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
28877$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
28878      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
28879$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
28880      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28881    fi
28882
28883    # First line typically looks something like:
28884    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
28885    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
28886    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
28887  fi
28888  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
28889  CC_VERSION="$COMPILER_VERSION"
28890  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
28891  CC_VENDOR="$COMPILER_VENDOR"
28892
28893  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
28894$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
28895
28896
28897  # Now that we have resolved CC ourself, let autoconf have its go at it
28898  ac_ext=c
28899ac_cpp='$CPP $CPPFLAGS'
28900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28902ac_compiler_gnu=$ac_cv_c_compiler_gnu
28903if test -n "$ac_tool_prefix"; then
28904  for ac_prog in $CC
28905  do
28906    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28907set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28909$as_echo_n "checking for $ac_word... " >&6; }
28910if ${ac_cv_prog_CC+:} false; then :
28911  $as_echo_n "(cached) " >&6
28912else
28913  if test -n "$CC"; then
28914  ac_cv_prog_CC="$CC" # Let the user override the test.
28915else
28916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28917for as_dir in $PATH
28918do
28919  IFS=$as_save_IFS
28920  test -z "$as_dir" && as_dir=.
28921    for ac_exec_ext in '' $ac_executable_extensions; do
28922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28923    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28925    break 2
28926  fi
28927done
28928  done
28929IFS=$as_save_IFS
28930
28931fi
28932fi
28933CC=$ac_cv_prog_CC
28934if test -n "$CC"; then
28935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28936$as_echo "$CC" >&6; }
28937else
28938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28939$as_echo "no" >&6; }
28940fi
28941
28942
28943    test -n "$CC" && break
28944  done
28945fi
28946if test -z "$CC"; then
28947  ac_ct_CC=$CC
28948  for ac_prog in $CC
28949do
28950  # Extract the first word of "$ac_prog", so it can be a program name with args.
28951set dummy $ac_prog; ac_word=$2
28952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28953$as_echo_n "checking for $ac_word... " >&6; }
28954if ${ac_cv_prog_ac_ct_CC+:} false; then :
28955  $as_echo_n "(cached) " >&6
28956else
28957  if test -n "$ac_ct_CC"; then
28958  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28959else
28960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28961for as_dir in $PATH
28962do
28963  IFS=$as_save_IFS
28964  test -z "$as_dir" && as_dir=.
28965    for ac_exec_ext in '' $ac_executable_extensions; do
28966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28967    ac_cv_prog_ac_ct_CC="$ac_prog"
28968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28969    break 2
28970  fi
28971done
28972  done
28973IFS=$as_save_IFS
28974
28975fi
28976fi
28977ac_ct_CC=$ac_cv_prog_ac_ct_CC
28978if test -n "$ac_ct_CC"; then
28979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28980$as_echo "$ac_ct_CC" >&6; }
28981else
28982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28983$as_echo "no" >&6; }
28984fi
28985
28986
28987  test -n "$ac_ct_CC" && break
28988done
28989
28990  if test "x$ac_ct_CC" = x; then
28991    CC=""
28992  else
28993    case $cross_compiling:$ac_tool_warned in
28994yes:)
28995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28997ac_tool_warned=yes ;;
28998esac
28999    CC=$ac_ct_CC
29000  fi
29001fi
29002
29003
29004test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29006as_fn_error $? "no acceptable C compiler found in \$PATH
29007See \`config.log' for more details" "$LINENO" 5; }
29008
29009# Provide some information about the compiler.
29010$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29011set X $ac_compile
29012ac_compiler=$2
29013for ac_option in --version -v -V -qversion; do
29014  { { ac_try="$ac_compiler $ac_option >&5"
29015case "(($ac_try" in
29016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29017  *) ac_try_echo=$ac_try;;
29018esac
29019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29020$as_echo "$ac_try_echo"; } >&5
29021  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29022  ac_status=$?
29023  if test -s conftest.err; then
29024    sed '10a\
29025... rest of stderr output deleted ...
29026         10q' conftest.err >conftest.er1
29027    cat conftest.er1 >&5
29028  fi
29029  rm -f conftest.er1 conftest.err
29030  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29031  test $ac_status = 0; }
29032done
29033
29034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035/* end confdefs.h.  */
29036
29037int
29038main ()
29039{
29040
29041  ;
29042  return 0;
29043}
29044_ACEOF
29045ac_clean_files_save=$ac_clean_files
29046ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29047# Try to create an executable without -o first, disregard a.out.
29048# It will help us diagnose broken compilers, and finding out an intuition
29049# of exeext.
29050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29051$as_echo_n "checking whether the C compiler works... " >&6; }
29052ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29053
29054# The possible output files:
29055ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29056
29057ac_rmfiles=
29058for ac_file in $ac_files
29059do
29060  case $ac_file in
29061    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29062    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29063  esac
29064done
29065rm -f $ac_rmfiles
29066
29067if { { ac_try="$ac_link_default"
29068case "(($ac_try" in
29069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29070  *) ac_try_echo=$ac_try;;
29071esac
29072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29073$as_echo "$ac_try_echo"; } >&5
29074  (eval "$ac_link_default") 2>&5
29075  ac_status=$?
29076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29077  test $ac_status = 0; }; then :
29078  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29079# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29080# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29081# so that the user can short-circuit this test for compilers unknown to
29082# Autoconf.
29083for ac_file in $ac_files ''
29084do
29085  test -f "$ac_file" || continue
29086  case $ac_file in
29087    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29088	;;
29089    [ab].out )
29090	# We found the default executable, but exeext='' is most
29091	# certainly right.
29092	break;;
29093    *.* )
29094	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29095	then :; else
29096	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29097	fi
29098	# We set ac_cv_exeext here because the later test for it is not
29099	# safe: cross compilers may not add the suffix if given an `-o'
29100	# argument, so we may need to know it at that point already.
29101	# Even if this section looks crufty: it has the advantage of
29102	# actually working.
29103	break;;
29104    * )
29105	break;;
29106  esac
29107done
29108test "$ac_cv_exeext" = no && ac_cv_exeext=
29109
29110else
29111  ac_file=''
29112fi
29113if test -z "$ac_file"; then :
29114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29115$as_echo "no" >&6; }
29116$as_echo "$as_me: failed program was:" >&5
29117sed 's/^/| /' conftest.$ac_ext >&5
29118
29119{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29121as_fn_error 77 "C compiler cannot create executables
29122See \`config.log' for more details" "$LINENO" 5; }
29123else
29124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29125$as_echo "yes" >&6; }
29126fi
29127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29128$as_echo_n "checking for C compiler default output file name... " >&6; }
29129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29130$as_echo "$ac_file" >&6; }
29131ac_exeext=$ac_cv_exeext
29132
29133rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29134ac_clean_files=$ac_clean_files_save
29135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29136$as_echo_n "checking for suffix of executables... " >&6; }
29137if { { ac_try="$ac_link"
29138case "(($ac_try" in
29139  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29140  *) ac_try_echo=$ac_try;;
29141esac
29142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29143$as_echo "$ac_try_echo"; } >&5
29144  (eval "$ac_link") 2>&5
29145  ac_status=$?
29146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29147  test $ac_status = 0; }; then :
29148  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29149# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29150# work properly (i.e., refer to `conftest.exe'), while it won't with
29151# `rm'.
29152for ac_file in conftest.exe conftest conftest.*; do
29153  test -f "$ac_file" || continue
29154  case $ac_file in
29155    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29156    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29157	  break;;
29158    * ) break;;
29159  esac
29160done
29161else
29162  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29164as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29165See \`config.log' for more details" "$LINENO" 5; }
29166fi
29167rm -f conftest conftest$ac_cv_exeext
29168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29169$as_echo "$ac_cv_exeext" >&6; }
29170
29171rm -f conftest.$ac_ext
29172EXEEXT=$ac_cv_exeext
29173ac_exeext=$EXEEXT
29174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175/* end confdefs.h.  */
29176#include <stdio.h>
29177int
29178main ()
29179{
29180FILE *f = fopen ("conftest.out", "w");
29181 return ferror (f) || fclose (f) != 0;
29182
29183  ;
29184  return 0;
29185}
29186_ACEOF
29187ac_clean_files="$ac_clean_files conftest.out"
29188# Check that the compiler produces executables we can run.  If not, either
29189# the compiler is broken, or we cross compile.
29190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29191$as_echo_n "checking whether we are cross compiling... " >&6; }
29192if test "$cross_compiling" != yes; then
29193  { { ac_try="$ac_link"
29194case "(($ac_try" in
29195  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29196  *) ac_try_echo=$ac_try;;
29197esac
29198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29199$as_echo "$ac_try_echo"; } >&5
29200  (eval "$ac_link") 2>&5
29201  ac_status=$?
29202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29203  test $ac_status = 0; }
29204  if { ac_try='./conftest$ac_cv_exeext'
29205  { { case "(($ac_try" in
29206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29207  *) ac_try_echo=$ac_try;;
29208esac
29209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29210$as_echo "$ac_try_echo"; } >&5
29211  (eval "$ac_try") 2>&5
29212  ac_status=$?
29213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29214  test $ac_status = 0; }; }; then
29215    cross_compiling=no
29216  else
29217    if test "$cross_compiling" = maybe; then
29218	cross_compiling=yes
29219    else
29220	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29222as_fn_error $? "cannot run C compiled programs.
29223If you meant to cross compile, use \`--host'.
29224See \`config.log' for more details" "$LINENO" 5; }
29225    fi
29226  fi
29227fi
29228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29229$as_echo "$cross_compiling" >&6; }
29230
29231rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29232ac_clean_files=$ac_clean_files_save
29233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29234$as_echo_n "checking for suffix of object files... " >&6; }
29235if ${ac_cv_objext+:} false; then :
29236  $as_echo_n "(cached) " >&6
29237else
29238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29239/* end confdefs.h.  */
29240
29241int
29242main ()
29243{
29244
29245  ;
29246  return 0;
29247}
29248_ACEOF
29249rm -f conftest.o conftest.obj
29250if { { ac_try="$ac_compile"
29251case "(($ac_try" in
29252  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29253  *) ac_try_echo=$ac_try;;
29254esac
29255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29256$as_echo "$ac_try_echo"; } >&5
29257  (eval "$ac_compile") 2>&5
29258  ac_status=$?
29259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29260  test $ac_status = 0; }; then :
29261  for ac_file in conftest.o conftest.obj conftest.*; do
29262  test -f "$ac_file" || continue;
29263  case $ac_file in
29264    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29265    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29266       break;;
29267  esac
29268done
29269else
29270  $as_echo "$as_me: failed program was:" >&5
29271sed 's/^/| /' conftest.$ac_ext >&5
29272
29273{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29275as_fn_error $? "cannot compute suffix of object files: cannot compile
29276See \`config.log' for more details" "$LINENO" 5; }
29277fi
29278rm -f conftest.$ac_cv_objext conftest.$ac_ext
29279fi
29280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29281$as_echo "$ac_cv_objext" >&6; }
29282OBJEXT=$ac_cv_objext
29283ac_objext=$OBJEXT
29284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29285$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29286if ${ac_cv_c_compiler_gnu+:} false; then :
29287  $as_echo_n "(cached) " >&6
29288else
29289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29290/* end confdefs.h.  */
29291
29292int
29293main ()
29294{
29295#ifndef __GNUC__
29296       choke me
29297#endif
29298
29299  ;
29300  return 0;
29301}
29302_ACEOF
29303if ac_fn_c_try_compile "$LINENO"; then :
29304  ac_compiler_gnu=yes
29305else
29306  ac_compiler_gnu=no
29307fi
29308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29309ac_cv_c_compiler_gnu=$ac_compiler_gnu
29310
29311fi
29312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29313$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29314if test $ac_compiler_gnu = yes; then
29315  GCC=yes
29316else
29317  GCC=
29318fi
29319ac_test_CFLAGS=${CFLAGS+set}
29320ac_save_CFLAGS=$CFLAGS
29321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29322$as_echo_n "checking whether $CC accepts -g... " >&6; }
29323if ${ac_cv_prog_cc_g+:} false; then :
29324  $as_echo_n "(cached) " >&6
29325else
29326  ac_save_c_werror_flag=$ac_c_werror_flag
29327   ac_c_werror_flag=yes
29328   ac_cv_prog_cc_g=no
29329   CFLAGS="-g"
29330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29331/* end confdefs.h.  */
29332
29333int
29334main ()
29335{
29336
29337  ;
29338  return 0;
29339}
29340_ACEOF
29341if ac_fn_c_try_compile "$LINENO"; then :
29342  ac_cv_prog_cc_g=yes
29343else
29344  CFLAGS=""
29345      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29346/* end confdefs.h.  */
29347
29348int
29349main ()
29350{
29351
29352  ;
29353  return 0;
29354}
29355_ACEOF
29356if ac_fn_c_try_compile "$LINENO"; then :
29357
29358else
29359  ac_c_werror_flag=$ac_save_c_werror_flag
29360	 CFLAGS="-g"
29361	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362/* end confdefs.h.  */
29363
29364int
29365main ()
29366{
29367
29368  ;
29369  return 0;
29370}
29371_ACEOF
29372if ac_fn_c_try_compile "$LINENO"; then :
29373  ac_cv_prog_cc_g=yes
29374fi
29375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29376fi
29377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29378fi
29379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29380   ac_c_werror_flag=$ac_save_c_werror_flag
29381fi
29382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29383$as_echo "$ac_cv_prog_cc_g" >&6; }
29384if test "$ac_test_CFLAGS" = set; then
29385  CFLAGS=$ac_save_CFLAGS
29386elif test $ac_cv_prog_cc_g = yes; then
29387  if test "$GCC" = yes; then
29388    CFLAGS="-g -O2"
29389  else
29390    CFLAGS="-g"
29391  fi
29392else
29393  if test "$GCC" = yes; then
29394    CFLAGS="-O2"
29395  else
29396    CFLAGS=
29397  fi
29398fi
29399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29400$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29401if ${ac_cv_prog_cc_c89+:} false; then :
29402  $as_echo_n "(cached) " >&6
29403else
29404  ac_cv_prog_cc_c89=no
29405ac_save_CC=$CC
29406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29407/* end confdefs.h.  */
29408#include <stdarg.h>
29409#include <stdio.h>
29410struct stat;
29411/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29412struct buf { int x; };
29413FILE * (*rcsopen) (struct buf *, struct stat *, int);
29414static char *e (p, i)
29415     char **p;
29416     int i;
29417{
29418  return p[i];
29419}
29420static char *f (char * (*g) (char **, int), char **p, ...)
29421{
29422  char *s;
29423  va_list v;
29424  va_start (v,p);
29425  s = g (p, va_arg (v,int));
29426  va_end (v);
29427  return s;
29428}
29429
29430/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29431   function prototypes and stuff, but not '\xHH' hex character constants.
29432   These don't provoke an error unfortunately, instead are silently treated
29433   as 'x'.  The following induces an error, until -std is added to get
29434   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29435   array size at least.  It's necessary to write '\x00'==0 to get something
29436   that's true only with -std.  */
29437int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29438
29439/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29440   inside strings and character constants.  */
29441#define FOO(x) 'x'
29442int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29443
29444int test (int i, double x);
29445struct s1 {int (*f) (int a);};
29446struct s2 {int (*f) (double a);};
29447int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29448int argc;
29449char **argv;
29450int
29451main ()
29452{
29453return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29454  ;
29455  return 0;
29456}
29457_ACEOF
29458for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29459	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29460do
29461  CC="$ac_save_CC $ac_arg"
29462  if ac_fn_c_try_compile "$LINENO"; then :
29463  ac_cv_prog_cc_c89=$ac_arg
29464fi
29465rm -f core conftest.err conftest.$ac_objext
29466  test "x$ac_cv_prog_cc_c89" != "xno" && break
29467done
29468rm -f conftest.$ac_ext
29469CC=$ac_save_CC
29470
29471fi
29472# AC_CACHE_VAL
29473case "x$ac_cv_prog_cc_c89" in
29474  x)
29475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29476$as_echo "none needed" >&6; } ;;
29477  xno)
29478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29479$as_echo "unsupported" >&6; } ;;
29480  *)
29481    CC="$CC $ac_cv_prog_cc_c89"
29482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29483$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29484esac
29485if test "x$ac_cv_prog_cc_c89" != xno; then :
29486
29487fi
29488
29489ac_ext=cpp
29490ac_cpp='$CXXCPP $CPPFLAGS'
29491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29494
29495
29496  # Option used to tell the compiler whether to create 32- or 64-bit executables
29497  # Notice that CC contains the full compiler path at this point.
29498  case $CC in
29499    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
29500    *)      COMPILER_TARGET_BITS_FLAG="-m";;
29501  esac
29502
29503
29504  ### Locate C++ compiler (CXX)
29505
29506  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29507    COMPILER_CHECK_LIST="cl"
29508  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29509    COMPILER_CHECK_LIST="CC g++"
29510  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29511    # Do not probe for CC on AIX .
29512    COMPILER_CHECK_LIST="xlC_r"
29513  else
29514    COMPILER_CHECK_LIST="g++ CC"
29515  fi
29516
29517
29518  COMPILER_NAME=C++
29519  SEARCH_LIST="$COMPILER_CHECK_LIST"
29520
29521  if test "x$CXX" != x; then
29522    # User has supplied compiler name already, always let that override.
29523    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29524$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29525    if test "x`basename $CXX`" = "x$CXX"; then
29526      # A command without a complete path is provided, search $PATH.
29527
29528      for ac_prog in $CXX
29529do
29530  # Extract the first word of "$ac_prog", so it can be a program name with args.
29531set dummy $ac_prog; ac_word=$2
29532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29533$as_echo_n "checking for $ac_word... " >&6; }
29534if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29535  $as_echo_n "(cached) " >&6
29536else
29537  case $POTENTIAL_CXX in
29538  [\\/]* | ?:[\\/]*)
29539  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29540  ;;
29541  *)
29542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29543for as_dir in $PATH
29544do
29545  IFS=$as_save_IFS
29546  test -z "$as_dir" && as_dir=.
29547    for ac_exec_ext in '' $ac_executable_extensions; do
29548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29549    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29551    break 2
29552  fi
29553done
29554  done
29555IFS=$as_save_IFS
29556
29557  ;;
29558esac
29559fi
29560POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29561if test -n "$POTENTIAL_CXX"; then
29562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29563$as_echo "$POTENTIAL_CXX" >&6; }
29564else
29565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29566$as_echo "no" >&6; }
29567fi
29568
29569
29570  test -n "$POTENTIAL_CXX" && break
29571done
29572
29573      if test "x$POTENTIAL_CXX" != x; then
29574        CXX=$POTENTIAL_CXX
29575      else
29576        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29577      fi
29578    else
29579      # Otherwise it might already be a complete path
29580      if test ! -x "$CXX"; then
29581        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29582      fi
29583    fi
29584  else
29585    # No user supplied value. Locate compiler ourselves
29586    CXX=
29587    # If TOOLS_DIR is set, check for all compiler names in there first
29588    # before checking the rest of the PATH.
29589    if test -n "$TOOLS_DIR"; then
29590      PATH_save="$PATH"
29591      PATH="$TOOLS_DIR"
29592      for ac_prog in $SEARCH_LIST
29593do
29594  # Extract the first word of "$ac_prog", so it can be a program name with args.
29595set dummy $ac_prog; ac_word=$2
29596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29597$as_echo_n "checking for $ac_word... " >&6; }
29598if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29599  $as_echo_n "(cached) " >&6
29600else
29601  case $TOOLS_DIR_CXX in
29602  [\\/]* | ?:[\\/]*)
29603  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29604  ;;
29605  *)
29606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29607for as_dir in $PATH
29608do
29609  IFS=$as_save_IFS
29610  test -z "$as_dir" && as_dir=.
29611    for ac_exec_ext in '' $ac_executable_extensions; do
29612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29613    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29615    break 2
29616  fi
29617done
29618  done
29619IFS=$as_save_IFS
29620
29621  ;;
29622esac
29623fi
29624TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29625if test -n "$TOOLS_DIR_CXX"; then
29626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29627$as_echo "$TOOLS_DIR_CXX" >&6; }
29628else
29629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29630$as_echo "no" >&6; }
29631fi
29632
29633
29634  test -n "$TOOLS_DIR_CXX" && break
29635done
29636
29637      CXX=$TOOLS_DIR_CXX
29638      PATH="$PATH_save"
29639    fi
29640
29641    # AC_PATH_PROGS can't be run multiple times with the same variable,
29642    # so create a new name for this run.
29643    if test "x$CXX" = x; then
29644      for ac_prog in $SEARCH_LIST
29645do
29646  # Extract the first word of "$ac_prog", so it can be a program name with args.
29647set dummy $ac_prog; ac_word=$2
29648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29649$as_echo_n "checking for $ac_word... " >&6; }
29650if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29651  $as_echo_n "(cached) " >&6
29652else
29653  case $POTENTIAL_CXX in
29654  [\\/]* | ?:[\\/]*)
29655  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29656  ;;
29657  *)
29658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29659for as_dir in $PATH
29660do
29661  IFS=$as_save_IFS
29662  test -z "$as_dir" && as_dir=.
29663    for ac_exec_ext in '' $ac_executable_extensions; do
29664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29665    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29667    break 2
29668  fi
29669done
29670  done
29671IFS=$as_save_IFS
29672
29673  ;;
29674esac
29675fi
29676POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29677if test -n "$POTENTIAL_CXX"; then
29678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29679$as_echo "$POTENTIAL_CXX" >&6; }
29680else
29681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29682$as_echo "no" >&6; }
29683fi
29684
29685
29686  test -n "$POTENTIAL_CXX" && break
29687done
29688
29689      CXX=$POTENTIAL_CXX
29690    fi
29691
29692    if test "x$CXX" = x; then
29693
29694  # Print a helpful message on how to acquire the necessary build dependency.
29695  # devkit is the help tag: freetype, cups, pulse, alsa etc
29696  MISSING_DEPENDENCY=devkit
29697
29698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29699    cygwin_help $MISSING_DEPENDENCY
29700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29701    msys_help $MISSING_DEPENDENCY
29702  else
29703    PKGHANDLER_COMMAND=
29704
29705    case $PKGHANDLER in
29706      apt-get)
29707        apt_help     $MISSING_DEPENDENCY ;;
29708      yum)
29709        yum_help     $MISSING_DEPENDENCY ;;
29710      port)
29711        port_help    $MISSING_DEPENDENCY ;;
29712      pkgutil)
29713        pkgutil_help $MISSING_DEPENDENCY ;;
29714      pkgadd)
29715        pkgadd_help  $MISSING_DEPENDENCY ;;
29716    esac
29717
29718    if test "x$PKGHANDLER_COMMAND" != x; then
29719      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29720    fi
29721  fi
29722
29723      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29724    fi
29725  fi
29726
29727  # Now we have a compiler binary in CXX. Make sure it's okay.
29728
29729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29730
29731  # First separate the path from the arguments. This will split at the first
29732  # space.
29733  complete="$CXX"
29734  path="${complete%% *}"
29735  tmp="$complete EOL"
29736  arguments="${tmp#* }"
29737
29738  # Input might be given as Windows format, start by converting to
29739  # unix format.
29740  new_path=`$CYGPATH -u "$path"`
29741
29742  # Now try to locate executable using which
29743  new_path=`$WHICH "$new_path" 2> /dev/null`
29744  # bat and cmd files are not always considered executable in cygwin causing which
29745  # to not find them
29746  if test "x$new_path" = x \
29747      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29748      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29749    new_path=`$CYGPATH -u "$path"`
29750  fi
29751  if test "x$new_path" = x; then
29752    # Oops. Which didn't find the executable.
29753    # The splitting of arguments from the executable at a space might have been incorrect,
29754    # since paths with space are more likely in Windows. Give it another try with the whole
29755    # argument.
29756    path="$complete"
29757    arguments="EOL"
29758    new_path=`$CYGPATH -u "$path"`
29759    new_path=`$WHICH "$new_path" 2> /dev/null`
29760    # bat and cmd files are not always considered executable in cygwin causing which
29761    # to not find them
29762    if test "x$new_path" = x \
29763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29765      new_path=`$CYGPATH -u "$path"`
29766    fi
29767    if test "x$new_path" = x; then
29768      # It's still not found. Now this is an unrecoverable error.
29769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29770$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29771      has_space=`$ECHO "$complete" | $GREP " "`
29772      if test "x$has_space" != x; then
29773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29775      fi
29776      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29777    fi
29778  fi
29779
29780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29783  # "foo.exe" is OK but "foo" is an error.
29784  #
29785  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29786  # It is also a way to make sure we got the proper file name for the real test later on.
29787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29788  if test "x$test_shortpath" = x; then
29789    # Short path failed, file does not exist as specified.
29790    # Try adding .exe or .cmd
29791    if test -f "${new_path}.exe"; then
29792      input_to_shortpath="${new_path}.exe"
29793    elif test -f "${new_path}.cmd"; then
29794      input_to_shortpath="${new_path}.cmd"
29795    else
29796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29797$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29800      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29801    fi
29802  else
29803    input_to_shortpath="$new_path"
29804  fi
29805
29806  # Call helper function which possibly converts this using DOS-style short mode.
29807  # If so, the updated path is stored in $new_path.
29808  new_path="$input_to_shortpath"
29809
29810  input_path="$input_to_shortpath"
29811  # Check if we need to convert this using DOS-style short mode. If the path
29812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29813  # take no chances and rewrite it.
29814  # Note: m4 eats our [], so we need to use [ and ] instead.
29815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29816  if test "x$has_forbidden_chars" != x; then
29817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29821      # Going to short mode and back again did indeed matter. Since short mode is
29822      # case insensitive, let's make it lowercase to improve readability.
29823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29824      # Now convert it back to Unix-stile (cygpath)
29825      input_path=`$CYGPATH -u "$shortmode_path"`
29826      new_path="$input_path"
29827    fi
29828  fi
29829
29830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29831  if test "x$test_cygdrive_prefix" = x; then
29832    # As a simple fix, exclude /usr/bin since it's not a real path.
29833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29835      # a path prefixed by /cygdrive for fixpath to work.
29836      new_path="$CYGWIN_ROOT_PATH$input_path"
29837    fi
29838  fi
29839
29840  # remove trailing .exe if any
29841  new_path="${new_path/%.exe/}"
29842
29843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29844
29845  # First separate the path from the arguments. This will split at the first
29846  # space.
29847  complete="$CXX"
29848  path="${complete%% *}"
29849  tmp="$complete EOL"
29850  arguments="${tmp#* }"
29851
29852  # Input might be given as Windows format, start by converting to
29853  # unix format.
29854  new_path="$path"
29855
29856  windows_path="$new_path"
29857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29858    unix_path=`$CYGPATH -u "$windows_path"`
29859    new_path="$unix_path"
29860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29862    new_path="$unix_path"
29863  fi
29864
29865
29866  # Now try to locate executable using which
29867  new_path=`$WHICH "$new_path" 2> /dev/null`
29868
29869  if test "x$new_path" = x; then
29870    # Oops. Which didn't find the executable.
29871    # The splitting of arguments from the executable at a space might have been incorrect,
29872    # since paths with space are more likely in Windows. Give it another try with the whole
29873    # argument.
29874    path="$complete"
29875    arguments="EOL"
29876    new_path="$path"
29877
29878  windows_path="$new_path"
29879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29880    unix_path=`$CYGPATH -u "$windows_path"`
29881    new_path="$unix_path"
29882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29884    new_path="$unix_path"
29885  fi
29886
29887
29888    new_path=`$WHICH "$new_path" 2> /dev/null`
29889
29890    if test "x$new_path" = x; then
29891      # It's still not found. Now this is an unrecoverable error.
29892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29893$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29894      has_space=`$ECHO "$complete" | $GREP " "`
29895      if test "x$has_space" != x; then
29896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29898      fi
29899      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29900    fi
29901  fi
29902
29903  # Now new_path has a complete unix path to the binary
29904  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29905    # Keep paths in /bin as-is, but remove trailing .exe if any
29906    new_path="${new_path/%.exe/}"
29907    # Do not save /bin paths to all_fixpath_prefixes!
29908  else
29909    # Not in mixed or Windows style, start by that.
29910    new_path=`cmd //c echo $new_path`
29911
29912  input_path="$new_path"
29913  # Check if we need to convert this using DOS-style short mode. If the path
29914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29915  # take no chances and rewrite it.
29916  # Note: m4 eats our [], so we need to use [ and ] instead.
29917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29918  if test "x$has_forbidden_chars" != x; then
29919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29921  fi
29922
29923    # Output is in $new_path
29924
29925  windows_path="$new_path"
29926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29927    unix_path=`$CYGPATH -u "$windows_path"`
29928    new_path="$unix_path"
29929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29931    new_path="$unix_path"
29932  fi
29933
29934    # remove trailing .exe if any
29935    new_path="${new_path/%.exe/}"
29936
29937    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29938    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29939  fi
29940
29941  else
29942    # We're on a posix platform. Hooray! :)
29943    # First separate the path from the arguments. This will split at the first
29944    # space.
29945    complete="$CXX"
29946    path="${complete%% *}"
29947    tmp="$complete EOL"
29948    arguments="${tmp#* }"
29949
29950    # Cannot rely on the command "which" here since it doesn't always work.
29951    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29952    if test -z "$is_absolute_path"; then
29953      # Path to executable is not absolute. Find it.
29954      IFS_save="$IFS"
29955      IFS=:
29956      for p in $PATH; do
29957        if test -f "$p/$path" && test -x "$p/$path"; then
29958          new_path="$p/$path"
29959          break
29960        fi
29961      done
29962      IFS="$IFS_save"
29963    else
29964      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
29965$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
29966      new_path="$path"
29967    fi
29968
29969    if test "x$new_path" = x; then
29970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29971$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29972      has_space=`$ECHO "$complete" | $GREP " "`
29973      if test "x$has_space" != x; then
29974        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29976      fi
29977      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29978    fi
29979  fi
29980
29981  # Now join together the path and the arguments once again
29982  if test "x$arguments" != xEOL; then
29983    new_complete="$new_path ${arguments% *}"
29984  else
29985    new_complete="$new_path"
29986  fi
29987
29988  if test "x$complete" != "x$new_complete"; then
29989    CXX="$new_complete"
29990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29991$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29992  fi
29993
29994  TEST_COMPILER="$CXX"
29995  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29996  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29997  if test "x$OPENJDK_BUILD_OS" != xaix; then
29998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29999$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30000
30001  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30002    # Follow a chain of symbolic links. Use readlink
30003    # where it exists, else fall back to horribly
30004    # complicated shell code.
30005    if test "x$READLINK_TESTED" != yes; then
30006      # On MacOSX there is a readlink tool with a different
30007      # purpose than the GNU readlink tool. Check the found readlink.
30008      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30009      if test "x$ISGNU" = x; then
30010        # A readlink that we do not know how to use.
30011        # Are there other non-GNU readlinks out there?
30012        READLINK_TESTED=yes
30013        READLINK=
30014      fi
30015    fi
30016
30017    if test "x$READLINK" != x; then
30018      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30019    else
30020      # Save the current directory for restoring afterwards
30021      STARTDIR=$PWD
30022      COUNTER=0
30023      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30024      sym_link_file=`$BASENAME $TEST_COMPILER`
30025      cd $sym_link_dir
30026      # Use -P flag to resolve symlinks in directories.
30027      cd `$THEPWDCMD -P`
30028      sym_link_dir=`$THEPWDCMD -P`
30029      # Resolve file symlinks
30030      while test $COUNTER -lt 20; do
30031        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30032        if test "x$ISLINK" == x; then
30033          # This is not a symbolic link! We are done!
30034          break
30035        fi
30036        # Again resolve directory symlinks since the target of the just found
30037        # link could be in a different directory
30038        cd `$DIRNAME $ISLINK`
30039        sym_link_dir=`$THEPWDCMD -P`
30040        sym_link_file=`$BASENAME $ISLINK`
30041        let COUNTER=COUNTER+1
30042      done
30043      cd $STARTDIR
30044      TEST_COMPILER=$sym_link_dir/$sym_link_file
30045    fi
30046  fi
30047
30048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30049$as_echo "$TEST_COMPILER" >&6; }
30050  fi
30051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30052$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30053
30054  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30055  if test "x$COMPILER_BASENAME" = "xccache"; then
30056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30057$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30058    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30059    # We want to control ccache invocation ourselves, so ignore this cc and try
30060    # searching again.
30061
30062    # Remove the path to the fake ccache cc from the PATH
30063    RETRY_COMPILER_SAVED_PATH="$PATH"
30064    COMPILER_DIRNAME=`$DIRNAME $CXX`
30065    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30066
30067    # Try again looking for our compiler
30068    if test -n "$ac_tool_prefix"; then
30069  for ac_prog in $COMPILER_CHECK_LIST
30070  do
30071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30074$as_echo_n "checking for $ac_word... " >&6; }
30075if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30076  $as_echo_n "(cached) " >&6
30077else
30078  if test -n "$PROPER_COMPILER_CXX"; then
30079  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30080else
30081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30082for as_dir in $PATH
30083do
30084  IFS=$as_save_IFS
30085  test -z "$as_dir" && as_dir=.
30086    for ac_exec_ext in '' $ac_executable_extensions; do
30087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30088    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30090    break 2
30091  fi
30092done
30093  done
30094IFS=$as_save_IFS
30095
30096fi
30097fi
30098PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30099if test -n "$PROPER_COMPILER_CXX"; then
30100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30101$as_echo "$PROPER_COMPILER_CXX" >&6; }
30102else
30103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30104$as_echo "no" >&6; }
30105fi
30106
30107
30108    test -n "$PROPER_COMPILER_CXX" && break
30109  done
30110fi
30111if test -z "$PROPER_COMPILER_CXX"; then
30112  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30113  for ac_prog in $COMPILER_CHECK_LIST
30114do
30115  # Extract the first word of "$ac_prog", so it can be a program name with args.
30116set dummy $ac_prog; ac_word=$2
30117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30118$as_echo_n "checking for $ac_word... " >&6; }
30119if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30120  $as_echo_n "(cached) " >&6
30121else
30122  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30123  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30124else
30125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30126for as_dir in $PATH
30127do
30128  IFS=$as_save_IFS
30129  test -z "$as_dir" && as_dir=.
30130    for ac_exec_ext in '' $ac_executable_extensions; do
30131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30132    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30134    break 2
30135  fi
30136done
30137  done
30138IFS=$as_save_IFS
30139
30140fi
30141fi
30142ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30143if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30145$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30146else
30147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30148$as_echo "no" >&6; }
30149fi
30150
30151
30152  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30153done
30154
30155  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30156    PROPER_COMPILER_CXX=""
30157  else
30158    case $cross_compiling:$ac_tool_warned in
30159yes:)
30160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30162ac_tool_warned=yes ;;
30163esac
30164    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30165  fi
30166fi
30167
30168
30169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30170
30171  # First separate the path from the arguments. This will split at the first
30172  # space.
30173  complete="$PROPER_COMPILER_CXX"
30174  path="${complete%% *}"
30175  tmp="$complete EOL"
30176  arguments="${tmp#* }"
30177
30178  # Input might be given as Windows format, start by converting to
30179  # unix format.
30180  new_path=`$CYGPATH -u "$path"`
30181
30182  # Now try to locate executable using which
30183  new_path=`$WHICH "$new_path" 2> /dev/null`
30184  # bat and cmd files are not always considered executable in cygwin causing which
30185  # to not find them
30186  if test "x$new_path" = x \
30187      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30188      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30189    new_path=`$CYGPATH -u "$path"`
30190  fi
30191  if test "x$new_path" = x; then
30192    # Oops. Which didn't find the executable.
30193    # The splitting of arguments from the executable at a space might have been incorrect,
30194    # since paths with space are more likely in Windows. Give it another try with the whole
30195    # argument.
30196    path="$complete"
30197    arguments="EOL"
30198    new_path=`$CYGPATH -u "$path"`
30199    new_path=`$WHICH "$new_path" 2> /dev/null`
30200    # bat and cmd files are not always considered executable in cygwin causing which
30201    # to not find them
30202    if test "x$new_path" = x \
30203        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30204        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30205      new_path=`$CYGPATH -u "$path"`
30206    fi
30207    if test "x$new_path" = x; then
30208      # It's still not found. Now this is an unrecoverable error.
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30210$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30211      has_space=`$ECHO "$complete" | $GREP " "`
30212      if test "x$has_space" != x; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30215      fi
30216      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30217    fi
30218  fi
30219
30220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30223  # "foo.exe" is OK but "foo" is an error.
30224  #
30225  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30226  # It is also a way to make sure we got the proper file name for the real test later on.
30227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30228  if test "x$test_shortpath" = x; then
30229    # Short path failed, file does not exist as specified.
30230    # Try adding .exe or .cmd
30231    if test -f "${new_path}.exe"; then
30232      input_to_shortpath="${new_path}.exe"
30233    elif test -f "${new_path}.cmd"; then
30234      input_to_shortpath="${new_path}.cmd"
30235    else
30236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30237$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30238      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30239$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30241    fi
30242  else
30243    input_to_shortpath="$new_path"
30244  fi
30245
30246  # Call helper function which possibly converts this using DOS-style short mode.
30247  # If so, the updated path is stored in $new_path.
30248  new_path="$input_to_shortpath"
30249
30250  input_path="$input_to_shortpath"
30251  # Check if we need to convert this using DOS-style short mode. If the path
30252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30253  # take no chances and rewrite it.
30254  # Note: m4 eats our [], so we need to use [ and ] instead.
30255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30256  if test "x$has_forbidden_chars" != x; then
30257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30261      # Going to short mode and back again did indeed matter. Since short mode is
30262      # case insensitive, let's make it lowercase to improve readability.
30263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30264      # Now convert it back to Unix-stile (cygpath)
30265      input_path=`$CYGPATH -u "$shortmode_path"`
30266      new_path="$input_path"
30267    fi
30268  fi
30269
30270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30271  if test "x$test_cygdrive_prefix" = x; then
30272    # As a simple fix, exclude /usr/bin since it's not a real path.
30273    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30275      # a path prefixed by /cygdrive for fixpath to work.
30276      new_path="$CYGWIN_ROOT_PATH$input_path"
30277    fi
30278  fi
30279
30280  # remove trailing .exe if any
30281  new_path="${new_path/%.exe/}"
30282
30283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30284
30285  # First separate the path from the arguments. This will split at the first
30286  # space.
30287  complete="$PROPER_COMPILER_CXX"
30288  path="${complete%% *}"
30289  tmp="$complete EOL"
30290  arguments="${tmp#* }"
30291
30292  # Input might be given as Windows format, start by converting to
30293  # unix format.
30294  new_path="$path"
30295
30296  windows_path="$new_path"
30297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30298    unix_path=`$CYGPATH -u "$windows_path"`
30299    new_path="$unix_path"
30300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30302    new_path="$unix_path"
30303  fi
30304
30305
30306  # Now try to locate executable using which
30307  new_path=`$WHICH "$new_path" 2> /dev/null`
30308
30309  if test "x$new_path" = x; then
30310    # Oops. Which didn't find the executable.
30311    # The splitting of arguments from the executable at a space might have been incorrect,
30312    # since paths with space are more likely in Windows. Give it another try with the whole
30313    # argument.
30314    path="$complete"
30315    arguments="EOL"
30316    new_path="$path"
30317
30318  windows_path="$new_path"
30319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30320    unix_path=`$CYGPATH -u "$windows_path"`
30321    new_path="$unix_path"
30322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30324    new_path="$unix_path"
30325  fi
30326
30327
30328    new_path=`$WHICH "$new_path" 2> /dev/null`
30329
30330    if test "x$new_path" = x; then
30331      # It's still not found. Now this is an unrecoverable error.
30332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30333$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30334      has_space=`$ECHO "$complete" | $GREP " "`
30335      if test "x$has_space" != x; then
30336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30338      fi
30339      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30340    fi
30341  fi
30342
30343  # Now new_path has a complete unix path to the binary
30344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30345    # Keep paths in /bin as-is, but remove trailing .exe if any
30346    new_path="${new_path/%.exe/}"
30347    # Do not save /bin paths to all_fixpath_prefixes!
30348  else
30349    # Not in mixed or Windows style, start by that.
30350    new_path=`cmd //c echo $new_path`
30351
30352  input_path="$new_path"
30353  # Check if we need to convert this using DOS-style short mode. If the path
30354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30355  # take no chances and rewrite it.
30356  # Note: m4 eats our [], so we need to use [ and ] instead.
30357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30358  if test "x$has_forbidden_chars" != x; then
30359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30361  fi
30362
30363    # Output is in $new_path
30364
30365  windows_path="$new_path"
30366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30367    unix_path=`$CYGPATH -u "$windows_path"`
30368    new_path="$unix_path"
30369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30371    new_path="$unix_path"
30372  fi
30373
30374    # remove trailing .exe if any
30375    new_path="${new_path/%.exe/}"
30376
30377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30379  fi
30380
30381  else
30382    # We're on a posix platform. Hooray! :)
30383    # First separate the path from the arguments. This will split at the first
30384    # space.
30385    complete="$PROPER_COMPILER_CXX"
30386    path="${complete%% *}"
30387    tmp="$complete EOL"
30388    arguments="${tmp#* }"
30389
30390    # Cannot rely on the command "which" here since it doesn't always work.
30391    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30392    if test -z "$is_absolute_path"; then
30393      # Path to executable is not absolute. Find it.
30394      IFS_save="$IFS"
30395      IFS=:
30396      for p in $PATH; do
30397        if test -f "$p/$path" && test -x "$p/$path"; then
30398          new_path="$p/$path"
30399          break
30400        fi
30401      done
30402      IFS="$IFS_save"
30403    else
30404      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
30405$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
30406      new_path="$path"
30407    fi
30408
30409    if test "x$new_path" = x; then
30410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30411$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30412      has_space=`$ECHO "$complete" | $GREP " "`
30413      if test "x$has_space" != x; then
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30416      fi
30417      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30418    fi
30419  fi
30420
30421  # Now join together the path and the arguments once again
30422  if test "x$arguments" != xEOL; then
30423    new_complete="$new_path ${arguments% *}"
30424  else
30425    new_complete="$new_path"
30426  fi
30427
30428  if test "x$complete" != "x$new_complete"; then
30429    PROPER_COMPILER_CXX="$new_complete"
30430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30431$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30432  fi
30433
30434    PATH="$RETRY_COMPILER_SAVED_PATH"
30435
30436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30437$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30438
30439  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30440    # Follow a chain of symbolic links. Use readlink
30441    # where it exists, else fall back to horribly
30442    # complicated shell code.
30443    if test "x$READLINK_TESTED" != yes; then
30444      # On MacOSX there is a readlink tool with a different
30445      # purpose than the GNU readlink tool. Check the found readlink.
30446      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30447      if test "x$ISGNU" = x; then
30448        # A readlink that we do not know how to use.
30449        # Are there other non-GNU readlinks out there?
30450        READLINK_TESTED=yes
30451        READLINK=
30452      fi
30453    fi
30454
30455    if test "x$READLINK" != x; then
30456      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30457    else
30458      # Save the current directory for restoring afterwards
30459      STARTDIR=$PWD
30460      COUNTER=0
30461      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30462      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30463      cd $sym_link_dir
30464      # Use -P flag to resolve symlinks in directories.
30465      cd `$THEPWDCMD -P`
30466      sym_link_dir=`$THEPWDCMD -P`
30467      # Resolve file symlinks
30468      while test $COUNTER -lt 20; do
30469        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30470        if test "x$ISLINK" == x; then
30471          # This is not a symbolic link! We are done!
30472          break
30473        fi
30474        # Again resolve directory symlinks since the target of the just found
30475        # link could be in a different directory
30476        cd `$DIRNAME $ISLINK`
30477        sym_link_dir=`$THEPWDCMD -P`
30478        sym_link_file=`$BASENAME $ISLINK`
30479        let COUNTER=COUNTER+1
30480      done
30481      cd $STARTDIR
30482      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30483    fi
30484  fi
30485
30486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30487$as_echo "$PROPER_COMPILER_CXX" >&6; }
30488    CXX="$PROPER_COMPILER_CXX"
30489  else
30490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30491$as_echo "no, keeping CXX" >&6; }
30492  fi
30493
30494
30495  COMPILER=$CXX
30496  COMPILER_NAME=$COMPILER_NAME
30497
30498  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30499    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30500    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30501    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30502    if test $? -ne 0; then
30503      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30504
30505      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
30506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30508$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30509      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30510    else
30511      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30512      COMPILER_VENDOR="Sun Studio"
30513    fi
30514  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30515      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30516      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30517      if test $? -ne 0; then
30518        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30519      else
30520        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30521        COMPILER_VENDOR='IBM'
30522      fi
30523  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30524    # First line typically looks something like:
30525    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30526    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30527    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30528    COMPILER_VENDOR="Microsoft CL.EXE"
30529    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30530    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30531      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30532        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30533      fi
30534    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30535      if test "x$COMPILER_CPU_TEST" != "xx64"; then
30536        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30537      fi
30538    fi
30539  else
30540    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30541    # Check that this is likely to be GCC.
30542    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30543    if test $? -ne 0; then
30544      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30545$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30547$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30548      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30549    fi
30550
30551    # First line typically looks something like:
30552    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30553    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30554    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30555  fi
30556  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30557  CXX_VERSION="$COMPILER_VERSION"
30558  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30559  CXX_VENDOR="$COMPILER_VENDOR"
30560
30561  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30562$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30563
30564
30565  # Now that we have resolved CXX ourself, let autoconf have its go at it
30566  ac_ext=cpp
30567ac_cpp='$CXXCPP $CPPFLAGS'
30568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30571if test -z "$CXX"; then
30572  if test -n "$CCC"; then
30573    CXX=$CCC
30574  else
30575    if test -n "$ac_tool_prefix"; then
30576  for ac_prog in $CXX
30577  do
30578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30581$as_echo_n "checking for $ac_word... " >&6; }
30582if ${ac_cv_prog_CXX+:} false; then :
30583  $as_echo_n "(cached) " >&6
30584else
30585  if test -n "$CXX"; then
30586  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30587else
30588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30589for as_dir in $PATH
30590do
30591  IFS=$as_save_IFS
30592  test -z "$as_dir" && as_dir=.
30593    for ac_exec_ext in '' $ac_executable_extensions; do
30594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30595    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30597    break 2
30598  fi
30599done
30600  done
30601IFS=$as_save_IFS
30602
30603fi
30604fi
30605CXX=$ac_cv_prog_CXX
30606if test -n "$CXX"; then
30607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30608$as_echo "$CXX" >&6; }
30609else
30610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30611$as_echo "no" >&6; }
30612fi
30613
30614
30615    test -n "$CXX" && break
30616  done
30617fi
30618if test -z "$CXX"; then
30619  ac_ct_CXX=$CXX
30620  for ac_prog in $CXX
30621do
30622  # Extract the first word of "$ac_prog", so it can be a program name with args.
30623set dummy $ac_prog; ac_word=$2
30624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30625$as_echo_n "checking for $ac_word... " >&6; }
30626if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30627  $as_echo_n "(cached) " >&6
30628else
30629  if test -n "$ac_ct_CXX"; then
30630  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30631else
30632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30633for as_dir in $PATH
30634do
30635  IFS=$as_save_IFS
30636  test -z "$as_dir" && as_dir=.
30637    for ac_exec_ext in '' $ac_executable_extensions; do
30638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30639    ac_cv_prog_ac_ct_CXX="$ac_prog"
30640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30641    break 2
30642  fi
30643done
30644  done
30645IFS=$as_save_IFS
30646
30647fi
30648fi
30649ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30650if test -n "$ac_ct_CXX"; then
30651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30652$as_echo "$ac_ct_CXX" >&6; }
30653else
30654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30655$as_echo "no" >&6; }
30656fi
30657
30658
30659  test -n "$ac_ct_CXX" && break
30660done
30661
30662  if test "x$ac_ct_CXX" = x; then
30663    CXX="g++"
30664  else
30665    case $cross_compiling:$ac_tool_warned in
30666yes:)
30667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30669ac_tool_warned=yes ;;
30670esac
30671    CXX=$ac_ct_CXX
30672  fi
30673fi
30674
30675  fi
30676fi
30677# Provide some information about the compiler.
30678$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30679set X $ac_compile
30680ac_compiler=$2
30681for ac_option in --version -v -V -qversion; do
30682  { { ac_try="$ac_compiler $ac_option >&5"
30683case "(($ac_try" in
30684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30685  *) ac_try_echo=$ac_try;;
30686esac
30687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30688$as_echo "$ac_try_echo"; } >&5
30689  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30690  ac_status=$?
30691  if test -s conftest.err; then
30692    sed '10a\
30693... rest of stderr output deleted ...
30694         10q' conftest.err >conftest.er1
30695    cat conftest.er1 >&5
30696  fi
30697  rm -f conftest.er1 conftest.err
30698  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30699  test $ac_status = 0; }
30700done
30701
30702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30703$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30704if ${ac_cv_cxx_compiler_gnu+:} false; then :
30705  $as_echo_n "(cached) " >&6
30706else
30707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30708/* end confdefs.h.  */
30709
30710int
30711main ()
30712{
30713#ifndef __GNUC__
30714       choke me
30715#endif
30716
30717  ;
30718  return 0;
30719}
30720_ACEOF
30721if ac_fn_cxx_try_compile "$LINENO"; then :
30722  ac_compiler_gnu=yes
30723else
30724  ac_compiler_gnu=no
30725fi
30726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30727ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30728
30729fi
30730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30731$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30732if test $ac_compiler_gnu = yes; then
30733  GXX=yes
30734else
30735  GXX=
30736fi
30737ac_test_CXXFLAGS=${CXXFLAGS+set}
30738ac_save_CXXFLAGS=$CXXFLAGS
30739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30740$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30741if ${ac_cv_prog_cxx_g+:} false; then :
30742  $as_echo_n "(cached) " >&6
30743else
30744  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30745   ac_cxx_werror_flag=yes
30746   ac_cv_prog_cxx_g=no
30747   CXXFLAGS="-g"
30748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30749/* end confdefs.h.  */
30750
30751int
30752main ()
30753{
30754
30755  ;
30756  return 0;
30757}
30758_ACEOF
30759if ac_fn_cxx_try_compile "$LINENO"; then :
30760  ac_cv_prog_cxx_g=yes
30761else
30762  CXXFLAGS=""
30763      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30764/* end confdefs.h.  */
30765
30766int
30767main ()
30768{
30769
30770  ;
30771  return 0;
30772}
30773_ACEOF
30774if ac_fn_cxx_try_compile "$LINENO"; then :
30775
30776else
30777  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30778	 CXXFLAGS="-g"
30779	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780/* end confdefs.h.  */
30781
30782int
30783main ()
30784{
30785
30786  ;
30787  return 0;
30788}
30789_ACEOF
30790if ac_fn_cxx_try_compile "$LINENO"; then :
30791  ac_cv_prog_cxx_g=yes
30792fi
30793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30794fi
30795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30796fi
30797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30798   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30799fi
30800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30801$as_echo "$ac_cv_prog_cxx_g" >&6; }
30802if test "$ac_test_CXXFLAGS" = set; then
30803  CXXFLAGS=$ac_save_CXXFLAGS
30804elif test $ac_cv_prog_cxx_g = yes; then
30805  if test "$GXX" = yes; then
30806    CXXFLAGS="-g -O2"
30807  else
30808    CXXFLAGS="-g"
30809  fi
30810else
30811  if test "$GXX" = yes; then
30812    CXXFLAGS="-O2"
30813  else
30814    CXXFLAGS=
30815  fi
30816fi
30817ac_ext=cpp
30818ac_cpp='$CXXCPP $CPPFLAGS'
30819ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30820ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30821ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30822
30823
30824  ### Locate other tools
30825
30826  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30827    ac_ext=m
30828ac_cpp='$OBJCPP $CPPFLAGS'
30829ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30830ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30831ac_compiler_gnu=$ac_cv_objc_compiler_gnu
30832if test -n "$ac_tool_prefix"; then
30833  for ac_prog in gcc objcc objc cc CC
30834  do
30835    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30836set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30838$as_echo_n "checking for $ac_word... " >&6; }
30839if ${ac_cv_prog_OBJC+:} false; then :
30840  $as_echo_n "(cached) " >&6
30841else
30842  if test -n "$OBJC"; then
30843  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
30844else
30845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30846for as_dir in $PATH
30847do
30848  IFS=$as_save_IFS
30849  test -z "$as_dir" && as_dir=.
30850    for ac_exec_ext in '' $ac_executable_extensions; do
30851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30852    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
30853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30854    break 2
30855  fi
30856done
30857  done
30858IFS=$as_save_IFS
30859
30860fi
30861fi
30862OBJC=$ac_cv_prog_OBJC
30863if test -n "$OBJC"; then
30864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
30865$as_echo "$OBJC" >&6; }
30866else
30867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30868$as_echo "no" >&6; }
30869fi
30870
30871
30872    test -n "$OBJC" && break
30873  done
30874fi
30875if test -z "$OBJC"; then
30876  ac_ct_OBJC=$OBJC
30877  for ac_prog in gcc objcc objc cc CC
30878do
30879  # Extract the first word of "$ac_prog", so it can be a program name with args.
30880set dummy $ac_prog; ac_word=$2
30881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30882$as_echo_n "checking for $ac_word... " >&6; }
30883if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
30884  $as_echo_n "(cached) " >&6
30885else
30886  if test -n "$ac_ct_OBJC"; then
30887  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
30888else
30889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30890for as_dir in $PATH
30891do
30892  IFS=$as_save_IFS
30893  test -z "$as_dir" && as_dir=.
30894    for ac_exec_ext in '' $ac_executable_extensions; do
30895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30896    ac_cv_prog_ac_ct_OBJC="$ac_prog"
30897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30898    break 2
30899  fi
30900done
30901  done
30902IFS=$as_save_IFS
30903
30904fi
30905fi
30906ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
30907if test -n "$ac_ct_OBJC"; then
30908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
30909$as_echo "$ac_ct_OBJC" >&6; }
30910else
30911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30912$as_echo "no" >&6; }
30913fi
30914
30915
30916  test -n "$ac_ct_OBJC" && break
30917done
30918
30919  if test "x$ac_ct_OBJC" = x; then
30920    OBJC="gcc"
30921  else
30922    case $cross_compiling:$ac_tool_warned in
30923yes:)
30924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30926ac_tool_warned=yes ;;
30927esac
30928    OBJC=$ac_ct_OBJC
30929  fi
30930fi
30931
30932# Provide some information about the compiler.
30933$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
30934set X $ac_compile
30935ac_compiler=$2
30936for ac_option in --version -v -V -qversion; do
30937  { { ac_try="$ac_compiler $ac_option >&5"
30938case "(($ac_try" in
30939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30940  *) ac_try_echo=$ac_try;;
30941esac
30942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30943$as_echo "$ac_try_echo"; } >&5
30944  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30945  ac_status=$?
30946  if test -s conftest.err; then
30947    sed '10a\
30948... rest of stderr output deleted ...
30949         10q' conftest.err >conftest.er1
30950    cat conftest.er1 >&5
30951  fi
30952  rm -f conftest.er1 conftest.err
30953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30954  test $ac_status = 0; }
30955done
30956
30957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
30958$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
30959if ${ac_cv_objc_compiler_gnu+:} false; then :
30960  $as_echo_n "(cached) " >&6
30961else
30962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30963/* end confdefs.h.  */
30964
30965int
30966main ()
30967{
30968#ifndef __GNUC__
30969       choke me
30970#endif
30971
30972  ;
30973  return 0;
30974}
30975_ACEOF
30976if ac_fn_objc_try_compile "$LINENO"; then :
30977  ac_compiler_gnu=yes
30978else
30979  ac_compiler_gnu=no
30980fi
30981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30982ac_cv_objc_compiler_gnu=$ac_compiler_gnu
30983
30984fi
30985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
30986$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
30987if test $ac_compiler_gnu = yes; then
30988  GOBJC=yes
30989else
30990  GOBJC=
30991fi
30992ac_test_OBJCFLAGS=${OBJCFLAGS+set}
30993ac_save_OBJCFLAGS=$OBJCFLAGS
30994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
30995$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
30996if ${ac_cv_prog_objc_g+:} false; then :
30997  $as_echo_n "(cached) " >&6
30998else
30999  ac_save_objc_werror_flag=$ac_objc_werror_flag
31000   ac_objc_werror_flag=yes
31001   ac_cv_prog_objc_g=no
31002   OBJCFLAGS="-g"
31003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31004/* end confdefs.h.  */
31005
31006int
31007main ()
31008{
31009
31010  ;
31011  return 0;
31012}
31013_ACEOF
31014if ac_fn_objc_try_compile "$LINENO"; then :
31015  ac_cv_prog_objc_g=yes
31016else
31017  OBJCFLAGS=""
31018      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31019/* end confdefs.h.  */
31020
31021int
31022main ()
31023{
31024
31025  ;
31026  return 0;
31027}
31028_ACEOF
31029if ac_fn_objc_try_compile "$LINENO"; then :
31030
31031else
31032  ac_objc_werror_flag=$ac_save_objc_werror_flag
31033	 OBJCFLAGS="-g"
31034	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31035/* end confdefs.h.  */
31036
31037int
31038main ()
31039{
31040
31041  ;
31042  return 0;
31043}
31044_ACEOF
31045if ac_fn_objc_try_compile "$LINENO"; then :
31046  ac_cv_prog_objc_g=yes
31047fi
31048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31049fi
31050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31051fi
31052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31053   ac_objc_werror_flag=$ac_save_objc_werror_flag
31054fi
31055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
31056$as_echo "$ac_cv_prog_objc_g" >&6; }
31057if test "$ac_test_OBJCFLAGS" = set; then
31058  OBJCFLAGS=$ac_save_OBJCFLAGS
31059elif test $ac_cv_prog_objc_g = yes; then
31060  if test "$GOBJC" = yes; then
31061    OBJCFLAGS="-g -O2"
31062  else
31063    OBJCFLAGS="-g"
31064  fi
31065else
31066  if test "$GOBJC" = yes; then
31067    OBJCFLAGS="-O2"
31068  else
31069    OBJCFLAGS=
31070  fi
31071fi
31072ac_ext=cpp
31073ac_cpp='$CXXCPP $CPPFLAGS'
31074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31077
31078
31079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31080
31081  # First separate the path from the arguments. This will split at the first
31082  # space.
31083  complete="$OBJC"
31084  path="${complete%% *}"
31085  tmp="$complete EOL"
31086  arguments="${tmp#* }"
31087
31088  # Input might be given as Windows format, start by converting to
31089  # unix format.
31090  new_path=`$CYGPATH -u "$path"`
31091
31092  # Now try to locate executable using which
31093  new_path=`$WHICH "$new_path" 2> /dev/null`
31094  # bat and cmd files are not always considered executable in cygwin causing which
31095  # to not find them
31096  if test "x$new_path" = x \
31097      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31098      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31099    new_path=`$CYGPATH -u "$path"`
31100  fi
31101  if test "x$new_path" = x; then
31102    # Oops. Which didn't find the executable.
31103    # The splitting of arguments from the executable at a space might have been incorrect,
31104    # since paths with space are more likely in Windows. Give it another try with the whole
31105    # argument.
31106    path="$complete"
31107    arguments="EOL"
31108    new_path=`$CYGPATH -u "$path"`
31109    new_path=`$WHICH "$new_path" 2> /dev/null`
31110    # bat and cmd files are not always considered executable in cygwin causing which
31111    # to not find them
31112    if test "x$new_path" = x \
31113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31115      new_path=`$CYGPATH -u "$path"`
31116    fi
31117    if test "x$new_path" = x; then
31118      # It's still not found. Now this is an unrecoverable error.
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31120$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31121      has_space=`$ECHO "$complete" | $GREP " "`
31122      if test "x$has_space" != x; then
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31125      fi
31126      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31127    fi
31128  fi
31129
31130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31133  # "foo.exe" is OK but "foo" is an error.
31134  #
31135  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31136  # It is also a way to make sure we got the proper file name for the real test later on.
31137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31138  if test "x$test_shortpath" = x; then
31139    # Short path failed, file does not exist as specified.
31140    # Try adding .exe or .cmd
31141    if test -f "${new_path}.exe"; then
31142      input_to_shortpath="${new_path}.exe"
31143    elif test -f "${new_path}.cmd"; then
31144      input_to_shortpath="${new_path}.cmd"
31145    else
31146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
31147$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
31148      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31149$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31150      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31151    fi
31152  else
31153    input_to_shortpath="$new_path"
31154  fi
31155
31156  # Call helper function which possibly converts this using DOS-style short mode.
31157  # If so, the updated path is stored in $new_path.
31158  new_path="$input_to_shortpath"
31159
31160  input_path="$input_to_shortpath"
31161  # Check if we need to convert this using DOS-style short mode. If the path
31162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31163  # take no chances and rewrite it.
31164  # Note: m4 eats our [], so we need to use [ and ] instead.
31165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31166  if test "x$has_forbidden_chars" != x; then
31167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31171      # Going to short mode and back again did indeed matter. Since short mode is
31172      # case insensitive, let's make it lowercase to improve readability.
31173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31174      # Now convert it back to Unix-stile (cygpath)
31175      input_path=`$CYGPATH -u "$shortmode_path"`
31176      new_path="$input_path"
31177    fi
31178  fi
31179
31180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31181  if test "x$test_cygdrive_prefix" = x; then
31182    # As a simple fix, exclude /usr/bin since it's not a real path.
31183    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31185      # a path prefixed by /cygdrive for fixpath to work.
31186      new_path="$CYGWIN_ROOT_PATH$input_path"
31187    fi
31188  fi
31189
31190  # remove trailing .exe if any
31191  new_path="${new_path/%.exe/}"
31192
31193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31194
31195  # First separate the path from the arguments. This will split at the first
31196  # space.
31197  complete="$OBJC"
31198  path="${complete%% *}"
31199  tmp="$complete EOL"
31200  arguments="${tmp#* }"
31201
31202  # Input might be given as Windows format, start by converting to
31203  # unix format.
31204  new_path="$path"
31205
31206  windows_path="$new_path"
31207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31208    unix_path=`$CYGPATH -u "$windows_path"`
31209    new_path="$unix_path"
31210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31212    new_path="$unix_path"
31213  fi
31214
31215
31216  # Now try to locate executable using which
31217  new_path=`$WHICH "$new_path" 2> /dev/null`
31218
31219  if test "x$new_path" = x; then
31220    # Oops. Which didn't find the executable.
31221    # The splitting of arguments from the executable at a space might have been incorrect,
31222    # since paths with space are more likely in Windows. Give it another try with the whole
31223    # argument.
31224    path="$complete"
31225    arguments="EOL"
31226    new_path="$path"
31227
31228  windows_path="$new_path"
31229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31230    unix_path=`$CYGPATH -u "$windows_path"`
31231    new_path="$unix_path"
31232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31234    new_path="$unix_path"
31235  fi
31236
31237
31238    new_path=`$WHICH "$new_path" 2> /dev/null`
31239
31240    if test "x$new_path" = x; then
31241      # It's still not found. Now this is an unrecoverable error.
31242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31243$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31244      has_space=`$ECHO "$complete" | $GREP " "`
31245      if test "x$has_space" != x; then
31246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31248      fi
31249      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31250    fi
31251  fi
31252
31253  # Now new_path has a complete unix path to the binary
31254  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31255    # Keep paths in /bin as-is, but remove trailing .exe if any
31256    new_path="${new_path/%.exe/}"
31257    # Do not save /bin paths to all_fixpath_prefixes!
31258  else
31259    # Not in mixed or Windows style, start by that.
31260    new_path=`cmd //c echo $new_path`
31261
31262  input_path="$new_path"
31263  # Check if we need to convert this using DOS-style short mode. If the path
31264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31265  # take no chances and rewrite it.
31266  # Note: m4 eats our [], so we need to use [ and ] instead.
31267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31268  if test "x$has_forbidden_chars" != x; then
31269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31271  fi
31272
31273    # Output is in $new_path
31274
31275  windows_path="$new_path"
31276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31277    unix_path=`$CYGPATH -u "$windows_path"`
31278    new_path="$unix_path"
31279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31281    new_path="$unix_path"
31282  fi
31283
31284    # remove trailing .exe if any
31285    new_path="${new_path/%.exe/}"
31286
31287    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31288    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31289  fi
31290
31291  else
31292    # We're on a posix platform. Hooray! :)
31293    # First separate the path from the arguments. This will split at the first
31294    # space.
31295    complete="$OBJC"
31296    path="${complete%% *}"
31297    tmp="$complete EOL"
31298    arguments="${tmp#* }"
31299
31300    # Cannot rely on the command "which" here since it doesn't always work.
31301    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31302    if test -z "$is_absolute_path"; then
31303      # Path to executable is not absolute. Find it.
31304      IFS_save="$IFS"
31305      IFS=:
31306      for p in $PATH; do
31307        if test -f "$p/$path" && test -x "$p/$path"; then
31308          new_path="$p/$path"
31309          break
31310        fi
31311      done
31312      IFS="$IFS_save"
31313    else
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
31315$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
31316      new_path="$path"
31317    fi
31318
31319    if test "x$new_path" = x; then
31320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31321$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31322      has_space=`$ECHO "$complete" | $GREP " "`
31323      if test "x$has_space" != x; then
31324        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31326      fi
31327      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31328    fi
31329  fi
31330
31331  # Now join together the path and the arguments once again
31332  if test "x$arguments" != xEOL; then
31333    new_complete="$new_path ${arguments% *}"
31334  else
31335    new_complete="$new_path"
31336  fi
31337
31338  if test "x$complete" != "x$new_complete"; then
31339    OBJC="$new_complete"
31340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
31341$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
31342  fi
31343
31344  else
31345    OBJC=
31346  fi
31347
31348  # Restore the flags to the user specified values.
31349  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
31350  CFLAGS="$ORG_CFLAGS"
31351  CXXFLAGS="$ORG_CXXFLAGS"
31352  OBJCFLAGS="$ORG_OBJCFLAGS"
31353
31354  LD="$CC"
31355  LDEXE="$CC"
31356  LDCXX="$CXX"
31357  LDEXECXX="$CXX"
31358
31359  # LDEXE is the linker to use, when creating executables.
31360
31361  # Linking C++ libraries.
31362
31363  # Linking C++ executables.
31364
31365
31366  if test "x$OPENJDK_TARGET_OS" != xwindows; then
31367
31368
31369  # Publish this variable in the help.
31370
31371
31372  if test "x$AR" = x; then
31373    # The variable is not set by user, try to locate tool using the code snippet
31374    if test -n "$ac_tool_prefix"; then
31375  for ac_prog in ar
31376  do
31377    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31378set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31380$as_echo_n "checking for $ac_word... " >&6; }
31381if ${ac_cv_prog_AR+:} false; then :
31382  $as_echo_n "(cached) " >&6
31383else
31384  if test -n "$AR"; then
31385  ac_cv_prog_AR="$AR" # Let the user override the test.
31386else
31387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31388for as_dir in $PATH
31389do
31390  IFS=$as_save_IFS
31391  test -z "$as_dir" && as_dir=.
31392    for ac_exec_ext in '' $ac_executable_extensions; do
31393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31394    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31396    break 2
31397  fi
31398done
31399  done
31400IFS=$as_save_IFS
31401
31402fi
31403fi
31404AR=$ac_cv_prog_AR
31405if test -n "$AR"; then
31406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31407$as_echo "$AR" >&6; }
31408else
31409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31410$as_echo "no" >&6; }
31411fi
31412
31413
31414    test -n "$AR" && break
31415  done
31416fi
31417if test -z "$AR"; then
31418  ac_ct_AR=$AR
31419  for ac_prog in ar
31420do
31421  # Extract the first word of "$ac_prog", so it can be a program name with args.
31422set dummy $ac_prog; ac_word=$2
31423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31424$as_echo_n "checking for $ac_word... " >&6; }
31425if ${ac_cv_prog_ac_ct_AR+:} false; then :
31426  $as_echo_n "(cached) " >&6
31427else
31428  if test -n "$ac_ct_AR"; then
31429  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31430else
31431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31432for as_dir in $PATH
31433do
31434  IFS=$as_save_IFS
31435  test -z "$as_dir" && as_dir=.
31436    for ac_exec_ext in '' $ac_executable_extensions; do
31437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31438    ac_cv_prog_ac_ct_AR="$ac_prog"
31439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31440    break 2
31441  fi
31442done
31443  done
31444IFS=$as_save_IFS
31445
31446fi
31447fi
31448ac_ct_AR=$ac_cv_prog_ac_ct_AR
31449if test -n "$ac_ct_AR"; then
31450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31451$as_echo "$ac_ct_AR" >&6; }
31452else
31453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31454$as_echo "no" >&6; }
31455fi
31456
31457
31458  test -n "$ac_ct_AR" && break
31459done
31460
31461  if test "x$ac_ct_AR" = x; then
31462    AR=""
31463  else
31464    case $cross_compiling:$ac_tool_warned in
31465yes:)
31466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31468ac_tool_warned=yes ;;
31469esac
31470    AR=$ac_ct_AR
31471  fi
31472fi
31473
31474  else
31475    # The variable is set, but is it from the command line or the environment?
31476
31477    # Try to remove the string !AR! from our list.
31478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31480      # If it failed, the variable was not from the command line. Ignore it,
31481      # but warn the user (except for BASH, which is always set by the calling BASH).
31482      if test "xAR" != xBASH; then
31483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31484$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31485      fi
31486      # Try to locate tool using the code snippet
31487      if test -n "$ac_tool_prefix"; then
31488  for ac_prog in ar
31489  do
31490    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31491set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31493$as_echo_n "checking for $ac_word... " >&6; }
31494if ${ac_cv_prog_AR+:} false; then :
31495  $as_echo_n "(cached) " >&6
31496else
31497  if test -n "$AR"; then
31498  ac_cv_prog_AR="$AR" # Let the user override the test.
31499else
31500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31501for as_dir in $PATH
31502do
31503  IFS=$as_save_IFS
31504  test -z "$as_dir" && as_dir=.
31505    for ac_exec_ext in '' $ac_executable_extensions; do
31506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31507    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31509    break 2
31510  fi
31511done
31512  done
31513IFS=$as_save_IFS
31514
31515fi
31516fi
31517AR=$ac_cv_prog_AR
31518if test -n "$AR"; then
31519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31520$as_echo "$AR" >&6; }
31521else
31522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31523$as_echo "no" >&6; }
31524fi
31525
31526
31527    test -n "$AR" && break
31528  done
31529fi
31530if test -z "$AR"; then
31531  ac_ct_AR=$AR
31532  for ac_prog in ar
31533do
31534  # Extract the first word of "$ac_prog", so it can be a program name with args.
31535set dummy $ac_prog; ac_word=$2
31536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31537$as_echo_n "checking for $ac_word... " >&6; }
31538if ${ac_cv_prog_ac_ct_AR+:} false; then :
31539  $as_echo_n "(cached) " >&6
31540else
31541  if test -n "$ac_ct_AR"; then
31542  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31543else
31544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31545for as_dir in $PATH
31546do
31547  IFS=$as_save_IFS
31548  test -z "$as_dir" && as_dir=.
31549    for ac_exec_ext in '' $ac_executable_extensions; do
31550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31551    ac_cv_prog_ac_ct_AR="$ac_prog"
31552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31553    break 2
31554  fi
31555done
31556  done
31557IFS=$as_save_IFS
31558
31559fi
31560fi
31561ac_ct_AR=$ac_cv_prog_ac_ct_AR
31562if test -n "$ac_ct_AR"; then
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31564$as_echo "$ac_ct_AR" >&6; }
31565else
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31567$as_echo "no" >&6; }
31568fi
31569
31570
31571  test -n "$ac_ct_AR" && break
31572done
31573
31574  if test "x$ac_ct_AR" = x; then
31575    AR=""
31576  else
31577    case $cross_compiling:$ac_tool_warned in
31578yes:)
31579{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31580$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31581ac_tool_warned=yes ;;
31582esac
31583    AR=$ac_ct_AR
31584  fi
31585fi
31586
31587    else
31588      # If it succeeded, then it was overridden by the user. We will use it
31589      # for the tool.
31590
31591      # First remove it from the list of overridden variables, so we can test
31592      # for unknown variables in the end.
31593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31594
31595      # Check if the provided tool contains a complete path.
31596      tool_specified="$AR"
31597      tool_basename="${tool_specified##*/}"
31598      if test "x$tool_basename" = "x$tool_specified"; then
31599        # A command without a complete path is provided, search $PATH.
31600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
31601$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
31602        # Extract the first word of "$tool_basename", so it can be a program name with args.
31603set dummy $tool_basename; ac_word=$2
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31605$as_echo_n "checking for $ac_word... " >&6; }
31606if ${ac_cv_path_AR+:} false; then :
31607  $as_echo_n "(cached) " >&6
31608else
31609  case $AR in
31610  [\\/]* | ?:[\\/]*)
31611  ac_cv_path_AR="$AR" # Let the user override the test with a path.
31612  ;;
31613  *)
31614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31615for as_dir in $PATH
31616do
31617  IFS=$as_save_IFS
31618  test -z "$as_dir" && as_dir=.
31619    for ac_exec_ext in '' $ac_executable_extensions; do
31620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31621    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
31622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31623    break 2
31624  fi
31625done
31626  done
31627IFS=$as_save_IFS
31628
31629  ;;
31630esac
31631fi
31632AR=$ac_cv_path_AR
31633if test -n "$AR"; then
31634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31635$as_echo "$AR" >&6; }
31636else
31637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31638$as_echo "no" >&6; }
31639fi
31640
31641
31642        if test "x$AR" = x; then
31643          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31644        fi
31645      else
31646        # Otherwise we believe it is a complete path. Use it as it is.
31647        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
31648$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
31649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
31650$as_echo_n "checking for AR... " >&6; }
31651        if test ! -x "$tool_specified"; then
31652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31653$as_echo "not found" >&6; }
31654          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
31655        fi
31656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31657$as_echo "$tool_specified" >&6; }
31658      fi
31659    fi
31660  fi
31661
31662
31663
31664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31665
31666  # First separate the path from the arguments. This will split at the first
31667  # space.
31668  complete="$AR"
31669  path="${complete%% *}"
31670  tmp="$complete EOL"
31671  arguments="${tmp#* }"
31672
31673  # Input might be given as Windows format, start by converting to
31674  # unix format.
31675  new_path=`$CYGPATH -u "$path"`
31676
31677  # Now try to locate executable using which
31678  new_path=`$WHICH "$new_path" 2> /dev/null`
31679  # bat and cmd files are not always considered executable in cygwin causing which
31680  # to not find them
31681  if test "x$new_path" = x \
31682      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31683      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31684    new_path=`$CYGPATH -u "$path"`
31685  fi
31686  if test "x$new_path" = x; then
31687    # Oops. Which didn't find the executable.
31688    # The splitting of arguments from the executable at a space might have been incorrect,
31689    # since paths with space are more likely in Windows. Give it another try with the whole
31690    # argument.
31691    path="$complete"
31692    arguments="EOL"
31693    new_path=`$CYGPATH -u "$path"`
31694    new_path=`$WHICH "$new_path" 2> /dev/null`
31695    # bat and cmd files are not always considered executable in cygwin causing which
31696    # to not find them
31697    if test "x$new_path" = x \
31698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31700      new_path=`$CYGPATH -u "$path"`
31701    fi
31702    if test "x$new_path" = x; then
31703      # It's still not found. Now this is an unrecoverable error.
31704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31705$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31706      has_space=`$ECHO "$complete" | $GREP " "`
31707      if test "x$has_space" != x; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31710      fi
31711      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31712    fi
31713  fi
31714
31715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31718  # "foo.exe" is OK but "foo" is an error.
31719  #
31720  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31721  # It is also a way to make sure we got the proper file name for the real test later on.
31722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31723  if test "x$test_shortpath" = x; then
31724    # Short path failed, file does not exist as specified.
31725    # Try adding .exe or .cmd
31726    if test -f "${new_path}.exe"; then
31727      input_to_shortpath="${new_path}.exe"
31728    elif test -f "${new_path}.cmd"; then
31729      input_to_shortpath="${new_path}.cmd"
31730    else
31731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
31732$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
31733      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31734$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31735      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31736    fi
31737  else
31738    input_to_shortpath="$new_path"
31739  fi
31740
31741  # Call helper function which possibly converts this using DOS-style short mode.
31742  # If so, the updated path is stored in $new_path.
31743  new_path="$input_to_shortpath"
31744
31745  input_path="$input_to_shortpath"
31746  # Check if we need to convert this using DOS-style short mode. If the path
31747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31748  # take no chances and rewrite it.
31749  # Note: m4 eats our [], so we need to use [ and ] instead.
31750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31751  if test "x$has_forbidden_chars" != x; then
31752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31756      # Going to short mode and back again did indeed matter. Since short mode is
31757      # case insensitive, let's make it lowercase to improve readability.
31758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31759      # Now convert it back to Unix-stile (cygpath)
31760      input_path=`$CYGPATH -u "$shortmode_path"`
31761      new_path="$input_path"
31762    fi
31763  fi
31764
31765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31766  if test "x$test_cygdrive_prefix" = x; then
31767    # As a simple fix, exclude /usr/bin since it's not a real path.
31768    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31770      # a path prefixed by /cygdrive for fixpath to work.
31771      new_path="$CYGWIN_ROOT_PATH$input_path"
31772    fi
31773  fi
31774
31775  # remove trailing .exe if any
31776  new_path="${new_path/%.exe/}"
31777
31778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31779
31780  # First separate the path from the arguments. This will split at the first
31781  # space.
31782  complete="$AR"
31783  path="${complete%% *}"
31784  tmp="$complete EOL"
31785  arguments="${tmp#* }"
31786
31787  # Input might be given as Windows format, start by converting to
31788  # unix format.
31789  new_path="$path"
31790
31791  windows_path="$new_path"
31792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31793    unix_path=`$CYGPATH -u "$windows_path"`
31794    new_path="$unix_path"
31795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31797    new_path="$unix_path"
31798  fi
31799
31800
31801  # Now try to locate executable using which
31802  new_path=`$WHICH "$new_path" 2> /dev/null`
31803
31804  if test "x$new_path" = x; then
31805    # Oops. Which didn't find the executable.
31806    # The splitting of arguments from the executable at a space might have been incorrect,
31807    # since paths with space are more likely in Windows. Give it another try with the whole
31808    # argument.
31809    path="$complete"
31810    arguments="EOL"
31811    new_path="$path"
31812
31813  windows_path="$new_path"
31814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31815    unix_path=`$CYGPATH -u "$windows_path"`
31816    new_path="$unix_path"
31817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31819    new_path="$unix_path"
31820  fi
31821
31822
31823    new_path=`$WHICH "$new_path" 2> /dev/null`
31824
31825    if test "x$new_path" = x; then
31826      # It's still not found. Now this is an unrecoverable error.
31827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31828$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31829      has_space=`$ECHO "$complete" | $GREP " "`
31830      if test "x$has_space" != x; then
31831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31833      fi
31834      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31835    fi
31836  fi
31837
31838  # Now new_path has a complete unix path to the binary
31839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31840    # Keep paths in /bin as-is, but remove trailing .exe if any
31841    new_path="${new_path/%.exe/}"
31842    # Do not save /bin paths to all_fixpath_prefixes!
31843  else
31844    # Not in mixed or Windows style, start by that.
31845    new_path=`cmd //c echo $new_path`
31846
31847  input_path="$new_path"
31848  # Check if we need to convert this using DOS-style short mode. If the path
31849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31850  # take no chances and rewrite it.
31851  # Note: m4 eats our [], so we need to use [ and ] instead.
31852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31853  if test "x$has_forbidden_chars" != x; then
31854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31856  fi
31857
31858    # Output is in $new_path
31859
31860  windows_path="$new_path"
31861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31862    unix_path=`$CYGPATH -u "$windows_path"`
31863    new_path="$unix_path"
31864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31866    new_path="$unix_path"
31867  fi
31868
31869    # remove trailing .exe if any
31870    new_path="${new_path/%.exe/}"
31871
31872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31874  fi
31875
31876  else
31877    # We're on a posix platform. Hooray! :)
31878    # First separate the path from the arguments. This will split at the first
31879    # space.
31880    complete="$AR"
31881    path="${complete%% *}"
31882    tmp="$complete EOL"
31883    arguments="${tmp#* }"
31884
31885    # Cannot rely on the command "which" here since it doesn't always work.
31886    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31887    if test -z "$is_absolute_path"; then
31888      # Path to executable is not absolute. Find it.
31889      IFS_save="$IFS"
31890      IFS=:
31891      for p in $PATH; do
31892        if test -f "$p/$path" && test -x "$p/$path"; then
31893          new_path="$p/$path"
31894          break
31895        fi
31896      done
31897      IFS="$IFS_save"
31898    else
31899      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
31900$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
31901      new_path="$path"
31902    fi
31903
31904    if test "x$new_path" = x; then
31905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31906$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31907      has_space=`$ECHO "$complete" | $GREP " "`
31908      if test "x$has_space" != x; then
31909        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31910$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31911      fi
31912      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31913    fi
31914  fi
31915
31916  # Now join together the path and the arguments once again
31917  if test "x$arguments" != xEOL; then
31918    new_complete="$new_path ${arguments% *}"
31919  else
31920    new_complete="$new_path"
31921  fi
31922
31923  if test "x$complete" != "x$new_complete"; then
31924    AR="$new_complete"
31925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
31926$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
31927  fi
31928
31929  fi
31930  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31931    ARFLAGS="-r"
31932  elif test "x$OPENJDK_TARGET_OS" = xaix; then
31933    ARFLAGS="-X64"
31934  else
31935    ARFLAGS=""
31936  fi
31937
31938
31939  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
31940  HOTSPOT_CXX="$CXX"
31941  HOTSPOT_LD="$LD"
31942
31943
31944
31945  COMPILER_NAME=gcc
31946  COMPILER_TYPE=CC
31947  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
31948
31949    # For now, assume that we are always compiling using cl.exe.
31950    CC_OUT_OPTION=-Fo
31951    EXE_OUT_OPTION=-out:
31952    LD_OUT_OPTION=-out:
31953    AR_OUT_OPTION=-out:
31954    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
31955    # program for something completely different.
31956    # Extract the first word of "link", so it can be a program name with args.
31957set dummy link; ac_word=$2
31958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31959$as_echo_n "checking for $ac_word... " >&6; }
31960if ${ac_cv_prog_WINLD+:} false; then :
31961  $as_echo_n "(cached) " >&6
31962else
31963  if test -n "$WINLD"; then
31964  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
31965else
31966  ac_prog_rejected=no
31967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31968for as_dir in $PATH
31969do
31970  IFS=$as_save_IFS
31971  test -z "$as_dir" && as_dir=.
31972    for ac_exec_ext in '' $ac_executable_extensions; do
31973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31974    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31975       ac_prog_rejected=yes
31976       continue
31977     fi
31978    ac_cv_prog_WINLD="link"
31979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31980    break 2
31981  fi
31982done
31983  done
31984IFS=$as_save_IFS
31985
31986if test $ac_prog_rejected = yes; then
31987  # We found a bogon in the path, so make sure we never use it.
31988  set dummy $ac_cv_prog_WINLD
31989  shift
31990  if test $# != 0; then
31991    # We chose a different compiler from the bogus one.
31992    # However, it has the same basename, so the bogon will be chosen
31993    # first if we set WINLD to just the basename; use the full file name.
31994    shift
31995    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
31996  fi
31997fi
31998fi
31999fi
32000WINLD=$ac_cv_prog_WINLD
32001if test -n "$WINLD"; then
32002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
32003$as_echo "$WINLD" >&6; }
32004else
32005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32006$as_echo "no" >&6; }
32007fi
32008
32009
32010    # Since we must ignore the first found link, WINLD will contain
32011    # the full path to the link.exe program.
32012
32013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32014
32015  # First separate the path from the arguments. This will split at the first
32016  # space.
32017  complete="$WINLD"
32018  path="${complete%% *}"
32019  tmp="$complete EOL"
32020  arguments="${tmp#* }"
32021
32022  # Input might be given as Windows format, start by converting to
32023  # unix format.
32024  new_path=`$CYGPATH -u "$path"`
32025
32026  # Now try to locate executable using which
32027  new_path=`$WHICH "$new_path" 2> /dev/null`
32028  # bat and cmd files are not always considered executable in cygwin causing which
32029  # to not find them
32030  if test "x$new_path" = x \
32031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32033    new_path=`$CYGPATH -u "$path"`
32034  fi
32035  if test "x$new_path" = x; then
32036    # Oops. Which didn't find the executable.
32037    # The splitting of arguments from the executable at a space might have been incorrect,
32038    # since paths with space are more likely in Windows. Give it another try with the whole
32039    # argument.
32040    path="$complete"
32041    arguments="EOL"
32042    new_path=`$CYGPATH -u "$path"`
32043    new_path=`$WHICH "$new_path" 2> /dev/null`
32044    # bat and cmd files are not always considered executable in cygwin causing which
32045    # to not find them
32046    if test "x$new_path" = x \
32047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32049      new_path=`$CYGPATH -u "$path"`
32050    fi
32051    if test "x$new_path" = x; then
32052      # It's still not found. Now this is an unrecoverable error.
32053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32054$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32055      has_space=`$ECHO "$complete" | $GREP " "`
32056      if test "x$has_space" != x; then
32057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32059      fi
32060      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32061    fi
32062  fi
32063
32064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32067  # "foo.exe" is OK but "foo" is an error.
32068  #
32069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32070  # It is also a way to make sure we got the proper file name for the real test later on.
32071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32072  if test "x$test_shortpath" = x; then
32073    # Short path failed, file does not exist as specified.
32074    # Try adding .exe or .cmd
32075    if test -f "${new_path}.exe"; then
32076      input_to_shortpath="${new_path}.exe"
32077    elif test -f "${new_path}.cmd"; then
32078      input_to_shortpath="${new_path}.cmd"
32079    else
32080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
32081$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
32082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32084      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32085    fi
32086  else
32087    input_to_shortpath="$new_path"
32088  fi
32089
32090  # Call helper function which possibly converts this using DOS-style short mode.
32091  # If so, the updated path is stored in $new_path.
32092  new_path="$input_to_shortpath"
32093
32094  input_path="$input_to_shortpath"
32095  # Check if we need to convert this using DOS-style short mode. If the path
32096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32097  # take no chances and rewrite it.
32098  # Note: m4 eats our [], so we need to use [ and ] instead.
32099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32100  if test "x$has_forbidden_chars" != x; then
32101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32105      # Going to short mode and back again did indeed matter. Since short mode is
32106      # case insensitive, let's make it lowercase to improve readability.
32107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32108      # Now convert it back to Unix-stile (cygpath)
32109      input_path=`$CYGPATH -u "$shortmode_path"`
32110      new_path="$input_path"
32111    fi
32112  fi
32113
32114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32115  if test "x$test_cygdrive_prefix" = x; then
32116    # As a simple fix, exclude /usr/bin since it's not a real path.
32117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32119      # a path prefixed by /cygdrive for fixpath to work.
32120      new_path="$CYGWIN_ROOT_PATH$input_path"
32121    fi
32122  fi
32123
32124  # remove trailing .exe if any
32125  new_path="${new_path/%.exe/}"
32126
32127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32128
32129  # First separate the path from the arguments. This will split at the first
32130  # space.
32131  complete="$WINLD"
32132  path="${complete%% *}"
32133  tmp="$complete EOL"
32134  arguments="${tmp#* }"
32135
32136  # Input might be given as Windows format, start by converting to
32137  # unix format.
32138  new_path="$path"
32139
32140  windows_path="$new_path"
32141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142    unix_path=`$CYGPATH -u "$windows_path"`
32143    new_path="$unix_path"
32144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32146    new_path="$unix_path"
32147  fi
32148
32149
32150  # Now try to locate executable using which
32151  new_path=`$WHICH "$new_path" 2> /dev/null`
32152
32153  if test "x$new_path" = x; then
32154    # Oops. Which didn't find the executable.
32155    # The splitting of arguments from the executable at a space might have been incorrect,
32156    # since paths with space are more likely in Windows. Give it another try with the whole
32157    # argument.
32158    path="$complete"
32159    arguments="EOL"
32160    new_path="$path"
32161
32162  windows_path="$new_path"
32163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32164    unix_path=`$CYGPATH -u "$windows_path"`
32165    new_path="$unix_path"
32166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32168    new_path="$unix_path"
32169  fi
32170
32171
32172    new_path=`$WHICH "$new_path" 2> /dev/null`
32173
32174    if test "x$new_path" = x; then
32175      # It's still not found. Now this is an unrecoverable error.
32176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32177$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32178      has_space=`$ECHO "$complete" | $GREP " "`
32179      if test "x$has_space" != x; then
32180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32182      fi
32183      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32184    fi
32185  fi
32186
32187  # Now new_path has a complete unix path to the binary
32188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32189    # Keep paths in /bin as-is, but remove trailing .exe if any
32190    new_path="${new_path/%.exe/}"
32191    # Do not save /bin paths to all_fixpath_prefixes!
32192  else
32193    # Not in mixed or Windows style, start by that.
32194    new_path=`cmd //c echo $new_path`
32195
32196  input_path="$new_path"
32197  # Check if we need to convert this using DOS-style short mode. If the path
32198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32199  # take no chances and rewrite it.
32200  # Note: m4 eats our [], so we need to use [ and ] instead.
32201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32202  if test "x$has_forbidden_chars" != x; then
32203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32205  fi
32206
32207    # Output is in $new_path
32208
32209  windows_path="$new_path"
32210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32211    unix_path=`$CYGPATH -u "$windows_path"`
32212    new_path="$unix_path"
32213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32215    new_path="$unix_path"
32216  fi
32217
32218    # remove trailing .exe if any
32219    new_path="${new_path/%.exe/}"
32220
32221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32223  fi
32224
32225  else
32226    # We're on a posix platform. Hooray! :)
32227    # First separate the path from the arguments. This will split at the first
32228    # space.
32229    complete="$WINLD"
32230    path="${complete%% *}"
32231    tmp="$complete EOL"
32232    arguments="${tmp#* }"
32233
32234    # Cannot rely on the command "which" here since it doesn't always work.
32235    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32236    if test -z "$is_absolute_path"; then
32237      # Path to executable is not absolute. Find it.
32238      IFS_save="$IFS"
32239      IFS=:
32240      for p in $PATH; do
32241        if test -f "$p/$path" && test -x "$p/$path"; then
32242          new_path="$p/$path"
32243          break
32244        fi
32245      done
32246      IFS="$IFS_save"
32247    else
32248      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
32249$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
32250      new_path="$path"
32251    fi
32252
32253    if test "x$new_path" = x; then
32254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32255$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32256      has_space=`$ECHO "$complete" | $GREP " "`
32257      if test "x$has_space" != x; then
32258        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32260      fi
32261      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32262    fi
32263  fi
32264
32265  # Now join together the path and the arguments once again
32266  if test "x$arguments" != xEOL; then
32267    new_complete="$new_path ${arguments% *}"
32268  else
32269    new_complete="$new_path"
32270  fi
32271
32272  if test "x$complete" != "x$new_complete"; then
32273    WINLD="$new_complete"
32274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
32275$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
32276  fi
32277
32278    printf "Windows linker was found at $WINLD\n"
32279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32280$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32281    "$WINLD" --version > /dev/null
32282    if test $? -eq 0 ; then
32283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32284$as_echo "no" >&6; }
32285      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32286    else
32287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32288$as_echo "yes" >&6; }
32289    fi
32290    LD="$WINLD"
32291    LDEXE="$WINLD"
32292    LDCXX="$WINLD"
32293    LDEXECXX="$WINLD"
32294
32295    # Extract the first word of "mt", so it can be a program name with args.
32296set dummy mt; ac_word=$2
32297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32298$as_echo_n "checking for $ac_word... " >&6; }
32299if ${ac_cv_prog_MT+:} false; then :
32300  $as_echo_n "(cached) " >&6
32301else
32302  if test -n "$MT"; then
32303  ac_cv_prog_MT="$MT" # Let the user override the test.
32304else
32305  ac_prog_rejected=no
32306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32307for as_dir in $PATH
32308do
32309  IFS=$as_save_IFS
32310  test -z "$as_dir" && as_dir=.
32311    for ac_exec_ext in '' $ac_executable_extensions; do
32312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32313    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
32314       ac_prog_rejected=yes
32315       continue
32316     fi
32317    ac_cv_prog_MT="mt"
32318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32319    break 2
32320  fi
32321done
32322  done
32323IFS=$as_save_IFS
32324
32325if test $ac_prog_rejected = yes; then
32326  # We found a bogon in the path, so make sure we never use it.
32327  set dummy $ac_cv_prog_MT
32328  shift
32329  if test $# != 0; then
32330    # We chose a different compiler from the bogus one.
32331    # However, it has the same basename, so the bogon will be chosen
32332    # first if we set MT to just the basename; use the full file name.
32333    shift
32334    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
32335  fi
32336fi
32337fi
32338fi
32339MT=$ac_cv_prog_MT
32340if test -n "$MT"; then
32341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
32342$as_echo "$MT" >&6; }
32343else
32344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32345$as_echo "no" >&6; }
32346fi
32347
32348
32349
32350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32351
32352  # First separate the path from the arguments. This will split at the first
32353  # space.
32354  complete="$MT"
32355  path="${complete%% *}"
32356  tmp="$complete EOL"
32357  arguments="${tmp#* }"
32358
32359  # Input might be given as Windows format, start by converting to
32360  # unix format.
32361  new_path=`$CYGPATH -u "$path"`
32362
32363  # Now try to locate executable using which
32364  new_path=`$WHICH "$new_path" 2> /dev/null`
32365  # bat and cmd files are not always considered executable in cygwin causing which
32366  # to not find them
32367  if test "x$new_path" = x \
32368      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32369      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32370    new_path=`$CYGPATH -u "$path"`
32371  fi
32372  if test "x$new_path" = x; then
32373    # Oops. Which didn't find the executable.
32374    # The splitting of arguments from the executable at a space might have been incorrect,
32375    # since paths with space are more likely in Windows. Give it another try with the whole
32376    # argument.
32377    path="$complete"
32378    arguments="EOL"
32379    new_path=`$CYGPATH -u "$path"`
32380    new_path=`$WHICH "$new_path" 2> /dev/null`
32381    # bat and cmd files are not always considered executable in cygwin causing which
32382    # to not find them
32383    if test "x$new_path" = x \
32384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32386      new_path=`$CYGPATH -u "$path"`
32387    fi
32388    if test "x$new_path" = x; then
32389      # It's still not found. Now this is an unrecoverable error.
32390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32391$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32392      has_space=`$ECHO "$complete" | $GREP " "`
32393      if test "x$has_space" != x; then
32394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32396      fi
32397      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32398    fi
32399  fi
32400
32401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32404  # "foo.exe" is OK but "foo" is an error.
32405  #
32406  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32407  # It is also a way to make sure we got the proper file name for the real test later on.
32408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32409  if test "x$test_shortpath" = x; then
32410    # Short path failed, file does not exist as specified.
32411    # Try adding .exe or .cmd
32412    if test -f "${new_path}.exe"; then
32413      input_to_shortpath="${new_path}.exe"
32414    elif test -f "${new_path}.cmd"; then
32415      input_to_shortpath="${new_path}.cmd"
32416    else
32417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
32418$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32421      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32422    fi
32423  else
32424    input_to_shortpath="$new_path"
32425  fi
32426
32427  # Call helper function which possibly converts this using DOS-style short mode.
32428  # If so, the updated path is stored in $new_path.
32429  new_path="$input_to_shortpath"
32430
32431  input_path="$input_to_shortpath"
32432  # Check if we need to convert this using DOS-style short mode. If the path
32433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32434  # take no chances and rewrite it.
32435  # Note: m4 eats our [], so we need to use [ and ] instead.
32436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32437  if test "x$has_forbidden_chars" != x; then
32438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32442      # Going to short mode and back again did indeed matter. Since short mode is
32443      # case insensitive, let's make it lowercase to improve readability.
32444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32445      # Now convert it back to Unix-stile (cygpath)
32446      input_path=`$CYGPATH -u "$shortmode_path"`
32447      new_path="$input_path"
32448    fi
32449  fi
32450
32451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32452  if test "x$test_cygdrive_prefix" = x; then
32453    # As a simple fix, exclude /usr/bin since it's not a real path.
32454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32456      # a path prefixed by /cygdrive for fixpath to work.
32457      new_path="$CYGWIN_ROOT_PATH$input_path"
32458    fi
32459  fi
32460
32461  # remove trailing .exe if any
32462  new_path="${new_path/%.exe/}"
32463
32464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32465
32466  # First separate the path from the arguments. This will split at the first
32467  # space.
32468  complete="$MT"
32469  path="${complete%% *}"
32470  tmp="$complete EOL"
32471  arguments="${tmp#* }"
32472
32473  # Input might be given as Windows format, start by converting to
32474  # unix format.
32475  new_path="$path"
32476
32477  windows_path="$new_path"
32478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32479    unix_path=`$CYGPATH -u "$windows_path"`
32480    new_path="$unix_path"
32481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32483    new_path="$unix_path"
32484  fi
32485
32486
32487  # Now try to locate executable using which
32488  new_path=`$WHICH "$new_path" 2> /dev/null`
32489
32490  if test "x$new_path" = x; then
32491    # Oops. Which didn't find the executable.
32492    # The splitting of arguments from the executable at a space might have been incorrect,
32493    # since paths with space are more likely in Windows. Give it another try with the whole
32494    # argument.
32495    path="$complete"
32496    arguments="EOL"
32497    new_path="$path"
32498
32499  windows_path="$new_path"
32500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32501    unix_path=`$CYGPATH -u "$windows_path"`
32502    new_path="$unix_path"
32503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32505    new_path="$unix_path"
32506  fi
32507
32508
32509    new_path=`$WHICH "$new_path" 2> /dev/null`
32510
32511    if test "x$new_path" = x; then
32512      # It's still not found. Now this is an unrecoverable error.
32513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32514$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32515      has_space=`$ECHO "$complete" | $GREP " "`
32516      if test "x$has_space" != x; then
32517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32519      fi
32520      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32521    fi
32522  fi
32523
32524  # Now new_path has a complete unix path to the binary
32525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32526    # Keep paths in /bin as-is, but remove trailing .exe if any
32527    new_path="${new_path/%.exe/}"
32528    # Do not save /bin paths to all_fixpath_prefixes!
32529  else
32530    # Not in mixed or Windows style, start by that.
32531    new_path=`cmd //c echo $new_path`
32532
32533  input_path="$new_path"
32534  # Check if we need to convert this using DOS-style short mode. If the path
32535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32536  # take no chances and rewrite it.
32537  # Note: m4 eats our [], so we need to use [ and ] instead.
32538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32539  if test "x$has_forbidden_chars" != x; then
32540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32542  fi
32543
32544    # Output is in $new_path
32545
32546  windows_path="$new_path"
32547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32548    unix_path=`$CYGPATH -u "$windows_path"`
32549    new_path="$unix_path"
32550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32552    new_path="$unix_path"
32553  fi
32554
32555    # remove trailing .exe if any
32556    new_path="${new_path/%.exe/}"
32557
32558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32560  fi
32561
32562  else
32563    # We're on a posix platform. Hooray! :)
32564    # First separate the path from the arguments. This will split at the first
32565    # space.
32566    complete="$MT"
32567    path="${complete%% *}"
32568    tmp="$complete EOL"
32569    arguments="${tmp#* }"
32570
32571    # Cannot rely on the command "which" here since it doesn't always work.
32572    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32573    if test -z "$is_absolute_path"; then
32574      # Path to executable is not absolute. Find it.
32575      IFS_save="$IFS"
32576      IFS=:
32577      for p in $PATH; do
32578        if test -f "$p/$path" && test -x "$p/$path"; then
32579          new_path="$p/$path"
32580          break
32581        fi
32582      done
32583      IFS="$IFS_save"
32584    else
32585      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
32586$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
32587      new_path="$path"
32588    fi
32589
32590    if test "x$new_path" = x; then
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32592$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32593      has_space=`$ECHO "$complete" | $GREP " "`
32594      if test "x$has_space" != x; then
32595        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32597      fi
32598      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32599    fi
32600  fi
32601
32602  # Now join together the path and the arguments once again
32603  if test "x$arguments" != xEOL; then
32604    new_complete="$new_path ${arguments% *}"
32605  else
32606    new_complete="$new_path"
32607  fi
32608
32609  if test "x$complete" != "x$new_complete"; then
32610    MT="$new_complete"
32611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
32612$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
32613  fi
32614
32615    # The resource compiler
32616    # Extract the first word of "rc", so it can be a program name with args.
32617set dummy rc; ac_word=$2
32618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32619$as_echo_n "checking for $ac_word... " >&6; }
32620if ${ac_cv_prog_RC+:} false; then :
32621  $as_echo_n "(cached) " >&6
32622else
32623  if test -n "$RC"; then
32624  ac_cv_prog_RC="$RC" # Let the user override the test.
32625else
32626  ac_prog_rejected=no
32627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32628for as_dir in $PATH
32629do
32630  IFS=$as_save_IFS
32631  test -z "$as_dir" && as_dir=.
32632    for ac_exec_ext in '' $ac_executable_extensions; do
32633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32634    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
32635       ac_prog_rejected=yes
32636       continue
32637     fi
32638    ac_cv_prog_RC="rc"
32639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32640    break 2
32641  fi
32642done
32643  done
32644IFS=$as_save_IFS
32645
32646if test $ac_prog_rejected = yes; then
32647  # We found a bogon in the path, so make sure we never use it.
32648  set dummy $ac_cv_prog_RC
32649  shift
32650  if test $# != 0; then
32651    # We chose a different compiler from the bogus one.
32652    # However, it has the same basename, so the bogon will be chosen
32653    # first if we set RC to just the basename; use the full file name.
32654    shift
32655    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
32656  fi
32657fi
32658fi
32659fi
32660RC=$ac_cv_prog_RC
32661if test -n "$RC"; then
32662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
32663$as_echo "$RC" >&6; }
32664else
32665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32666$as_echo "no" >&6; }
32667fi
32668
32669
32670
32671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32672
32673  # First separate the path from the arguments. This will split at the first
32674  # space.
32675  complete="$RC"
32676  path="${complete%% *}"
32677  tmp="$complete EOL"
32678  arguments="${tmp#* }"
32679
32680  # Input might be given as Windows format, start by converting to
32681  # unix format.
32682  new_path=`$CYGPATH -u "$path"`
32683
32684  # Now try to locate executable using which
32685  new_path=`$WHICH "$new_path" 2> /dev/null`
32686  # bat and cmd files are not always considered executable in cygwin causing which
32687  # to not find them
32688  if test "x$new_path" = x \
32689      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32690      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32691    new_path=`$CYGPATH -u "$path"`
32692  fi
32693  if test "x$new_path" = x; then
32694    # Oops. Which didn't find the executable.
32695    # The splitting of arguments from the executable at a space might have been incorrect,
32696    # since paths with space are more likely in Windows. Give it another try with the whole
32697    # argument.
32698    path="$complete"
32699    arguments="EOL"
32700    new_path=`$CYGPATH -u "$path"`
32701    new_path=`$WHICH "$new_path" 2> /dev/null`
32702    # bat and cmd files are not always considered executable in cygwin causing which
32703    # to not find them
32704    if test "x$new_path" = x \
32705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32707      new_path=`$CYGPATH -u "$path"`
32708    fi
32709    if test "x$new_path" = x; then
32710      # It's still not found. Now this is an unrecoverable error.
32711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32712$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32713      has_space=`$ECHO "$complete" | $GREP " "`
32714      if test "x$has_space" != x; then
32715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32717      fi
32718      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32719    fi
32720  fi
32721
32722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32725  # "foo.exe" is OK but "foo" is an error.
32726  #
32727  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32728  # It is also a way to make sure we got the proper file name for the real test later on.
32729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32730  if test "x$test_shortpath" = x; then
32731    # Short path failed, file does not exist as specified.
32732    # Try adding .exe or .cmd
32733    if test -f "${new_path}.exe"; then
32734      input_to_shortpath="${new_path}.exe"
32735    elif test -f "${new_path}.cmd"; then
32736      input_to_shortpath="${new_path}.cmd"
32737    else
32738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
32739$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32742      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32743    fi
32744  else
32745    input_to_shortpath="$new_path"
32746  fi
32747
32748  # Call helper function which possibly converts this using DOS-style short mode.
32749  # If so, the updated path is stored in $new_path.
32750  new_path="$input_to_shortpath"
32751
32752  input_path="$input_to_shortpath"
32753  # Check if we need to convert this using DOS-style short mode. If the path
32754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32755  # take no chances and rewrite it.
32756  # Note: m4 eats our [], so we need to use [ and ] instead.
32757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32758  if test "x$has_forbidden_chars" != x; then
32759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32763      # Going to short mode and back again did indeed matter. Since short mode is
32764      # case insensitive, let's make it lowercase to improve readability.
32765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32766      # Now convert it back to Unix-stile (cygpath)
32767      input_path=`$CYGPATH -u "$shortmode_path"`
32768      new_path="$input_path"
32769    fi
32770  fi
32771
32772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32773  if test "x$test_cygdrive_prefix" = x; then
32774    # As a simple fix, exclude /usr/bin since it's not a real path.
32775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32777      # a path prefixed by /cygdrive for fixpath to work.
32778      new_path="$CYGWIN_ROOT_PATH$input_path"
32779    fi
32780  fi
32781
32782  # remove trailing .exe if any
32783  new_path="${new_path/%.exe/}"
32784
32785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32786
32787  # First separate the path from the arguments. This will split at the first
32788  # space.
32789  complete="$RC"
32790  path="${complete%% *}"
32791  tmp="$complete EOL"
32792  arguments="${tmp#* }"
32793
32794  # Input might be given as Windows format, start by converting to
32795  # unix format.
32796  new_path="$path"
32797
32798  windows_path="$new_path"
32799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32800    unix_path=`$CYGPATH -u "$windows_path"`
32801    new_path="$unix_path"
32802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32804    new_path="$unix_path"
32805  fi
32806
32807
32808  # Now try to locate executable using which
32809  new_path=`$WHICH "$new_path" 2> /dev/null`
32810
32811  if test "x$new_path" = x; then
32812    # Oops. Which didn't find the executable.
32813    # The splitting of arguments from the executable at a space might have been incorrect,
32814    # since paths with space are more likely in Windows. Give it another try with the whole
32815    # argument.
32816    path="$complete"
32817    arguments="EOL"
32818    new_path="$path"
32819
32820  windows_path="$new_path"
32821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822    unix_path=`$CYGPATH -u "$windows_path"`
32823    new_path="$unix_path"
32824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32826    new_path="$unix_path"
32827  fi
32828
32829
32830    new_path=`$WHICH "$new_path" 2> /dev/null`
32831
32832    if test "x$new_path" = x; then
32833      # It's still not found. Now this is an unrecoverable error.
32834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32835$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32836      has_space=`$ECHO "$complete" | $GREP " "`
32837      if test "x$has_space" != x; then
32838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32840      fi
32841      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32842    fi
32843  fi
32844
32845  # Now new_path has a complete unix path to the binary
32846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32847    # Keep paths in /bin as-is, but remove trailing .exe if any
32848    new_path="${new_path/%.exe/}"
32849    # Do not save /bin paths to all_fixpath_prefixes!
32850  else
32851    # Not in mixed or Windows style, start by that.
32852    new_path=`cmd //c echo $new_path`
32853
32854  input_path="$new_path"
32855  # Check if we need to convert this using DOS-style short mode. If the path
32856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32857  # take no chances and rewrite it.
32858  # Note: m4 eats our [], so we need to use [ and ] instead.
32859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32860  if test "x$has_forbidden_chars" != x; then
32861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32863  fi
32864
32865    # Output is in $new_path
32866
32867  windows_path="$new_path"
32868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32869    unix_path=`$CYGPATH -u "$windows_path"`
32870    new_path="$unix_path"
32871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32873    new_path="$unix_path"
32874  fi
32875
32876    # remove trailing .exe if any
32877    new_path="${new_path/%.exe/}"
32878
32879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32881  fi
32882
32883  else
32884    # We're on a posix platform. Hooray! :)
32885    # First separate the path from the arguments. This will split at the first
32886    # space.
32887    complete="$RC"
32888    path="${complete%% *}"
32889    tmp="$complete EOL"
32890    arguments="${tmp#* }"
32891
32892    # Cannot rely on the command "which" here since it doesn't always work.
32893    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32894    if test -z "$is_absolute_path"; then
32895      # Path to executable is not absolute. Find it.
32896      IFS_save="$IFS"
32897      IFS=:
32898      for p in $PATH; do
32899        if test -f "$p/$path" && test -x "$p/$path"; then
32900          new_path="$p/$path"
32901          break
32902        fi
32903      done
32904      IFS="$IFS_save"
32905    else
32906      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
32907$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
32908      new_path="$path"
32909    fi
32910
32911    if test "x$new_path" = x; then
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32913$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32914      has_space=`$ECHO "$complete" | $GREP " "`
32915      if test "x$has_space" != x; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32917$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32918      fi
32919      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32920    fi
32921  fi
32922
32923  # Now join together the path and the arguments once again
32924  if test "x$arguments" != xEOL; then
32925    new_complete="$new_path ${arguments% *}"
32926  else
32927    new_complete="$new_path"
32928  fi
32929
32930  if test "x$complete" != "x$new_complete"; then
32931    RC="$new_complete"
32932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
32933$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
32934  fi
32935
32936
32937    # For hotspot, we need these in Windows mixed path,
32938    # so rewrite them all. Need added .exe suffix.
32939    HOTSPOT_CXX="$CXX.exe"
32940    HOTSPOT_LD="$LD.exe"
32941    HOTSPOT_MT="$MT.exe"
32942    HOTSPOT_RC="$RC.exe"
32943
32944  unix_path="$HOTSPOT_CXX"
32945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32946    windows_path=`$CYGPATH -m "$unix_path"`
32947    HOTSPOT_CXX="$windows_path"
32948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32949    windows_path=`cmd //c echo $unix_path`
32950    HOTSPOT_CXX="$windows_path"
32951  fi
32952
32953
32954  unix_path="$HOTSPOT_LD"
32955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32956    windows_path=`$CYGPATH -m "$unix_path"`
32957    HOTSPOT_LD="$windows_path"
32958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32959    windows_path=`cmd //c echo $unix_path`
32960    HOTSPOT_LD="$windows_path"
32961  fi
32962
32963
32964  unix_path="$HOTSPOT_MT"
32965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32966    windows_path=`$CYGPATH -m "$unix_path"`
32967    HOTSPOT_MT="$windows_path"
32968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32969    windows_path=`cmd //c echo $unix_path`
32970    HOTSPOT_MT="$windows_path"
32971  fi
32972
32973
32974  unix_path="$HOTSPOT_RC"
32975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32976    windows_path=`$CYGPATH -m "$unix_path"`
32977    HOTSPOT_RC="$windows_path"
32978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32979    windows_path=`cmd //c echo $unix_path`
32980    HOTSPOT_RC="$windows_path"
32981  fi
32982
32983
32984
32985
32986    RC_FLAGS="-nologo -l 0x409 -r"
32987    if test "x$VARIANT" = xOPT; then :
32988
32989    RC_FLAGS="$RC_FLAGS -d NDEBUG"
32990
32991fi
32992
32993  # The version variables used to create RC_FLAGS may be overridden
32994  # in a custom configure script, or possibly the command line.
32995  # Let those variables be expanded at make time in spec.gmk.
32996  # The \$ are escaped to the shell, and the $(...) variables
32997  # are evaluated by make.
32998  RC_FLAGS="$RC_FLAGS \
32999      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
33000      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
33001      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
33002      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
33003      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
33004      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
33005      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
33006
33007  # lib.exe is used to create static libraries.
33008  # Extract the first word of "lib", so it can be a program name with args.
33009set dummy lib; ac_word=$2
33010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33011$as_echo_n "checking for $ac_word... " >&6; }
33012if ${ac_cv_prog_WINAR+:} false; then :
33013  $as_echo_n "(cached) " >&6
33014else
33015  if test -n "$WINAR"; then
33016  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
33017else
33018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33019for as_dir in $PATH
33020do
33021  IFS=$as_save_IFS
33022  test -z "$as_dir" && as_dir=.
33023    for ac_exec_ext in '' $ac_executable_extensions; do
33024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33025    ac_cv_prog_WINAR="lib"
33026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33027    break 2
33028  fi
33029done
33030  done
33031IFS=$as_save_IFS
33032
33033fi
33034fi
33035WINAR=$ac_cv_prog_WINAR
33036if test -n "$WINAR"; then
33037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
33038$as_echo "$WINAR" >&6; }
33039else
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33041$as_echo "no" >&6; }
33042fi
33043
33044
33045
33046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33047
33048  # First separate the path from the arguments. This will split at the first
33049  # space.
33050  complete="$WINAR"
33051  path="${complete%% *}"
33052  tmp="$complete EOL"
33053  arguments="${tmp#* }"
33054
33055  # Input might be given as Windows format, start by converting to
33056  # unix format.
33057  new_path=`$CYGPATH -u "$path"`
33058
33059  # Now try to locate executable using which
33060  new_path=`$WHICH "$new_path" 2> /dev/null`
33061  # bat and cmd files are not always considered executable in cygwin causing which
33062  # to not find them
33063  if test "x$new_path" = x \
33064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33066    new_path=`$CYGPATH -u "$path"`
33067  fi
33068  if test "x$new_path" = x; then
33069    # Oops. Which didn't find the executable.
33070    # The splitting of arguments from the executable at a space might have been incorrect,
33071    # since paths with space are more likely in Windows. Give it another try with the whole
33072    # argument.
33073    path="$complete"
33074    arguments="EOL"
33075    new_path=`$CYGPATH -u "$path"`
33076    new_path=`$WHICH "$new_path" 2> /dev/null`
33077    # bat and cmd files are not always considered executable in cygwin causing which
33078    # to not find them
33079    if test "x$new_path" = x \
33080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33082      new_path=`$CYGPATH -u "$path"`
33083    fi
33084    if test "x$new_path" = x; then
33085      # It's still not found. Now this is an unrecoverable error.
33086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33087$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33088      has_space=`$ECHO "$complete" | $GREP " "`
33089      if test "x$has_space" != x; then
33090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33092      fi
33093      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33094    fi
33095  fi
33096
33097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33100  # "foo.exe" is OK but "foo" is an error.
33101  #
33102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33103  # It is also a way to make sure we got the proper file name for the real test later on.
33104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33105  if test "x$test_shortpath" = x; then
33106    # Short path failed, file does not exist as specified.
33107    # Try adding .exe or .cmd
33108    if test -f "${new_path}.exe"; then
33109      input_to_shortpath="${new_path}.exe"
33110    elif test -f "${new_path}.cmd"; then
33111      input_to_shortpath="${new_path}.cmd"
33112    else
33113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
33114$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
33115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33117      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33118    fi
33119  else
33120    input_to_shortpath="$new_path"
33121  fi
33122
33123  # Call helper function which possibly converts this using DOS-style short mode.
33124  # If so, the updated path is stored in $new_path.
33125  new_path="$input_to_shortpath"
33126
33127  input_path="$input_to_shortpath"
33128  # Check if we need to convert this using DOS-style short mode. If the path
33129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33130  # take no chances and rewrite it.
33131  # Note: m4 eats our [], so we need to use [ and ] instead.
33132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33133  if test "x$has_forbidden_chars" != x; then
33134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33138      # Going to short mode and back again did indeed matter. Since short mode is
33139      # case insensitive, let's make it lowercase to improve readability.
33140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33141      # Now convert it back to Unix-stile (cygpath)
33142      input_path=`$CYGPATH -u "$shortmode_path"`
33143      new_path="$input_path"
33144    fi
33145  fi
33146
33147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33148  if test "x$test_cygdrive_prefix" = x; then
33149    # As a simple fix, exclude /usr/bin since it's not a real path.
33150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33152      # a path prefixed by /cygdrive for fixpath to work.
33153      new_path="$CYGWIN_ROOT_PATH$input_path"
33154    fi
33155  fi
33156
33157  # remove trailing .exe if any
33158  new_path="${new_path/%.exe/}"
33159
33160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33161
33162  # First separate the path from the arguments. This will split at the first
33163  # space.
33164  complete="$WINAR"
33165  path="${complete%% *}"
33166  tmp="$complete EOL"
33167  arguments="${tmp#* }"
33168
33169  # Input might be given as Windows format, start by converting to
33170  # unix format.
33171  new_path="$path"
33172
33173  windows_path="$new_path"
33174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33175    unix_path=`$CYGPATH -u "$windows_path"`
33176    new_path="$unix_path"
33177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33179    new_path="$unix_path"
33180  fi
33181
33182
33183  # Now try to locate executable using which
33184  new_path=`$WHICH "$new_path" 2> /dev/null`
33185
33186  if test "x$new_path" = x; then
33187    # Oops. Which didn't find the executable.
33188    # The splitting of arguments from the executable at a space might have been incorrect,
33189    # since paths with space are more likely in Windows. Give it another try with the whole
33190    # argument.
33191    path="$complete"
33192    arguments="EOL"
33193    new_path="$path"
33194
33195  windows_path="$new_path"
33196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33197    unix_path=`$CYGPATH -u "$windows_path"`
33198    new_path="$unix_path"
33199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33201    new_path="$unix_path"
33202  fi
33203
33204
33205    new_path=`$WHICH "$new_path" 2> /dev/null`
33206
33207    if test "x$new_path" = x; then
33208      # It's still not found. Now this is an unrecoverable error.
33209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33210$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33211      has_space=`$ECHO "$complete" | $GREP " "`
33212      if test "x$has_space" != x; then
33213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33215      fi
33216      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33217    fi
33218  fi
33219
33220  # Now new_path has a complete unix path to the binary
33221  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33222    # Keep paths in /bin as-is, but remove trailing .exe if any
33223    new_path="${new_path/%.exe/}"
33224    # Do not save /bin paths to all_fixpath_prefixes!
33225  else
33226    # Not in mixed or Windows style, start by that.
33227    new_path=`cmd //c echo $new_path`
33228
33229  input_path="$new_path"
33230  # Check if we need to convert this using DOS-style short mode. If the path
33231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33232  # take no chances and rewrite it.
33233  # Note: m4 eats our [], so we need to use [ and ] instead.
33234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33235  if test "x$has_forbidden_chars" != x; then
33236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33238  fi
33239
33240    # Output is in $new_path
33241
33242  windows_path="$new_path"
33243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33244    unix_path=`$CYGPATH -u "$windows_path"`
33245    new_path="$unix_path"
33246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33248    new_path="$unix_path"
33249  fi
33250
33251    # remove trailing .exe if any
33252    new_path="${new_path/%.exe/}"
33253
33254    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33255    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33256  fi
33257
33258  else
33259    # We're on a posix platform. Hooray! :)
33260    # First separate the path from the arguments. This will split at the first
33261    # space.
33262    complete="$WINAR"
33263    path="${complete%% *}"
33264    tmp="$complete EOL"
33265    arguments="${tmp#* }"
33266
33267    # Cannot rely on the command "which" here since it doesn't always work.
33268    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33269    if test -z "$is_absolute_path"; then
33270      # Path to executable is not absolute. Find it.
33271      IFS_save="$IFS"
33272      IFS=:
33273      for p in $PATH; do
33274        if test -f "$p/$path" && test -x "$p/$path"; then
33275          new_path="$p/$path"
33276          break
33277        fi
33278      done
33279      IFS="$IFS_save"
33280    else
33281      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
33282$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
33283      new_path="$path"
33284    fi
33285
33286    if test "x$new_path" = x; then
33287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33288$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33289      has_space=`$ECHO "$complete" | $GREP " "`
33290      if test "x$has_space" != x; then
33291        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33293      fi
33294      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33295    fi
33296  fi
33297
33298  # Now join together the path and the arguments once again
33299  if test "x$arguments" != xEOL; then
33300    new_complete="$new_path ${arguments% *}"
33301  else
33302    new_complete="$new_path"
33303  fi
33304
33305  if test "x$complete" != "x$new_complete"; then
33306    WINAR="$new_complete"
33307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
33308$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
33309  fi
33310
33311  AR="$WINAR"
33312  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
33313
33314  # Extract the first word of "dumpbin", so it can be a program name with args.
33315set dummy dumpbin; ac_word=$2
33316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33317$as_echo_n "checking for $ac_word... " >&6; }
33318if ${ac_cv_prog_DUMPBIN+:} false; then :
33319  $as_echo_n "(cached) " >&6
33320else
33321  if test -n "$DUMPBIN"; then
33322  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
33323else
33324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33325for as_dir in $PATH
33326do
33327  IFS=$as_save_IFS
33328  test -z "$as_dir" && as_dir=.
33329    for ac_exec_ext in '' $ac_executable_extensions; do
33330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33331    ac_cv_prog_DUMPBIN="dumpbin"
33332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33333    break 2
33334  fi
33335done
33336  done
33337IFS=$as_save_IFS
33338
33339fi
33340fi
33341DUMPBIN=$ac_cv_prog_DUMPBIN
33342if test -n "$DUMPBIN"; then
33343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
33344$as_echo "$DUMPBIN" >&6; }
33345else
33346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33347$as_echo "no" >&6; }
33348fi
33349
33350
33351
33352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33353
33354  # First separate the path from the arguments. This will split at the first
33355  # space.
33356  complete="$DUMPBIN"
33357  path="${complete%% *}"
33358  tmp="$complete EOL"
33359  arguments="${tmp#* }"
33360
33361  # Input might be given as Windows format, start by converting to
33362  # unix format.
33363  new_path=`$CYGPATH -u "$path"`
33364
33365  # Now try to locate executable using which
33366  new_path=`$WHICH "$new_path" 2> /dev/null`
33367  # bat and cmd files are not always considered executable in cygwin causing which
33368  # to not find them
33369  if test "x$new_path" = x \
33370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33372    new_path=`$CYGPATH -u "$path"`
33373  fi
33374  if test "x$new_path" = x; then
33375    # Oops. Which didn't find the executable.
33376    # The splitting of arguments from the executable at a space might have been incorrect,
33377    # since paths with space are more likely in Windows. Give it another try with the whole
33378    # argument.
33379    path="$complete"
33380    arguments="EOL"
33381    new_path=`$CYGPATH -u "$path"`
33382    new_path=`$WHICH "$new_path" 2> /dev/null`
33383    # bat and cmd files are not always considered executable in cygwin causing which
33384    # to not find them
33385    if test "x$new_path" = x \
33386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33388      new_path=`$CYGPATH -u "$path"`
33389    fi
33390    if test "x$new_path" = x; then
33391      # It's still not found. Now this is an unrecoverable error.
33392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33393$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33394      has_space=`$ECHO "$complete" | $GREP " "`
33395      if test "x$has_space" != x; then
33396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33398      fi
33399      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33400    fi
33401  fi
33402
33403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33406  # "foo.exe" is OK but "foo" is an error.
33407  #
33408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33409  # It is also a way to make sure we got the proper file name for the real test later on.
33410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33411  if test "x$test_shortpath" = x; then
33412    # Short path failed, file does not exist as specified.
33413    # Try adding .exe or .cmd
33414    if test -f "${new_path}.exe"; then
33415      input_to_shortpath="${new_path}.exe"
33416    elif test -f "${new_path}.cmd"; then
33417      input_to_shortpath="${new_path}.cmd"
33418    else
33419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
33420$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
33421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33423      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33424    fi
33425  else
33426    input_to_shortpath="$new_path"
33427  fi
33428
33429  # Call helper function which possibly converts this using DOS-style short mode.
33430  # If so, the updated path is stored in $new_path.
33431  new_path="$input_to_shortpath"
33432
33433  input_path="$input_to_shortpath"
33434  # Check if we need to convert this using DOS-style short mode. If the path
33435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33436  # take no chances and rewrite it.
33437  # Note: m4 eats our [], so we need to use [ and ] instead.
33438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33439  if test "x$has_forbidden_chars" != x; then
33440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33444      # Going to short mode and back again did indeed matter. Since short mode is
33445      # case insensitive, let's make it lowercase to improve readability.
33446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33447      # Now convert it back to Unix-stile (cygpath)
33448      input_path=`$CYGPATH -u "$shortmode_path"`
33449      new_path="$input_path"
33450    fi
33451  fi
33452
33453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33454  if test "x$test_cygdrive_prefix" = x; then
33455    # As a simple fix, exclude /usr/bin since it's not a real path.
33456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33458      # a path prefixed by /cygdrive for fixpath to work.
33459      new_path="$CYGWIN_ROOT_PATH$input_path"
33460    fi
33461  fi
33462
33463  # remove trailing .exe if any
33464  new_path="${new_path/%.exe/}"
33465
33466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33467
33468  # First separate the path from the arguments. This will split at the first
33469  # space.
33470  complete="$DUMPBIN"
33471  path="${complete%% *}"
33472  tmp="$complete EOL"
33473  arguments="${tmp#* }"
33474
33475  # Input might be given as Windows format, start by converting to
33476  # unix format.
33477  new_path="$path"
33478
33479  windows_path="$new_path"
33480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33481    unix_path=`$CYGPATH -u "$windows_path"`
33482    new_path="$unix_path"
33483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33485    new_path="$unix_path"
33486  fi
33487
33488
33489  # Now try to locate executable using which
33490  new_path=`$WHICH "$new_path" 2> /dev/null`
33491
33492  if test "x$new_path" = x; then
33493    # Oops. Which didn't find the executable.
33494    # The splitting of arguments from the executable at a space might have been incorrect,
33495    # since paths with space are more likely in Windows. Give it another try with the whole
33496    # argument.
33497    path="$complete"
33498    arguments="EOL"
33499    new_path="$path"
33500
33501  windows_path="$new_path"
33502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33503    unix_path=`$CYGPATH -u "$windows_path"`
33504    new_path="$unix_path"
33505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33507    new_path="$unix_path"
33508  fi
33509
33510
33511    new_path=`$WHICH "$new_path" 2> /dev/null`
33512
33513    if test "x$new_path" = x; then
33514      # It's still not found. Now this is an unrecoverable error.
33515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33516$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33517      has_space=`$ECHO "$complete" | $GREP " "`
33518      if test "x$has_space" != x; then
33519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33521      fi
33522      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33523    fi
33524  fi
33525
33526  # Now new_path has a complete unix path to the binary
33527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33528    # Keep paths in /bin as-is, but remove trailing .exe if any
33529    new_path="${new_path/%.exe/}"
33530    # Do not save /bin paths to all_fixpath_prefixes!
33531  else
33532    # Not in mixed or Windows style, start by that.
33533    new_path=`cmd //c echo $new_path`
33534
33535  input_path="$new_path"
33536  # Check if we need to convert this using DOS-style short mode. If the path
33537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33538  # take no chances and rewrite it.
33539  # Note: m4 eats our [], so we need to use [ and ] instead.
33540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33541  if test "x$has_forbidden_chars" != x; then
33542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33544  fi
33545
33546    # Output is in $new_path
33547
33548  windows_path="$new_path"
33549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33550    unix_path=`$CYGPATH -u "$windows_path"`
33551    new_path="$unix_path"
33552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33554    new_path="$unix_path"
33555  fi
33556
33557    # remove trailing .exe if any
33558    new_path="${new_path/%.exe/}"
33559
33560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33562  fi
33563
33564  else
33565    # We're on a posix platform. Hooray! :)
33566    # First separate the path from the arguments. This will split at the first
33567    # space.
33568    complete="$DUMPBIN"
33569    path="${complete%% *}"
33570    tmp="$complete EOL"
33571    arguments="${tmp#* }"
33572
33573    # Cannot rely on the command "which" here since it doesn't always work.
33574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33575    if test -z "$is_absolute_path"; then
33576      # Path to executable is not absolute. Find it.
33577      IFS_save="$IFS"
33578      IFS=:
33579      for p in $PATH; do
33580        if test -f "$p/$path" && test -x "$p/$path"; then
33581          new_path="$p/$path"
33582          break
33583        fi
33584      done
33585      IFS="$IFS_save"
33586    else
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
33588$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
33589      new_path="$path"
33590    fi
33591
33592    if test "x$new_path" = x; then
33593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33594$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33595      has_space=`$ECHO "$complete" | $GREP " "`
33596      if test "x$has_space" != x; then
33597        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33599      fi
33600      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33601    fi
33602  fi
33603
33604  # Now join together the path and the arguments once again
33605  if test "x$arguments" != xEOL; then
33606    new_complete="$new_path ${arguments% *}"
33607  else
33608    new_complete="$new_path"
33609  fi
33610
33611  if test "x$complete" != "x$new_complete"; then
33612    DUMPBIN="$new_complete"
33613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
33614$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
33615  fi
33616
33617
33618      COMPILER_TYPE=CL
33619      CCXXFLAGS="$CCXXFLAGS -nologo"
33620
33621fi
33622
33623
33624
33625  ac_ext=c
33626ac_cpp='$CPP $CPPFLAGS'
33627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33629ac_compiler_gnu=$ac_cv_c_compiler_gnu
33630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33631$as_echo_n "checking how to run the C preprocessor... " >&6; }
33632# On Suns, sometimes $CPP names a directory.
33633if test -n "$CPP" && test -d "$CPP"; then
33634  CPP=
33635fi
33636if test -z "$CPP"; then
33637  if ${ac_cv_prog_CPP+:} false; then :
33638  $as_echo_n "(cached) " >&6
33639else
33640      # Double quotes because CPP needs to be expanded
33641    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33642    do
33643      ac_preproc_ok=false
33644for ac_c_preproc_warn_flag in '' yes
33645do
33646  # Use a header file that comes with gcc, so configuring glibc
33647  # with a fresh cross-compiler works.
33648  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33649  # <limits.h> exists even on freestanding compilers.
33650  # On the NeXT, cc -E runs the code through the compiler's parser,
33651  # not just through cpp. "Syntax error" is here to catch this case.
33652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33653/* end confdefs.h.  */
33654#ifdef __STDC__
33655# include <limits.h>
33656#else
33657# include <assert.h>
33658#endif
33659		     Syntax error
33660_ACEOF
33661if ac_fn_c_try_cpp "$LINENO"; then :
33662
33663else
33664  # Broken: fails on valid input.
33665continue
33666fi
33667rm -f conftest.err conftest.i conftest.$ac_ext
33668
33669  # OK, works on sane cases.  Now check whether nonexistent headers
33670  # can be detected and how.
33671  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33672/* end confdefs.h.  */
33673#include <ac_nonexistent.h>
33674_ACEOF
33675if ac_fn_c_try_cpp "$LINENO"; then :
33676  # Broken: success on invalid input.
33677continue
33678else
33679  # Passes both tests.
33680ac_preproc_ok=:
33681break
33682fi
33683rm -f conftest.err conftest.i conftest.$ac_ext
33684
33685done
33686# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33687rm -f conftest.i conftest.err conftest.$ac_ext
33688if $ac_preproc_ok; then :
33689  break
33690fi
33691
33692    done
33693    ac_cv_prog_CPP=$CPP
33694
33695fi
33696  CPP=$ac_cv_prog_CPP
33697else
33698  ac_cv_prog_CPP=$CPP
33699fi
33700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33701$as_echo "$CPP" >&6; }
33702ac_preproc_ok=false
33703for ac_c_preproc_warn_flag in '' yes
33704do
33705  # Use a header file that comes with gcc, so configuring glibc
33706  # with a fresh cross-compiler works.
33707  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33708  # <limits.h> exists even on freestanding compilers.
33709  # On the NeXT, cc -E runs the code through the compiler's parser,
33710  # not just through cpp. "Syntax error" is here to catch this case.
33711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33712/* end confdefs.h.  */
33713#ifdef __STDC__
33714# include <limits.h>
33715#else
33716# include <assert.h>
33717#endif
33718		     Syntax error
33719_ACEOF
33720if ac_fn_c_try_cpp "$LINENO"; then :
33721
33722else
33723  # Broken: fails on valid input.
33724continue
33725fi
33726rm -f conftest.err conftest.i conftest.$ac_ext
33727
33728  # OK, works on sane cases.  Now check whether nonexistent headers
33729  # can be detected and how.
33730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33731/* end confdefs.h.  */
33732#include <ac_nonexistent.h>
33733_ACEOF
33734if ac_fn_c_try_cpp "$LINENO"; then :
33735  # Broken: success on invalid input.
33736continue
33737else
33738  # Passes both tests.
33739ac_preproc_ok=:
33740break
33741fi
33742rm -f conftest.err conftest.i conftest.$ac_ext
33743
33744done
33745# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33746rm -f conftest.i conftest.err conftest.$ac_ext
33747if $ac_preproc_ok; then :
33748
33749else
33750  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33752as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
33753See \`config.log' for more details" "$LINENO" 5; }
33754fi
33755
33756ac_ext=cpp
33757ac_cpp='$CXXCPP $CPPFLAGS'
33758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33761
33762
33763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33764
33765  # First separate the path from the arguments. This will split at the first
33766  # space.
33767  complete="$CPP"
33768  path="${complete%% *}"
33769  tmp="$complete EOL"
33770  arguments="${tmp#* }"
33771
33772  # Input might be given as Windows format, start by converting to
33773  # unix format.
33774  new_path=`$CYGPATH -u "$path"`
33775
33776  # Now try to locate executable using which
33777  new_path=`$WHICH "$new_path" 2> /dev/null`
33778  # bat and cmd files are not always considered executable in cygwin causing which
33779  # to not find them
33780  if test "x$new_path" = x \
33781      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33782      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33783    new_path=`$CYGPATH -u "$path"`
33784  fi
33785  if test "x$new_path" = x; then
33786    # Oops. Which didn't find the executable.
33787    # The splitting of arguments from the executable at a space might have been incorrect,
33788    # since paths with space are more likely in Windows. Give it another try with the whole
33789    # argument.
33790    path="$complete"
33791    arguments="EOL"
33792    new_path=`$CYGPATH -u "$path"`
33793    new_path=`$WHICH "$new_path" 2> /dev/null`
33794    # bat and cmd files are not always considered executable in cygwin causing which
33795    # to not find them
33796    if test "x$new_path" = x \
33797        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33798        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33799      new_path=`$CYGPATH -u "$path"`
33800    fi
33801    if test "x$new_path" = x; then
33802      # It's still not found. Now this is an unrecoverable error.
33803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33804$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33805      has_space=`$ECHO "$complete" | $GREP " "`
33806      if test "x$has_space" != x; then
33807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33809      fi
33810      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33811    fi
33812  fi
33813
33814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33817  # "foo.exe" is OK but "foo" is an error.
33818  #
33819  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33820  # It is also a way to make sure we got the proper file name for the real test later on.
33821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33822  if test "x$test_shortpath" = x; then
33823    # Short path failed, file does not exist as specified.
33824    # Try adding .exe or .cmd
33825    if test -f "${new_path}.exe"; then
33826      input_to_shortpath="${new_path}.exe"
33827    elif test -f "${new_path}.cmd"; then
33828      input_to_shortpath="${new_path}.cmd"
33829    else
33830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
33831$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33833$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33834      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33835    fi
33836  else
33837    input_to_shortpath="$new_path"
33838  fi
33839
33840  # Call helper function which possibly converts this using DOS-style short mode.
33841  # If so, the updated path is stored in $new_path.
33842  new_path="$input_to_shortpath"
33843
33844  input_path="$input_to_shortpath"
33845  # Check if we need to convert this using DOS-style short mode. If the path
33846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33847  # take no chances and rewrite it.
33848  # Note: m4 eats our [], so we need to use [ and ] instead.
33849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33850  if test "x$has_forbidden_chars" != x; then
33851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33855      # Going to short mode and back again did indeed matter. Since short mode is
33856      # case insensitive, let's make it lowercase to improve readability.
33857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33858      # Now convert it back to Unix-stile (cygpath)
33859      input_path=`$CYGPATH -u "$shortmode_path"`
33860      new_path="$input_path"
33861    fi
33862  fi
33863
33864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33865  if test "x$test_cygdrive_prefix" = x; then
33866    # As a simple fix, exclude /usr/bin since it's not a real path.
33867    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33869      # a path prefixed by /cygdrive for fixpath to work.
33870      new_path="$CYGWIN_ROOT_PATH$input_path"
33871    fi
33872  fi
33873
33874  # remove trailing .exe if any
33875  new_path="${new_path/%.exe/}"
33876
33877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33878
33879  # First separate the path from the arguments. This will split at the first
33880  # space.
33881  complete="$CPP"
33882  path="${complete%% *}"
33883  tmp="$complete EOL"
33884  arguments="${tmp#* }"
33885
33886  # Input might be given as Windows format, start by converting to
33887  # unix format.
33888  new_path="$path"
33889
33890  windows_path="$new_path"
33891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33892    unix_path=`$CYGPATH -u "$windows_path"`
33893    new_path="$unix_path"
33894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33896    new_path="$unix_path"
33897  fi
33898
33899
33900  # Now try to locate executable using which
33901  new_path=`$WHICH "$new_path" 2> /dev/null`
33902
33903  if test "x$new_path" = x; then
33904    # Oops. Which didn't find the executable.
33905    # The splitting of arguments from the executable at a space might have been incorrect,
33906    # since paths with space are more likely in Windows. Give it another try with the whole
33907    # argument.
33908    path="$complete"
33909    arguments="EOL"
33910    new_path="$path"
33911
33912  windows_path="$new_path"
33913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33914    unix_path=`$CYGPATH -u "$windows_path"`
33915    new_path="$unix_path"
33916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33918    new_path="$unix_path"
33919  fi
33920
33921
33922    new_path=`$WHICH "$new_path" 2> /dev/null`
33923
33924    if test "x$new_path" = x; then
33925      # It's still not found. Now this is an unrecoverable error.
33926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33927$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33928      has_space=`$ECHO "$complete" | $GREP " "`
33929      if test "x$has_space" != x; then
33930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33932      fi
33933      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33934    fi
33935  fi
33936
33937  # Now new_path has a complete unix path to the binary
33938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33939    # Keep paths in /bin as-is, but remove trailing .exe if any
33940    new_path="${new_path/%.exe/}"
33941    # Do not save /bin paths to all_fixpath_prefixes!
33942  else
33943    # Not in mixed or Windows style, start by that.
33944    new_path=`cmd //c echo $new_path`
33945
33946  input_path="$new_path"
33947  # Check if we need to convert this using DOS-style short mode. If the path
33948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33949  # take no chances and rewrite it.
33950  # Note: m4 eats our [], so we need to use [ and ] instead.
33951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33952  if test "x$has_forbidden_chars" != x; then
33953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33955  fi
33956
33957    # Output is in $new_path
33958
33959  windows_path="$new_path"
33960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33961    unix_path=`$CYGPATH -u "$windows_path"`
33962    new_path="$unix_path"
33963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33965    new_path="$unix_path"
33966  fi
33967
33968    # remove trailing .exe if any
33969    new_path="${new_path/%.exe/}"
33970
33971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33973  fi
33974
33975  else
33976    # We're on a posix platform. Hooray! :)
33977    # First separate the path from the arguments. This will split at the first
33978    # space.
33979    complete="$CPP"
33980    path="${complete%% *}"
33981    tmp="$complete EOL"
33982    arguments="${tmp#* }"
33983
33984    # Cannot rely on the command "which" here since it doesn't always work.
33985    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33986    if test -z "$is_absolute_path"; then
33987      # Path to executable is not absolute. Find it.
33988      IFS_save="$IFS"
33989      IFS=:
33990      for p in $PATH; do
33991        if test -f "$p/$path" && test -x "$p/$path"; then
33992          new_path="$p/$path"
33993          break
33994        fi
33995      done
33996      IFS="$IFS_save"
33997    else
33998      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
33999$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
34000      new_path="$path"
34001    fi
34002
34003    if test "x$new_path" = x; then
34004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34005$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34006      has_space=`$ECHO "$complete" | $GREP " "`
34007      if test "x$has_space" != x; then
34008        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34010      fi
34011      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34012    fi
34013  fi
34014
34015  # Now join together the path and the arguments once again
34016  if test "x$arguments" != xEOL; then
34017    new_complete="$new_path ${arguments% *}"
34018  else
34019    new_complete="$new_path"
34020  fi
34021
34022  if test "x$complete" != "x$new_complete"; then
34023    CPP="$new_complete"
34024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34025$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34026  fi
34027
34028
34029  ac_ext=cpp
34030ac_cpp='$CXXCPP $CPPFLAGS'
34031ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34032ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34033ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34035$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34036if test -z "$CXXCPP"; then
34037  if ${ac_cv_prog_CXXCPP+:} false; then :
34038  $as_echo_n "(cached) " >&6
34039else
34040      # Double quotes because CXXCPP needs to be expanded
34041    for CXXCPP in "$CXX -E" "/lib/cpp"
34042    do
34043      ac_preproc_ok=false
34044for ac_cxx_preproc_warn_flag in '' yes
34045do
34046  # Use a header file that comes with gcc, so configuring glibc
34047  # with a fresh cross-compiler works.
34048  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34049  # <limits.h> exists even on freestanding compilers.
34050  # On the NeXT, cc -E runs the code through the compiler's parser,
34051  # not just through cpp. "Syntax error" is here to catch this case.
34052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34053/* end confdefs.h.  */
34054#ifdef __STDC__
34055# include <limits.h>
34056#else
34057# include <assert.h>
34058#endif
34059		     Syntax error
34060_ACEOF
34061if ac_fn_cxx_try_cpp "$LINENO"; then :
34062
34063else
34064  # Broken: fails on valid input.
34065continue
34066fi
34067rm -f conftest.err conftest.i conftest.$ac_ext
34068
34069  # OK, works on sane cases.  Now check whether nonexistent headers
34070  # can be detected and how.
34071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34072/* end confdefs.h.  */
34073#include <ac_nonexistent.h>
34074_ACEOF
34075if ac_fn_cxx_try_cpp "$LINENO"; then :
34076  # Broken: success on invalid input.
34077continue
34078else
34079  # Passes both tests.
34080ac_preproc_ok=:
34081break
34082fi
34083rm -f conftest.err conftest.i conftest.$ac_ext
34084
34085done
34086# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34087rm -f conftest.i conftest.err conftest.$ac_ext
34088if $ac_preproc_ok; then :
34089  break
34090fi
34091
34092    done
34093    ac_cv_prog_CXXCPP=$CXXCPP
34094
34095fi
34096  CXXCPP=$ac_cv_prog_CXXCPP
34097else
34098  ac_cv_prog_CXXCPP=$CXXCPP
34099fi
34100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34101$as_echo "$CXXCPP" >&6; }
34102ac_preproc_ok=false
34103for ac_cxx_preproc_warn_flag in '' yes
34104do
34105  # Use a header file that comes with gcc, so configuring glibc
34106  # with a fresh cross-compiler works.
34107  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34108  # <limits.h> exists even on freestanding compilers.
34109  # On the NeXT, cc -E runs the code through the compiler's parser,
34110  # not just through cpp. "Syntax error" is here to catch this case.
34111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34112/* end confdefs.h.  */
34113#ifdef __STDC__
34114# include <limits.h>
34115#else
34116# include <assert.h>
34117#endif
34118		     Syntax error
34119_ACEOF
34120if ac_fn_cxx_try_cpp "$LINENO"; then :
34121
34122else
34123  # Broken: fails on valid input.
34124continue
34125fi
34126rm -f conftest.err conftest.i conftest.$ac_ext
34127
34128  # OK, works on sane cases.  Now check whether nonexistent headers
34129  # can be detected and how.
34130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34131/* end confdefs.h.  */
34132#include <ac_nonexistent.h>
34133_ACEOF
34134if ac_fn_cxx_try_cpp "$LINENO"; then :
34135  # Broken: success on invalid input.
34136continue
34137else
34138  # Passes both tests.
34139ac_preproc_ok=:
34140break
34141fi
34142rm -f conftest.err conftest.i conftest.$ac_ext
34143
34144done
34145# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34146rm -f conftest.i conftest.err conftest.$ac_ext
34147if $ac_preproc_ok; then :
34148
34149else
34150  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34152as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34153See \`config.log' for more details" "$LINENO" 5; }
34154fi
34155
34156ac_ext=cpp
34157ac_cpp='$CXXCPP $CPPFLAGS'
34158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34161
34162
34163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34164
34165  # First separate the path from the arguments. This will split at the first
34166  # space.
34167  complete="$CXXCPP"
34168  path="${complete%% *}"
34169  tmp="$complete EOL"
34170  arguments="${tmp#* }"
34171
34172  # Input might be given as Windows format, start by converting to
34173  # unix format.
34174  new_path=`$CYGPATH -u "$path"`
34175
34176  # Now try to locate executable using which
34177  new_path=`$WHICH "$new_path" 2> /dev/null`
34178  # bat and cmd files are not always considered executable in cygwin causing which
34179  # to not find them
34180  if test "x$new_path" = x \
34181      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34182      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34183    new_path=`$CYGPATH -u "$path"`
34184  fi
34185  if test "x$new_path" = x; then
34186    # Oops. Which didn't find the executable.
34187    # The splitting of arguments from the executable at a space might have been incorrect,
34188    # since paths with space are more likely in Windows. Give it another try with the whole
34189    # argument.
34190    path="$complete"
34191    arguments="EOL"
34192    new_path=`$CYGPATH -u "$path"`
34193    new_path=`$WHICH "$new_path" 2> /dev/null`
34194    # bat and cmd files are not always considered executable in cygwin causing which
34195    # to not find them
34196    if test "x$new_path" = x \
34197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34199      new_path=`$CYGPATH -u "$path"`
34200    fi
34201    if test "x$new_path" = x; then
34202      # It's still not found. Now this is an unrecoverable error.
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34204$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34205      has_space=`$ECHO "$complete" | $GREP " "`
34206      if test "x$has_space" != x; then
34207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34209      fi
34210      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34211    fi
34212  fi
34213
34214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34217  # "foo.exe" is OK but "foo" is an error.
34218  #
34219  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34220  # It is also a way to make sure we got the proper file name for the real test later on.
34221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34222  if test "x$test_shortpath" = x; then
34223    # Short path failed, file does not exist as specified.
34224    # Try adding .exe or .cmd
34225    if test -f "${new_path}.exe"; then
34226      input_to_shortpath="${new_path}.exe"
34227    elif test -f "${new_path}.cmd"; then
34228      input_to_shortpath="${new_path}.cmd"
34229    else
34230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34231$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34234      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34235    fi
34236  else
34237    input_to_shortpath="$new_path"
34238  fi
34239
34240  # Call helper function which possibly converts this using DOS-style short mode.
34241  # If so, the updated path is stored in $new_path.
34242  new_path="$input_to_shortpath"
34243
34244  input_path="$input_to_shortpath"
34245  # Check if we need to convert this using DOS-style short mode. If the path
34246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34247  # take no chances and rewrite it.
34248  # Note: m4 eats our [], so we need to use [ and ] instead.
34249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34250  if test "x$has_forbidden_chars" != x; then
34251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34255      # Going to short mode and back again did indeed matter. Since short mode is
34256      # case insensitive, let's make it lowercase to improve readability.
34257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34258      # Now convert it back to Unix-stile (cygpath)
34259      input_path=`$CYGPATH -u "$shortmode_path"`
34260      new_path="$input_path"
34261    fi
34262  fi
34263
34264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34265  if test "x$test_cygdrive_prefix" = x; then
34266    # As a simple fix, exclude /usr/bin since it's not a real path.
34267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34269      # a path prefixed by /cygdrive for fixpath to work.
34270      new_path="$CYGWIN_ROOT_PATH$input_path"
34271    fi
34272  fi
34273
34274  # remove trailing .exe if any
34275  new_path="${new_path/%.exe/}"
34276
34277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34278
34279  # First separate the path from the arguments. This will split at the first
34280  # space.
34281  complete="$CXXCPP"
34282  path="${complete%% *}"
34283  tmp="$complete EOL"
34284  arguments="${tmp#* }"
34285
34286  # Input might be given as Windows format, start by converting to
34287  # unix format.
34288  new_path="$path"
34289
34290  windows_path="$new_path"
34291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34292    unix_path=`$CYGPATH -u "$windows_path"`
34293    new_path="$unix_path"
34294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34296    new_path="$unix_path"
34297  fi
34298
34299
34300  # Now try to locate executable using which
34301  new_path=`$WHICH "$new_path" 2> /dev/null`
34302
34303  if test "x$new_path" = x; then
34304    # Oops. Which didn't find the executable.
34305    # The splitting of arguments from the executable at a space might have been incorrect,
34306    # since paths with space are more likely in Windows. Give it another try with the whole
34307    # argument.
34308    path="$complete"
34309    arguments="EOL"
34310    new_path="$path"
34311
34312  windows_path="$new_path"
34313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34314    unix_path=`$CYGPATH -u "$windows_path"`
34315    new_path="$unix_path"
34316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34318    new_path="$unix_path"
34319  fi
34320
34321
34322    new_path=`$WHICH "$new_path" 2> /dev/null`
34323
34324    if test "x$new_path" = x; then
34325      # It's still not found. Now this is an unrecoverable error.
34326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34327$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34328      has_space=`$ECHO "$complete" | $GREP " "`
34329      if test "x$has_space" != x; then
34330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34332      fi
34333      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34334    fi
34335  fi
34336
34337  # Now new_path has a complete unix path to the binary
34338  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34339    # Keep paths in /bin as-is, but remove trailing .exe if any
34340    new_path="${new_path/%.exe/}"
34341    # Do not save /bin paths to all_fixpath_prefixes!
34342  else
34343    # Not in mixed or Windows style, start by that.
34344    new_path=`cmd //c echo $new_path`
34345
34346  input_path="$new_path"
34347  # Check if we need to convert this using DOS-style short mode. If the path
34348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34349  # take no chances and rewrite it.
34350  # Note: m4 eats our [], so we need to use [ and ] instead.
34351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34352  if test "x$has_forbidden_chars" != x; then
34353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34355  fi
34356
34357    # Output is in $new_path
34358
34359  windows_path="$new_path"
34360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34361    unix_path=`$CYGPATH -u "$windows_path"`
34362    new_path="$unix_path"
34363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34365    new_path="$unix_path"
34366  fi
34367
34368    # remove trailing .exe if any
34369    new_path="${new_path/%.exe/}"
34370
34371    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34372    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34373  fi
34374
34375  else
34376    # We're on a posix platform. Hooray! :)
34377    # First separate the path from the arguments. This will split at the first
34378    # space.
34379    complete="$CXXCPP"
34380    path="${complete%% *}"
34381    tmp="$complete EOL"
34382    arguments="${tmp#* }"
34383
34384    # Cannot rely on the command "which" here since it doesn't always work.
34385    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34386    if test -z "$is_absolute_path"; then
34387      # Path to executable is not absolute. Find it.
34388      IFS_save="$IFS"
34389      IFS=:
34390      for p in $PATH; do
34391        if test -f "$p/$path" && test -x "$p/$path"; then
34392          new_path="$p/$path"
34393          break
34394        fi
34395      done
34396      IFS="$IFS_save"
34397    else
34398      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
34399$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
34400      new_path="$path"
34401    fi
34402
34403    if test "x$new_path" = x; then
34404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34405$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34406      has_space=`$ECHO "$complete" | $GREP " "`
34407      if test "x$has_space" != x; then
34408        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34409$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34410      fi
34411      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34412    fi
34413  fi
34414
34415  # Now join together the path and the arguments once again
34416  if test "x$arguments" != xEOL; then
34417    new_complete="$new_path ${arguments% *}"
34418  else
34419    new_complete="$new_path"
34420  fi
34421
34422  if test "x$complete" != "x$new_complete"; then
34423    CXXCPP="$new_complete"
34424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34425$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34426  fi
34427
34428
34429  if test "x$COMPILE_TYPE" != "xcross"; then
34430    # If we are not cross compiling, use the same compilers for
34431    # building the build platform executables. The cross-compilation
34432    # case needed to be done earlier, but this can only be done after
34433    # the native tools have been localized.
34434    BUILD_CC="$CC"
34435    BUILD_CXX="$CXX"
34436    BUILD_LD="$LD"
34437  fi
34438
34439  # for solaris we really need solaris tools, and not gnu equivalent
34440  #   these seems to normally reside in /usr/ccs/bin so add that to path before
34441  #   starting to probe
34442  #
34443  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
34444  #         so that it can be overriden --with-tools-dir
34445  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
34446    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
34447  fi
34448
34449  # Find the right assembler.
34450  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34451
34452
34453  # Publish this variable in the help.
34454
34455
34456  if test "x$AS" = x; then
34457    # The variable is not set by user, try to locate tool using the code snippet
34458    for ac_prog in as
34459do
34460  # Extract the first word of "$ac_prog", so it can be a program name with args.
34461set dummy $ac_prog; ac_word=$2
34462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34463$as_echo_n "checking for $ac_word... " >&6; }
34464if ${ac_cv_path_AS+:} false; then :
34465  $as_echo_n "(cached) " >&6
34466else
34467  case $AS in
34468  [\\/]* | ?:[\\/]*)
34469  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34470  ;;
34471  *)
34472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34473for as_dir in $PATH
34474do
34475  IFS=$as_save_IFS
34476  test -z "$as_dir" && as_dir=.
34477    for ac_exec_ext in '' $ac_executable_extensions; do
34478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34479    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34481    break 2
34482  fi
34483done
34484  done
34485IFS=$as_save_IFS
34486
34487  ;;
34488esac
34489fi
34490AS=$ac_cv_path_AS
34491if test -n "$AS"; then
34492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34493$as_echo "$AS" >&6; }
34494else
34495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34496$as_echo "no" >&6; }
34497fi
34498
34499
34500  test -n "$AS" && break
34501done
34502
34503  else
34504    # The variable is set, but is it from the command line or the environment?
34505
34506    # Try to remove the string !AS! from our list.
34507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
34508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34509      # If it failed, the variable was not from the command line. Ignore it,
34510      # but warn the user (except for BASH, which is always set by the calling BASH).
34511      if test "xAS" != xBASH; then
34512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
34513$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
34514      fi
34515      # Try to locate tool using the code snippet
34516      for ac_prog in as
34517do
34518  # Extract the first word of "$ac_prog", so it can be a program name with args.
34519set dummy $ac_prog; ac_word=$2
34520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34521$as_echo_n "checking for $ac_word... " >&6; }
34522if ${ac_cv_path_AS+:} false; then :
34523  $as_echo_n "(cached) " >&6
34524else
34525  case $AS in
34526  [\\/]* | ?:[\\/]*)
34527  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34528  ;;
34529  *)
34530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34531for as_dir in $PATH
34532do
34533  IFS=$as_save_IFS
34534  test -z "$as_dir" && as_dir=.
34535    for ac_exec_ext in '' $ac_executable_extensions; do
34536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34537    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34539    break 2
34540  fi
34541done
34542  done
34543IFS=$as_save_IFS
34544
34545  ;;
34546esac
34547fi
34548AS=$ac_cv_path_AS
34549if test -n "$AS"; then
34550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34551$as_echo "$AS" >&6; }
34552else
34553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34554$as_echo "no" >&6; }
34555fi
34556
34557
34558  test -n "$AS" && break
34559done
34560
34561    else
34562      # If it succeeded, then it was overridden by the user. We will use it
34563      # for the tool.
34564
34565      # First remove it from the list of overridden variables, so we can test
34566      # for unknown variables in the end.
34567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34568
34569      # Check if the provided tool contains a complete path.
34570      tool_specified="$AS"
34571      tool_basename="${tool_specified##*/}"
34572      if test "x$tool_basename" = "x$tool_specified"; then
34573        # A command without a complete path is provided, search $PATH.
34574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
34575$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
34576        # Extract the first word of "$tool_basename", so it can be a program name with args.
34577set dummy $tool_basename; ac_word=$2
34578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34579$as_echo_n "checking for $ac_word... " >&6; }
34580if ${ac_cv_path_AS+:} false; then :
34581  $as_echo_n "(cached) " >&6
34582else
34583  case $AS in
34584  [\\/]* | ?:[\\/]*)
34585  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34586  ;;
34587  *)
34588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34589for as_dir in $PATH
34590do
34591  IFS=$as_save_IFS
34592  test -z "$as_dir" && as_dir=.
34593    for ac_exec_ext in '' $ac_executable_extensions; do
34594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34595    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34597    break 2
34598  fi
34599done
34600  done
34601IFS=$as_save_IFS
34602
34603  ;;
34604esac
34605fi
34606AS=$ac_cv_path_AS
34607if test -n "$AS"; then
34608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34609$as_echo "$AS" >&6; }
34610else
34611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34612$as_echo "no" >&6; }
34613fi
34614
34615
34616        if test "x$AS" = x; then
34617          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34618        fi
34619      else
34620        # Otherwise we believe it is a complete path. Use it as it is.
34621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
34622$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
34623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
34624$as_echo_n "checking for AS... " >&6; }
34625        if test ! -x "$tool_specified"; then
34626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34627$as_echo "not found" >&6; }
34628          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
34629        fi
34630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34631$as_echo "$tool_specified" >&6; }
34632      fi
34633    fi
34634  fi
34635
34636
34637
34638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34639
34640  # First separate the path from the arguments. This will split at the first
34641  # space.
34642  complete="$AS"
34643  path="${complete%% *}"
34644  tmp="$complete EOL"
34645  arguments="${tmp#* }"
34646
34647  # Input might be given as Windows format, start by converting to
34648  # unix format.
34649  new_path=`$CYGPATH -u "$path"`
34650
34651  # Now try to locate executable using which
34652  new_path=`$WHICH "$new_path" 2> /dev/null`
34653  # bat and cmd files are not always considered executable in cygwin causing which
34654  # to not find them
34655  if test "x$new_path" = x \
34656      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34657      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34658    new_path=`$CYGPATH -u "$path"`
34659  fi
34660  if test "x$new_path" = x; then
34661    # Oops. Which didn't find the executable.
34662    # The splitting of arguments from the executable at a space might have been incorrect,
34663    # since paths with space are more likely in Windows. Give it another try with the whole
34664    # argument.
34665    path="$complete"
34666    arguments="EOL"
34667    new_path=`$CYGPATH -u "$path"`
34668    new_path=`$WHICH "$new_path" 2> /dev/null`
34669    # bat and cmd files are not always considered executable in cygwin causing which
34670    # to not find them
34671    if test "x$new_path" = x \
34672        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34673        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34674      new_path=`$CYGPATH -u "$path"`
34675    fi
34676    if test "x$new_path" = x; then
34677      # It's still not found. Now this is an unrecoverable error.
34678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34679$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34680      has_space=`$ECHO "$complete" | $GREP " "`
34681      if test "x$has_space" != x; then
34682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34684      fi
34685      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34686    fi
34687  fi
34688
34689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34692  # "foo.exe" is OK but "foo" is an error.
34693  #
34694  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34695  # It is also a way to make sure we got the proper file name for the real test later on.
34696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34697  if test "x$test_shortpath" = x; then
34698    # Short path failed, file does not exist as specified.
34699    # Try adding .exe or .cmd
34700    if test -f "${new_path}.exe"; then
34701      input_to_shortpath="${new_path}.exe"
34702    elif test -f "${new_path}.cmd"; then
34703      input_to_shortpath="${new_path}.cmd"
34704    else
34705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
34706$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
34707      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34708$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34709      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34710    fi
34711  else
34712    input_to_shortpath="$new_path"
34713  fi
34714
34715  # Call helper function which possibly converts this using DOS-style short mode.
34716  # If so, the updated path is stored in $new_path.
34717  new_path="$input_to_shortpath"
34718
34719  input_path="$input_to_shortpath"
34720  # Check if we need to convert this using DOS-style short mode. If the path
34721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34722  # take no chances and rewrite it.
34723  # Note: m4 eats our [], so we need to use [ and ] instead.
34724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34725  if test "x$has_forbidden_chars" != x; then
34726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34730      # Going to short mode and back again did indeed matter. Since short mode is
34731      # case insensitive, let's make it lowercase to improve readability.
34732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34733      # Now convert it back to Unix-stile (cygpath)
34734      input_path=`$CYGPATH -u "$shortmode_path"`
34735      new_path="$input_path"
34736    fi
34737  fi
34738
34739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34740  if test "x$test_cygdrive_prefix" = x; then
34741    # As a simple fix, exclude /usr/bin since it's not a real path.
34742    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34744      # a path prefixed by /cygdrive for fixpath to work.
34745      new_path="$CYGWIN_ROOT_PATH$input_path"
34746    fi
34747  fi
34748
34749  # remove trailing .exe if any
34750  new_path="${new_path/%.exe/}"
34751
34752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34753
34754  # First separate the path from the arguments. This will split at the first
34755  # space.
34756  complete="$AS"
34757  path="${complete%% *}"
34758  tmp="$complete EOL"
34759  arguments="${tmp#* }"
34760
34761  # Input might be given as Windows format, start by converting to
34762  # unix format.
34763  new_path="$path"
34764
34765  windows_path="$new_path"
34766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34767    unix_path=`$CYGPATH -u "$windows_path"`
34768    new_path="$unix_path"
34769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34771    new_path="$unix_path"
34772  fi
34773
34774
34775  # Now try to locate executable using which
34776  new_path=`$WHICH "$new_path" 2> /dev/null`
34777
34778  if test "x$new_path" = x; then
34779    # Oops. Which didn't find the executable.
34780    # The splitting of arguments from the executable at a space might have been incorrect,
34781    # since paths with space are more likely in Windows. Give it another try with the whole
34782    # argument.
34783    path="$complete"
34784    arguments="EOL"
34785    new_path="$path"
34786
34787  windows_path="$new_path"
34788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34789    unix_path=`$CYGPATH -u "$windows_path"`
34790    new_path="$unix_path"
34791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34793    new_path="$unix_path"
34794  fi
34795
34796
34797    new_path=`$WHICH "$new_path" 2> /dev/null`
34798
34799    if test "x$new_path" = x; then
34800      # It's still not found. Now this is an unrecoverable error.
34801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34802$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34803      has_space=`$ECHO "$complete" | $GREP " "`
34804      if test "x$has_space" != x; then
34805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34807      fi
34808      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34809    fi
34810  fi
34811
34812  # Now new_path has a complete unix path to the binary
34813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34814    # Keep paths in /bin as-is, but remove trailing .exe if any
34815    new_path="${new_path/%.exe/}"
34816    # Do not save /bin paths to all_fixpath_prefixes!
34817  else
34818    # Not in mixed or Windows style, start by that.
34819    new_path=`cmd //c echo $new_path`
34820
34821  input_path="$new_path"
34822  # Check if we need to convert this using DOS-style short mode. If the path
34823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34824  # take no chances and rewrite it.
34825  # Note: m4 eats our [], so we need to use [ and ] instead.
34826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34827  if test "x$has_forbidden_chars" != x; then
34828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34830  fi
34831
34832    # Output is in $new_path
34833
34834  windows_path="$new_path"
34835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34836    unix_path=`$CYGPATH -u "$windows_path"`
34837    new_path="$unix_path"
34838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34840    new_path="$unix_path"
34841  fi
34842
34843    # remove trailing .exe if any
34844    new_path="${new_path/%.exe/}"
34845
34846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34848  fi
34849
34850  else
34851    # We're on a posix platform. Hooray! :)
34852    # First separate the path from the arguments. This will split at the first
34853    # space.
34854    complete="$AS"
34855    path="${complete%% *}"
34856    tmp="$complete EOL"
34857    arguments="${tmp#* }"
34858
34859    # Cannot rely on the command "which" here since it doesn't always work.
34860    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34861    if test -z "$is_absolute_path"; then
34862      # Path to executable is not absolute. Find it.
34863      IFS_save="$IFS"
34864      IFS=:
34865      for p in $PATH; do
34866        if test -f "$p/$path" && test -x "$p/$path"; then
34867          new_path="$p/$path"
34868          break
34869        fi
34870      done
34871      IFS="$IFS_save"
34872    else
34873      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
34874$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
34875      new_path="$path"
34876    fi
34877
34878    if test "x$new_path" = x; then
34879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34880$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34881      has_space=`$ECHO "$complete" | $GREP " "`
34882      if test "x$has_space" != x; then
34883        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34885      fi
34886      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34887    fi
34888  fi
34889
34890  # Now join together the path and the arguments once again
34891  if test "x$arguments" != xEOL; then
34892    new_complete="$new_path ${arguments% *}"
34893  else
34894    new_complete="$new_path"
34895  fi
34896
34897  if test "x$complete" != "x$new_complete"; then
34898    AS="$new_complete"
34899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
34900$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
34901  fi
34902
34903  else
34904    AS="$CC -c"
34905  fi
34906
34907
34908  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34909
34910
34911  # Publish this variable in the help.
34912
34913
34914  if test "x$NM" = x; then
34915    # The variable is not set by user, try to locate tool using the code snippet
34916    for ac_prog in nm
34917do
34918  # Extract the first word of "$ac_prog", so it can be a program name with args.
34919set dummy $ac_prog; ac_word=$2
34920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34921$as_echo_n "checking for $ac_word... " >&6; }
34922if ${ac_cv_path_NM+:} false; then :
34923  $as_echo_n "(cached) " >&6
34924else
34925  case $NM in
34926  [\\/]* | ?:[\\/]*)
34927  ac_cv_path_NM="$NM" # Let the user override the test with a path.
34928  ;;
34929  *)
34930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34931for as_dir in $PATH
34932do
34933  IFS=$as_save_IFS
34934  test -z "$as_dir" && as_dir=.
34935    for ac_exec_ext in '' $ac_executable_extensions; do
34936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34937    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34939    break 2
34940  fi
34941done
34942  done
34943IFS=$as_save_IFS
34944
34945  ;;
34946esac
34947fi
34948NM=$ac_cv_path_NM
34949if test -n "$NM"; then
34950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34951$as_echo "$NM" >&6; }
34952else
34953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34954$as_echo "no" >&6; }
34955fi
34956
34957
34958  test -n "$NM" && break
34959done
34960
34961  else
34962    # The variable is set, but is it from the command line or the environment?
34963
34964    # Try to remove the string !NM! from our list.
34965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34967      # If it failed, the variable was not from the command line. Ignore it,
34968      # but warn the user (except for BASH, which is always set by the calling BASH).
34969      if test "xNM" != xBASH; then
34970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34971$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34972      fi
34973      # Try to locate tool using the code snippet
34974      for ac_prog in nm
34975do
34976  # Extract the first word of "$ac_prog", so it can be a program name with args.
34977set dummy $ac_prog; ac_word=$2
34978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34979$as_echo_n "checking for $ac_word... " >&6; }
34980if ${ac_cv_path_NM+:} false; then :
34981  $as_echo_n "(cached) " >&6
34982else
34983  case $NM in
34984  [\\/]* | ?:[\\/]*)
34985  ac_cv_path_NM="$NM" # Let the user override the test with a path.
34986  ;;
34987  *)
34988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34989for as_dir in $PATH
34990do
34991  IFS=$as_save_IFS
34992  test -z "$as_dir" && as_dir=.
34993    for ac_exec_ext in '' $ac_executable_extensions; do
34994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34995    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34997    break 2
34998  fi
34999done
35000  done
35001IFS=$as_save_IFS
35002
35003  ;;
35004esac
35005fi
35006NM=$ac_cv_path_NM
35007if test -n "$NM"; then
35008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35009$as_echo "$NM" >&6; }
35010else
35011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35012$as_echo "no" >&6; }
35013fi
35014
35015
35016  test -n "$NM" && break
35017done
35018
35019    else
35020      # If it succeeded, then it was overridden by the user. We will use it
35021      # for the tool.
35022
35023      # First remove it from the list of overridden variables, so we can test
35024      # for unknown variables in the end.
35025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35026
35027      # Check if the provided tool contains a complete path.
35028      tool_specified="$NM"
35029      tool_basename="${tool_specified##*/}"
35030      if test "x$tool_basename" = "x$tool_specified"; then
35031        # A command without a complete path is provided, search $PATH.
35032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35033$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35034        # Extract the first word of "$tool_basename", so it can be a program name with args.
35035set dummy $tool_basename; ac_word=$2
35036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35037$as_echo_n "checking for $ac_word... " >&6; }
35038if ${ac_cv_path_NM+:} false; then :
35039  $as_echo_n "(cached) " >&6
35040else
35041  case $NM in
35042  [\\/]* | ?:[\\/]*)
35043  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35044  ;;
35045  *)
35046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35047for as_dir in $PATH
35048do
35049  IFS=$as_save_IFS
35050  test -z "$as_dir" && as_dir=.
35051    for ac_exec_ext in '' $ac_executable_extensions; do
35052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35053    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35055    break 2
35056  fi
35057done
35058  done
35059IFS=$as_save_IFS
35060
35061  ;;
35062esac
35063fi
35064NM=$ac_cv_path_NM
35065if test -n "$NM"; then
35066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35067$as_echo "$NM" >&6; }
35068else
35069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35070$as_echo "no" >&6; }
35071fi
35072
35073
35074        if test "x$NM" = x; then
35075          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35076        fi
35077      else
35078        # Otherwise we believe it is a complete path. Use it as it is.
35079        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35080$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35082$as_echo_n "checking for NM... " >&6; }
35083        if test ! -x "$tool_specified"; then
35084          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35085$as_echo "not found" >&6; }
35086          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35087        fi
35088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35089$as_echo "$tool_specified" >&6; }
35090      fi
35091    fi
35092  fi
35093
35094
35095
35096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35097
35098  # First separate the path from the arguments. This will split at the first
35099  # space.
35100  complete="$NM"
35101  path="${complete%% *}"
35102  tmp="$complete EOL"
35103  arguments="${tmp#* }"
35104
35105  # Input might be given as Windows format, start by converting to
35106  # unix format.
35107  new_path=`$CYGPATH -u "$path"`
35108
35109  # Now try to locate executable using which
35110  new_path=`$WHICH "$new_path" 2> /dev/null`
35111  # bat and cmd files are not always considered executable in cygwin causing which
35112  # to not find them
35113  if test "x$new_path" = x \
35114      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35115      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35116    new_path=`$CYGPATH -u "$path"`
35117  fi
35118  if test "x$new_path" = x; then
35119    # Oops. Which didn't find the executable.
35120    # The splitting of arguments from the executable at a space might have been incorrect,
35121    # since paths with space are more likely in Windows. Give it another try with the whole
35122    # argument.
35123    path="$complete"
35124    arguments="EOL"
35125    new_path=`$CYGPATH -u "$path"`
35126    new_path=`$WHICH "$new_path" 2> /dev/null`
35127    # bat and cmd files are not always considered executable in cygwin causing which
35128    # to not find them
35129    if test "x$new_path" = x \
35130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35132      new_path=`$CYGPATH -u "$path"`
35133    fi
35134    if test "x$new_path" = x; then
35135      # It's still not found. Now this is an unrecoverable error.
35136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35137$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35138      has_space=`$ECHO "$complete" | $GREP " "`
35139      if test "x$has_space" != x; then
35140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35142      fi
35143      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35144    fi
35145  fi
35146
35147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35150  # "foo.exe" is OK but "foo" is an error.
35151  #
35152  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35153  # It is also a way to make sure we got the proper file name for the real test later on.
35154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35155  if test "x$test_shortpath" = x; then
35156    # Short path failed, file does not exist as specified.
35157    # Try adding .exe or .cmd
35158    if test -f "${new_path}.exe"; then
35159      input_to_shortpath="${new_path}.exe"
35160    elif test -f "${new_path}.cmd"; then
35161      input_to_shortpath="${new_path}.cmd"
35162    else
35163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35164$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35165      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35166$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35167      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35168    fi
35169  else
35170    input_to_shortpath="$new_path"
35171  fi
35172
35173  # Call helper function which possibly converts this using DOS-style short mode.
35174  # If so, the updated path is stored in $new_path.
35175  new_path="$input_to_shortpath"
35176
35177  input_path="$input_to_shortpath"
35178  # Check if we need to convert this using DOS-style short mode. If the path
35179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35180  # take no chances and rewrite it.
35181  # Note: m4 eats our [], so we need to use [ and ] instead.
35182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35183  if test "x$has_forbidden_chars" != x; then
35184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35188      # Going to short mode and back again did indeed matter. Since short mode is
35189      # case insensitive, let's make it lowercase to improve readability.
35190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35191      # Now convert it back to Unix-stile (cygpath)
35192      input_path=`$CYGPATH -u "$shortmode_path"`
35193      new_path="$input_path"
35194    fi
35195  fi
35196
35197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35198  if test "x$test_cygdrive_prefix" = x; then
35199    # As a simple fix, exclude /usr/bin since it's not a real path.
35200    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35202      # a path prefixed by /cygdrive for fixpath to work.
35203      new_path="$CYGWIN_ROOT_PATH$input_path"
35204    fi
35205  fi
35206
35207  # remove trailing .exe if any
35208  new_path="${new_path/%.exe/}"
35209
35210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35211
35212  # First separate the path from the arguments. This will split at the first
35213  # space.
35214  complete="$NM"
35215  path="${complete%% *}"
35216  tmp="$complete EOL"
35217  arguments="${tmp#* }"
35218
35219  # Input might be given as Windows format, start by converting to
35220  # unix format.
35221  new_path="$path"
35222
35223  windows_path="$new_path"
35224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35225    unix_path=`$CYGPATH -u "$windows_path"`
35226    new_path="$unix_path"
35227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35229    new_path="$unix_path"
35230  fi
35231
35232
35233  # Now try to locate executable using which
35234  new_path=`$WHICH "$new_path" 2> /dev/null`
35235
35236  if test "x$new_path" = x; then
35237    # Oops. Which didn't find the executable.
35238    # The splitting of arguments from the executable at a space might have been incorrect,
35239    # since paths with space are more likely in Windows. Give it another try with the whole
35240    # argument.
35241    path="$complete"
35242    arguments="EOL"
35243    new_path="$path"
35244
35245  windows_path="$new_path"
35246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35247    unix_path=`$CYGPATH -u "$windows_path"`
35248    new_path="$unix_path"
35249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35251    new_path="$unix_path"
35252  fi
35253
35254
35255    new_path=`$WHICH "$new_path" 2> /dev/null`
35256
35257    if test "x$new_path" = x; then
35258      # It's still not found. Now this is an unrecoverable error.
35259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35260$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35261      has_space=`$ECHO "$complete" | $GREP " "`
35262      if test "x$has_space" != x; then
35263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35265      fi
35266      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35267    fi
35268  fi
35269
35270  # Now new_path has a complete unix path to the binary
35271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35272    # Keep paths in /bin as-is, but remove trailing .exe if any
35273    new_path="${new_path/%.exe/}"
35274    # Do not save /bin paths to all_fixpath_prefixes!
35275  else
35276    # Not in mixed or Windows style, start by that.
35277    new_path=`cmd //c echo $new_path`
35278
35279  input_path="$new_path"
35280  # Check if we need to convert this using DOS-style short mode. If the path
35281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35282  # take no chances and rewrite it.
35283  # Note: m4 eats our [], so we need to use [ and ] instead.
35284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35285  if test "x$has_forbidden_chars" != x; then
35286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35288  fi
35289
35290    # Output is in $new_path
35291
35292  windows_path="$new_path"
35293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35294    unix_path=`$CYGPATH -u "$windows_path"`
35295    new_path="$unix_path"
35296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35298    new_path="$unix_path"
35299  fi
35300
35301    # remove trailing .exe if any
35302    new_path="${new_path/%.exe/}"
35303
35304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35306  fi
35307
35308  else
35309    # We're on a posix platform. Hooray! :)
35310    # First separate the path from the arguments. This will split at the first
35311    # space.
35312    complete="$NM"
35313    path="${complete%% *}"
35314    tmp="$complete EOL"
35315    arguments="${tmp#* }"
35316
35317    # Cannot rely on the command "which" here since it doesn't always work.
35318    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35319    if test -z "$is_absolute_path"; then
35320      # Path to executable is not absolute. Find it.
35321      IFS_save="$IFS"
35322      IFS=:
35323      for p in $PATH; do
35324        if test -f "$p/$path" && test -x "$p/$path"; then
35325          new_path="$p/$path"
35326          break
35327        fi
35328      done
35329      IFS="$IFS_save"
35330    else
35331      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
35332$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
35333      new_path="$path"
35334    fi
35335
35336    if test "x$new_path" = x; then
35337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35338$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35339      has_space=`$ECHO "$complete" | $GREP " "`
35340      if test "x$has_space" != x; then
35341        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35343      fi
35344      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35345    fi
35346  fi
35347
35348  # Now join together the path and the arguments once again
35349  if test "x$arguments" != xEOL; then
35350    new_complete="$new_path ${arguments% *}"
35351  else
35352    new_complete="$new_path"
35353  fi
35354
35355  if test "x$complete" != "x$new_complete"; then
35356    NM="$new_complete"
35357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35358$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35359  fi
35360
35361
35362
35363  # Publish this variable in the help.
35364
35365
35366  if test "x$GNM" = x; then
35367    # The variable is not set by user, try to locate tool using the code snippet
35368    for ac_prog in gnm
35369do
35370  # Extract the first word of "$ac_prog", so it can be a program name with args.
35371set dummy $ac_prog; ac_word=$2
35372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35373$as_echo_n "checking for $ac_word... " >&6; }
35374if ${ac_cv_path_GNM+:} false; then :
35375  $as_echo_n "(cached) " >&6
35376else
35377  case $GNM in
35378  [\\/]* | ?:[\\/]*)
35379  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35380  ;;
35381  *)
35382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35383for as_dir in $PATH
35384do
35385  IFS=$as_save_IFS
35386  test -z "$as_dir" && as_dir=.
35387    for ac_exec_ext in '' $ac_executable_extensions; do
35388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35389    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35391    break 2
35392  fi
35393done
35394  done
35395IFS=$as_save_IFS
35396
35397  ;;
35398esac
35399fi
35400GNM=$ac_cv_path_GNM
35401if test -n "$GNM"; then
35402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35403$as_echo "$GNM" >&6; }
35404else
35405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35406$as_echo "no" >&6; }
35407fi
35408
35409
35410  test -n "$GNM" && break
35411done
35412
35413  else
35414    # The variable is set, but is it from the command line or the environment?
35415
35416    # Try to remove the string !GNM! from our list.
35417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35419      # If it failed, the variable was not from the command line. Ignore it,
35420      # but warn the user (except for BASH, which is always set by the calling BASH).
35421      if test "xGNM" != xBASH; then
35422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35423$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35424      fi
35425      # Try to locate tool using the code snippet
35426      for ac_prog in gnm
35427do
35428  # Extract the first word of "$ac_prog", so it can be a program name with args.
35429set dummy $ac_prog; ac_word=$2
35430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35431$as_echo_n "checking for $ac_word... " >&6; }
35432if ${ac_cv_path_GNM+:} false; then :
35433  $as_echo_n "(cached) " >&6
35434else
35435  case $GNM in
35436  [\\/]* | ?:[\\/]*)
35437  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35438  ;;
35439  *)
35440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35441for as_dir in $PATH
35442do
35443  IFS=$as_save_IFS
35444  test -z "$as_dir" && as_dir=.
35445    for ac_exec_ext in '' $ac_executable_extensions; do
35446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35447    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35449    break 2
35450  fi
35451done
35452  done
35453IFS=$as_save_IFS
35454
35455  ;;
35456esac
35457fi
35458GNM=$ac_cv_path_GNM
35459if test -n "$GNM"; then
35460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35461$as_echo "$GNM" >&6; }
35462else
35463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35464$as_echo "no" >&6; }
35465fi
35466
35467
35468  test -n "$GNM" && break
35469done
35470
35471    else
35472      # If it succeeded, then it was overridden by the user. We will use it
35473      # for the tool.
35474
35475      # First remove it from the list of overridden variables, so we can test
35476      # for unknown variables in the end.
35477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35478
35479      # Check if the provided tool contains a complete path.
35480      tool_specified="$GNM"
35481      tool_basename="${tool_specified##*/}"
35482      if test "x$tool_basename" = "x$tool_specified"; then
35483        # A command without a complete path is provided, search $PATH.
35484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35485$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35486        # Extract the first word of "$tool_basename", so it can be a program name with args.
35487set dummy $tool_basename; ac_word=$2
35488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35489$as_echo_n "checking for $ac_word... " >&6; }
35490if ${ac_cv_path_GNM+:} false; then :
35491  $as_echo_n "(cached) " >&6
35492else
35493  case $GNM in
35494  [\\/]* | ?:[\\/]*)
35495  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35496  ;;
35497  *)
35498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35499for as_dir in $PATH
35500do
35501  IFS=$as_save_IFS
35502  test -z "$as_dir" && as_dir=.
35503    for ac_exec_ext in '' $ac_executable_extensions; do
35504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35505    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35507    break 2
35508  fi
35509done
35510  done
35511IFS=$as_save_IFS
35512
35513  ;;
35514esac
35515fi
35516GNM=$ac_cv_path_GNM
35517if test -n "$GNM"; then
35518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35519$as_echo "$GNM" >&6; }
35520else
35521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35522$as_echo "no" >&6; }
35523fi
35524
35525
35526        if test "x$GNM" = x; then
35527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35528        fi
35529      else
35530        # Otherwise we believe it is a complete path. Use it as it is.
35531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35532$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35534$as_echo_n "checking for GNM... " >&6; }
35535        if test ! -x "$tool_specified"; then
35536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35537$as_echo "not found" >&6; }
35538          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35539        fi
35540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35541$as_echo "$tool_specified" >&6; }
35542      fi
35543    fi
35544  fi
35545
35546
35547
35548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35549
35550  # First separate the path from the arguments. This will split at the first
35551  # space.
35552  complete="$GNM"
35553  path="${complete%% *}"
35554  tmp="$complete EOL"
35555  arguments="${tmp#* }"
35556
35557  # Input might be given as Windows format, start by converting to
35558  # unix format.
35559  new_path=`$CYGPATH -u "$path"`
35560
35561  # Now try to locate executable using which
35562  new_path=`$WHICH "$new_path" 2> /dev/null`
35563  # bat and cmd files are not always considered executable in cygwin causing which
35564  # to not find them
35565  if test "x$new_path" = x \
35566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35568    new_path=`$CYGPATH -u "$path"`
35569  fi
35570  if test "x$new_path" = x; then
35571    # Oops. Which didn't find the executable.
35572    # The splitting of arguments from the executable at a space might have been incorrect,
35573    # since paths with space are more likely in Windows. Give it another try with the whole
35574    # argument.
35575    path="$complete"
35576    arguments="EOL"
35577    new_path=`$CYGPATH -u "$path"`
35578    new_path=`$WHICH "$new_path" 2> /dev/null`
35579    # bat and cmd files are not always considered executable in cygwin causing which
35580    # to not find them
35581    if test "x$new_path" = x \
35582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35584      new_path=`$CYGPATH -u "$path"`
35585    fi
35586    if test "x$new_path" = x; then
35587      # It's still not found. Now this is an unrecoverable error.
35588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35589$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35590      has_space=`$ECHO "$complete" | $GREP " "`
35591      if test "x$has_space" != x; then
35592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35594      fi
35595      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35596    fi
35597  fi
35598
35599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35602  # "foo.exe" is OK but "foo" is an error.
35603  #
35604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35605  # It is also a way to make sure we got the proper file name for the real test later on.
35606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35607  if test "x$test_shortpath" = x; then
35608    # Short path failed, file does not exist as specified.
35609    # Try adding .exe or .cmd
35610    if test -f "${new_path}.exe"; then
35611      input_to_shortpath="${new_path}.exe"
35612    elif test -f "${new_path}.cmd"; then
35613      input_to_shortpath="${new_path}.cmd"
35614    else
35615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35616$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35619      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35620    fi
35621  else
35622    input_to_shortpath="$new_path"
35623  fi
35624
35625  # Call helper function which possibly converts this using DOS-style short mode.
35626  # If so, the updated path is stored in $new_path.
35627  new_path="$input_to_shortpath"
35628
35629  input_path="$input_to_shortpath"
35630  # Check if we need to convert this using DOS-style short mode. If the path
35631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35632  # take no chances and rewrite it.
35633  # Note: m4 eats our [], so we need to use [ and ] instead.
35634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35635  if test "x$has_forbidden_chars" != x; then
35636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35640      # Going to short mode and back again did indeed matter. Since short mode is
35641      # case insensitive, let's make it lowercase to improve readability.
35642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35643      # Now convert it back to Unix-stile (cygpath)
35644      input_path=`$CYGPATH -u "$shortmode_path"`
35645      new_path="$input_path"
35646    fi
35647  fi
35648
35649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35650  if test "x$test_cygdrive_prefix" = x; then
35651    # As a simple fix, exclude /usr/bin since it's not a real path.
35652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35654      # a path prefixed by /cygdrive for fixpath to work.
35655      new_path="$CYGWIN_ROOT_PATH$input_path"
35656    fi
35657  fi
35658
35659  # remove trailing .exe if any
35660  new_path="${new_path/%.exe/}"
35661
35662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35663
35664  # First separate the path from the arguments. This will split at the first
35665  # space.
35666  complete="$GNM"
35667  path="${complete%% *}"
35668  tmp="$complete EOL"
35669  arguments="${tmp#* }"
35670
35671  # Input might be given as Windows format, start by converting to
35672  # unix format.
35673  new_path="$path"
35674
35675  windows_path="$new_path"
35676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35677    unix_path=`$CYGPATH -u "$windows_path"`
35678    new_path="$unix_path"
35679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35681    new_path="$unix_path"
35682  fi
35683
35684
35685  # Now try to locate executable using which
35686  new_path=`$WHICH "$new_path" 2> /dev/null`
35687
35688  if test "x$new_path" = x; then
35689    # Oops. Which didn't find the executable.
35690    # The splitting of arguments from the executable at a space might have been incorrect,
35691    # since paths with space are more likely in Windows. Give it another try with the whole
35692    # argument.
35693    path="$complete"
35694    arguments="EOL"
35695    new_path="$path"
35696
35697  windows_path="$new_path"
35698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35699    unix_path=`$CYGPATH -u "$windows_path"`
35700    new_path="$unix_path"
35701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35703    new_path="$unix_path"
35704  fi
35705
35706
35707    new_path=`$WHICH "$new_path" 2> /dev/null`
35708
35709    if test "x$new_path" = x; then
35710      # It's still not found. Now this is an unrecoverable error.
35711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35712$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35713      has_space=`$ECHO "$complete" | $GREP " "`
35714      if test "x$has_space" != x; then
35715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35717      fi
35718      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35719    fi
35720  fi
35721
35722  # Now new_path has a complete unix path to the binary
35723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35724    # Keep paths in /bin as-is, but remove trailing .exe if any
35725    new_path="${new_path/%.exe/}"
35726    # Do not save /bin paths to all_fixpath_prefixes!
35727  else
35728    # Not in mixed or Windows style, start by that.
35729    new_path=`cmd //c echo $new_path`
35730
35731  input_path="$new_path"
35732  # Check if we need to convert this using DOS-style short mode. If the path
35733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35734  # take no chances and rewrite it.
35735  # Note: m4 eats our [], so we need to use [ and ] instead.
35736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35737  if test "x$has_forbidden_chars" != x; then
35738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35740  fi
35741
35742    # Output is in $new_path
35743
35744  windows_path="$new_path"
35745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35746    unix_path=`$CYGPATH -u "$windows_path"`
35747    new_path="$unix_path"
35748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35750    new_path="$unix_path"
35751  fi
35752
35753    # remove trailing .exe if any
35754    new_path="${new_path/%.exe/}"
35755
35756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35758  fi
35759
35760  else
35761    # We're on a posix platform. Hooray! :)
35762    # First separate the path from the arguments. This will split at the first
35763    # space.
35764    complete="$GNM"
35765    path="${complete%% *}"
35766    tmp="$complete EOL"
35767    arguments="${tmp#* }"
35768
35769    # Cannot rely on the command "which" here since it doesn't always work.
35770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35771    if test -z "$is_absolute_path"; then
35772      # Path to executable is not absolute. Find it.
35773      IFS_save="$IFS"
35774      IFS=:
35775      for p in $PATH; do
35776        if test -f "$p/$path" && test -x "$p/$path"; then
35777          new_path="$p/$path"
35778          break
35779        fi
35780      done
35781      IFS="$IFS_save"
35782    else
35783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
35784$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
35785      new_path="$path"
35786    fi
35787
35788    if test "x$new_path" = x; then
35789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35790$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35791      has_space=`$ECHO "$complete" | $GREP " "`
35792      if test "x$has_space" != x; then
35793        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35795      fi
35796      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35797    fi
35798  fi
35799
35800  # Now join together the path and the arguments once again
35801  if test "x$arguments" != xEOL; then
35802    new_complete="$new_path ${arguments% *}"
35803  else
35804    new_complete="$new_path"
35805  fi
35806
35807  if test "x$complete" != "x$new_complete"; then
35808    GNM="$new_complete"
35809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35810$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35811  fi
35812
35813
35814
35815  # Publish this variable in the help.
35816
35817
35818  if test "x$STRIP" = x; then
35819    # The variable is not set by user, try to locate tool using the code snippet
35820    for ac_prog in strip
35821do
35822  # Extract the first word of "$ac_prog", so it can be a program name with args.
35823set dummy $ac_prog; ac_word=$2
35824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35825$as_echo_n "checking for $ac_word... " >&6; }
35826if ${ac_cv_path_STRIP+:} false; then :
35827  $as_echo_n "(cached) " >&6
35828else
35829  case $STRIP in
35830  [\\/]* | ?:[\\/]*)
35831  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35832  ;;
35833  *)
35834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35835for as_dir in $PATH
35836do
35837  IFS=$as_save_IFS
35838  test -z "$as_dir" && as_dir=.
35839    for ac_exec_ext in '' $ac_executable_extensions; do
35840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35841    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35843    break 2
35844  fi
35845done
35846  done
35847IFS=$as_save_IFS
35848
35849  ;;
35850esac
35851fi
35852STRIP=$ac_cv_path_STRIP
35853if test -n "$STRIP"; then
35854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35855$as_echo "$STRIP" >&6; }
35856else
35857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35858$as_echo "no" >&6; }
35859fi
35860
35861
35862  test -n "$STRIP" && break
35863done
35864
35865  else
35866    # The variable is set, but is it from the command line or the environment?
35867
35868    # Try to remove the string !STRIP! from our list.
35869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35871      # If it failed, the variable was not from the command line. Ignore it,
35872      # but warn the user (except for BASH, which is always set by the calling BASH).
35873      if test "xSTRIP" != xBASH; then
35874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35875$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35876      fi
35877      # Try to locate tool using the code snippet
35878      for ac_prog in strip
35879do
35880  # Extract the first word of "$ac_prog", so it can be a program name with args.
35881set dummy $ac_prog; ac_word=$2
35882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35883$as_echo_n "checking for $ac_word... " >&6; }
35884if ${ac_cv_path_STRIP+:} false; then :
35885  $as_echo_n "(cached) " >&6
35886else
35887  case $STRIP in
35888  [\\/]* | ?:[\\/]*)
35889  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35890  ;;
35891  *)
35892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35893for as_dir in $PATH
35894do
35895  IFS=$as_save_IFS
35896  test -z "$as_dir" && as_dir=.
35897    for ac_exec_ext in '' $ac_executable_extensions; do
35898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35899    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35901    break 2
35902  fi
35903done
35904  done
35905IFS=$as_save_IFS
35906
35907  ;;
35908esac
35909fi
35910STRIP=$ac_cv_path_STRIP
35911if test -n "$STRIP"; then
35912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35913$as_echo "$STRIP" >&6; }
35914else
35915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35916$as_echo "no" >&6; }
35917fi
35918
35919
35920  test -n "$STRIP" && break
35921done
35922
35923    else
35924      # If it succeeded, then it was overridden by the user. We will use it
35925      # for the tool.
35926
35927      # First remove it from the list of overridden variables, so we can test
35928      # for unknown variables in the end.
35929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35930
35931      # Check if the provided tool contains a complete path.
35932      tool_specified="$STRIP"
35933      tool_basename="${tool_specified##*/}"
35934      if test "x$tool_basename" = "x$tool_specified"; then
35935        # A command without a complete path is provided, search $PATH.
35936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35937$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35938        # Extract the first word of "$tool_basename", so it can be a program name with args.
35939set dummy $tool_basename; ac_word=$2
35940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35941$as_echo_n "checking for $ac_word... " >&6; }
35942if ${ac_cv_path_STRIP+:} false; then :
35943  $as_echo_n "(cached) " >&6
35944else
35945  case $STRIP in
35946  [\\/]* | ?:[\\/]*)
35947  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35948  ;;
35949  *)
35950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35951for as_dir in $PATH
35952do
35953  IFS=$as_save_IFS
35954  test -z "$as_dir" && as_dir=.
35955    for ac_exec_ext in '' $ac_executable_extensions; do
35956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35957    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35959    break 2
35960  fi
35961done
35962  done
35963IFS=$as_save_IFS
35964
35965  ;;
35966esac
35967fi
35968STRIP=$ac_cv_path_STRIP
35969if test -n "$STRIP"; then
35970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35971$as_echo "$STRIP" >&6; }
35972else
35973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35974$as_echo "no" >&6; }
35975fi
35976
35977
35978        if test "x$STRIP" = x; then
35979          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35980        fi
35981      else
35982        # Otherwise we believe it is a complete path. Use it as it is.
35983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35984$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35986$as_echo_n "checking for STRIP... " >&6; }
35987        if test ! -x "$tool_specified"; then
35988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35989$as_echo "not found" >&6; }
35990          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35991        fi
35992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35993$as_echo "$tool_specified" >&6; }
35994      fi
35995    fi
35996  fi
35997
35998
35999
36000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36001
36002  # First separate the path from the arguments. This will split at the first
36003  # space.
36004  complete="$STRIP"
36005  path="${complete%% *}"
36006  tmp="$complete EOL"
36007  arguments="${tmp#* }"
36008
36009  # Input might be given as Windows format, start by converting to
36010  # unix format.
36011  new_path=`$CYGPATH -u "$path"`
36012
36013  # Now try to locate executable using which
36014  new_path=`$WHICH "$new_path" 2> /dev/null`
36015  # bat and cmd files are not always considered executable in cygwin causing which
36016  # to not find them
36017  if test "x$new_path" = x \
36018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36020    new_path=`$CYGPATH -u "$path"`
36021  fi
36022  if test "x$new_path" = x; then
36023    # Oops. Which didn't find the executable.
36024    # The splitting of arguments from the executable at a space might have been incorrect,
36025    # since paths with space are more likely in Windows. Give it another try with the whole
36026    # argument.
36027    path="$complete"
36028    arguments="EOL"
36029    new_path=`$CYGPATH -u "$path"`
36030    new_path=`$WHICH "$new_path" 2> /dev/null`
36031    # bat and cmd files are not always considered executable in cygwin causing which
36032    # to not find them
36033    if test "x$new_path" = x \
36034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36036      new_path=`$CYGPATH -u "$path"`
36037    fi
36038    if test "x$new_path" = x; then
36039      # It's still not found. Now this is an unrecoverable error.
36040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36041$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36042      has_space=`$ECHO "$complete" | $GREP " "`
36043      if test "x$has_space" != x; then
36044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36046      fi
36047      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36048    fi
36049  fi
36050
36051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36054  # "foo.exe" is OK but "foo" is an error.
36055  #
36056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36057  # It is also a way to make sure we got the proper file name for the real test later on.
36058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36059  if test "x$test_shortpath" = x; then
36060    # Short path failed, file does not exist as specified.
36061    # Try adding .exe or .cmd
36062    if test -f "${new_path}.exe"; then
36063      input_to_shortpath="${new_path}.exe"
36064    elif test -f "${new_path}.cmd"; then
36065      input_to_shortpath="${new_path}.cmd"
36066    else
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36068$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36071      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36072    fi
36073  else
36074    input_to_shortpath="$new_path"
36075  fi
36076
36077  # Call helper function which possibly converts this using DOS-style short mode.
36078  # If so, the updated path is stored in $new_path.
36079  new_path="$input_to_shortpath"
36080
36081  input_path="$input_to_shortpath"
36082  # Check if we need to convert this using DOS-style short mode. If the path
36083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36084  # take no chances and rewrite it.
36085  # Note: m4 eats our [], so we need to use [ and ] instead.
36086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36087  if test "x$has_forbidden_chars" != x; then
36088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36092      # Going to short mode and back again did indeed matter. Since short mode is
36093      # case insensitive, let's make it lowercase to improve readability.
36094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36095      # Now convert it back to Unix-stile (cygpath)
36096      input_path=`$CYGPATH -u "$shortmode_path"`
36097      new_path="$input_path"
36098    fi
36099  fi
36100
36101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36102  if test "x$test_cygdrive_prefix" = x; then
36103    # As a simple fix, exclude /usr/bin since it's not a real path.
36104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36106      # a path prefixed by /cygdrive for fixpath to work.
36107      new_path="$CYGWIN_ROOT_PATH$input_path"
36108    fi
36109  fi
36110
36111  # remove trailing .exe if any
36112  new_path="${new_path/%.exe/}"
36113
36114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36115
36116  # First separate the path from the arguments. This will split at the first
36117  # space.
36118  complete="$STRIP"
36119  path="${complete%% *}"
36120  tmp="$complete EOL"
36121  arguments="${tmp#* }"
36122
36123  # Input might be given as Windows format, start by converting to
36124  # unix format.
36125  new_path="$path"
36126
36127  windows_path="$new_path"
36128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36129    unix_path=`$CYGPATH -u "$windows_path"`
36130    new_path="$unix_path"
36131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36133    new_path="$unix_path"
36134  fi
36135
36136
36137  # Now try to locate executable using which
36138  new_path=`$WHICH "$new_path" 2> /dev/null`
36139
36140  if test "x$new_path" = x; then
36141    # Oops. Which didn't find the executable.
36142    # The splitting of arguments from the executable at a space might have been incorrect,
36143    # since paths with space are more likely in Windows. Give it another try with the whole
36144    # argument.
36145    path="$complete"
36146    arguments="EOL"
36147    new_path="$path"
36148
36149  windows_path="$new_path"
36150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36151    unix_path=`$CYGPATH -u "$windows_path"`
36152    new_path="$unix_path"
36153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36155    new_path="$unix_path"
36156  fi
36157
36158
36159    new_path=`$WHICH "$new_path" 2> /dev/null`
36160
36161    if test "x$new_path" = x; then
36162      # It's still not found. Now this is an unrecoverable error.
36163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36164$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36165      has_space=`$ECHO "$complete" | $GREP " "`
36166      if test "x$has_space" != x; then
36167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36169      fi
36170      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36171    fi
36172  fi
36173
36174  # Now new_path has a complete unix path to the binary
36175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36176    # Keep paths in /bin as-is, but remove trailing .exe if any
36177    new_path="${new_path/%.exe/}"
36178    # Do not save /bin paths to all_fixpath_prefixes!
36179  else
36180    # Not in mixed or Windows style, start by that.
36181    new_path=`cmd //c echo $new_path`
36182
36183  input_path="$new_path"
36184  # Check if we need to convert this using DOS-style short mode. If the path
36185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36186  # take no chances and rewrite it.
36187  # Note: m4 eats our [], so we need to use [ and ] instead.
36188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36189  if test "x$has_forbidden_chars" != x; then
36190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36192  fi
36193
36194    # Output is in $new_path
36195
36196  windows_path="$new_path"
36197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36198    unix_path=`$CYGPATH -u "$windows_path"`
36199    new_path="$unix_path"
36200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36202    new_path="$unix_path"
36203  fi
36204
36205    # remove trailing .exe if any
36206    new_path="${new_path/%.exe/}"
36207
36208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36210  fi
36211
36212  else
36213    # We're on a posix platform. Hooray! :)
36214    # First separate the path from the arguments. This will split at the first
36215    # space.
36216    complete="$STRIP"
36217    path="${complete%% *}"
36218    tmp="$complete EOL"
36219    arguments="${tmp#* }"
36220
36221    # Cannot rely on the command "which" here since it doesn't always work.
36222    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36223    if test -z "$is_absolute_path"; then
36224      # Path to executable is not absolute. Find it.
36225      IFS_save="$IFS"
36226      IFS=:
36227      for p in $PATH; do
36228        if test -f "$p/$path" && test -x "$p/$path"; then
36229          new_path="$p/$path"
36230          break
36231        fi
36232      done
36233      IFS="$IFS_save"
36234    else
36235      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
36236$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
36237      new_path="$path"
36238    fi
36239
36240    if test "x$new_path" = x; then
36241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36242$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36243      has_space=`$ECHO "$complete" | $GREP " "`
36244      if test "x$has_space" != x; then
36245        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36246$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36247      fi
36248      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36249    fi
36250  fi
36251
36252  # Now join together the path and the arguments once again
36253  if test "x$arguments" != xEOL; then
36254    new_complete="$new_path ${arguments% *}"
36255  else
36256    new_complete="$new_path"
36257  fi
36258
36259  if test "x$complete" != "x$new_complete"; then
36260    STRIP="$new_complete"
36261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36262$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36263  fi
36264
36265
36266
36267  # Publish this variable in the help.
36268
36269
36270  if test "x$MCS" = x; then
36271    # The variable is not set by user, try to locate tool using the code snippet
36272    for ac_prog in mcs
36273do
36274  # Extract the first word of "$ac_prog", so it can be a program name with args.
36275set dummy $ac_prog; ac_word=$2
36276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36277$as_echo_n "checking for $ac_word... " >&6; }
36278if ${ac_cv_path_MCS+:} false; then :
36279  $as_echo_n "(cached) " >&6
36280else
36281  case $MCS in
36282  [\\/]* | ?:[\\/]*)
36283  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36284  ;;
36285  *)
36286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36287for as_dir in $PATH
36288do
36289  IFS=$as_save_IFS
36290  test -z "$as_dir" && as_dir=.
36291    for ac_exec_ext in '' $ac_executable_extensions; do
36292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36293    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36295    break 2
36296  fi
36297done
36298  done
36299IFS=$as_save_IFS
36300
36301  ;;
36302esac
36303fi
36304MCS=$ac_cv_path_MCS
36305if test -n "$MCS"; then
36306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36307$as_echo "$MCS" >&6; }
36308else
36309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36310$as_echo "no" >&6; }
36311fi
36312
36313
36314  test -n "$MCS" && break
36315done
36316
36317  else
36318    # The variable is set, but is it from the command line or the environment?
36319
36320    # Try to remove the string !MCS! from our list.
36321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36323      # If it failed, the variable was not from the command line. Ignore it,
36324      # but warn the user (except for BASH, which is always set by the calling BASH).
36325      if test "xMCS" != xBASH; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36327$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36328      fi
36329      # Try to locate tool using the code snippet
36330      for ac_prog in mcs
36331do
36332  # Extract the first word of "$ac_prog", so it can be a program name with args.
36333set dummy $ac_prog; ac_word=$2
36334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36335$as_echo_n "checking for $ac_word... " >&6; }
36336if ${ac_cv_path_MCS+:} false; then :
36337  $as_echo_n "(cached) " >&6
36338else
36339  case $MCS in
36340  [\\/]* | ?:[\\/]*)
36341  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36342  ;;
36343  *)
36344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36345for as_dir in $PATH
36346do
36347  IFS=$as_save_IFS
36348  test -z "$as_dir" && as_dir=.
36349    for ac_exec_ext in '' $ac_executable_extensions; do
36350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36351    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36353    break 2
36354  fi
36355done
36356  done
36357IFS=$as_save_IFS
36358
36359  ;;
36360esac
36361fi
36362MCS=$ac_cv_path_MCS
36363if test -n "$MCS"; then
36364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36365$as_echo "$MCS" >&6; }
36366else
36367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36368$as_echo "no" >&6; }
36369fi
36370
36371
36372  test -n "$MCS" && break
36373done
36374
36375    else
36376      # If it succeeded, then it was overridden by the user. We will use it
36377      # for the tool.
36378
36379      # First remove it from the list of overridden variables, so we can test
36380      # for unknown variables in the end.
36381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36382
36383      # Check if the provided tool contains a complete path.
36384      tool_specified="$MCS"
36385      tool_basename="${tool_specified##*/}"
36386      if test "x$tool_basename" = "x$tool_specified"; then
36387        # A command without a complete path is provided, search $PATH.
36388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36389$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36390        # Extract the first word of "$tool_basename", so it can be a program name with args.
36391set dummy $tool_basename; ac_word=$2
36392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36393$as_echo_n "checking for $ac_word... " >&6; }
36394if ${ac_cv_path_MCS+:} false; then :
36395  $as_echo_n "(cached) " >&6
36396else
36397  case $MCS in
36398  [\\/]* | ?:[\\/]*)
36399  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36400  ;;
36401  *)
36402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36403for as_dir in $PATH
36404do
36405  IFS=$as_save_IFS
36406  test -z "$as_dir" && as_dir=.
36407    for ac_exec_ext in '' $ac_executable_extensions; do
36408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36409    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36411    break 2
36412  fi
36413done
36414  done
36415IFS=$as_save_IFS
36416
36417  ;;
36418esac
36419fi
36420MCS=$ac_cv_path_MCS
36421if test -n "$MCS"; then
36422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36423$as_echo "$MCS" >&6; }
36424else
36425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36426$as_echo "no" >&6; }
36427fi
36428
36429
36430        if test "x$MCS" = x; then
36431          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36432        fi
36433      else
36434        # Otherwise we believe it is a complete path. Use it as it is.
36435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36436$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36438$as_echo_n "checking for MCS... " >&6; }
36439        if test ! -x "$tool_specified"; then
36440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36441$as_echo "not found" >&6; }
36442          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36443        fi
36444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36445$as_echo "$tool_specified" >&6; }
36446      fi
36447    fi
36448  fi
36449
36450
36451
36452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36453
36454  # First separate the path from the arguments. This will split at the first
36455  # space.
36456  complete="$MCS"
36457  path="${complete%% *}"
36458  tmp="$complete EOL"
36459  arguments="${tmp#* }"
36460
36461  # Input might be given as Windows format, start by converting to
36462  # unix format.
36463  new_path=`$CYGPATH -u "$path"`
36464
36465  # Now try to locate executable using which
36466  new_path=`$WHICH "$new_path" 2> /dev/null`
36467  # bat and cmd files are not always considered executable in cygwin causing which
36468  # to not find them
36469  if test "x$new_path" = x \
36470      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36471      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36472    new_path=`$CYGPATH -u "$path"`
36473  fi
36474  if test "x$new_path" = x; then
36475    # Oops. Which didn't find the executable.
36476    # The splitting of arguments from the executable at a space might have been incorrect,
36477    # since paths with space are more likely in Windows. Give it another try with the whole
36478    # argument.
36479    path="$complete"
36480    arguments="EOL"
36481    new_path=`$CYGPATH -u "$path"`
36482    new_path=`$WHICH "$new_path" 2> /dev/null`
36483    # bat and cmd files are not always considered executable in cygwin causing which
36484    # to not find them
36485    if test "x$new_path" = x \
36486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488      new_path=`$CYGPATH -u "$path"`
36489    fi
36490    if test "x$new_path" = x; then
36491      # It's still not found. Now this is an unrecoverable error.
36492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36493$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36494      has_space=`$ECHO "$complete" | $GREP " "`
36495      if test "x$has_space" != x; then
36496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36498      fi
36499      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36500    fi
36501  fi
36502
36503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36506  # "foo.exe" is OK but "foo" is an error.
36507  #
36508  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36509  # It is also a way to make sure we got the proper file name for the real test later on.
36510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36511  if test "x$test_shortpath" = x; then
36512    # Short path failed, file does not exist as specified.
36513    # Try adding .exe or .cmd
36514    if test -f "${new_path}.exe"; then
36515      input_to_shortpath="${new_path}.exe"
36516    elif test -f "${new_path}.cmd"; then
36517      input_to_shortpath="${new_path}.cmd"
36518    else
36519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36520$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36521      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36522$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36523      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36524    fi
36525  else
36526    input_to_shortpath="$new_path"
36527  fi
36528
36529  # Call helper function which possibly converts this using DOS-style short mode.
36530  # If so, the updated path is stored in $new_path.
36531  new_path="$input_to_shortpath"
36532
36533  input_path="$input_to_shortpath"
36534  # Check if we need to convert this using DOS-style short mode. If the path
36535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36536  # take no chances and rewrite it.
36537  # Note: m4 eats our [], so we need to use [ and ] instead.
36538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36539  if test "x$has_forbidden_chars" != x; then
36540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36544      # Going to short mode and back again did indeed matter. Since short mode is
36545      # case insensitive, let's make it lowercase to improve readability.
36546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36547      # Now convert it back to Unix-stile (cygpath)
36548      input_path=`$CYGPATH -u "$shortmode_path"`
36549      new_path="$input_path"
36550    fi
36551  fi
36552
36553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36554  if test "x$test_cygdrive_prefix" = x; then
36555    # As a simple fix, exclude /usr/bin since it's not a real path.
36556    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36558      # a path prefixed by /cygdrive for fixpath to work.
36559      new_path="$CYGWIN_ROOT_PATH$input_path"
36560    fi
36561  fi
36562
36563  # remove trailing .exe if any
36564  new_path="${new_path/%.exe/}"
36565
36566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36567
36568  # First separate the path from the arguments. This will split at the first
36569  # space.
36570  complete="$MCS"
36571  path="${complete%% *}"
36572  tmp="$complete EOL"
36573  arguments="${tmp#* }"
36574
36575  # Input might be given as Windows format, start by converting to
36576  # unix format.
36577  new_path="$path"
36578
36579  windows_path="$new_path"
36580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36581    unix_path=`$CYGPATH -u "$windows_path"`
36582    new_path="$unix_path"
36583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36585    new_path="$unix_path"
36586  fi
36587
36588
36589  # Now try to locate executable using which
36590  new_path=`$WHICH "$new_path" 2> /dev/null`
36591
36592  if test "x$new_path" = x; then
36593    # Oops. Which didn't find the executable.
36594    # The splitting of arguments from the executable at a space might have been incorrect,
36595    # since paths with space are more likely in Windows. Give it another try with the whole
36596    # argument.
36597    path="$complete"
36598    arguments="EOL"
36599    new_path="$path"
36600
36601  windows_path="$new_path"
36602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36603    unix_path=`$CYGPATH -u "$windows_path"`
36604    new_path="$unix_path"
36605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36607    new_path="$unix_path"
36608  fi
36609
36610
36611    new_path=`$WHICH "$new_path" 2> /dev/null`
36612
36613    if test "x$new_path" = x; then
36614      # It's still not found. Now this is an unrecoverable error.
36615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36616$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36617      has_space=`$ECHO "$complete" | $GREP " "`
36618      if test "x$has_space" != x; then
36619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36621      fi
36622      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36623    fi
36624  fi
36625
36626  # Now new_path has a complete unix path to the binary
36627  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36628    # Keep paths in /bin as-is, but remove trailing .exe if any
36629    new_path="${new_path/%.exe/}"
36630    # Do not save /bin paths to all_fixpath_prefixes!
36631  else
36632    # Not in mixed or Windows style, start by that.
36633    new_path=`cmd //c echo $new_path`
36634
36635  input_path="$new_path"
36636  # Check if we need to convert this using DOS-style short mode. If the path
36637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36638  # take no chances and rewrite it.
36639  # Note: m4 eats our [], so we need to use [ and ] instead.
36640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36641  if test "x$has_forbidden_chars" != x; then
36642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36644  fi
36645
36646    # Output is in $new_path
36647
36648  windows_path="$new_path"
36649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36650    unix_path=`$CYGPATH -u "$windows_path"`
36651    new_path="$unix_path"
36652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36654    new_path="$unix_path"
36655  fi
36656
36657    # remove trailing .exe if any
36658    new_path="${new_path/%.exe/}"
36659
36660    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36661    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36662  fi
36663
36664  else
36665    # We're on a posix platform. Hooray! :)
36666    # First separate the path from the arguments. This will split at the first
36667    # space.
36668    complete="$MCS"
36669    path="${complete%% *}"
36670    tmp="$complete EOL"
36671    arguments="${tmp#* }"
36672
36673    # Cannot rely on the command "which" here since it doesn't always work.
36674    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36675    if test -z "$is_absolute_path"; then
36676      # Path to executable is not absolute. Find it.
36677      IFS_save="$IFS"
36678      IFS=:
36679      for p in $PATH; do
36680        if test -f "$p/$path" && test -x "$p/$path"; then
36681          new_path="$p/$path"
36682          break
36683        fi
36684      done
36685      IFS="$IFS_save"
36686    else
36687      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
36688$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
36689      new_path="$path"
36690    fi
36691
36692    if test "x$new_path" = x; then
36693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36694$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36695      has_space=`$ECHO "$complete" | $GREP " "`
36696      if test "x$has_space" != x; then
36697        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36698$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36699      fi
36700      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36701    fi
36702  fi
36703
36704  # Now join together the path and the arguments once again
36705  if test "x$arguments" != xEOL; then
36706    new_complete="$new_path ${arguments% *}"
36707  else
36708    new_complete="$new_path"
36709  fi
36710
36711  if test "x$complete" != "x$new_complete"; then
36712    MCS="$new_complete"
36713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36714$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36715  fi
36716
36717  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36718
36719
36720  # Publish this variable in the help.
36721
36722
36723  if test "x$NM" = x; then
36724    # The variable is not set by user, try to locate tool using the code snippet
36725    if test -n "$ac_tool_prefix"; then
36726  for ac_prog in nm
36727  do
36728    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36731$as_echo_n "checking for $ac_word... " >&6; }
36732if ${ac_cv_prog_NM+:} false; then :
36733  $as_echo_n "(cached) " >&6
36734else
36735  if test -n "$NM"; then
36736  ac_cv_prog_NM="$NM" # Let the user override the test.
36737else
36738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36739for as_dir in $PATH
36740do
36741  IFS=$as_save_IFS
36742  test -z "$as_dir" && as_dir=.
36743    for ac_exec_ext in '' $ac_executable_extensions; do
36744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36745    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36747    break 2
36748  fi
36749done
36750  done
36751IFS=$as_save_IFS
36752
36753fi
36754fi
36755NM=$ac_cv_prog_NM
36756if test -n "$NM"; then
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36758$as_echo "$NM" >&6; }
36759else
36760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36761$as_echo "no" >&6; }
36762fi
36763
36764
36765    test -n "$NM" && break
36766  done
36767fi
36768if test -z "$NM"; then
36769  ac_ct_NM=$NM
36770  for ac_prog in nm
36771do
36772  # Extract the first word of "$ac_prog", so it can be a program name with args.
36773set dummy $ac_prog; ac_word=$2
36774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36775$as_echo_n "checking for $ac_word... " >&6; }
36776if ${ac_cv_prog_ac_ct_NM+:} false; then :
36777  $as_echo_n "(cached) " >&6
36778else
36779  if test -n "$ac_ct_NM"; then
36780  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36781else
36782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36783for as_dir in $PATH
36784do
36785  IFS=$as_save_IFS
36786  test -z "$as_dir" && as_dir=.
36787    for ac_exec_ext in '' $ac_executable_extensions; do
36788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36789    ac_cv_prog_ac_ct_NM="$ac_prog"
36790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36791    break 2
36792  fi
36793done
36794  done
36795IFS=$as_save_IFS
36796
36797fi
36798fi
36799ac_ct_NM=$ac_cv_prog_ac_ct_NM
36800if test -n "$ac_ct_NM"; then
36801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36802$as_echo "$ac_ct_NM" >&6; }
36803else
36804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36805$as_echo "no" >&6; }
36806fi
36807
36808
36809  test -n "$ac_ct_NM" && break
36810done
36811
36812  if test "x$ac_ct_NM" = x; then
36813    NM=""
36814  else
36815    case $cross_compiling:$ac_tool_warned in
36816yes:)
36817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36819ac_tool_warned=yes ;;
36820esac
36821    NM=$ac_ct_NM
36822  fi
36823fi
36824
36825  else
36826    # The variable is set, but is it from the command line or the environment?
36827
36828    # Try to remove the string !NM! from our list.
36829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36831      # If it failed, the variable was not from the command line. Ignore it,
36832      # but warn the user (except for BASH, which is always set by the calling BASH).
36833      if test "xNM" != xBASH; then
36834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36835$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36836      fi
36837      # Try to locate tool using the code snippet
36838      if test -n "$ac_tool_prefix"; then
36839  for ac_prog in nm
36840  do
36841    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36842set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36844$as_echo_n "checking for $ac_word... " >&6; }
36845if ${ac_cv_prog_NM+:} false; then :
36846  $as_echo_n "(cached) " >&6
36847else
36848  if test -n "$NM"; then
36849  ac_cv_prog_NM="$NM" # Let the user override the test.
36850else
36851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36852for as_dir in $PATH
36853do
36854  IFS=$as_save_IFS
36855  test -z "$as_dir" && as_dir=.
36856    for ac_exec_ext in '' $ac_executable_extensions; do
36857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36858    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36860    break 2
36861  fi
36862done
36863  done
36864IFS=$as_save_IFS
36865
36866fi
36867fi
36868NM=$ac_cv_prog_NM
36869if test -n "$NM"; then
36870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36871$as_echo "$NM" >&6; }
36872else
36873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36874$as_echo "no" >&6; }
36875fi
36876
36877
36878    test -n "$NM" && break
36879  done
36880fi
36881if test -z "$NM"; then
36882  ac_ct_NM=$NM
36883  for ac_prog in nm
36884do
36885  # Extract the first word of "$ac_prog", so it can be a program name with args.
36886set dummy $ac_prog; ac_word=$2
36887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36888$as_echo_n "checking for $ac_word... " >&6; }
36889if ${ac_cv_prog_ac_ct_NM+:} false; then :
36890  $as_echo_n "(cached) " >&6
36891else
36892  if test -n "$ac_ct_NM"; then
36893  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36894else
36895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36896for as_dir in $PATH
36897do
36898  IFS=$as_save_IFS
36899  test -z "$as_dir" && as_dir=.
36900    for ac_exec_ext in '' $ac_executable_extensions; do
36901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36902    ac_cv_prog_ac_ct_NM="$ac_prog"
36903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36904    break 2
36905  fi
36906done
36907  done
36908IFS=$as_save_IFS
36909
36910fi
36911fi
36912ac_ct_NM=$ac_cv_prog_ac_ct_NM
36913if test -n "$ac_ct_NM"; then
36914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36915$as_echo "$ac_ct_NM" >&6; }
36916else
36917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36918$as_echo "no" >&6; }
36919fi
36920
36921
36922  test -n "$ac_ct_NM" && break
36923done
36924
36925  if test "x$ac_ct_NM" = x; then
36926    NM=""
36927  else
36928    case $cross_compiling:$ac_tool_warned in
36929yes:)
36930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36932ac_tool_warned=yes ;;
36933esac
36934    NM=$ac_ct_NM
36935  fi
36936fi
36937
36938    else
36939      # If it succeeded, then it was overridden by the user. We will use it
36940      # for the tool.
36941
36942      # First remove it from the list of overridden variables, so we can test
36943      # for unknown variables in the end.
36944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36945
36946      # Check if the provided tool contains a complete path.
36947      tool_specified="$NM"
36948      tool_basename="${tool_specified##*/}"
36949      if test "x$tool_basename" = "x$tool_specified"; then
36950        # A command without a complete path is provided, search $PATH.
36951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36952$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36953        # Extract the first word of "$tool_basename", so it can be a program name with args.
36954set dummy $tool_basename; ac_word=$2
36955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36956$as_echo_n "checking for $ac_word... " >&6; }
36957if ${ac_cv_path_NM+:} false; then :
36958  $as_echo_n "(cached) " >&6
36959else
36960  case $NM in
36961  [\\/]* | ?:[\\/]*)
36962  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36963  ;;
36964  *)
36965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36966for as_dir in $PATH
36967do
36968  IFS=$as_save_IFS
36969  test -z "$as_dir" && as_dir=.
36970    for ac_exec_ext in '' $ac_executable_extensions; do
36971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36972    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36974    break 2
36975  fi
36976done
36977  done
36978IFS=$as_save_IFS
36979
36980  ;;
36981esac
36982fi
36983NM=$ac_cv_path_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        if test "x$NM" = x; then
36994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36995        fi
36996      else
36997        # Otherwise we believe it is a complete path. Use it as it is.
36998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36999$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37001$as_echo_n "checking for NM... " >&6; }
37002        if test ! -x "$tool_specified"; then
37003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37004$as_echo "not found" >&6; }
37005          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37006        fi
37007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37008$as_echo "$tool_specified" >&6; }
37009      fi
37010    fi
37011  fi
37012
37013
37014
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016
37017  # First separate the path from the arguments. This will split at the first
37018  # space.
37019  complete="$NM"
37020  path="${complete%% *}"
37021  tmp="$complete EOL"
37022  arguments="${tmp#* }"
37023
37024  # Input might be given as Windows format, start by converting to
37025  # unix format.
37026  new_path=`$CYGPATH -u "$path"`
37027
37028  # Now try to locate executable using which
37029  new_path=`$WHICH "$new_path" 2> /dev/null`
37030  # bat and cmd files are not always considered executable in cygwin causing which
37031  # to not find them
37032  if test "x$new_path" = x \
37033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37035    new_path=`$CYGPATH -u "$path"`
37036  fi
37037  if test "x$new_path" = x; then
37038    # Oops. Which didn't find the executable.
37039    # The splitting of arguments from the executable at a space might have been incorrect,
37040    # since paths with space are more likely in Windows. Give it another try with the whole
37041    # argument.
37042    path="$complete"
37043    arguments="EOL"
37044    new_path=`$CYGPATH -u "$path"`
37045    new_path=`$WHICH "$new_path" 2> /dev/null`
37046    # bat and cmd files are not always considered executable in cygwin causing which
37047    # to not find them
37048    if test "x$new_path" = x \
37049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37051      new_path=`$CYGPATH -u "$path"`
37052    fi
37053    if test "x$new_path" = x; then
37054      # It's still not found. Now this is an unrecoverable error.
37055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37056$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37057      has_space=`$ECHO "$complete" | $GREP " "`
37058      if test "x$has_space" != x; then
37059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37061      fi
37062      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37063    fi
37064  fi
37065
37066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37069  # "foo.exe" is OK but "foo" is an error.
37070  #
37071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37072  # It is also a way to make sure we got the proper file name for the real test later on.
37073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37074  if test "x$test_shortpath" = x; then
37075    # Short path failed, file does not exist as specified.
37076    # Try adding .exe or .cmd
37077    if test -f "${new_path}.exe"; then
37078      input_to_shortpath="${new_path}.exe"
37079    elif test -f "${new_path}.cmd"; then
37080      input_to_shortpath="${new_path}.cmd"
37081    else
37082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37083$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37086      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37087    fi
37088  else
37089    input_to_shortpath="$new_path"
37090  fi
37091
37092  # Call helper function which possibly converts this using DOS-style short mode.
37093  # If so, the updated path is stored in $new_path.
37094  new_path="$input_to_shortpath"
37095
37096  input_path="$input_to_shortpath"
37097  # Check if we need to convert this using DOS-style short mode. If the path
37098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37099  # take no chances and rewrite it.
37100  # Note: m4 eats our [], so we need to use [ and ] instead.
37101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37102  if test "x$has_forbidden_chars" != x; then
37103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37107      # Going to short mode and back again did indeed matter. Since short mode is
37108      # case insensitive, let's make it lowercase to improve readability.
37109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37110      # Now convert it back to Unix-stile (cygpath)
37111      input_path=`$CYGPATH -u "$shortmode_path"`
37112      new_path="$input_path"
37113    fi
37114  fi
37115
37116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37117  if test "x$test_cygdrive_prefix" = x; then
37118    # As a simple fix, exclude /usr/bin since it's not a real path.
37119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37121      # a path prefixed by /cygdrive for fixpath to work.
37122      new_path="$CYGWIN_ROOT_PATH$input_path"
37123    fi
37124  fi
37125
37126  # remove trailing .exe if any
37127  new_path="${new_path/%.exe/}"
37128
37129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37130
37131  # First separate the path from the arguments. This will split at the first
37132  # space.
37133  complete="$NM"
37134  path="${complete%% *}"
37135  tmp="$complete EOL"
37136  arguments="${tmp#* }"
37137
37138  # Input might be given as Windows format, start by converting to
37139  # unix format.
37140  new_path="$path"
37141
37142  windows_path="$new_path"
37143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37144    unix_path=`$CYGPATH -u "$windows_path"`
37145    new_path="$unix_path"
37146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37148    new_path="$unix_path"
37149  fi
37150
37151
37152  # Now try to locate executable using which
37153  new_path=`$WHICH "$new_path" 2> /dev/null`
37154
37155  if test "x$new_path" = x; then
37156    # Oops. Which didn't find the executable.
37157    # The splitting of arguments from the executable at a space might have been incorrect,
37158    # since paths with space are more likely in Windows. Give it another try with the whole
37159    # argument.
37160    path="$complete"
37161    arguments="EOL"
37162    new_path="$path"
37163
37164  windows_path="$new_path"
37165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37166    unix_path=`$CYGPATH -u "$windows_path"`
37167    new_path="$unix_path"
37168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37170    new_path="$unix_path"
37171  fi
37172
37173
37174    new_path=`$WHICH "$new_path" 2> /dev/null`
37175
37176    if test "x$new_path" = x; then
37177      # It's still not found. Now this is an unrecoverable error.
37178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37179$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37180      has_space=`$ECHO "$complete" | $GREP " "`
37181      if test "x$has_space" != x; then
37182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37184      fi
37185      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37186    fi
37187  fi
37188
37189  # Now new_path has a complete unix path to the binary
37190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37191    # Keep paths in /bin as-is, but remove trailing .exe if any
37192    new_path="${new_path/%.exe/}"
37193    # Do not save /bin paths to all_fixpath_prefixes!
37194  else
37195    # Not in mixed or Windows style, start by that.
37196    new_path=`cmd //c echo $new_path`
37197
37198  input_path="$new_path"
37199  # Check if we need to convert this using DOS-style short mode. If the path
37200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37201  # take no chances and rewrite it.
37202  # Note: m4 eats our [], so we need to use [ and ] instead.
37203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37204  if test "x$has_forbidden_chars" != x; then
37205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37207  fi
37208
37209    # Output is in $new_path
37210
37211  windows_path="$new_path"
37212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37213    unix_path=`$CYGPATH -u "$windows_path"`
37214    new_path="$unix_path"
37215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37217    new_path="$unix_path"
37218  fi
37219
37220    # remove trailing .exe if any
37221    new_path="${new_path/%.exe/}"
37222
37223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37225  fi
37226
37227  else
37228    # We're on a posix platform. Hooray! :)
37229    # First separate the path from the arguments. This will split at the first
37230    # space.
37231    complete="$NM"
37232    path="${complete%% *}"
37233    tmp="$complete EOL"
37234    arguments="${tmp#* }"
37235
37236    # Cannot rely on the command "which" here since it doesn't always work.
37237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37238    if test -z "$is_absolute_path"; then
37239      # Path to executable is not absolute. Find it.
37240      IFS_save="$IFS"
37241      IFS=:
37242      for p in $PATH; do
37243        if test -f "$p/$path" && test -x "$p/$path"; then
37244          new_path="$p/$path"
37245          break
37246        fi
37247      done
37248      IFS="$IFS_save"
37249    else
37250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
37251$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
37252      new_path="$path"
37253    fi
37254
37255    if test "x$new_path" = x; then
37256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37257$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37258      has_space=`$ECHO "$complete" | $GREP " "`
37259      if test "x$has_space" != x; then
37260        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37262      fi
37263      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37264    fi
37265  fi
37266
37267  # Now join together the path and the arguments once again
37268  if test "x$arguments" != xEOL; then
37269    new_complete="$new_path ${arguments% *}"
37270  else
37271    new_complete="$new_path"
37272  fi
37273
37274  if test "x$complete" != "x$new_complete"; then
37275    NM="$new_complete"
37276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37277$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37278  fi
37279
37280    GNM="$NM"
37281
37282
37283
37284  # Publish this variable in the help.
37285
37286
37287  if test "x$STRIP" = x; then
37288    # The variable is not set by user, try to locate tool using the code snippet
37289    if test -n "$ac_tool_prefix"; then
37290  for ac_prog in strip
37291  do
37292    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37293set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37295$as_echo_n "checking for $ac_word... " >&6; }
37296if ${ac_cv_prog_STRIP+:} false; then :
37297  $as_echo_n "(cached) " >&6
37298else
37299  if test -n "$STRIP"; then
37300  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37301else
37302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37303for as_dir in $PATH
37304do
37305  IFS=$as_save_IFS
37306  test -z "$as_dir" && as_dir=.
37307    for ac_exec_ext in '' $ac_executable_extensions; do
37308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37309    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37311    break 2
37312  fi
37313done
37314  done
37315IFS=$as_save_IFS
37316
37317fi
37318fi
37319STRIP=$ac_cv_prog_STRIP
37320if test -n "$STRIP"; then
37321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37322$as_echo "$STRIP" >&6; }
37323else
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37325$as_echo "no" >&6; }
37326fi
37327
37328
37329    test -n "$STRIP" && break
37330  done
37331fi
37332if test -z "$STRIP"; then
37333  ac_ct_STRIP=$STRIP
37334  for ac_prog in strip
37335do
37336  # Extract the first word of "$ac_prog", so it can be a program name with args.
37337set dummy $ac_prog; ac_word=$2
37338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37339$as_echo_n "checking for $ac_word... " >&6; }
37340if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37341  $as_echo_n "(cached) " >&6
37342else
37343  if test -n "$ac_ct_STRIP"; then
37344  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37345else
37346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37347for as_dir in $PATH
37348do
37349  IFS=$as_save_IFS
37350  test -z "$as_dir" && as_dir=.
37351    for ac_exec_ext in '' $ac_executable_extensions; do
37352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37353    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37355    break 2
37356  fi
37357done
37358  done
37359IFS=$as_save_IFS
37360
37361fi
37362fi
37363ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37364if test -n "$ac_ct_STRIP"; then
37365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37366$as_echo "$ac_ct_STRIP" >&6; }
37367else
37368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37369$as_echo "no" >&6; }
37370fi
37371
37372
37373  test -n "$ac_ct_STRIP" && break
37374done
37375
37376  if test "x$ac_ct_STRIP" = x; then
37377    STRIP=""
37378  else
37379    case $cross_compiling:$ac_tool_warned in
37380yes:)
37381{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37382$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37383ac_tool_warned=yes ;;
37384esac
37385    STRIP=$ac_ct_STRIP
37386  fi
37387fi
37388
37389  else
37390    # The variable is set, but is it from the command line or the environment?
37391
37392    # Try to remove the string !STRIP! from our list.
37393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37395      # If it failed, the variable was not from the command line. Ignore it,
37396      # but warn the user (except for BASH, which is always set by the calling BASH).
37397      if test "xSTRIP" != xBASH; then
37398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37399$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37400      fi
37401      # Try to locate tool using the code snippet
37402      if test -n "$ac_tool_prefix"; then
37403  for ac_prog in strip
37404  do
37405    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37406set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37408$as_echo_n "checking for $ac_word... " >&6; }
37409if ${ac_cv_prog_STRIP+:} false; then :
37410  $as_echo_n "(cached) " >&6
37411else
37412  if test -n "$STRIP"; then
37413  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37414else
37415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37416for as_dir in $PATH
37417do
37418  IFS=$as_save_IFS
37419  test -z "$as_dir" && as_dir=.
37420    for ac_exec_ext in '' $ac_executable_extensions; do
37421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37422    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37424    break 2
37425  fi
37426done
37427  done
37428IFS=$as_save_IFS
37429
37430fi
37431fi
37432STRIP=$ac_cv_prog_STRIP
37433if test -n "$STRIP"; then
37434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37435$as_echo "$STRIP" >&6; }
37436else
37437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37438$as_echo "no" >&6; }
37439fi
37440
37441
37442    test -n "$STRIP" && break
37443  done
37444fi
37445if test -z "$STRIP"; then
37446  ac_ct_STRIP=$STRIP
37447  for ac_prog in strip
37448do
37449  # Extract the first word of "$ac_prog", so it can be a program name with args.
37450set dummy $ac_prog; ac_word=$2
37451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37452$as_echo_n "checking for $ac_word... " >&6; }
37453if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37454  $as_echo_n "(cached) " >&6
37455else
37456  if test -n "$ac_ct_STRIP"; then
37457  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37458else
37459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37460for as_dir in $PATH
37461do
37462  IFS=$as_save_IFS
37463  test -z "$as_dir" && as_dir=.
37464    for ac_exec_ext in '' $ac_executable_extensions; do
37465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37466    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37468    break 2
37469  fi
37470done
37471  done
37472IFS=$as_save_IFS
37473
37474fi
37475fi
37476ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37477if test -n "$ac_ct_STRIP"; then
37478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37479$as_echo "$ac_ct_STRIP" >&6; }
37480else
37481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37482$as_echo "no" >&6; }
37483fi
37484
37485
37486  test -n "$ac_ct_STRIP" && break
37487done
37488
37489  if test "x$ac_ct_STRIP" = x; then
37490    STRIP=""
37491  else
37492    case $cross_compiling:$ac_tool_warned in
37493yes:)
37494{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37495$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37496ac_tool_warned=yes ;;
37497esac
37498    STRIP=$ac_ct_STRIP
37499  fi
37500fi
37501
37502    else
37503      # If it succeeded, then it was overridden by the user. We will use it
37504      # for the tool.
37505
37506      # First remove it from the list of overridden variables, so we can test
37507      # for unknown variables in the end.
37508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37509
37510      # Check if the provided tool contains a complete path.
37511      tool_specified="$STRIP"
37512      tool_basename="${tool_specified##*/}"
37513      if test "x$tool_basename" = "x$tool_specified"; then
37514        # A command without a complete path is provided, search $PATH.
37515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37516$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37517        # Extract the first word of "$tool_basename", so it can be a program name with args.
37518set dummy $tool_basename; ac_word=$2
37519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37520$as_echo_n "checking for $ac_word... " >&6; }
37521if ${ac_cv_path_STRIP+:} false; then :
37522  $as_echo_n "(cached) " >&6
37523else
37524  case $STRIP in
37525  [\\/]* | ?:[\\/]*)
37526  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37527  ;;
37528  *)
37529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37530for as_dir in $PATH
37531do
37532  IFS=$as_save_IFS
37533  test -z "$as_dir" && as_dir=.
37534    for ac_exec_ext in '' $ac_executable_extensions; do
37535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37536    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37538    break 2
37539  fi
37540done
37541  done
37542IFS=$as_save_IFS
37543
37544  ;;
37545esac
37546fi
37547STRIP=$ac_cv_path_STRIP
37548if test -n "$STRIP"; then
37549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37550$as_echo "$STRIP" >&6; }
37551else
37552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37553$as_echo "no" >&6; }
37554fi
37555
37556
37557        if test "x$STRIP" = x; then
37558          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37559        fi
37560      else
37561        # Otherwise we believe it is a complete path. Use it as it is.
37562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37563$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37565$as_echo_n "checking for STRIP... " >&6; }
37566        if test ! -x "$tool_specified"; then
37567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37568$as_echo "not found" >&6; }
37569          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37570        fi
37571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37572$as_echo "$tool_specified" >&6; }
37573      fi
37574    fi
37575  fi
37576
37577
37578
37579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37580
37581  # First separate the path from the arguments. This will split at the first
37582  # space.
37583  complete="$STRIP"
37584  path="${complete%% *}"
37585  tmp="$complete EOL"
37586  arguments="${tmp#* }"
37587
37588  # Input might be given as Windows format, start by converting to
37589  # unix format.
37590  new_path=`$CYGPATH -u "$path"`
37591
37592  # Now try to locate executable using which
37593  new_path=`$WHICH "$new_path" 2> /dev/null`
37594  # bat and cmd files are not always considered executable in cygwin causing which
37595  # to not find them
37596  if test "x$new_path" = x \
37597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37599    new_path=`$CYGPATH -u "$path"`
37600  fi
37601  if test "x$new_path" = x; then
37602    # Oops. Which didn't find the executable.
37603    # The splitting of arguments from the executable at a space might have been incorrect,
37604    # since paths with space are more likely in Windows. Give it another try with the whole
37605    # argument.
37606    path="$complete"
37607    arguments="EOL"
37608    new_path=`$CYGPATH -u "$path"`
37609    new_path=`$WHICH "$new_path" 2> /dev/null`
37610    # bat and cmd files are not always considered executable in cygwin causing which
37611    # to not find them
37612    if test "x$new_path" = x \
37613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37615      new_path=`$CYGPATH -u "$path"`
37616    fi
37617    if test "x$new_path" = x; then
37618      # It's still not found. Now this is an unrecoverable error.
37619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37620$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37621      has_space=`$ECHO "$complete" | $GREP " "`
37622      if test "x$has_space" != x; then
37623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37625      fi
37626      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37627    fi
37628  fi
37629
37630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37633  # "foo.exe" is OK but "foo" is an error.
37634  #
37635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37636  # It is also a way to make sure we got the proper file name for the real test later on.
37637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37638  if test "x$test_shortpath" = x; then
37639    # Short path failed, file does not exist as specified.
37640    # Try adding .exe or .cmd
37641    if test -f "${new_path}.exe"; then
37642      input_to_shortpath="${new_path}.exe"
37643    elif test -f "${new_path}.cmd"; then
37644      input_to_shortpath="${new_path}.cmd"
37645    else
37646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37647$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37650      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37651    fi
37652  else
37653    input_to_shortpath="$new_path"
37654  fi
37655
37656  # Call helper function which possibly converts this using DOS-style short mode.
37657  # If so, the updated path is stored in $new_path.
37658  new_path="$input_to_shortpath"
37659
37660  input_path="$input_to_shortpath"
37661  # Check if we need to convert this using DOS-style short mode. If the path
37662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37663  # take no chances and rewrite it.
37664  # Note: m4 eats our [], so we need to use [ and ] instead.
37665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37666  if test "x$has_forbidden_chars" != x; then
37667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37671      # Going to short mode and back again did indeed matter. Since short mode is
37672      # case insensitive, let's make it lowercase to improve readability.
37673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37674      # Now convert it back to Unix-stile (cygpath)
37675      input_path=`$CYGPATH -u "$shortmode_path"`
37676      new_path="$input_path"
37677    fi
37678  fi
37679
37680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37681  if test "x$test_cygdrive_prefix" = x; then
37682    # As a simple fix, exclude /usr/bin since it's not a real path.
37683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37685      # a path prefixed by /cygdrive for fixpath to work.
37686      new_path="$CYGWIN_ROOT_PATH$input_path"
37687    fi
37688  fi
37689
37690  # remove trailing .exe if any
37691  new_path="${new_path/%.exe/}"
37692
37693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37694
37695  # First separate the path from the arguments. This will split at the first
37696  # space.
37697  complete="$STRIP"
37698  path="${complete%% *}"
37699  tmp="$complete EOL"
37700  arguments="${tmp#* }"
37701
37702  # Input might be given as Windows format, start by converting to
37703  # unix format.
37704  new_path="$path"
37705
37706  windows_path="$new_path"
37707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37708    unix_path=`$CYGPATH -u "$windows_path"`
37709    new_path="$unix_path"
37710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37712    new_path="$unix_path"
37713  fi
37714
37715
37716  # Now try to locate executable using which
37717  new_path=`$WHICH "$new_path" 2> /dev/null`
37718
37719  if test "x$new_path" = x; then
37720    # Oops. Which didn't find the executable.
37721    # The splitting of arguments from the executable at a space might have been incorrect,
37722    # since paths with space are more likely in Windows. Give it another try with the whole
37723    # argument.
37724    path="$complete"
37725    arguments="EOL"
37726    new_path="$path"
37727
37728  windows_path="$new_path"
37729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37730    unix_path=`$CYGPATH -u "$windows_path"`
37731    new_path="$unix_path"
37732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37734    new_path="$unix_path"
37735  fi
37736
37737
37738    new_path=`$WHICH "$new_path" 2> /dev/null`
37739
37740    if test "x$new_path" = x; then
37741      # It's still not found. Now this is an unrecoverable error.
37742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37743$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37744      has_space=`$ECHO "$complete" | $GREP " "`
37745      if test "x$has_space" != x; then
37746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37748      fi
37749      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37750    fi
37751  fi
37752
37753  # Now new_path has a complete unix path to the binary
37754  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37755    # Keep paths in /bin as-is, but remove trailing .exe if any
37756    new_path="${new_path/%.exe/}"
37757    # Do not save /bin paths to all_fixpath_prefixes!
37758  else
37759    # Not in mixed or Windows style, start by that.
37760    new_path=`cmd //c echo $new_path`
37761
37762  input_path="$new_path"
37763  # Check if we need to convert this using DOS-style short mode. If the path
37764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37765  # take no chances and rewrite it.
37766  # Note: m4 eats our [], so we need to use [ and ] instead.
37767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37768  if test "x$has_forbidden_chars" != x; then
37769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37771  fi
37772
37773    # Output is in $new_path
37774
37775  windows_path="$new_path"
37776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37777    unix_path=`$CYGPATH -u "$windows_path"`
37778    new_path="$unix_path"
37779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37781    new_path="$unix_path"
37782  fi
37783
37784    # remove trailing .exe if any
37785    new_path="${new_path/%.exe/}"
37786
37787    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37788    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37789  fi
37790
37791  else
37792    # We're on a posix platform. Hooray! :)
37793    # First separate the path from the arguments. This will split at the first
37794    # space.
37795    complete="$STRIP"
37796    path="${complete%% *}"
37797    tmp="$complete EOL"
37798    arguments="${tmp#* }"
37799
37800    # Cannot rely on the command "which" here since it doesn't always work.
37801    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37802    if test -z "$is_absolute_path"; then
37803      # Path to executable is not absolute. Find it.
37804      IFS_save="$IFS"
37805      IFS=:
37806      for p in $PATH; do
37807        if test -f "$p/$path" && test -x "$p/$path"; then
37808          new_path="$p/$path"
37809          break
37810        fi
37811      done
37812      IFS="$IFS_save"
37813    else
37814      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37815$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37816      new_path="$path"
37817    fi
37818
37819    if test "x$new_path" = x; then
37820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37821$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37822      has_space=`$ECHO "$complete" | $GREP " "`
37823      if test "x$has_space" != x; then
37824        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37826      fi
37827      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37828    fi
37829  fi
37830
37831  # Now join together the path and the arguments once again
37832  if test "x$arguments" != xEOL; then
37833    new_complete="$new_path ${arguments% *}"
37834  else
37835    new_complete="$new_path"
37836  fi
37837
37838  if test "x$complete" != "x$new_complete"; then
37839    STRIP="$new_complete"
37840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37841$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37842  fi
37843
37844  fi
37845
37846  # objcopy is used for moving debug symbols to separate files when
37847  # full debug symbols are enabled.
37848  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37849
37850
37851  # Publish this variable in the help.
37852
37853
37854  if test "x$OBJCOPY" = x; then
37855    # The variable is not set by user, try to locate tool using the code snippet
37856    if test -n "$ac_tool_prefix"; then
37857  for ac_prog in gobjcopy objcopy
37858  do
37859    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37860set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37862$as_echo_n "checking for $ac_word... " >&6; }
37863if ${ac_cv_prog_OBJCOPY+:} false; then :
37864  $as_echo_n "(cached) " >&6
37865else
37866  if test -n "$OBJCOPY"; then
37867  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37868else
37869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37870for as_dir in $PATH
37871do
37872  IFS=$as_save_IFS
37873  test -z "$as_dir" && as_dir=.
37874    for ac_exec_ext in '' $ac_executable_extensions; do
37875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37876    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37878    break 2
37879  fi
37880done
37881  done
37882IFS=$as_save_IFS
37883
37884fi
37885fi
37886OBJCOPY=$ac_cv_prog_OBJCOPY
37887if test -n "$OBJCOPY"; then
37888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37889$as_echo "$OBJCOPY" >&6; }
37890else
37891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37892$as_echo "no" >&6; }
37893fi
37894
37895
37896    test -n "$OBJCOPY" && break
37897  done
37898fi
37899if test -z "$OBJCOPY"; then
37900  ac_ct_OBJCOPY=$OBJCOPY
37901  for ac_prog in gobjcopy objcopy
37902do
37903  # Extract the first word of "$ac_prog", so it can be a program name with args.
37904set dummy $ac_prog; ac_word=$2
37905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37906$as_echo_n "checking for $ac_word... " >&6; }
37907if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37908  $as_echo_n "(cached) " >&6
37909else
37910  if test -n "$ac_ct_OBJCOPY"; then
37911  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37912else
37913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37914for as_dir in $PATH
37915do
37916  IFS=$as_save_IFS
37917  test -z "$as_dir" && as_dir=.
37918    for ac_exec_ext in '' $ac_executable_extensions; do
37919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37920    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37922    break 2
37923  fi
37924done
37925  done
37926IFS=$as_save_IFS
37927
37928fi
37929fi
37930ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37931if test -n "$ac_ct_OBJCOPY"; then
37932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37933$as_echo "$ac_ct_OBJCOPY" >&6; }
37934else
37935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37936$as_echo "no" >&6; }
37937fi
37938
37939
37940  test -n "$ac_ct_OBJCOPY" && break
37941done
37942
37943  if test "x$ac_ct_OBJCOPY" = x; then
37944    OBJCOPY=""
37945  else
37946    case $cross_compiling:$ac_tool_warned in
37947yes:)
37948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37950ac_tool_warned=yes ;;
37951esac
37952    OBJCOPY=$ac_ct_OBJCOPY
37953  fi
37954fi
37955
37956  else
37957    # The variable is set, but is it from the command line or the environment?
37958
37959    # Try to remove the string !OBJCOPY! from our list.
37960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37962      # If it failed, the variable was not from the command line. Ignore it,
37963      # but warn the user (except for BASH, which is always set by the calling BASH).
37964      if test "xOBJCOPY" != xBASH; then
37965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37966$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37967      fi
37968      # Try to locate tool using the code snippet
37969      if test -n "$ac_tool_prefix"; then
37970  for ac_prog in gobjcopy objcopy
37971  do
37972    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37973set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37975$as_echo_n "checking for $ac_word... " >&6; }
37976if ${ac_cv_prog_OBJCOPY+:} false; then :
37977  $as_echo_n "(cached) " >&6
37978else
37979  if test -n "$OBJCOPY"; then
37980  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37981else
37982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37983for as_dir in $PATH
37984do
37985  IFS=$as_save_IFS
37986  test -z "$as_dir" && as_dir=.
37987    for ac_exec_ext in '' $ac_executable_extensions; do
37988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37989    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37991    break 2
37992  fi
37993done
37994  done
37995IFS=$as_save_IFS
37996
37997fi
37998fi
37999OBJCOPY=$ac_cv_prog_OBJCOPY
38000if test -n "$OBJCOPY"; then
38001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38002$as_echo "$OBJCOPY" >&6; }
38003else
38004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38005$as_echo "no" >&6; }
38006fi
38007
38008
38009    test -n "$OBJCOPY" && break
38010  done
38011fi
38012if test -z "$OBJCOPY"; then
38013  ac_ct_OBJCOPY=$OBJCOPY
38014  for ac_prog in gobjcopy objcopy
38015do
38016  # Extract the first word of "$ac_prog", so it can be a program name with args.
38017set dummy $ac_prog; ac_word=$2
38018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38019$as_echo_n "checking for $ac_word... " >&6; }
38020if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38021  $as_echo_n "(cached) " >&6
38022else
38023  if test -n "$ac_ct_OBJCOPY"; then
38024  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38025else
38026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38027for as_dir in $PATH
38028do
38029  IFS=$as_save_IFS
38030  test -z "$as_dir" && as_dir=.
38031    for ac_exec_ext in '' $ac_executable_extensions; do
38032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38033    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38035    break 2
38036  fi
38037done
38038  done
38039IFS=$as_save_IFS
38040
38041fi
38042fi
38043ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38044if test -n "$ac_ct_OBJCOPY"; then
38045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38046$as_echo "$ac_ct_OBJCOPY" >&6; }
38047else
38048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38049$as_echo "no" >&6; }
38050fi
38051
38052
38053  test -n "$ac_ct_OBJCOPY" && break
38054done
38055
38056  if test "x$ac_ct_OBJCOPY" = x; then
38057    OBJCOPY=""
38058  else
38059    case $cross_compiling:$ac_tool_warned in
38060yes:)
38061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38063ac_tool_warned=yes ;;
38064esac
38065    OBJCOPY=$ac_ct_OBJCOPY
38066  fi
38067fi
38068
38069    else
38070      # If it succeeded, then it was overridden by the user. We will use it
38071      # for the tool.
38072
38073      # First remove it from the list of overridden variables, so we can test
38074      # for unknown variables in the end.
38075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38076
38077      # Check if the provided tool contains a complete path.
38078      tool_specified="$OBJCOPY"
38079      tool_basename="${tool_specified##*/}"
38080      if test "x$tool_basename" = "x$tool_specified"; then
38081        # A command without a complete path is provided, search $PATH.
38082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38083$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38084        # Extract the first word of "$tool_basename", so it can be a program name with args.
38085set dummy $tool_basename; ac_word=$2
38086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38087$as_echo_n "checking for $ac_word... " >&6; }
38088if ${ac_cv_path_OBJCOPY+:} false; then :
38089  $as_echo_n "(cached) " >&6
38090else
38091  case $OBJCOPY in
38092  [\\/]* | ?:[\\/]*)
38093  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38094  ;;
38095  *)
38096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38097for as_dir in $PATH
38098do
38099  IFS=$as_save_IFS
38100  test -z "$as_dir" && as_dir=.
38101    for ac_exec_ext in '' $ac_executable_extensions; do
38102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38103    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38105    break 2
38106  fi
38107done
38108  done
38109IFS=$as_save_IFS
38110
38111  ;;
38112esac
38113fi
38114OBJCOPY=$ac_cv_path_OBJCOPY
38115if test -n "$OBJCOPY"; then
38116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38117$as_echo "$OBJCOPY" >&6; }
38118else
38119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38120$as_echo "no" >&6; }
38121fi
38122
38123
38124        if test "x$OBJCOPY" = x; then
38125          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38126        fi
38127      else
38128        # Otherwise we believe it is a complete path. Use it as it is.
38129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38130$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38132$as_echo_n "checking for OBJCOPY... " >&6; }
38133        if test ! -x "$tool_specified"; then
38134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38135$as_echo "not found" >&6; }
38136          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38137        fi
38138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38139$as_echo "$tool_specified" >&6; }
38140      fi
38141    fi
38142  fi
38143
38144
38145    # Only call fixup if objcopy was found.
38146    if test -n "$OBJCOPY"; then
38147
38148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38149
38150  # First separate the path from the arguments. This will split at the first
38151  # space.
38152  complete="$OBJCOPY"
38153  path="${complete%% *}"
38154  tmp="$complete EOL"
38155  arguments="${tmp#* }"
38156
38157  # Input might be given as Windows format, start by converting to
38158  # unix format.
38159  new_path=`$CYGPATH -u "$path"`
38160
38161  # Now try to locate executable using which
38162  new_path=`$WHICH "$new_path" 2> /dev/null`
38163  # bat and cmd files are not always considered executable in cygwin causing which
38164  # to not find them
38165  if test "x$new_path" = x \
38166      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38167      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38168    new_path=`$CYGPATH -u "$path"`
38169  fi
38170  if test "x$new_path" = x; then
38171    # Oops. Which didn't find the executable.
38172    # The splitting of arguments from the executable at a space might have been incorrect,
38173    # since paths with space are more likely in Windows. Give it another try with the whole
38174    # argument.
38175    path="$complete"
38176    arguments="EOL"
38177    new_path=`$CYGPATH -u "$path"`
38178    new_path=`$WHICH "$new_path" 2> /dev/null`
38179    # bat and cmd files are not always considered executable in cygwin causing which
38180    # to not find them
38181    if test "x$new_path" = x \
38182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38184      new_path=`$CYGPATH -u "$path"`
38185    fi
38186    if test "x$new_path" = x; then
38187      # It's still not found. Now this is an unrecoverable error.
38188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38189$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38190      has_space=`$ECHO "$complete" | $GREP " "`
38191      if test "x$has_space" != x; then
38192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38194      fi
38195      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38196    fi
38197  fi
38198
38199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38202  # "foo.exe" is OK but "foo" is an error.
38203  #
38204  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38205  # It is also a way to make sure we got the proper file name for the real test later on.
38206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38207  if test "x$test_shortpath" = x; then
38208    # Short path failed, file does not exist as specified.
38209    # Try adding .exe or .cmd
38210    if test -f "${new_path}.exe"; then
38211      input_to_shortpath="${new_path}.exe"
38212    elif test -f "${new_path}.cmd"; then
38213      input_to_shortpath="${new_path}.cmd"
38214    else
38215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38216$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38219      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38220    fi
38221  else
38222    input_to_shortpath="$new_path"
38223  fi
38224
38225  # Call helper function which possibly converts this using DOS-style short mode.
38226  # If so, the updated path is stored in $new_path.
38227  new_path="$input_to_shortpath"
38228
38229  input_path="$input_to_shortpath"
38230  # Check if we need to convert this using DOS-style short mode. If the path
38231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38232  # take no chances and rewrite it.
38233  # Note: m4 eats our [], so we need to use [ and ] instead.
38234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38235  if test "x$has_forbidden_chars" != x; then
38236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38240      # Going to short mode and back again did indeed matter. Since short mode is
38241      # case insensitive, let's make it lowercase to improve readability.
38242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38243      # Now convert it back to Unix-stile (cygpath)
38244      input_path=`$CYGPATH -u "$shortmode_path"`
38245      new_path="$input_path"
38246    fi
38247  fi
38248
38249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38250  if test "x$test_cygdrive_prefix" = x; then
38251    # As a simple fix, exclude /usr/bin since it's not a real path.
38252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38254      # a path prefixed by /cygdrive for fixpath to work.
38255      new_path="$CYGWIN_ROOT_PATH$input_path"
38256    fi
38257  fi
38258
38259  # remove trailing .exe if any
38260  new_path="${new_path/%.exe/}"
38261
38262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38263
38264  # First separate the path from the arguments. This will split at the first
38265  # space.
38266  complete="$OBJCOPY"
38267  path="${complete%% *}"
38268  tmp="$complete EOL"
38269  arguments="${tmp#* }"
38270
38271  # Input might be given as Windows format, start by converting to
38272  # unix format.
38273  new_path="$path"
38274
38275  windows_path="$new_path"
38276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38277    unix_path=`$CYGPATH -u "$windows_path"`
38278    new_path="$unix_path"
38279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38281    new_path="$unix_path"
38282  fi
38283
38284
38285  # Now try to locate executable using which
38286  new_path=`$WHICH "$new_path" 2> /dev/null`
38287
38288  if test "x$new_path" = x; then
38289    # Oops. Which didn't find the executable.
38290    # The splitting of arguments from the executable at a space might have been incorrect,
38291    # since paths with space are more likely in Windows. Give it another try with the whole
38292    # argument.
38293    path="$complete"
38294    arguments="EOL"
38295    new_path="$path"
38296
38297  windows_path="$new_path"
38298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38299    unix_path=`$CYGPATH -u "$windows_path"`
38300    new_path="$unix_path"
38301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38303    new_path="$unix_path"
38304  fi
38305
38306
38307    new_path=`$WHICH "$new_path" 2> /dev/null`
38308
38309    if test "x$new_path" = x; then
38310      # It's still not found. Now this is an unrecoverable error.
38311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38312$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38313      has_space=`$ECHO "$complete" | $GREP " "`
38314      if test "x$has_space" != x; then
38315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38317      fi
38318      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38319    fi
38320  fi
38321
38322  # Now new_path has a complete unix path to the binary
38323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38324    # Keep paths in /bin as-is, but remove trailing .exe if any
38325    new_path="${new_path/%.exe/}"
38326    # Do not save /bin paths to all_fixpath_prefixes!
38327  else
38328    # Not in mixed or Windows style, start by that.
38329    new_path=`cmd //c echo $new_path`
38330
38331  input_path="$new_path"
38332  # Check if we need to convert this using DOS-style short mode. If the path
38333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38334  # take no chances and rewrite it.
38335  # Note: m4 eats our [], so we need to use [ and ] instead.
38336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38337  if test "x$has_forbidden_chars" != x; then
38338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38340  fi
38341
38342    # Output is in $new_path
38343
38344  windows_path="$new_path"
38345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38346    unix_path=`$CYGPATH -u "$windows_path"`
38347    new_path="$unix_path"
38348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38350    new_path="$unix_path"
38351  fi
38352
38353    # remove trailing .exe if any
38354    new_path="${new_path/%.exe/}"
38355
38356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38358  fi
38359
38360  else
38361    # We're on a posix platform. Hooray! :)
38362    # First separate the path from the arguments. This will split at the first
38363    # space.
38364    complete="$OBJCOPY"
38365    path="${complete%% *}"
38366    tmp="$complete EOL"
38367    arguments="${tmp#* }"
38368
38369    # Cannot rely on the command "which" here since it doesn't always work.
38370    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38371    if test -z "$is_absolute_path"; then
38372      # Path to executable is not absolute. Find it.
38373      IFS_save="$IFS"
38374      IFS=:
38375      for p in $PATH; do
38376        if test -f "$p/$path" && test -x "$p/$path"; then
38377          new_path="$p/$path"
38378          break
38379        fi
38380      done
38381      IFS="$IFS_save"
38382    else
38383      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
38384$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
38385      new_path="$path"
38386    fi
38387
38388    if test "x$new_path" = x; then
38389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38390$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38391      has_space=`$ECHO "$complete" | $GREP " "`
38392      if test "x$has_space" != x; then
38393        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38395      fi
38396      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38397    fi
38398  fi
38399
38400  # Now join together the path and the arguments once again
38401  if test "x$arguments" != xEOL; then
38402    new_complete="$new_path ${arguments% *}"
38403  else
38404    new_complete="$new_path"
38405  fi
38406
38407  if test "x$complete" != "x$new_complete"; then
38408    OBJCOPY="$new_complete"
38409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38410$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38411  fi
38412
38413    fi
38414  fi
38415
38416
38417
38418  # Publish this variable in the help.
38419
38420
38421  if test "x$OBJDUMP" = x; then
38422    # The variable is not set by user, try to locate tool using the code snippet
38423    if test -n "$ac_tool_prefix"; then
38424  for ac_prog in gobjdump objdump
38425  do
38426    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38427set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38429$as_echo_n "checking for $ac_word... " >&6; }
38430if ${ac_cv_prog_OBJDUMP+:} false; then :
38431  $as_echo_n "(cached) " >&6
38432else
38433  if test -n "$OBJDUMP"; then
38434  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38435else
38436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38437for as_dir in $PATH
38438do
38439  IFS=$as_save_IFS
38440  test -z "$as_dir" && as_dir=.
38441    for ac_exec_ext in '' $ac_executable_extensions; do
38442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38443    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38445    break 2
38446  fi
38447done
38448  done
38449IFS=$as_save_IFS
38450
38451fi
38452fi
38453OBJDUMP=$ac_cv_prog_OBJDUMP
38454if test -n "$OBJDUMP"; then
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38456$as_echo "$OBJDUMP" >&6; }
38457else
38458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38459$as_echo "no" >&6; }
38460fi
38461
38462
38463    test -n "$OBJDUMP" && break
38464  done
38465fi
38466if test -z "$OBJDUMP"; then
38467  ac_ct_OBJDUMP=$OBJDUMP
38468  for ac_prog in gobjdump objdump
38469do
38470  # Extract the first word of "$ac_prog", so it can be a program name with args.
38471set dummy $ac_prog; ac_word=$2
38472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38473$as_echo_n "checking for $ac_word... " >&6; }
38474if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38475  $as_echo_n "(cached) " >&6
38476else
38477  if test -n "$ac_ct_OBJDUMP"; then
38478  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38479else
38480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481for as_dir in $PATH
38482do
38483  IFS=$as_save_IFS
38484  test -z "$as_dir" && as_dir=.
38485    for ac_exec_ext in '' $ac_executable_extensions; do
38486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489    break 2
38490  fi
38491done
38492  done
38493IFS=$as_save_IFS
38494
38495fi
38496fi
38497ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38498if test -n "$ac_ct_OBJDUMP"; then
38499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38500$as_echo "$ac_ct_OBJDUMP" >&6; }
38501else
38502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38503$as_echo "no" >&6; }
38504fi
38505
38506
38507  test -n "$ac_ct_OBJDUMP" && break
38508done
38509
38510  if test "x$ac_ct_OBJDUMP" = x; then
38511    OBJDUMP=""
38512  else
38513    case $cross_compiling:$ac_tool_warned in
38514yes:)
38515{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38516$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38517ac_tool_warned=yes ;;
38518esac
38519    OBJDUMP=$ac_ct_OBJDUMP
38520  fi
38521fi
38522
38523  else
38524    # The variable is set, but is it from the command line or the environment?
38525
38526    # Try to remove the string !OBJDUMP! from our list.
38527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38529      # If it failed, the variable was not from the command line. Ignore it,
38530      # but warn the user (except for BASH, which is always set by the calling BASH).
38531      if test "xOBJDUMP" != xBASH; then
38532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38533$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38534      fi
38535      # Try to locate tool using the code snippet
38536      if test -n "$ac_tool_prefix"; then
38537  for ac_prog in gobjdump objdump
38538  do
38539    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38542$as_echo_n "checking for $ac_word... " >&6; }
38543if ${ac_cv_prog_OBJDUMP+:} false; then :
38544  $as_echo_n "(cached) " >&6
38545else
38546  if test -n "$OBJDUMP"; then
38547  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38548else
38549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38550for as_dir in $PATH
38551do
38552  IFS=$as_save_IFS
38553  test -z "$as_dir" && as_dir=.
38554    for ac_exec_ext in '' $ac_executable_extensions; do
38555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38556    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38558    break 2
38559  fi
38560done
38561  done
38562IFS=$as_save_IFS
38563
38564fi
38565fi
38566OBJDUMP=$ac_cv_prog_OBJDUMP
38567if test -n "$OBJDUMP"; then
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38569$as_echo "$OBJDUMP" >&6; }
38570else
38571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38572$as_echo "no" >&6; }
38573fi
38574
38575
38576    test -n "$OBJDUMP" && break
38577  done
38578fi
38579if test -z "$OBJDUMP"; then
38580  ac_ct_OBJDUMP=$OBJDUMP
38581  for ac_prog in gobjdump objdump
38582do
38583  # Extract the first word of "$ac_prog", so it can be a program name with args.
38584set dummy $ac_prog; ac_word=$2
38585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38586$as_echo_n "checking for $ac_word... " >&6; }
38587if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38588  $as_echo_n "(cached) " >&6
38589else
38590  if test -n "$ac_ct_OBJDUMP"; then
38591  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38592else
38593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38594for as_dir in $PATH
38595do
38596  IFS=$as_save_IFS
38597  test -z "$as_dir" && as_dir=.
38598    for ac_exec_ext in '' $ac_executable_extensions; do
38599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38600    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38602    break 2
38603  fi
38604done
38605  done
38606IFS=$as_save_IFS
38607
38608fi
38609fi
38610ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38611if test -n "$ac_ct_OBJDUMP"; then
38612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38613$as_echo "$ac_ct_OBJDUMP" >&6; }
38614else
38615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38616$as_echo "no" >&6; }
38617fi
38618
38619
38620  test -n "$ac_ct_OBJDUMP" && break
38621done
38622
38623  if test "x$ac_ct_OBJDUMP" = x; then
38624    OBJDUMP=""
38625  else
38626    case $cross_compiling:$ac_tool_warned in
38627yes:)
38628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38630ac_tool_warned=yes ;;
38631esac
38632    OBJDUMP=$ac_ct_OBJDUMP
38633  fi
38634fi
38635
38636    else
38637      # If it succeeded, then it was overridden by the user. We will use it
38638      # for the tool.
38639
38640      # First remove it from the list of overridden variables, so we can test
38641      # for unknown variables in the end.
38642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38643
38644      # Check if the provided tool contains a complete path.
38645      tool_specified="$OBJDUMP"
38646      tool_basename="${tool_specified##*/}"
38647      if test "x$tool_basename" = "x$tool_specified"; then
38648        # A command without a complete path is provided, search $PATH.
38649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38650$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38651        # Extract the first word of "$tool_basename", so it can be a program name with args.
38652set dummy $tool_basename; ac_word=$2
38653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38654$as_echo_n "checking for $ac_word... " >&6; }
38655if ${ac_cv_path_OBJDUMP+:} false; then :
38656  $as_echo_n "(cached) " >&6
38657else
38658  case $OBJDUMP in
38659  [\\/]* | ?:[\\/]*)
38660  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38661  ;;
38662  *)
38663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38664for as_dir in $PATH
38665do
38666  IFS=$as_save_IFS
38667  test -z "$as_dir" && as_dir=.
38668    for ac_exec_ext in '' $ac_executable_extensions; do
38669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38670    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38672    break 2
38673  fi
38674done
38675  done
38676IFS=$as_save_IFS
38677
38678  ;;
38679esac
38680fi
38681OBJDUMP=$ac_cv_path_OBJDUMP
38682if test -n "$OBJDUMP"; then
38683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38684$as_echo "$OBJDUMP" >&6; }
38685else
38686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38687$as_echo "no" >&6; }
38688fi
38689
38690
38691        if test "x$OBJDUMP" = x; then
38692          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38693        fi
38694      else
38695        # Otherwise we believe it is a complete path. Use it as it is.
38696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38697$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38699$as_echo_n "checking for OBJDUMP... " >&6; }
38700        if test ! -x "$tool_specified"; then
38701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38702$as_echo "not found" >&6; }
38703          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38704        fi
38705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38706$as_echo "$tool_specified" >&6; }
38707      fi
38708    fi
38709  fi
38710
38711
38712  if test "x$OBJDUMP" != x; then
38713    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
38714
38715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38716
38717  # First separate the path from the arguments. This will split at the first
38718  # space.
38719  complete="$OBJDUMP"
38720  path="${complete%% *}"
38721  tmp="$complete EOL"
38722  arguments="${tmp#* }"
38723
38724  # Input might be given as Windows format, start by converting to
38725  # unix format.
38726  new_path=`$CYGPATH -u "$path"`
38727
38728  # Now try to locate executable using which
38729  new_path=`$WHICH "$new_path" 2> /dev/null`
38730  # bat and cmd files are not always considered executable in cygwin causing which
38731  # to not find them
38732  if test "x$new_path" = x \
38733      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38734      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38735    new_path=`$CYGPATH -u "$path"`
38736  fi
38737  if test "x$new_path" = x; then
38738    # Oops. Which didn't find the executable.
38739    # The splitting of arguments from the executable at a space might have been incorrect,
38740    # since paths with space are more likely in Windows. Give it another try with the whole
38741    # argument.
38742    path="$complete"
38743    arguments="EOL"
38744    new_path=`$CYGPATH -u "$path"`
38745    new_path=`$WHICH "$new_path" 2> /dev/null`
38746    # bat and cmd files are not always considered executable in cygwin causing which
38747    # to not find them
38748    if test "x$new_path" = x \
38749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38751      new_path=`$CYGPATH -u "$path"`
38752    fi
38753    if test "x$new_path" = x; then
38754      # It's still not found. Now this is an unrecoverable error.
38755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38756$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38757      has_space=`$ECHO "$complete" | $GREP " "`
38758      if test "x$has_space" != x; then
38759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38761      fi
38762      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38763    fi
38764  fi
38765
38766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38769  # "foo.exe" is OK but "foo" is an error.
38770  #
38771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38772  # It is also a way to make sure we got the proper file name for the real test later on.
38773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38774  if test "x$test_shortpath" = x; then
38775    # Short path failed, file does not exist as specified.
38776    # Try adding .exe or .cmd
38777    if test -f "${new_path}.exe"; then
38778      input_to_shortpath="${new_path}.exe"
38779    elif test -f "${new_path}.cmd"; then
38780      input_to_shortpath="${new_path}.cmd"
38781    else
38782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38783$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38786      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38787    fi
38788  else
38789    input_to_shortpath="$new_path"
38790  fi
38791
38792  # Call helper function which possibly converts this using DOS-style short mode.
38793  # If so, the updated path is stored in $new_path.
38794  new_path="$input_to_shortpath"
38795
38796  input_path="$input_to_shortpath"
38797  # Check if we need to convert this using DOS-style short mode. If the path
38798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38799  # take no chances and rewrite it.
38800  # Note: m4 eats our [], so we need to use [ and ] instead.
38801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38802  if test "x$has_forbidden_chars" != x; then
38803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38807      # Going to short mode and back again did indeed matter. Since short mode is
38808      # case insensitive, let's make it lowercase to improve readability.
38809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38810      # Now convert it back to Unix-stile (cygpath)
38811      input_path=`$CYGPATH -u "$shortmode_path"`
38812      new_path="$input_path"
38813    fi
38814  fi
38815
38816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38817  if test "x$test_cygdrive_prefix" = x; then
38818    # As a simple fix, exclude /usr/bin since it's not a real path.
38819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38821      # a path prefixed by /cygdrive for fixpath to work.
38822      new_path="$CYGWIN_ROOT_PATH$input_path"
38823    fi
38824  fi
38825
38826  # remove trailing .exe if any
38827  new_path="${new_path/%.exe/}"
38828
38829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38830
38831  # First separate the path from the arguments. This will split at the first
38832  # space.
38833  complete="$OBJDUMP"
38834  path="${complete%% *}"
38835  tmp="$complete EOL"
38836  arguments="${tmp#* }"
38837
38838  # Input might be given as Windows format, start by converting to
38839  # unix format.
38840  new_path="$path"
38841
38842  windows_path="$new_path"
38843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38844    unix_path=`$CYGPATH -u "$windows_path"`
38845    new_path="$unix_path"
38846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38848    new_path="$unix_path"
38849  fi
38850
38851
38852  # Now try to locate executable using which
38853  new_path=`$WHICH "$new_path" 2> /dev/null`
38854
38855  if test "x$new_path" = x; then
38856    # Oops. Which didn't find the executable.
38857    # The splitting of arguments from the executable at a space might have been incorrect,
38858    # since paths with space are more likely in Windows. Give it another try with the whole
38859    # argument.
38860    path="$complete"
38861    arguments="EOL"
38862    new_path="$path"
38863
38864  windows_path="$new_path"
38865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38866    unix_path=`$CYGPATH -u "$windows_path"`
38867    new_path="$unix_path"
38868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38870    new_path="$unix_path"
38871  fi
38872
38873
38874    new_path=`$WHICH "$new_path" 2> /dev/null`
38875
38876    if test "x$new_path" = x; then
38877      # It's still not found. Now this is an unrecoverable error.
38878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38879$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38880      has_space=`$ECHO "$complete" | $GREP " "`
38881      if test "x$has_space" != x; then
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38884      fi
38885      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38886    fi
38887  fi
38888
38889  # Now new_path has a complete unix path to the binary
38890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38891    # Keep paths in /bin as-is, but remove trailing .exe if any
38892    new_path="${new_path/%.exe/}"
38893    # Do not save /bin paths to all_fixpath_prefixes!
38894  else
38895    # Not in mixed or Windows style, start by that.
38896    new_path=`cmd //c echo $new_path`
38897
38898  input_path="$new_path"
38899  # Check if we need to convert this using DOS-style short mode. If the path
38900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38901  # take no chances and rewrite it.
38902  # Note: m4 eats our [], so we need to use [ and ] instead.
38903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38904  if test "x$has_forbidden_chars" != x; then
38905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38907  fi
38908
38909    # Output is in $new_path
38910
38911  windows_path="$new_path"
38912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913    unix_path=`$CYGPATH -u "$windows_path"`
38914    new_path="$unix_path"
38915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38917    new_path="$unix_path"
38918  fi
38919
38920    # remove trailing .exe if any
38921    new_path="${new_path/%.exe/}"
38922
38923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38925  fi
38926
38927  else
38928    # We're on a posix platform. Hooray! :)
38929    # First separate the path from the arguments. This will split at the first
38930    # space.
38931    complete="$OBJDUMP"
38932    path="${complete%% *}"
38933    tmp="$complete EOL"
38934    arguments="${tmp#* }"
38935
38936    # Cannot rely on the command "which" here since it doesn't always work.
38937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38938    if test -z "$is_absolute_path"; then
38939      # Path to executable is not absolute. Find it.
38940      IFS_save="$IFS"
38941      IFS=:
38942      for p in $PATH; do
38943        if test -f "$p/$path" && test -x "$p/$path"; then
38944          new_path="$p/$path"
38945          break
38946        fi
38947      done
38948      IFS="$IFS_save"
38949    else
38950      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
38951$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
38952      new_path="$path"
38953    fi
38954
38955    if test "x$new_path" = x; then
38956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38957$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38958      has_space=`$ECHO "$complete" | $GREP " "`
38959      if test "x$has_space" != x; then
38960        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38962      fi
38963      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38964    fi
38965  fi
38966
38967  # Now join together the path and the arguments once again
38968  if test "x$arguments" != xEOL; then
38969    new_complete="$new_path ${arguments% *}"
38970  else
38971    new_complete="$new_path"
38972  fi
38973
38974  if test "x$complete" != "x$new_complete"; then
38975    OBJDUMP="$new_complete"
38976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38977$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38978  fi
38979
38980  fi
38981
38982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38983
38984
38985  # Publish this variable in the help.
38986
38987
38988  if test "x$LIPO" = x; then
38989    # The variable is not set by user, try to locate tool using the code snippet
38990    for ac_prog in lipo
38991do
38992  # Extract the first word of "$ac_prog", so it can be a program name with args.
38993set dummy $ac_prog; ac_word=$2
38994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38995$as_echo_n "checking for $ac_word... " >&6; }
38996if ${ac_cv_path_LIPO+:} false; then :
38997  $as_echo_n "(cached) " >&6
38998else
38999  case $LIPO in
39000  [\\/]* | ?:[\\/]*)
39001  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39002  ;;
39003  *)
39004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39005for as_dir in $PATH
39006do
39007  IFS=$as_save_IFS
39008  test -z "$as_dir" && as_dir=.
39009    for ac_exec_ext in '' $ac_executable_extensions; do
39010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39011    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39013    break 2
39014  fi
39015done
39016  done
39017IFS=$as_save_IFS
39018
39019  ;;
39020esac
39021fi
39022LIPO=$ac_cv_path_LIPO
39023if test -n "$LIPO"; then
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39025$as_echo "$LIPO" >&6; }
39026else
39027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39028$as_echo "no" >&6; }
39029fi
39030
39031
39032  test -n "$LIPO" && break
39033done
39034
39035  else
39036    # The variable is set, but is it from the command line or the environment?
39037
39038    # Try to remove the string !LIPO! from our list.
39039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39041      # If it failed, the variable was not from the command line. Ignore it,
39042      # but warn the user (except for BASH, which is always set by the calling BASH).
39043      if test "xLIPO" != xBASH; then
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39045$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39046      fi
39047      # Try to locate tool using the code snippet
39048      for ac_prog in lipo
39049do
39050  # Extract the first word of "$ac_prog", so it can be a program name with args.
39051set dummy $ac_prog; ac_word=$2
39052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39053$as_echo_n "checking for $ac_word... " >&6; }
39054if ${ac_cv_path_LIPO+:} false; then :
39055  $as_echo_n "(cached) " >&6
39056else
39057  case $LIPO in
39058  [\\/]* | ?:[\\/]*)
39059  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39060  ;;
39061  *)
39062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39063for as_dir in $PATH
39064do
39065  IFS=$as_save_IFS
39066  test -z "$as_dir" && as_dir=.
39067    for ac_exec_ext in '' $ac_executable_extensions; do
39068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39069    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39071    break 2
39072  fi
39073done
39074  done
39075IFS=$as_save_IFS
39076
39077  ;;
39078esac
39079fi
39080LIPO=$ac_cv_path_LIPO
39081if test -n "$LIPO"; then
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39083$as_echo "$LIPO" >&6; }
39084else
39085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39086$as_echo "no" >&6; }
39087fi
39088
39089
39090  test -n "$LIPO" && break
39091done
39092
39093    else
39094      # If it succeeded, then it was overridden by the user. We will use it
39095      # for the tool.
39096
39097      # First remove it from the list of overridden variables, so we can test
39098      # for unknown variables in the end.
39099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39100
39101      # Check if the provided tool contains a complete path.
39102      tool_specified="$LIPO"
39103      tool_basename="${tool_specified##*/}"
39104      if test "x$tool_basename" = "x$tool_specified"; then
39105        # A command without a complete path is provided, search $PATH.
39106        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39107$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39108        # Extract the first word of "$tool_basename", so it can be a program name with args.
39109set dummy $tool_basename; ac_word=$2
39110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39111$as_echo_n "checking for $ac_word... " >&6; }
39112if ${ac_cv_path_LIPO+:} false; then :
39113  $as_echo_n "(cached) " >&6
39114else
39115  case $LIPO in
39116  [\\/]* | ?:[\\/]*)
39117  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39118  ;;
39119  *)
39120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39121for as_dir in $PATH
39122do
39123  IFS=$as_save_IFS
39124  test -z "$as_dir" && as_dir=.
39125    for ac_exec_ext in '' $ac_executable_extensions; do
39126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39127    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39129    break 2
39130  fi
39131done
39132  done
39133IFS=$as_save_IFS
39134
39135  ;;
39136esac
39137fi
39138LIPO=$ac_cv_path_LIPO
39139if test -n "$LIPO"; then
39140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39141$as_echo "$LIPO" >&6; }
39142else
39143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39144$as_echo "no" >&6; }
39145fi
39146
39147
39148        if test "x$LIPO" = x; then
39149          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39150        fi
39151      else
39152        # Otherwise we believe it is a complete path. Use it as it is.
39153        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39154$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39156$as_echo_n "checking for LIPO... " >&6; }
39157        if test ! -x "$tool_specified"; then
39158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39159$as_echo "not found" >&6; }
39160          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39161        fi
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39163$as_echo "$tool_specified" >&6; }
39164      fi
39165    fi
39166  fi
39167
39168
39169
39170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171
39172  # First separate the path from the arguments. This will split at the first
39173  # space.
39174  complete="$LIPO"
39175  path="${complete%% *}"
39176  tmp="$complete EOL"
39177  arguments="${tmp#* }"
39178
39179  # Input might be given as Windows format, start by converting to
39180  # unix format.
39181  new_path=`$CYGPATH -u "$path"`
39182
39183  # Now try to locate executable using which
39184  new_path=`$WHICH "$new_path" 2> /dev/null`
39185  # bat and cmd files are not always considered executable in cygwin causing which
39186  # to not find them
39187  if test "x$new_path" = x \
39188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39190    new_path=`$CYGPATH -u "$path"`
39191  fi
39192  if test "x$new_path" = x; then
39193    # Oops. Which didn't find the executable.
39194    # The splitting of arguments from the executable at a space might have been incorrect,
39195    # since paths with space are more likely in Windows. Give it another try with the whole
39196    # argument.
39197    path="$complete"
39198    arguments="EOL"
39199    new_path=`$CYGPATH -u "$path"`
39200    new_path=`$WHICH "$new_path" 2> /dev/null`
39201    # bat and cmd files are not always considered executable in cygwin causing which
39202    # to not find them
39203    if test "x$new_path" = x \
39204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39206      new_path=`$CYGPATH -u "$path"`
39207    fi
39208    if test "x$new_path" = x; then
39209      # It's still not found. Now this is an unrecoverable error.
39210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39211$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39212      has_space=`$ECHO "$complete" | $GREP " "`
39213      if test "x$has_space" != x; then
39214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39216      fi
39217      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39218    fi
39219  fi
39220
39221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39224  # "foo.exe" is OK but "foo" is an error.
39225  #
39226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39227  # It is also a way to make sure we got the proper file name for the real test later on.
39228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39229  if test "x$test_shortpath" = x; then
39230    # Short path failed, file does not exist as specified.
39231    # Try adding .exe or .cmd
39232    if test -f "${new_path}.exe"; then
39233      input_to_shortpath="${new_path}.exe"
39234    elif test -f "${new_path}.cmd"; then
39235      input_to_shortpath="${new_path}.cmd"
39236    else
39237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39238$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39241      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39242    fi
39243  else
39244    input_to_shortpath="$new_path"
39245  fi
39246
39247  # Call helper function which possibly converts this using DOS-style short mode.
39248  # If so, the updated path is stored in $new_path.
39249  new_path="$input_to_shortpath"
39250
39251  input_path="$input_to_shortpath"
39252  # Check if we need to convert this using DOS-style short mode. If the path
39253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39254  # take no chances and rewrite it.
39255  # Note: m4 eats our [], so we need to use [ and ] instead.
39256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39257  if test "x$has_forbidden_chars" != x; then
39258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39262      # Going to short mode and back again did indeed matter. Since short mode is
39263      # case insensitive, let's make it lowercase to improve readability.
39264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39265      # Now convert it back to Unix-stile (cygpath)
39266      input_path=`$CYGPATH -u "$shortmode_path"`
39267      new_path="$input_path"
39268    fi
39269  fi
39270
39271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39272  if test "x$test_cygdrive_prefix" = x; then
39273    # As a simple fix, exclude /usr/bin since it's not a real path.
39274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39276      # a path prefixed by /cygdrive for fixpath to work.
39277      new_path="$CYGWIN_ROOT_PATH$input_path"
39278    fi
39279  fi
39280
39281  # remove trailing .exe if any
39282  new_path="${new_path/%.exe/}"
39283
39284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39285
39286  # First separate the path from the arguments. This will split at the first
39287  # space.
39288  complete="$LIPO"
39289  path="${complete%% *}"
39290  tmp="$complete EOL"
39291  arguments="${tmp#* }"
39292
39293  # Input might be given as Windows format, start by converting to
39294  # unix format.
39295  new_path="$path"
39296
39297  windows_path="$new_path"
39298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39299    unix_path=`$CYGPATH -u "$windows_path"`
39300    new_path="$unix_path"
39301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39303    new_path="$unix_path"
39304  fi
39305
39306
39307  # Now try to locate executable using which
39308  new_path=`$WHICH "$new_path" 2> /dev/null`
39309
39310  if test "x$new_path" = x; then
39311    # Oops. Which didn't find the executable.
39312    # The splitting of arguments from the executable at a space might have been incorrect,
39313    # since paths with space are more likely in Windows. Give it another try with the whole
39314    # argument.
39315    path="$complete"
39316    arguments="EOL"
39317    new_path="$path"
39318
39319  windows_path="$new_path"
39320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39321    unix_path=`$CYGPATH -u "$windows_path"`
39322    new_path="$unix_path"
39323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39325    new_path="$unix_path"
39326  fi
39327
39328
39329    new_path=`$WHICH "$new_path" 2> /dev/null`
39330
39331    if test "x$new_path" = x; then
39332      # It's still not found. Now this is an unrecoverable error.
39333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39334$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39335      has_space=`$ECHO "$complete" | $GREP " "`
39336      if test "x$has_space" != x; then
39337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39339      fi
39340      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39341    fi
39342  fi
39343
39344  # Now new_path has a complete unix path to the binary
39345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39346    # Keep paths in /bin as-is, but remove trailing .exe if any
39347    new_path="${new_path/%.exe/}"
39348    # Do not save /bin paths to all_fixpath_prefixes!
39349  else
39350    # Not in mixed or Windows style, start by that.
39351    new_path=`cmd //c echo $new_path`
39352
39353  input_path="$new_path"
39354  # Check if we need to convert this using DOS-style short mode. If the path
39355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39356  # take no chances and rewrite it.
39357  # Note: m4 eats our [], so we need to use [ and ] instead.
39358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39359  if test "x$has_forbidden_chars" != x; then
39360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39362  fi
39363
39364    # Output is in $new_path
39365
39366  windows_path="$new_path"
39367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39368    unix_path=`$CYGPATH -u "$windows_path"`
39369    new_path="$unix_path"
39370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39372    new_path="$unix_path"
39373  fi
39374
39375    # remove trailing .exe if any
39376    new_path="${new_path/%.exe/}"
39377
39378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39380  fi
39381
39382  else
39383    # We're on a posix platform. Hooray! :)
39384    # First separate the path from the arguments. This will split at the first
39385    # space.
39386    complete="$LIPO"
39387    path="${complete%% *}"
39388    tmp="$complete EOL"
39389    arguments="${tmp#* }"
39390
39391    # Cannot rely on the command "which" here since it doesn't always work.
39392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39393    if test -z "$is_absolute_path"; then
39394      # Path to executable is not absolute. Find it.
39395      IFS_save="$IFS"
39396      IFS=:
39397      for p in $PATH; do
39398        if test -f "$p/$path" && test -x "$p/$path"; then
39399          new_path="$p/$path"
39400          break
39401        fi
39402      done
39403      IFS="$IFS_save"
39404    else
39405      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
39406$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
39407      new_path="$path"
39408    fi
39409
39410    if test "x$new_path" = x; then
39411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39412$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39413      has_space=`$ECHO "$complete" | $GREP " "`
39414      if test "x$has_space" != x; then
39415        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39417      fi
39418      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39419    fi
39420  fi
39421
39422  # Now join together the path and the arguments once again
39423  if test "x$arguments" != xEOL; then
39424    new_complete="$new_path ${arguments% *}"
39425  else
39426    new_complete="$new_path"
39427  fi
39428
39429  if test "x$complete" != "x$new_complete"; then
39430    LIPO="$new_complete"
39431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39432$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39433  fi
39434
39435  fi
39436
39437
39438
39439  # Restore old path without tools dir
39440  PATH="$OLD_PATH"
39441
39442
39443# FIXME: Currently we must test this after paths but before flags. Fix!
39444
39445# And we can test some aspects on the target using configure macros.
39446
39447
39448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
39449$as_echo_n "checking for ANSI C header files... " >&6; }
39450if ${ac_cv_header_stdc+:} false; then :
39451  $as_echo_n "(cached) " >&6
39452else
39453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39454/* end confdefs.h.  */
39455#include <stdlib.h>
39456#include <stdarg.h>
39457#include <string.h>
39458#include <float.h>
39459
39460int
39461main ()
39462{
39463
39464  ;
39465  return 0;
39466}
39467_ACEOF
39468if ac_fn_cxx_try_compile "$LINENO"; then :
39469  ac_cv_header_stdc=yes
39470else
39471  ac_cv_header_stdc=no
39472fi
39473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39474
39475if test $ac_cv_header_stdc = yes; then
39476  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
39477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39478/* end confdefs.h.  */
39479#include <string.h>
39480
39481_ACEOF
39482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39483  $EGREP "memchr" >/dev/null 2>&1; then :
39484
39485else
39486  ac_cv_header_stdc=no
39487fi
39488rm -f conftest*
39489
39490fi
39491
39492if test $ac_cv_header_stdc = yes; then
39493  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
39494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39495/* end confdefs.h.  */
39496#include <stdlib.h>
39497
39498_ACEOF
39499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39500  $EGREP "free" >/dev/null 2>&1; then :
39501
39502else
39503  ac_cv_header_stdc=no
39504fi
39505rm -f conftest*
39506
39507fi
39508
39509if test $ac_cv_header_stdc = yes; then
39510  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
39511  if test "$cross_compiling" = yes; then :
39512  :
39513else
39514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39515/* end confdefs.h.  */
39516#include <ctype.h>
39517#include <stdlib.h>
39518#if ((' ' & 0x0FF) == 0x020)
39519# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
39520# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
39521#else
39522# define ISLOWER(c) \
39523		   (('a' <= (c) && (c) <= 'i') \
39524		     || ('j' <= (c) && (c) <= 'r') \
39525		     || ('s' <= (c) && (c) <= 'z'))
39526# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
39527#endif
39528
39529#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
39530int
39531main ()
39532{
39533  int i;
39534  for (i = 0; i < 256; i++)
39535    if (XOR (islower (i), ISLOWER (i))
39536	|| toupper (i) != TOUPPER (i))
39537      return 2;
39538  return 0;
39539}
39540_ACEOF
39541if ac_fn_cxx_try_run "$LINENO"; then :
39542
39543else
39544  ac_cv_header_stdc=no
39545fi
39546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39547  conftest.$ac_objext conftest.beam conftest.$ac_ext
39548fi
39549
39550fi
39551fi
39552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
39553$as_echo "$ac_cv_header_stdc" >&6; }
39554if test $ac_cv_header_stdc = yes; then
39555
39556$as_echo "#define STDC_HEADERS 1" >>confdefs.h
39557
39558fi
39559
39560# On IRIX 5.3, sys/types and inttypes.h are conflicting.
39561for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
39562		  inttypes.h stdint.h unistd.h
39563do :
39564  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
39565ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
39566"
39567if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
39568  cat >>confdefs.h <<_ACEOF
39569#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
39570_ACEOF
39571
39572fi
39573
39574done
39575
39576
39577
39578  ###############################################################################
39579  #
39580  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
39581  # (The JVM can use 32 or 64 bit Java pointers but that decision
39582  # is made at runtime.)
39583  #
39584
39585  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
39586    # Always specify -m flag on Solaris
39587    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
39588
39589  # When we add flags to the "official" CFLAGS etc, we need to
39590  # keep track of these additions in ADDED_CFLAGS etc. These
39591  # will later be checked to make sure only controlled additions
39592  # have been made to CFLAGS etc.
39593  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39594  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39595  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39596
39597  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39598  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39599  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39600
39601  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39602  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39603  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39604
39605  elif test "x$COMPILE_TYPE" = xreduced; then
39606    if test "x$OPENJDK_TARGET_OS" != xwindows; then
39607      # Specify -m if running reduced on other Posix platforms
39608
39609  # When we add flags to the "official" CFLAGS etc, we need to
39610  # keep track of these additions in ADDED_CFLAGS etc. These
39611  # will later be checked to make sure only controlled additions
39612  # have been made to CFLAGS etc.
39613  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39614  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39615  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39616
39617  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39618  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39619  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39620
39621  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39622  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39623  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39624
39625    fi
39626  fi
39627
39628  # Make compilation sanity check
39629  for ac_header in stdio.h
39630do :
39631  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
39632if test "x$ac_cv_header_stdio_h" = xyes; then :
39633  cat >>confdefs.h <<_ACEOF
39634#define HAVE_STDIO_H 1
39635_ACEOF
39636
39637else
39638
39639    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
39640$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
39641    if test "x$COMPILE_TYPE" = xreduced; then
39642      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
39643$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
39644    elif test "x$COMPILE_TYPE" = xcross; then
39645      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
39646$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
39647    fi
39648    as_fn_error $? "Cannot continue." "$LINENO" 5
39649
39650fi
39651
39652done
39653
39654
39655  # The cast to long int works around a bug in the HP C Compiler
39656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
39657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
39658# This bug is HP SR number 8606223364.
39659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
39660$as_echo_n "checking size of int *... " >&6; }
39661if ${ac_cv_sizeof_int_p+:} false; then :
39662  $as_echo_n "(cached) " >&6
39663else
39664  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
39665
39666else
39667  if test "$ac_cv_type_int_p" = yes; then
39668     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
39670as_fn_error 77 "cannot compute sizeof (int *)
39671See \`config.log' for more details" "$LINENO" 5; }
39672   else
39673     ac_cv_sizeof_int_p=0
39674   fi
39675fi
39676
39677fi
39678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
39679$as_echo "$ac_cv_sizeof_int_p" >&6; }
39680
39681
39682
39683cat >>confdefs.h <<_ACEOF
39684#define SIZEOF_INT_P $ac_cv_sizeof_int_p
39685_ACEOF
39686
39687
39688
39689  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
39690  if test "x$ac_cv_sizeof_int_p" = x; then
39691    # The test failed, lets stick to the assumed value.
39692    { $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
39693$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
39694  else
39695    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
39696
39697    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
39698      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
39699      # Let's try to implicitely set the compilers target architecture and retry the test
39700      { $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
39701$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;}
39702      { $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
39703$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;}
39704
39705  # When we add flags to the "official" CFLAGS etc, we need to
39706  # keep track of these additions in ADDED_CFLAGS etc. These
39707  # will later be checked to make sure only controlled additions
39708  # have been made to CFLAGS etc.
39709  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39710  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39711  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39712
39713  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39714  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39715  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39716
39717  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39718  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39719  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39720
39721
39722      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
39723      unset ac_cv_sizeof_int_p
39724      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
39725      cat >>confdefs.h <<_ACEOF
39726#undef SIZEOF_INT_P
39727_ACEOF
39728
39729      # The cast to long int works around a bug in the HP C Compiler
39730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
39731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
39732# This bug is HP SR number 8606223364.
39733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
39734$as_echo_n "checking size of int *... " >&6; }
39735if ${ac_cv_sizeof_int_p+:} false; then :
39736  $as_echo_n "(cached) " >&6
39737else
39738  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
39739
39740else
39741  if test "$ac_cv_type_int_p" = yes; then
39742     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
39744as_fn_error 77 "cannot compute sizeof (int *)
39745See \`config.log' for more details" "$LINENO" 5; }
39746   else
39747     ac_cv_sizeof_int_p=0
39748   fi
39749fi
39750
39751fi
39752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
39753$as_echo "$ac_cv_sizeof_int_p" >&6; }
39754
39755
39756
39757cat >>confdefs.h <<_ACEOF
39758#define SIZEOF_INT_P $ac_cv_sizeof_int_p
39759_ACEOF
39760
39761
39762
39763      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
39764
39765      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
39766        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
39767      fi
39768    fi
39769  fi
39770
39771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
39772$as_echo_n "checking for target address size... " >&6; }
39773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
39774$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
39775
39776
39777  ###############################################################################
39778  #
39779  # Is the target little of big endian?
39780  #
39781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
39782$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
39783if ${ac_cv_c_bigendian+:} false; then :
39784  $as_echo_n "(cached) " >&6
39785else
39786  ac_cv_c_bigendian=unknown
39787    # See if we're dealing with a universal compiler.
39788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39789/* end confdefs.h.  */
39790#ifndef __APPLE_CC__
39791	       not a universal capable compiler
39792	     #endif
39793	     typedef int dummy;
39794
39795_ACEOF
39796if ac_fn_cxx_try_compile "$LINENO"; then :
39797
39798	# Check for potential -arch flags.  It is not universal unless
39799	# there are at least two -arch flags with different values.
39800	ac_arch=
39801	ac_prev=
39802	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
39803	 if test -n "$ac_prev"; then
39804	   case $ac_word in
39805	     i?86 | x86_64 | ppc | ppc64)
39806	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
39807		 ac_arch=$ac_word
39808	       else
39809		 ac_cv_c_bigendian=universal
39810		 break
39811	       fi
39812	       ;;
39813	   esac
39814	   ac_prev=
39815	 elif test "x$ac_word" = "x-arch"; then
39816	   ac_prev=arch
39817	 fi
39818       done
39819fi
39820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39821    if test $ac_cv_c_bigendian = unknown; then
39822      # See if sys/param.h defines the BYTE_ORDER macro.
39823      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39824/* end confdefs.h.  */
39825#include <sys/types.h>
39826	     #include <sys/param.h>
39827
39828int
39829main ()
39830{
39831#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
39832		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
39833		     && LITTLE_ENDIAN)
39834	      bogus endian macros
39835	     #endif
39836
39837  ;
39838  return 0;
39839}
39840_ACEOF
39841if ac_fn_cxx_try_compile "$LINENO"; then :
39842  # It does; now see whether it defined to BIG_ENDIAN or not.
39843	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39844/* end confdefs.h.  */
39845#include <sys/types.h>
39846		#include <sys/param.h>
39847
39848int
39849main ()
39850{
39851#if BYTE_ORDER != BIG_ENDIAN
39852		 not big endian
39853		#endif
39854
39855  ;
39856  return 0;
39857}
39858_ACEOF
39859if ac_fn_cxx_try_compile "$LINENO"; then :
39860  ac_cv_c_bigendian=yes
39861else
39862  ac_cv_c_bigendian=no
39863fi
39864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39865fi
39866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39867    fi
39868    if test $ac_cv_c_bigendian = unknown; then
39869      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
39870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39871/* end confdefs.h.  */
39872#include <limits.h>
39873
39874int
39875main ()
39876{
39877#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
39878	      bogus endian macros
39879	     #endif
39880
39881  ;
39882  return 0;
39883}
39884_ACEOF
39885if ac_fn_cxx_try_compile "$LINENO"; then :
39886  # It does; now see whether it defined to _BIG_ENDIAN or not.
39887	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39888/* end confdefs.h.  */
39889#include <limits.h>
39890
39891int
39892main ()
39893{
39894#ifndef _BIG_ENDIAN
39895		 not big endian
39896		#endif
39897
39898  ;
39899  return 0;
39900}
39901_ACEOF
39902if ac_fn_cxx_try_compile "$LINENO"; then :
39903  ac_cv_c_bigendian=yes
39904else
39905  ac_cv_c_bigendian=no
39906fi
39907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39908fi
39909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39910    fi
39911    if test $ac_cv_c_bigendian = unknown; then
39912      # Compile a test program.
39913      if test "$cross_compiling" = yes; then :
39914  # Try to guess by grepping values from an object file.
39915	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39916/* end confdefs.h.  */
39917short int ascii_mm[] =
39918		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39919		short int ascii_ii[] =
39920		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39921		int use_ascii (int i) {
39922		  return ascii_mm[i] + ascii_ii[i];
39923		}
39924		short int ebcdic_ii[] =
39925		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39926		short int ebcdic_mm[] =
39927		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39928		int use_ebcdic (int i) {
39929		  return ebcdic_mm[i] + ebcdic_ii[i];
39930		}
39931		extern int foo;
39932
39933int
39934main ()
39935{
39936return use_ascii (foo) == use_ebcdic (foo);
39937  ;
39938  return 0;
39939}
39940_ACEOF
39941if ac_fn_cxx_try_compile "$LINENO"; then :
39942  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
39943	      ac_cv_c_bigendian=yes
39944	    fi
39945	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39946	      if test "$ac_cv_c_bigendian" = unknown; then
39947		ac_cv_c_bigendian=no
39948	      else
39949		# finding both strings is unlikely to happen, but who knows?
39950		ac_cv_c_bigendian=unknown
39951	      fi
39952	    fi
39953fi
39954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39955else
39956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39957/* end confdefs.h.  */
39958$ac_includes_default
39959int
39960main ()
39961{
39962
39963	     /* Are we little or big endian?  From Harbison&Steele.  */
39964	     union
39965	     {
39966	       long int l;
39967	       char c[sizeof (long int)];
39968	     } u;
39969	     u.l = 1;
39970	     return u.c[sizeof (long int) - 1] == 1;
39971
39972  ;
39973  return 0;
39974}
39975_ACEOF
39976if ac_fn_cxx_try_run "$LINENO"; then :
39977  ac_cv_c_bigendian=no
39978else
39979  ac_cv_c_bigendian=yes
39980fi
39981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39982  conftest.$ac_objext conftest.beam conftest.$ac_ext
39983fi
39984
39985    fi
39986fi
39987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
39988$as_echo "$ac_cv_c_bigendian" >&6; }
39989 case $ac_cv_c_bigendian in #(
39990   yes)
39991     ENDIAN="big";; #(
39992   no)
39993     ENDIAN="little" ;; #(
39994   universal)
39995     ENDIAN="universal_endianness"
39996     ;; #(
39997   *)
39998     ENDIAN="unknown" ;;
39999 esac
40000
40001
40002  if test "x$ENDIAN" = xuniversal_endianness; then
40003    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
40004  fi
40005  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
40006    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
40007  fi
40008
40009
40010# Configure flags for the tools
40011
40012
40013  ###############################################################################
40014  #
40015  # How to compile shared libraries.
40016  #
40017
40018  if test "x$GCC" = xyes; then
40019    COMPILER_NAME=gcc
40020    PICFLAG="-fPIC"
40021    LIBRARY_PREFIX=lib
40022    SHARED_LIBRARY='lib$1.so'
40023    STATIC_LIBRARY='lib$1.a'
40024    SHARED_LIBRARY_FLAGS="-shared"
40025    SHARED_LIBRARY_SUFFIX='.so'
40026    STATIC_LIBRARY_SUFFIX='.a'
40027    OBJ_SUFFIX='.o'
40028    EXE_SUFFIX=''
40029    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
40030    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
40031    C_FLAG_REORDER=''
40032    CXX_FLAG_REORDER=''
40033    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
40034    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
40035    LD="$CC"
40036    LDEXE="$CC"
40037    LDCXX="$CXX"
40038    LDEXECXX="$CXX"
40039    POST_STRIP_CMD="$STRIP -g"
40040
40041    # Linking is different on MacOSX
40042    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40043      # Might change in the future to clang.
40044      COMPILER_NAME=gcc
40045      SHARED_LIBRARY='lib$1.dylib'
40046      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
40047      SHARED_LIBRARY_SUFFIX='.dylib'
40048      EXE_SUFFIX=''
40049      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
40050      SET_SHARED_LIBRARY_MAPFILE=''
40051      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
40052      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
40053      POST_STRIP_CMD="$STRIP -S"
40054    fi
40055  else
40056    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40057      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
40058      COMPILER_NAME=ossc
40059      PICFLAG="-KPIC"
40060      LIBRARY_PREFIX=lib
40061      SHARED_LIBRARY='lib$1.so'
40062      STATIC_LIBRARY='lib$1.a'
40063      SHARED_LIBRARY_FLAGS="-G"
40064      SHARED_LIBRARY_SUFFIX='.so'
40065      STATIC_LIBRARY_SUFFIX='.a'
40066      OBJ_SUFFIX='.o'
40067      EXE_SUFFIX=''
40068      SET_SHARED_LIBRARY_NAME=''
40069      SET_SHARED_LIBRARY_MAPFILE='-M$1'
40070      C_FLAG_REORDER='-xF'
40071      CXX_FLAG_REORDER='-xF'
40072      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
40073      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
40074      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
40075      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
40076      CFLAGS_JDKLIB_EXTRA='-xstrconst'
40077      POST_STRIP_CMD="$STRIP -x"
40078      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40079    fi
40080    if test "x$OPENJDK_TARGET_OS" = xaix; then
40081        COMPILER_NAME=xlc
40082        PICFLAG="-qpic=large"
40083        LIBRARY_PREFIX=lib
40084        SHARED_LIBRARY='lib$1.so'
40085        STATIC_LIBRARY='lib$1.a'
40086        SHARED_LIBRARY_FLAGS="-qmkshrobj"
40087        SHARED_LIBRARY_SUFFIX='.so'
40088        STATIC_LIBRARY_SUFFIX='.a'
40089        OBJ_SUFFIX='.o'
40090        EXE_SUFFIX=''
40091        SET_SHARED_LIBRARY_NAME=''
40092        SET_SHARED_LIBRARY_MAPFILE=''
40093        C_FLAG_REORDER=''
40094        CXX_FLAG_REORDER=''
40095        SET_SHARED_LIBRARY_ORIGIN=''
40096        SET_EXECUTABLE_ORIGIN=""
40097        CFLAGS_JDK=""
40098        CXXFLAGS_JDK=""
40099        CFLAGS_JDKLIB_EXTRA=''
40100        POST_STRIP_CMD="$STRIP -X32_64"
40101        POST_MCS_CMD=""
40102    fi
40103    if test "x$OPENJDK_TARGET_OS" = xwindows; then
40104      # If it is not gcc, then assume it is the MS Visual Studio compiler
40105      COMPILER_NAME=cl
40106      PICFLAG=""
40107      LIBRARY_PREFIX=
40108      SHARED_LIBRARY='$1.dll'
40109      STATIC_LIBRARY='$1.lib'
40110      SHARED_LIBRARY_FLAGS="-LD"
40111      SHARED_LIBRARY_SUFFIX='.dll'
40112      STATIC_LIBRARY_SUFFIX='.lib'
40113      OBJ_SUFFIX='.obj'
40114      EXE_SUFFIX='.exe'
40115      SET_SHARED_LIBRARY_NAME=''
40116      SET_SHARED_LIBRARY_MAPFILE=''
40117      SET_SHARED_LIBRARY_ORIGIN=''
40118      SET_EXECUTABLE_ORIGIN=''
40119    fi
40120  fi
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140  # The (cross) compiler is now configured, we can now test capabilities
40141  # of the target platform.
40142
40143
40144
40145  ###############################################################################
40146  #
40147  # Setup the opt flags for different compilers
40148  # and different operating systems.
40149  #
40150
40151  #
40152  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
40153  #
40154  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
40155    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
40156    # While waiting for a better solution, the current workaround is to use -mstackrealign.
40157    CFLAGS="$CFLAGS -mstackrealign"
40158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
40159$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
40160    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40161/* end confdefs.h.  */
40162int main() { return 0; }
40163_ACEOF
40164if ac_fn_cxx_try_link "$LINENO"; then :
40165
40166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40167$as_echo "yes" >&6; }
40168
40169else
40170
40171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40172$as_echo "no" >&6; }
40173          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
40174
40175
40176fi
40177rm -f core conftest.err conftest.$ac_objext \
40178    conftest$ac_exeext conftest.$ac_ext
40179  fi
40180
40181  C_FLAG_DEPS="-MMD -MF"
40182  CXX_FLAG_DEPS="-MMD -MF"
40183
40184  case $COMPILER_TYPE in
40185    CC )
40186      case $COMPILER_NAME in
40187        gcc )
40188          case $OPENJDK_TARGET_OS in
40189            macosx )
40190              # On MacOSX we optimize for size, something
40191              # we should do for all platforms?
40192              C_O_FLAG_HI="-Os"
40193              C_O_FLAG_NORM="-Os"
40194              C_O_FLAG_NONE=""
40195              ;;
40196            *)
40197              C_O_FLAG_HI="-O3"
40198              C_O_FLAG_NORM="-O2"
40199              C_O_FLAG_NONE="-O0"
40200              ;;
40201          esac
40202          CXX_O_FLAG_HI="$C_O_FLAG_HI"
40203          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
40204          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
40205          CFLAGS_DEBUG_SYMBOLS="-g"
40206          CXXFLAGS_DEBUG_SYMBOLS="-g"
40207          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
40208            CFLAGS_DEBUG_SYMBOLS="-g1"
40209            CXXFLAGS_DEBUG_SYMBOLS="-g1"
40210          fi
40211          ;;
40212        ossc )
40213          #
40214          # Forte has different names for this with their C++ compiler...
40215          #
40216          C_FLAG_DEPS="-xMMD -xMF"
40217          CXX_FLAG_DEPS="-xMMD -xMF"
40218
40219          # Extra options used with HIGHEST
40220          #
40221          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
40222          #          done with care, there are some assumptions below that need to
40223          #          be understood about the use of pointers, and IEEE behavior.
40224          #
40225          # Use non-standard floating point mode (not IEEE 754)
40226          CC_HIGHEST="$CC_HIGHEST -fns"
40227          # Do some simplification of floating point arithmetic (not IEEE 754)
40228          CC_HIGHEST="$CC_HIGHEST -fsimple"
40229          # Use single precision floating point with 'float'
40230          CC_HIGHEST="$CC_HIGHEST -fsingle"
40231          # Assume memory references via basic pointer types do not alias
40232          #   (Source with excessing pointer casting and data access with mixed
40233          #    pointer types are not recommended)
40234          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
40235          # Use intrinsic or inline versions for math/std functions
40236          #   (If you expect perfect errno behavior, do not use this)
40237          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
40238          # Loop data dependency optimizations (need -xO3 or higher)
40239          CC_HIGHEST="$CC_HIGHEST -xdepend"
40240          # Pointer parameters to functions do not overlap
40241          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
40242          #    If you pass in multiple pointers to the same data, do not use this)
40243          CC_HIGHEST="$CC_HIGHEST -xrestrict"
40244          # Inline some library routines
40245          #   (If you expect perfect errno behavior, do not use this)
40246          CC_HIGHEST="$CC_HIGHEST -xlibmil"
40247          # Use optimized math routines
40248          #   (If you expect perfect errno behavior, do not use this)
40249          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
40250          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
40251
40252          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
40253            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
40254            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
40255          fi
40256
40257          case $OPENJDK_TARGET_CPU_ARCH in
40258            x86)
40259              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
40260              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
40261              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
40262              C_O_FLAG_NONE="-xregs=no%frameptr"
40263              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
40264              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
40265              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
40266              CXX_O_FLAG_NONE="-xregs=no%frameptr"
40267              if test "x$OPENJDK_TARGET_CPU" = xx86; then
40268                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
40269                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
40270              fi
40271              ;;
40272            sparc)
40273              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
40274              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
40275              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
40276              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
40277              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
40278              C_O_FLAG_NONE=""
40279              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
40280              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
40281              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
40282              CXX_O_FLAG_NONE=""
40283              ;;
40284          esac
40285
40286          CFLAGS_DEBUG_SYMBOLS="-g -xs"
40287          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
40288          ;;
40289        xlc )
40290          C_FLAG_DEPS="-qmakedep=gcc -MF"
40291          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
40292          C_O_FLAG_HIGHEST="-O3"
40293          C_O_FLAG_HI="-O3 -qstrict"
40294          C_O_FLAG_NORM="-O2"
40295          C_O_FLAG_NONE=""
40296          CXX_O_FLAG_HIGHEST="-O3"
40297          CXX_O_FLAG_HI="-O3 -qstrict"
40298          CXX_O_FLAG_NORM="-O2"
40299          CXX_O_FLAG_NONE=""
40300          CFLAGS_DEBUG_SYMBOLS="-g"
40301          CXXFLAGS_DEBUG_SYMBOLS="-g"
40302          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
40303          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
40304          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
40305          ;;
40306      esac
40307      ;;
40308    CL )
40309      C_O_FLAG_HIGHEST="-O2"
40310      C_O_FLAG_HI="-O1"
40311      C_O_FLAG_NORM="-O1"
40312      C_O_FLAG_NONE="-Od"
40313      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
40314      CXX_O_FLAG_HI="$C_O_FLAG_HI"
40315      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
40316      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
40317      ;;
40318  esac
40319
40320  if test -z "$C_O_FLAG_HIGHEST"; then
40321    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
40322  fi
40323
40324  if test -z "$CXX_O_FLAG_HIGHEST"; then
40325    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
40326  fi
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
40342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
40343$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
40344  fi
40345
40346  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
40347    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
40348$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
40349  fi
40350
40351  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
40352    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
40353$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
40354  fi
40355
40356
40357# Check whether --with-extra-cflags was given.
40358if test "${with_extra_cflags+set}" = set; then :
40359  withval=$with_extra_cflags;
40360fi
40361
40362
40363
40364# Check whether --with-extra-cxxflags was given.
40365if test "${with_extra_cxxflags+set}" = set; then :
40366  withval=$with_extra_cxxflags;
40367fi
40368
40369
40370
40371# Check whether --with-extra-ldflags was given.
40372if test "${with_extra_ldflags+set}" = set; then :
40373  withval=$with_extra_ldflags;
40374fi
40375
40376
40377  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
40378  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
40379  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
40380
40381  # Hotspot needs these set in their legacy form
40382  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
40383  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
40384  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
40385
40386
40387
40388
40389
40390  ###############################################################################
40391  #
40392  # Now setup the CFLAGS and LDFLAGS for the JDK build.
40393  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
40394  #
40395  case $COMPILER_NAME in
40396    gcc )
40397      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
40398      -pipe \
40399      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
40400      case $OPENJDK_TARGET_CPU_ARCH in
40401        arm )
40402          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
40403          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
40404          ;;
40405        ppc )
40406          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
40407          ;;
40408        * )
40409          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
40410          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
40411          ;;
40412      esac
40413      ;;
40414    ossc )
40415      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
40416      case $OPENJDK_TARGET_CPU_ARCH in
40417        x86 )
40418          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
40419          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
40420          ;;
40421      esac
40422
40423      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
40424      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
40425
40426      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
40427      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
40428      ;;
40429    xlc )
40430      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
40431      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
40432
40433      LDFLAGS_JDK="$LDFLAGS_JDK"
40434      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
40435      ;;
40436    cl )
40437      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
40438      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
40439      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
40440      -DWIN32 -DIAL"
40441      case $OPENJDK_TARGET_CPU in
40442        x86 )
40443          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
40444          ;;
40445        x86_64 )
40446          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
40447          ;;
40448      esac
40449      ;;
40450  esac
40451
40452  ###############################################################################
40453
40454  # Adjust flags according to debug level.
40455  case $DEBUG_LEVEL in
40456    fastdebug )
40457      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
40458      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
40459      C_O_FLAG_HI="$C_O_FLAG_NORM"
40460      C_O_FLAG_NORM="$C_O_FLAG_NORM"
40461      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
40462      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
40463      JAVAC_FLAGS="$JAVAC_FLAGS -g"
40464      ;;
40465    slowdebug )
40466      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
40467      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
40468      C_O_FLAG_HI="$C_O_FLAG_NONE"
40469      C_O_FLAG_NORM="$C_O_FLAG_NONE"
40470      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
40471      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
40472      JAVAC_FLAGS="$JAVAC_FLAGS -g"
40473      ;;
40474  esac
40475
40476  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
40477
40478  # The package path is used only on macosx?
40479  PACKAGE_PATH=/opt/local
40480
40481
40482  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
40483    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
40484    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
40485    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
40486    #   Note: -Dmacro         is the same as    #define macro 1
40487    #         -Dmacro=        is the same as    #define macro
40488    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40489      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
40490    else
40491      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
40492    fi
40493  else
40494    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
40495  fi
40496  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40497    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
40498  fi
40499  if test "x$OPENJDK_TARGET_OS" = xwindows; then
40500    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
40501  fi
40502  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40503    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
40504  fi
40505  if test "x$OPENJDK_TARGET_OS" = xaix; then
40506    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
40507  fi
40508  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40509    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
40510    # Setting these parameters makes it an error to link to macosx APIs that are
40511    # newer than the given OS version and makes the linked binaries compatible even
40512    # if built on a newer version of the OS.
40513    # The expected format is X.Y.Z
40514    MACOSX_VERSION_MIN=10.7.0
40515
40516    # The macro takes the version with no dots, ex: 1070
40517    # Let the flags variables get resolved in make for easier override on make
40518    # command line.
40519    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
40520    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
40521  fi
40522  if test "x$OPENJDK_TARGET_OS" = xbsd; then
40523    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
40524  fi
40525  if test "x$DEBUG_LEVEL" = xrelease; then
40526    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
40527  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40528    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
40529  fi
40530  else
40531    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
40532  fi
40533
40534  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
40535  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
40536
40537  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
40538      -I${JDK_OUTPUTDIR}/include \
40539      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
40540      -I${JDK_TOPDIR}/src/share/javavm/export \
40541      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
40542      -I${JDK_TOPDIR}/src/share/native/common \
40543      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
40544
40545  # The shared libraries are compiled using the picflag.
40546  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
40547  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
40548
40549  # Executable flags
40550  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
40551  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
40552
40553  # Now this is odd. The JDK native libraries have to link against libjvm.so
40554  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
40555  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
40556  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
40557  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
40558  # libraries will link to whatever is in memory. Yuck.
40559  #
40560  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
40561  if test "x$COMPILER_NAME" = xcl; then
40562    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
40563    if test "x$OPENJDK_TARGET_CPU" = xx86; then
40564      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
40565    fi
40566    # TODO: make -debug optional "--disable-full-debug-symbols"
40567    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
40568    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
40569    LDFLAGS_JDKLIB_SUFFIX=""
40570    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
40571      LDFLAGS_STACK_SIZE=1048576
40572    else
40573      LDFLAGS_STACK_SIZE=327680
40574    fi
40575    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
40576  else
40577    if test "x$COMPILER_NAME" = xgcc; then
40578      # If this is a --hash-style=gnu system, use --hash-style=both, why?
40579      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40580      if test -n "$HAS_GNU_HASH"; then
40581        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
40582      fi
40583      if test "x$OPENJDK_TARGET_OS" = xlinux; then
40584        # And since we now know that the linker is gnu, then add -z defs, to forbid
40585        # undefined symbols in object files.
40586        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
40587        if test "x$DEBUG_LEVEL" = "xrelease"; then
40588          # When building release libraries, tell the linker optimize them.
40589          # Should this be supplied to the OSS linker as well?
40590          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
40591        fi
40592      fi
40593    fi
40594    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
40595        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
40596
40597    # On some platforms (mac) the linker warns about non existing -L dirs.
40598    # Add server first if available. Linking aginst client does not always produce the same results.
40599    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
40600    # Default to server for other variants.
40601    if test "x$JVM_VARIANT_SERVER" = xtrue; then
40602      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
40603    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
40604      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
40605    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
40606      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
40607    else
40608      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
40609    fi
40610
40611    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
40612    if test "x$COMPILER_NAME" = xossc; then
40613      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
40614    fi
40615
40616    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
40617    if test "x$OPENJDK_TARGET_OS" = xlinux; then
40618      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
40619    fi
40620  fi
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636  # Some Zero and Shark settings.
40637  # ZERO_ARCHFLAG tells the compiler which mode to build for
40638  case "${OPENJDK_TARGET_CPU}" in
40639    s390)
40640      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
40641      ;;
40642    *)
40643      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40644  esac
40645
40646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
40647$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
40648  supports=yes
40649
40650  saved_cflags="$CFLAGS"
40651  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
40652  ac_ext=c
40653ac_cpp='$CPP $CPPFLAGS'
40654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40656ac_compiler_gnu=$ac_cv_c_compiler_gnu
40657
40658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40659/* end confdefs.h.  */
40660int i;
40661_ACEOF
40662if ac_fn_c_try_compile "$LINENO"; then :
40663
40664else
40665  supports=no
40666fi
40667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40668  ac_ext=cpp
40669ac_cpp='$CXXCPP $CPPFLAGS'
40670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40673
40674  CFLAGS="$saved_cflags"
40675
40676  saved_cxxflags="$CXXFLAGS"
40677  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
40678  ac_ext=cpp
40679ac_cpp='$CXXCPP $CPPFLAGS'
40680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40683
40684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40685/* end confdefs.h.  */
40686int i;
40687_ACEOF
40688if ac_fn_cxx_try_compile "$LINENO"; then :
40689
40690else
40691  supports=no
40692fi
40693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40694  ac_ext=cpp
40695ac_cpp='$CXXCPP $CPPFLAGS'
40696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40699
40700  CXXFLAGS="$saved_cxxflags"
40701
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40703$as_echo "$supports" >&6; }
40704  if test "x$supports" = "xyes" ; then
40705    :
40706  else
40707    ZERO_ARCHFLAG=""
40708  fi
40709
40710
40711
40712  # Check that the compiler supports -mX (or -qX on AIX) flags
40713  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
40714
40715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
40716$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
40717  supports=yes
40718
40719  saved_cflags="$CFLAGS"
40720  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40721  ac_ext=c
40722ac_cpp='$CPP $CPPFLAGS'
40723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40725ac_compiler_gnu=$ac_cv_c_compiler_gnu
40726
40727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40728/* end confdefs.h.  */
40729int i;
40730_ACEOF
40731if ac_fn_c_try_compile "$LINENO"; then :
40732
40733else
40734  supports=no
40735fi
40736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40737  ac_ext=cpp
40738ac_cpp='$CXXCPP $CPPFLAGS'
40739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40742
40743  CFLAGS="$saved_cflags"
40744
40745  saved_cxxflags="$CXXFLAGS"
40746  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40747  ac_ext=cpp
40748ac_cpp='$CXXCPP $CPPFLAGS'
40749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40752
40753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40754/* end confdefs.h.  */
40755int i;
40756_ACEOF
40757if ac_fn_cxx_try_compile "$LINENO"; then :
40758
40759else
40760  supports=no
40761fi
40762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40763  ac_ext=cpp
40764ac_cpp='$CXXCPP $CPPFLAGS'
40765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40768
40769  CXXFLAGS="$saved_cxxflags"
40770
40771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40772$as_echo "$supports" >&6; }
40773  if test "x$supports" = "xyes" ; then
40774    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
40775  else
40776    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
40777  fi
40778
40779
40780
40781
40782  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
40783  USING_BROKEN_SUSE_LD=no
40784  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
40785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40786$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40787    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40788    echo "int main() { }" > main.c
40789    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40791$as_echo "no" >&6; }
40792      USING_BROKEN_SUSE_LD=no
40793    else
40794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40795$as_echo "yes" >&6; }
40796      USING_BROKEN_SUSE_LD=yes
40797    fi
40798    rm -rf version-script.map main.c
40799  fi
40800
40801
40802
40803# Setup debug symbols (need objcopy from the toolchain for that)
40804
40805  #
40806  # ENABLE_DEBUG_SYMBOLS
40807  # This must be done after the toolchain is setup, since we're looking at objcopy.
40808  #
40809  # Check whether --enable-debug-symbols was given.
40810if test "${enable_debug_symbols+set}" = set; then :
40811  enableval=$enable_debug_symbols;
40812fi
40813
40814
40815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
40816$as_echo_n "checking if we should generate debug symbols... " >&6; }
40817
40818  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
40819    # explicit enabling of enable-debug-symbols and can't find objcopy
40820    #   this is an error
40821    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
40822  fi
40823
40824  if test "x$enable_debug_symbols" = "xyes"; then
40825    ENABLE_DEBUG_SYMBOLS=true
40826  elif test "x$enable_debug_symbols" = "xno"; then
40827    ENABLE_DEBUG_SYMBOLS=false
40828  else
40829    # Default is on if objcopy is found
40830    if test "x$OBJCOPY" != x; then
40831      ENABLE_DEBUG_SYMBOLS=true
40832    # MacOS X and Windows don't use objcopy but default is on for those OSes
40833    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
40834      ENABLE_DEBUG_SYMBOLS=true
40835    else
40836      ENABLE_DEBUG_SYMBOLS=false
40837    fi
40838  fi
40839
40840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
40841$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
40842
40843  #
40844  # ZIP_DEBUGINFO_FILES
40845  #
40846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
40847$as_echo_n "checking if we should zip debug-info files... " >&6; }
40848  # Check whether --enable-zip-debug-info was given.
40849if test "${enable_zip_debug_info+set}" = set; then :
40850  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
40851else
40852  enable_zip_debug_info="yes"
40853fi
40854
40855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
40856$as_echo "${enable_zip_debug_info}" >&6; }
40857
40858  if test "x${enable_zip_debug_info}" = "xno"; then
40859    ZIP_DEBUGINFO_FILES=false
40860  else
40861    ZIP_DEBUGINFO_FILES=true
40862  fi
40863
40864
40865
40866
40867
40868
40869
40870###############################################################################
40871#
40872# Check dependencies for external and internal libraries.
40873#
40874###############################################################################
40875
40876# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
40877
40878  # When using cygwin or msys, we need a wrapper binary that renames
40879  # /cygdrive/c/ arguments into c:/ arguments and peeks into
40880  # @files and rewrites these too! This wrapper binary is
40881  # called fixpath.
40882  FIXPATH=
40883  if test "x$OPENJDK_BUILD_OS" = xwindows; then
40884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
40885$as_echo_n "checking if fixpath can be created... " >&6; }
40886    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
40887    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
40888    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
40889      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
40890      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
40891      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
40892      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
40893    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
40894      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
40895      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
40896
40897      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
40898      # @ was chosen as separator to minimize risk of other tools messing around with it
40899      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
40900      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
40901
40902      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
40903    fi
40904    rm -f $OUTPUT_ROOT/fixpath*
40905    cd $OUTPUT_ROOT
40906    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
40907    cd $CURDIR
40908
40909    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
40910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40911$as_echo "no" >&6; }
40912      cat $OUTPUT_ROOT/fixpath1.log
40913      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
40914    fi
40915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40916$as_echo "yes" >&6; }
40917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
40918$as_echo_n "checking if fixpath.exe works... " >&6; }
40919    cd $OUTPUT_ROOT
40920    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
40921    cd $CURDIR
40922    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
40923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40924$as_echo "no" >&6; }
40925      cat $OUTPUT_ROOT/fixpath2.log
40926      as_fn_error $? "fixpath did not work!" "$LINENO" 5
40927    fi
40928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40929$as_echo "yes" >&6; }
40930    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
40931  fi
40932
40933
40934
40935
40936
40937
40938  ###############################################################################
40939  #
40940  # OS specific settings that we never will need to probe.
40941  #
40942  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
40944$as_echo_n "checking what is not needed on Linux?... " >&6; }
40945    PULSE_NOT_NEEDED=yes
40946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
40947$as_echo "pulse" >&6; }
40948  fi
40949
40950  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
40952$as_echo_n "checking what is not needed on Solaris?... " >&6; }
40953    ALSA_NOT_NEEDED=yes
40954    PULSE_NOT_NEEDED=yes
40955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
40956$as_echo "alsa pulse" >&6; }
40957  fi
40958
40959  if test "x$OPENJDK_TARGET_OS" = xaix; then
40960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
40961$as_echo_n "checking what is not needed on AIX?... " >&6; }
40962    ALSA_NOT_NEEDED=yes
40963    PULSE_NOT_NEEDED=yes
40964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
40965$as_echo "alsa pulse" >&6; }
40966  fi
40967
40968
40969  if test "x$OPENJDK_TARGET_OS" = xwindows; then
40970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
40971$as_echo_n "checking what is not needed on Windows?... " >&6; }
40972    CUPS_NOT_NEEDED=yes
40973    ALSA_NOT_NEEDED=yes
40974    PULSE_NOT_NEEDED=yes
40975    X11_NOT_NEEDED=yes
40976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
40977$as_echo "alsa cups pulse x11" >&6; }
40978  fi
40979
40980  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
40982$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
40983    ALSA_NOT_NEEDED=yes
40984    PULSE_NOT_NEEDED=yes
40985    X11_NOT_NEEDED=yes
40986    # If the java runtime framework is disabled, then we need X11.
40987    # This will be adjusted below.
40988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
40989$as_echo "alsa pulse x11" >&6; }
40990  fi
40991
40992  if test "x$OPENJDK_TARGET_OS" = xbsd; then
40993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
40994$as_echo_n "checking what is not needed on bsd?... " >&6; }
40995    ALSA_NOT_NEEDED=yes
40996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
40997$as_echo "alsa" >&6; }
40998  fi
40999
41000  if test "x$OPENJDK" = "xfalse"; then
41001    FREETYPE_NOT_NEEDED=yes
41002  fi
41003
41004  if test "x$SUPPORT_HEADFUL" = xno; then
41005    X11_NOT_NEEDED=yes
41006  fi
41007
41008  ###############################################################################
41009  #
41010  # Check for MacOSX support for OpenJDK.
41011  #
41012
41013
41014  # Check whether --enable-macosx-runtime-support was given.
41015if test "${enable_macosx_runtime_support+set}" = set; then :
41016  enableval=$enable_macosx_runtime_support;
41017fi
41018
41019  if test "x$enable_macosx_runtime_support" != x; then
41020    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
41021$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
41022  fi
41023
41024
41025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
41026$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
41027  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
41028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
41029$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
41030  else
41031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41032$as_echo "no" >&6; }
41033  fi
41034
41035
41036
41037  ###############################################################################
41038  #
41039  # Check for X Windows
41040  #
41041
41042  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
41043  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
41044  # --x-libraries for the sysroot, if that seems to be correct.
41045  if test "x$SYS_ROOT" != "x/"; then
41046    if test "x$x_includes" = xNONE; then
41047      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
41048        x_includes="$SYS_ROOT/usr/X11R6/include"
41049      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
41050        x_includes="$SYS_ROOT/usr/include"
41051      fi
41052    fi
41053    if test "x$x_libraries" = xNONE; then
41054      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
41055        x_libraries="$SYS_ROOT/usr/X11R6/lib"
41056      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
41057        x_libraries="$SYS_ROOT/usr/lib64"
41058      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
41059        x_libraries="$SYS_ROOT/usr/lib"
41060      fi
41061    fi
41062  fi
41063
41064  # Now let autoconf do it's magic
41065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
41066$as_echo_n "checking for X... " >&6; }
41067
41068
41069# Check whether --with-x was given.
41070if test "${with_x+set}" = set; then :
41071  withval=$with_x;
41072fi
41073
41074# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
41075if test "x$with_x" = xno; then
41076  # The user explicitly disabled X.
41077  have_x=disabled
41078else
41079  case $x_includes,$x_libraries in #(
41080    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
41081    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
41082  $as_echo_n "(cached) " >&6
41083else
41084  # One or both of the vars are not set, and there is no cached value.
41085ac_x_includes=no ac_x_libraries=no
41086rm -f -r conftest.dir
41087if mkdir conftest.dir; then
41088  cd conftest.dir
41089  cat >Imakefile <<'_ACEOF'
41090incroot:
41091	@echo incroot='${INCROOT}'
41092usrlibdir:
41093	@echo usrlibdir='${USRLIBDIR}'
41094libdir:
41095	@echo libdir='${LIBDIR}'
41096_ACEOF
41097  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
41098    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
41099    for ac_var in incroot usrlibdir libdir; do
41100      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
41101    done
41102    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
41103    for ac_extension in a so sl dylib la dll; do
41104      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
41105	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
41106	ac_im_usrlibdir=$ac_im_libdir; break
41107      fi
41108    done
41109    # Screen out bogus values from the imake configuration.  They are
41110    # bogus both because they are the default anyway, and because
41111    # using them would break gcc on systems where it needs fixed includes.
41112    case $ac_im_incroot in
41113	/usr/include) ac_x_includes= ;;
41114	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
41115    esac
41116    case $ac_im_usrlibdir in
41117	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
41118	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
41119    esac
41120  fi
41121  cd ..
41122  rm -f -r conftest.dir
41123fi
41124
41125# Standard set of common directories for X headers.
41126# Check X11 before X11Rn because it is often a symlink to the current release.
41127ac_x_header_dirs='
41128/usr/X11/include
41129/usr/X11R7/include
41130/usr/X11R6/include
41131/usr/X11R5/include
41132/usr/X11R4/include
41133
41134/usr/include/X11
41135/usr/include/X11R7
41136/usr/include/X11R6
41137/usr/include/X11R5
41138/usr/include/X11R4
41139
41140/usr/local/X11/include
41141/usr/local/X11R7/include
41142/usr/local/X11R6/include
41143/usr/local/X11R5/include
41144/usr/local/X11R4/include
41145
41146/usr/local/include/X11
41147/usr/local/include/X11R7
41148/usr/local/include/X11R6
41149/usr/local/include/X11R5
41150/usr/local/include/X11R4
41151
41152/usr/X386/include
41153/usr/x386/include
41154/usr/XFree86/include/X11
41155
41156/usr/include
41157/usr/local/include
41158/usr/unsupported/include
41159/usr/athena/include
41160/usr/local/x11r5/include
41161/usr/lpp/Xamples/include
41162
41163/usr/openwin/include
41164/usr/openwin/share/include'
41165
41166if test "$ac_x_includes" = no; then
41167  # Guess where to find include files, by looking for Xlib.h.
41168  # First, try using that file with no special directory specified.
41169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41170/* end confdefs.h.  */
41171#include <X11/Xlib.h>
41172_ACEOF
41173if ac_fn_cxx_try_cpp "$LINENO"; then :
41174  # We can compile using X headers with no special include directory.
41175ac_x_includes=
41176else
41177  for ac_dir in $ac_x_header_dirs; do
41178  if test -r "$ac_dir/X11/Xlib.h"; then
41179    ac_x_includes=$ac_dir
41180    break
41181  fi
41182done
41183fi
41184rm -f conftest.err conftest.i conftest.$ac_ext
41185fi # $ac_x_includes = no
41186
41187if test "$ac_x_libraries" = no; then
41188  # Check for the libraries.
41189  # See if we find them without any special options.
41190  # Don't add to $LIBS permanently.
41191  ac_save_LIBS=$LIBS
41192  LIBS="-lX11 $LIBS"
41193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41194/* end confdefs.h.  */
41195#include <X11/Xlib.h>
41196int
41197main ()
41198{
41199XrmInitialize ()
41200  ;
41201  return 0;
41202}
41203_ACEOF
41204if ac_fn_cxx_try_link "$LINENO"; then :
41205  LIBS=$ac_save_LIBS
41206# We can link X programs with no special library path.
41207ac_x_libraries=
41208else
41209  LIBS=$ac_save_LIBS
41210for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
41211do
41212  # Don't even attempt the hair of trying to link an X program!
41213  for ac_extension in a so sl dylib la dll; do
41214    if test -r "$ac_dir/libX11.$ac_extension"; then
41215      ac_x_libraries=$ac_dir
41216      break 2
41217    fi
41218  done
41219done
41220fi
41221rm -f core conftest.err conftest.$ac_objext \
41222    conftest$ac_exeext conftest.$ac_ext
41223fi # $ac_x_libraries = no
41224
41225case $ac_x_includes,$ac_x_libraries in #(
41226  no,* | *,no | *\'*)
41227    # Didn't find X, or a directory has "'" in its name.
41228    ac_cv_have_x="have_x=no";; #(
41229  *)
41230    # Record where we found X for the cache.
41231    ac_cv_have_x="have_x=yes\
41232	ac_x_includes='$ac_x_includes'\
41233	ac_x_libraries='$ac_x_libraries'"
41234esac
41235fi
41236;; #(
41237    *) have_x=yes;;
41238  esac
41239  eval "$ac_cv_have_x"
41240fi # $with_x != no
41241
41242if test "$have_x" != yes; then
41243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
41244$as_echo "$have_x" >&6; }
41245  no_x=yes
41246else
41247  # If each of the values was on the command line, it overrides each guess.
41248  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
41249  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
41250  # Update the cache value to reflect the command line values.
41251  ac_cv_have_x="have_x=yes\
41252	ac_x_includes='$x_includes'\
41253	ac_x_libraries='$x_libraries'"
41254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
41255$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
41256fi
41257
41258  if test "$no_x" = yes; then
41259  # Not all programs may use this symbol, but it does not hurt to define it.
41260
41261$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
41262
41263  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
41264else
41265  if test -n "$x_includes"; then
41266    X_CFLAGS="$X_CFLAGS -I$x_includes"
41267  fi
41268
41269  # It would also be nice to do this for all -L options, not just this one.
41270  if test -n "$x_libraries"; then
41271    X_LIBS="$X_LIBS -L$x_libraries"
41272    # For Solaris; some versions of Sun CC require a space after -R and
41273    # others require no space.  Words are not sufficient . . . .
41274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
41275$as_echo_n "checking whether -R must be followed by a space... " >&6; }
41276    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
41277    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
41278    ac_cxx_werror_flag=yes
41279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41280/* end confdefs.h.  */
41281
41282int
41283main ()
41284{
41285
41286  ;
41287  return 0;
41288}
41289_ACEOF
41290if ac_fn_cxx_try_link "$LINENO"; then :
41291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41292$as_echo "no" >&6; }
41293       X_LIBS="$X_LIBS -R$x_libraries"
41294else
41295  LIBS="$ac_xsave_LIBS -R $x_libraries"
41296       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41297/* end confdefs.h.  */
41298
41299int
41300main ()
41301{
41302
41303  ;
41304  return 0;
41305}
41306_ACEOF
41307if ac_fn_cxx_try_link "$LINENO"; then :
41308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41309$as_echo "yes" >&6; }
41310	  X_LIBS="$X_LIBS -R $x_libraries"
41311else
41312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
41313$as_echo "neither works" >&6; }
41314fi
41315rm -f core conftest.err conftest.$ac_objext \
41316    conftest$ac_exeext conftest.$ac_ext
41317fi
41318rm -f core conftest.err conftest.$ac_objext \
41319    conftest$ac_exeext conftest.$ac_ext
41320    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
41321    LIBS=$ac_xsave_LIBS
41322  fi
41323
41324  # Check for system-dependent libraries X programs must link with.
41325  # Do this before checking for the system-independent R6 libraries
41326  # (-lICE), since we may need -lsocket or whatever for X linking.
41327
41328  if test "$ISC" = yes; then
41329    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
41330  else
41331    # Martyn Johnson says this is needed for Ultrix, if the X
41332    # libraries were built with DECnet support.  And Karl Berry says
41333    # the Alpha needs dnet_stub (dnet does not exist).
41334    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
41335    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41336/* end confdefs.h.  */
41337
41338/* Override any GCC internal prototype to avoid an error.
41339   Use char because int might match the return type of a GCC
41340   builtin and then its argument prototype would still apply.  */
41341#ifdef __cplusplus
41342extern "C"
41343#endif
41344char XOpenDisplay ();
41345int
41346main ()
41347{
41348return XOpenDisplay ();
41349  ;
41350  return 0;
41351}
41352_ACEOF
41353if ac_fn_cxx_try_link "$LINENO"; then :
41354
41355else
41356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
41357$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
41358if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
41359  $as_echo_n "(cached) " >&6
41360else
41361  ac_check_lib_save_LIBS=$LIBS
41362LIBS="-ldnet  $LIBS"
41363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41364/* end confdefs.h.  */
41365
41366/* Override any GCC internal prototype to avoid an error.
41367   Use char because int might match the return type of a GCC
41368   builtin and then its argument prototype would still apply.  */
41369#ifdef __cplusplus
41370extern "C"
41371#endif
41372char dnet_ntoa ();
41373int
41374main ()
41375{
41376return dnet_ntoa ();
41377  ;
41378  return 0;
41379}
41380_ACEOF
41381if ac_fn_cxx_try_link "$LINENO"; then :
41382  ac_cv_lib_dnet_dnet_ntoa=yes
41383else
41384  ac_cv_lib_dnet_dnet_ntoa=no
41385fi
41386rm -f core conftest.err conftest.$ac_objext \
41387    conftest$ac_exeext conftest.$ac_ext
41388LIBS=$ac_check_lib_save_LIBS
41389fi
41390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
41391$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
41392if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
41393  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
41394fi
41395
41396    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
41397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
41398$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
41399if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
41400  $as_echo_n "(cached) " >&6
41401else
41402  ac_check_lib_save_LIBS=$LIBS
41403LIBS="-ldnet_stub  $LIBS"
41404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41405/* end confdefs.h.  */
41406
41407/* Override any GCC internal prototype to avoid an error.
41408   Use char because int might match the return type of a GCC
41409   builtin and then its argument prototype would still apply.  */
41410#ifdef __cplusplus
41411extern "C"
41412#endif
41413char dnet_ntoa ();
41414int
41415main ()
41416{
41417return dnet_ntoa ();
41418  ;
41419  return 0;
41420}
41421_ACEOF
41422if ac_fn_cxx_try_link "$LINENO"; then :
41423  ac_cv_lib_dnet_stub_dnet_ntoa=yes
41424else
41425  ac_cv_lib_dnet_stub_dnet_ntoa=no
41426fi
41427rm -f core conftest.err conftest.$ac_objext \
41428    conftest$ac_exeext conftest.$ac_ext
41429LIBS=$ac_check_lib_save_LIBS
41430fi
41431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
41432$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
41433if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
41434  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
41435fi
41436
41437    fi
41438fi
41439rm -f core conftest.err conftest.$ac_objext \
41440    conftest$ac_exeext conftest.$ac_ext
41441    LIBS="$ac_xsave_LIBS"
41442
41443    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
41444    # to get the SysV transport functions.
41445    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
41446    # needs -lnsl.
41447    # The nsl library prevents programs from opening the X display
41448    # on Irix 5.2, according to T.E. Dickey.
41449    # The functions gethostbyname, getservbyname, and inet_addr are
41450    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
41451    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
41452if test "x$ac_cv_func_gethostbyname" = xyes; then :
41453
41454fi
41455
41456    if test $ac_cv_func_gethostbyname = no; then
41457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
41458$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
41459if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
41460  $as_echo_n "(cached) " >&6
41461else
41462  ac_check_lib_save_LIBS=$LIBS
41463LIBS="-lnsl  $LIBS"
41464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41465/* end confdefs.h.  */
41466
41467/* Override any GCC internal prototype to avoid an error.
41468   Use char because int might match the return type of a GCC
41469   builtin and then its argument prototype would still apply.  */
41470#ifdef __cplusplus
41471extern "C"
41472#endif
41473char gethostbyname ();
41474int
41475main ()
41476{
41477return gethostbyname ();
41478  ;
41479  return 0;
41480}
41481_ACEOF
41482if ac_fn_cxx_try_link "$LINENO"; then :
41483  ac_cv_lib_nsl_gethostbyname=yes
41484else
41485  ac_cv_lib_nsl_gethostbyname=no
41486fi
41487rm -f core conftest.err conftest.$ac_objext \
41488    conftest$ac_exeext conftest.$ac_ext
41489LIBS=$ac_check_lib_save_LIBS
41490fi
41491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
41492$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
41493if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
41494  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
41495fi
41496
41497      if test $ac_cv_lib_nsl_gethostbyname = no; then
41498	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
41499$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
41500if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
41501  $as_echo_n "(cached) " >&6
41502else
41503  ac_check_lib_save_LIBS=$LIBS
41504LIBS="-lbsd  $LIBS"
41505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41506/* end confdefs.h.  */
41507
41508/* Override any GCC internal prototype to avoid an error.
41509   Use char because int might match the return type of a GCC
41510   builtin and then its argument prototype would still apply.  */
41511#ifdef __cplusplus
41512extern "C"
41513#endif
41514char gethostbyname ();
41515int
41516main ()
41517{
41518return gethostbyname ();
41519  ;
41520  return 0;
41521}
41522_ACEOF
41523if ac_fn_cxx_try_link "$LINENO"; then :
41524  ac_cv_lib_bsd_gethostbyname=yes
41525else
41526  ac_cv_lib_bsd_gethostbyname=no
41527fi
41528rm -f core conftest.err conftest.$ac_objext \
41529    conftest$ac_exeext conftest.$ac_ext
41530LIBS=$ac_check_lib_save_LIBS
41531fi
41532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
41533$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
41534if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
41535  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
41536fi
41537
41538      fi
41539    fi
41540
41541    # lieder@skyler.mavd.honeywell.com says without -lsocket,
41542    # socket/setsockopt and other routines are undefined under SCO ODT
41543    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
41544    # on later versions), says Simon Leinen: it contains gethostby*
41545    # variants that don't use the name server (or something).  -lsocket
41546    # must be given before -lnsl if both are needed.  We assume that
41547    # if connect needs -lnsl, so does gethostbyname.
41548    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
41549if test "x$ac_cv_func_connect" = xyes; then :
41550
41551fi
41552
41553    if test $ac_cv_func_connect = no; then
41554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
41555$as_echo_n "checking for connect in -lsocket... " >&6; }
41556if ${ac_cv_lib_socket_connect+:} false; then :
41557  $as_echo_n "(cached) " >&6
41558else
41559  ac_check_lib_save_LIBS=$LIBS
41560LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
41561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41562/* end confdefs.h.  */
41563
41564/* Override any GCC internal prototype to avoid an error.
41565   Use char because int might match the return type of a GCC
41566   builtin and then its argument prototype would still apply.  */
41567#ifdef __cplusplus
41568extern "C"
41569#endif
41570char connect ();
41571int
41572main ()
41573{
41574return connect ();
41575  ;
41576  return 0;
41577}
41578_ACEOF
41579if ac_fn_cxx_try_link "$LINENO"; then :
41580  ac_cv_lib_socket_connect=yes
41581else
41582  ac_cv_lib_socket_connect=no
41583fi
41584rm -f core conftest.err conftest.$ac_objext \
41585    conftest$ac_exeext conftest.$ac_ext
41586LIBS=$ac_check_lib_save_LIBS
41587fi
41588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
41589$as_echo "$ac_cv_lib_socket_connect" >&6; }
41590if test "x$ac_cv_lib_socket_connect" = xyes; then :
41591  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
41592fi
41593
41594    fi
41595
41596    # Guillermo Gomez says -lposix is necessary on A/UX.
41597    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
41598if test "x$ac_cv_func_remove" = xyes; then :
41599
41600fi
41601
41602    if test $ac_cv_func_remove = no; then
41603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
41604$as_echo_n "checking for remove in -lposix... " >&6; }
41605if ${ac_cv_lib_posix_remove+:} false; then :
41606  $as_echo_n "(cached) " >&6
41607else
41608  ac_check_lib_save_LIBS=$LIBS
41609LIBS="-lposix  $LIBS"
41610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41611/* end confdefs.h.  */
41612
41613/* Override any GCC internal prototype to avoid an error.
41614   Use char because int might match the return type of a GCC
41615   builtin and then its argument prototype would still apply.  */
41616#ifdef __cplusplus
41617extern "C"
41618#endif
41619char remove ();
41620int
41621main ()
41622{
41623return remove ();
41624  ;
41625  return 0;
41626}
41627_ACEOF
41628if ac_fn_cxx_try_link "$LINENO"; then :
41629  ac_cv_lib_posix_remove=yes
41630else
41631  ac_cv_lib_posix_remove=no
41632fi
41633rm -f core conftest.err conftest.$ac_objext \
41634    conftest$ac_exeext conftest.$ac_ext
41635LIBS=$ac_check_lib_save_LIBS
41636fi
41637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
41638$as_echo "$ac_cv_lib_posix_remove" >&6; }
41639if test "x$ac_cv_lib_posix_remove" = xyes; then :
41640  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
41641fi
41642
41643    fi
41644
41645    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
41646    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
41647if test "x$ac_cv_func_shmat" = xyes; then :
41648
41649fi
41650
41651    if test $ac_cv_func_shmat = no; then
41652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
41653$as_echo_n "checking for shmat in -lipc... " >&6; }
41654if ${ac_cv_lib_ipc_shmat+:} false; then :
41655  $as_echo_n "(cached) " >&6
41656else
41657  ac_check_lib_save_LIBS=$LIBS
41658LIBS="-lipc  $LIBS"
41659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41660/* end confdefs.h.  */
41661
41662/* Override any GCC internal prototype to avoid an error.
41663   Use char because int might match the return type of a GCC
41664   builtin and then its argument prototype would still apply.  */
41665#ifdef __cplusplus
41666extern "C"
41667#endif
41668char shmat ();
41669int
41670main ()
41671{
41672return shmat ();
41673  ;
41674  return 0;
41675}
41676_ACEOF
41677if ac_fn_cxx_try_link "$LINENO"; then :
41678  ac_cv_lib_ipc_shmat=yes
41679else
41680  ac_cv_lib_ipc_shmat=no
41681fi
41682rm -f core conftest.err conftest.$ac_objext \
41683    conftest$ac_exeext conftest.$ac_ext
41684LIBS=$ac_check_lib_save_LIBS
41685fi
41686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
41687$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
41688if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
41689  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
41690fi
41691
41692    fi
41693  fi
41694
41695  # Check for libraries that X11R6 Xt/Xaw programs need.
41696  ac_save_LDFLAGS=$LDFLAGS
41697  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
41698  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
41699  # check for ICE first), but we must link in the order -lSM -lICE or
41700  # we get undefined symbols.  So assume we have SM if we have ICE.
41701  # These have to be linked with before -lX11, unlike the other
41702  # libraries we check for below, so use a different variable.
41703  # John Interrante, Karl Berry
41704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
41705$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
41706if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
41707  $as_echo_n "(cached) " >&6
41708else
41709  ac_check_lib_save_LIBS=$LIBS
41710LIBS="-lICE $X_EXTRA_LIBS $LIBS"
41711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41712/* end confdefs.h.  */
41713
41714/* Override any GCC internal prototype to avoid an error.
41715   Use char because int might match the return type of a GCC
41716   builtin and then its argument prototype would still apply.  */
41717#ifdef __cplusplus
41718extern "C"
41719#endif
41720char IceConnectionNumber ();
41721int
41722main ()
41723{
41724return IceConnectionNumber ();
41725  ;
41726  return 0;
41727}
41728_ACEOF
41729if ac_fn_cxx_try_link "$LINENO"; then :
41730  ac_cv_lib_ICE_IceConnectionNumber=yes
41731else
41732  ac_cv_lib_ICE_IceConnectionNumber=no
41733fi
41734rm -f core conftest.err conftest.$ac_objext \
41735    conftest$ac_exeext conftest.$ac_ext
41736LIBS=$ac_check_lib_save_LIBS
41737fi
41738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
41739$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
41740if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
41741  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
41742fi
41743
41744  LDFLAGS=$ac_save_LDFLAGS
41745
41746fi
41747
41748
41749  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
41750  # this doesn't make sense so we remove it.
41751  if test "x$COMPILE_TYPE" = xcross; then
41752    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
41753  fi
41754
41755  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
41756
41757  # Print a helpful message on how to acquire the necessary build dependency.
41758  # x11 is the help tag: freetype, cups, pulse, alsa etc
41759  MISSING_DEPENDENCY=x11
41760
41761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41762    cygwin_help $MISSING_DEPENDENCY
41763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41764    msys_help $MISSING_DEPENDENCY
41765  else
41766    PKGHANDLER_COMMAND=
41767
41768    case $PKGHANDLER in
41769      apt-get)
41770        apt_help     $MISSING_DEPENDENCY ;;
41771      yum)
41772        yum_help     $MISSING_DEPENDENCY ;;
41773      port)
41774        port_help    $MISSING_DEPENDENCY ;;
41775      pkgutil)
41776        pkgutil_help $MISSING_DEPENDENCY ;;
41777      pkgadd)
41778        pkgadd_help  $MISSING_DEPENDENCY ;;
41779    esac
41780
41781    if test "x$PKGHANDLER_COMMAND" != x; then
41782      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41783    fi
41784  fi
41785
41786    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
41787  fi
41788
41789  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41790    OPENWIN_HOME="/usr/openwin"
41791  fi
41792
41793
41794
41795  #
41796  # Weird Sol10 something check...TODO change to try compile
41797  #
41798  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
41799    if test "`uname -r`" = "5.10"; then
41800      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
41801        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
41802      fi
41803    fi
41804  fi
41805
41806  ac_ext=c
41807ac_cpp='$CPP $CPPFLAGS'
41808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41810ac_compiler_gnu=$ac_cv_c_compiler_gnu
41811
41812  OLD_CFLAGS="$CFLAGS"
41813  CFLAGS="$CFLAGS $X_CFLAGS"
41814
41815  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
41816  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
41817do :
41818  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41819ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
41820        # include <X11/Xlib.h>
41821        # include <X11/Xutil.h>
41822
41823
41824"
41825if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41826  cat >>confdefs.h <<_ACEOF
41827#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41828_ACEOF
41829 X11_A_OK=yes
41830else
41831  X11_A_OK=no; break
41832fi
41833
41834done
41835
41836
41837  CFLAGS="$OLD_CFLAGS"
41838  ac_ext=cpp
41839ac_cpp='$CXXCPP $CPPFLAGS'
41840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41843
41844
41845  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
41846
41847  # Print a helpful message on how to acquire the necessary build dependency.
41848  # x11 is the help tag: freetype, cups, pulse, alsa etc
41849  MISSING_DEPENDENCY=x11
41850
41851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41852    cygwin_help $MISSING_DEPENDENCY
41853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41854    msys_help $MISSING_DEPENDENCY
41855  else
41856    PKGHANDLER_COMMAND=
41857
41858    case $PKGHANDLER in
41859      apt-get)
41860        apt_help     $MISSING_DEPENDENCY ;;
41861      yum)
41862        yum_help     $MISSING_DEPENDENCY ;;
41863      port)
41864        port_help    $MISSING_DEPENDENCY ;;
41865      pkgutil)
41866        pkgutil_help $MISSING_DEPENDENCY ;;
41867      pkgadd)
41868        pkgadd_help  $MISSING_DEPENDENCY ;;
41869    esac
41870
41871    if test "x$PKGHANDLER_COMMAND" != x; then
41872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41873    fi
41874  fi
41875
41876    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
41877  fi
41878
41879
41880
41881
41882
41883
41884  ###############################################################################
41885  #
41886  # The common unix printing system cups is used to print from java.
41887  #
41888
41889# Check whether --with-cups was given.
41890if test "${with_cups+set}" = set; then :
41891  withval=$with_cups;
41892fi
41893
41894
41895# Check whether --with-cups-include was given.
41896if test "${with_cups_include+set}" = set; then :
41897  withval=$with_cups_include;
41898fi
41899
41900
41901  if test "x$CUPS_NOT_NEEDED" = xyes; then
41902    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
41903      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
41904$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
41905    fi
41906    CUPS_CFLAGS=
41907  else
41908    CUPS_FOUND=no
41909
41910    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
41911      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
41912    fi
41913
41914    if test "x${with_cups}" != x; then
41915      CUPS_CFLAGS="-I${with_cups}/include"
41916      CUPS_FOUND=yes
41917    fi
41918    if test "x${with_cups_include}" != x; then
41919      CUPS_CFLAGS="-I${with_cups_include}"
41920      CUPS_FOUND=yes
41921    fi
41922    if test "x$CUPS_FOUND" = xno; then
41923
41924
41925  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
41926    # Source the builddeps file again, to make sure it uses the latest variables!
41927    . $builddepsfile
41928    # Look for a target and build machine specific resource!
41929    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
41930    if test "x$resource" = x; then
41931      # Ok, lets instead look for a target specific resource
41932      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
41933    fi
41934    if test "x$resource" = x; then
41935      # Ok, lets instead look for a build specific resource
41936      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
41937    fi
41938    if test "x$resource" = x; then
41939      # Ok, lets instead look for a generic resource
41940      # (The cups comes from M4 and not the shell, thus no need for eval here.)
41941      resource=${builddep_cups}
41942    fi
41943    if test "x$resource" != x; then
41944      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
41945$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
41946      # If the resource in the builddeps.conf file is an existing directory,
41947      # for example /java/linux/cups
41948      if test -d ${resource}; then
41949        depdir=${resource}
41950      else
41951
41952  # cups is for example mymodule
41953  # $resource is for example libs/general/libmymod_1_2_3.zip
41954  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
41955  # $with_builddeps_dir is for example /localhome/builddeps
41956  # depdir is the name of the variable into which we store the depdir, eg MYMOD
41957  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
41958  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
41959  filename=`basename $resource`
41960  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
41961  filebase=${filename%%.*}
41962  extension=${filename#*.}
41963  installdir=$with_builddeps_dir/$filebase
41964  if test ! -f $installdir/$filename.unpacked; then
41965    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
41966$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
41967    if test ! -d $installdir; then
41968      mkdir -p $installdir
41969    fi
41970    if test ! -d $installdir; then
41971      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
41972    fi
41973    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
41974    touch $tmpfile
41975    if test ! -f $tmpfile; then
41976      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
41977    fi
41978
41979  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
41980  # $tmpfile is the local file name for the downloaded file.
41981  VALID_TOOL=no
41982  if test "x$BDEPS_FTP" = xwget; then
41983    VALID_TOOL=yes
41984    wget -O $tmpfile $with_builddeps_server/$resource
41985  fi
41986  if test "x$BDEPS_FTP" = xlftp; then
41987    VALID_TOOL=yes
41988    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
41989  fi
41990  if test "x$BDEPS_FTP" = xftp; then
41991    VALID_TOOL=yes
41992    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
41993    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
41994    FTPUSERPWD=${FTPSERVER%%@*}
41995    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
41996      FTPUSER=${userpwd%%:*}
41997      FTPPWD=${userpwd#*@}
41998      FTPSERVER=${FTPSERVER#*@}
41999    else
42000      FTPUSER=ftp
42001      FTPPWD=ftp
42002    fi
42003    # the "pass" command does not work on some
42004    # ftp clients (read ftp.exe) but if it works,
42005    # passive mode is better!
42006    ( \
42007        echo "user $FTPUSER $FTPPWD"        ; \
42008        echo "pass"                         ; \
42009        echo "bin"                          ; \
42010        echo "get $FTPPATH $tmpfile"              ; \
42011    ) | ftp -in $FTPSERVER
42012  fi
42013  if test "x$VALID_TOOL" != xyes; then
42014    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
42015  fi
42016
42017    mv $tmpfile $installdir/$filename
42018    if test ! -s $installdir/$filename; then
42019      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
42020    fi
42021    case "$extension" in
42022      zip)  echo "Unzipping $installdir/$filename..."
42023        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
42024        ;;
42025      tar.gz) echo "Untaring $installdir/$filename..."
42026        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42027        ;;
42028      tgz) echo "Untaring $installdir/$filename..."
42029        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42030        ;;
42031      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
42032        ;;
42033    esac
42034  fi
42035  if test -f $installdir/$filename.unpacked; then
42036    depdir=$installdir
42037  fi
42038
42039      fi
42040      # Source the builddeps file again, because in the previous command, the depdir
42041      # was updated to point at the current build dependency install directory.
42042      . $builddepsfile
42043      # Now extract variables from the builddeps.conf files.
42044      theroot=${builddep_cups_ROOT}
42045      thecflags=${builddep_cups_CFLAGS}
42046      thelibs=${builddep_cups_LIBS}
42047      if test "x$depdir" = x; then
42048        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
42049      fi
42050      CUPS=$depdir
42051      if test "x$theroot" != x; then
42052        CUPS="$theroot"
42053      fi
42054      if test "x$thecflags" != x; then
42055        CUPS_CFLAGS="$thecflags"
42056      fi
42057      if test "x$thelibs" != x; then
42058        CUPS_LIBS="$thelibs"
42059      fi
42060      CUPS_FOUND=yes
42061
42062    fi
42063
42064  fi
42065
42066    fi
42067    if test "x$CUPS_FOUND" = xno; then
42068      # Are the cups headers installed in the default /usr/include location?
42069      for ac_header in cups/cups.h cups/ppd.h
42070do :
42071  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42072ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
42073if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42074  cat >>confdefs.h <<_ACEOF
42075#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42076_ACEOF
42077
42078            CUPS_FOUND=yes
42079            CUPS_CFLAGS=
42080            DEFAULT_CUPS=yes
42081
42082
42083fi
42084
42085done
42086
42087    fi
42088    if test "x$CUPS_FOUND" = xno; then
42089      # Getting nervous now? Lets poke around for standard Solaris third-party
42090      # package installation locations.
42091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
42092$as_echo_n "checking for cups headers... " >&6; }
42093      if test -s /opt/sfw/cups/include/cups/cups.h; then
42094        # An SFW package seems to be installed!
42095        CUPS_FOUND=yes
42096        CUPS_CFLAGS="-I/opt/sfw/cups/include"
42097      elif test -s /opt/csw/include/cups/cups.h; then
42098        # A CSW package seems to be installed!
42099        CUPS_FOUND=yes
42100        CUPS_CFLAGS="-I/opt/csw/include"
42101      fi
42102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
42103$as_echo "$CUPS_FOUND" >&6; }
42104    fi
42105    if test "x$CUPS_FOUND" = xno; then
42106
42107  # Print a helpful message on how to acquire the necessary build dependency.
42108  # cups is the help tag: freetype, cups, pulse, alsa etc
42109  MISSING_DEPENDENCY=cups
42110
42111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42112    cygwin_help $MISSING_DEPENDENCY
42113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42114    msys_help $MISSING_DEPENDENCY
42115  else
42116    PKGHANDLER_COMMAND=
42117
42118    case $PKGHANDLER in
42119      apt-get)
42120        apt_help     $MISSING_DEPENDENCY ;;
42121      yum)
42122        yum_help     $MISSING_DEPENDENCY ;;
42123      port)
42124        port_help    $MISSING_DEPENDENCY ;;
42125      pkgutil)
42126        pkgutil_help $MISSING_DEPENDENCY ;;
42127      pkgadd)
42128        pkgadd_help  $MISSING_DEPENDENCY ;;
42129    esac
42130
42131    if test "x$PKGHANDLER_COMMAND" != x; then
42132      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42133    fi
42134  fi
42135
42136      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
42137    fi
42138  fi
42139
42140
42141
42142
42143
42144
42145  ###############################################################################
42146  #
42147  # The ubiquitous freetype library is used to render fonts.
42148  #
42149
42150# Check whether --with-freetype was given.
42151if test "${with_freetype+set}" = set; then :
42152  withval=$with_freetype;
42153fi
42154
42155
42156# Check whether --with-freetype-include was given.
42157if test "${with_freetype_include+set}" = set; then :
42158  withval=$with_freetype_include;
42159fi
42160
42161
42162# Check whether --with-freetype-lib was given.
42163if test "${with_freetype_lib+set}" = set; then :
42164  withval=$with_freetype_lib;
42165fi
42166
42167  # Check whether --enable-freetype-bundling was given.
42168if test "${enable_freetype_bundling+set}" = set; then :
42169  enableval=$enable_freetype_bundling;
42170fi
42171
42172
42173  FREETYPE_CFLAGS=
42174  FREETYPE_LIBS=
42175  FREETYPE_BUNDLE_LIB_PATH=
42176
42177  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
42178    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
42179      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
42180$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
42181    fi
42182    if test "x$enable_freetype_bundling" != x; then
42183      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
42184$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
42185    fi
42186  else
42187    # freetype is needed to build; go get it!
42188
42189    BUNDLE_FREETYPE="$enable_freetype_bundling"
42190
42191    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
42192      # User has specified settings
42193
42194      if test "x$BUNDLE_FREETYPE" = x; then
42195        # If not specified, default is to bundle freetype
42196        BUNDLE_FREETYPE=yes
42197      fi
42198
42199      if test "x$with_freetype" != x; then
42200        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
42201        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
42202      fi
42203
42204      # Allow --with-freetype-lib and --with-freetype-include to override
42205      if test "x$with_freetype_include" != x; then
42206        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
42207      fi
42208      if test "x$with_freetype_lib" != x; then
42209        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
42210      fi
42211
42212      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
42213        # Okay, we got it. Check that it works.
42214
42215  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42216  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
42217  METHOD="--with-freetype"
42218
42219  # First check if the files exists.
42220  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
42221    # We found an arbitrary include file. That's a good sign.
42222    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
42223$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
42224    FOUND_FREETYPE=yes
42225
42226    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
42227    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
42228      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
42229$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
42230      FOUND_FREETYPE=no
42231    else
42232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
42233        # On Windows, we will need both .lib and .dll file.
42234        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
42235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
42236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
42237          FOUND_FREETYPE=no
42238        fi
42239      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
42240        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
42241        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
42242      fi
42243    fi
42244  fi
42245
42246  if test "x$FOUND_FREETYPE" = xyes; then
42247
42248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42249
42250  # Input might be given as Windows format, start by converting to
42251  # unix format.
42252  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42253  new_path=`$CYGPATH -u "$path"`
42254
42255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42258  # "foo.exe" is OK but "foo" is an error.
42259  #
42260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42261  # It is also a way to make sure we got the proper file name for the real test later on.
42262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42263  if test "x$test_shortpath" = x; then
42264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42266    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
42267  fi
42268
42269  # Call helper function which possibly converts this using DOS-style short mode.
42270  # If so, the updated path is stored in $new_path.
42271
42272  input_path="$new_path"
42273  # Check if we need to convert this using DOS-style short mode. If the path
42274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42275  # take no chances and rewrite it.
42276  # Note: m4 eats our [], so we need to use [ and ] instead.
42277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42278  if test "x$has_forbidden_chars" != x; then
42279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42283      # Going to short mode and back again did indeed matter. Since short mode is
42284      # case insensitive, let's make it lowercase to improve readability.
42285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42286      # Now convert it back to Unix-stile (cygpath)
42287      input_path=`$CYGPATH -u "$shortmode_path"`
42288      new_path="$input_path"
42289    fi
42290  fi
42291
42292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42293  if test "x$test_cygdrive_prefix" = x; then
42294    # As a simple fix, exclude /usr/bin since it's not a real path.
42295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42297      # a path prefixed by /cygdrive for fixpath to work.
42298      new_path="$CYGWIN_ROOT_PATH$input_path"
42299    fi
42300  fi
42301
42302
42303  if test "x$path" != "x$new_path"; then
42304    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42307  fi
42308
42309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42310
42311  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42312  has_colon=`$ECHO $path | $GREP ^.:`
42313  new_path="$path"
42314  if test "x$has_colon" = x; then
42315    # Not in mixed or Windows style, start by that.
42316    new_path=`cmd //c echo $path`
42317  fi
42318
42319
42320  input_path="$new_path"
42321  # Check if we need to convert this using DOS-style short mode. If the path
42322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42323  # take no chances and rewrite it.
42324  # Note: m4 eats our [], so we need to use [ and ] instead.
42325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42326  if test "x$has_forbidden_chars" != x; then
42327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42329  fi
42330
42331
42332  windows_path="$new_path"
42333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42334    unix_path=`$CYGPATH -u "$windows_path"`
42335    new_path="$unix_path"
42336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42338    new_path="$unix_path"
42339  fi
42340
42341  if test "x$path" != "x$new_path"; then
42342    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42345  fi
42346
42347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42349
42350  else
42351    # We're on a posix platform. Hooray! :)
42352    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42353    has_space=`$ECHO "$path" | $GREP " "`
42354    if test "x$has_space" != x; then
42355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42357      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42358    fi
42359
42360    # Use eval to expand a potential ~
42361    eval path="$path"
42362    if test ! -f "$path" && test ! -d "$path"; then
42363      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42364    fi
42365
42366    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
42367  fi
42368
42369
42370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42371
42372  # Input might be given as Windows format, start by converting to
42373  # unix format.
42374  path="$POTENTIAL_FREETYPE_LIB_PATH"
42375  new_path=`$CYGPATH -u "$path"`
42376
42377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42380  # "foo.exe" is OK but "foo" is an error.
42381  #
42382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42383  # It is also a way to make sure we got the proper file name for the real test later on.
42384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42385  if test "x$test_shortpath" = x; then
42386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42388    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
42389  fi
42390
42391  # Call helper function which possibly converts this using DOS-style short mode.
42392  # If so, the updated path is stored in $new_path.
42393
42394  input_path="$new_path"
42395  # Check if we need to convert this using DOS-style short mode. If the path
42396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42397  # take no chances and rewrite it.
42398  # Note: m4 eats our [], so we need to use [ and ] instead.
42399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42400  if test "x$has_forbidden_chars" != x; then
42401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42405      # Going to short mode and back again did indeed matter. Since short mode is
42406      # case insensitive, let's make it lowercase to improve readability.
42407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42408      # Now convert it back to Unix-stile (cygpath)
42409      input_path=`$CYGPATH -u "$shortmode_path"`
42410      new_path="$input_path"
42411    fi
42412  fi
42413
42414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42415  if test "x$test_cygdrive_prefix" = x; then
42416    # As a simple fix, exclude /usr/bin since it's not a real path.
42417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42419      # a path prefixed by /cygdrive for fixpath to work.
42420      new_path="$CYGWIN_ROOT_PATH$input_path"
42421    fi
42422  fi
42423
42424
42425  if test "x$path" != "x$new_path"; then
42426    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
42427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
42428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
42429  fi
42430
42431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42432
42433  path="$POTENTIAL_FREETYPE_LIB_PATH"
42434  has_colon=`$ECHO $path | $GREP ^.:`
42435  new_path="$path"
42436  if test "x$has_colon" = x; then
42437    # Not in mixed or Windows style, start by that.
42438    new_path=`cmd //c echo $path`
42439  fi
42440
42441
42442  input_path="$new_path"
42443  # Check if we need to convert this using DOS-style short mode. If the path
42444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42445  # take no chances and rewrite it.
42446  # Note: m4 eats our [], so we need to use [ and ] instead.
42447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42448  if test "x$has_forbidden_chars" != x; then
42449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42451  fi
42452
42453
42454  windows_path="$new_path"
42455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42456    unix_path=`$CYGPATH -u "$windows_path"`
42457    new_path="$unix_path"
42458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42460    new_path="$unix_path"
42461  fi
42462
42463  if test "x$path" != "x$new_path"; then
42464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
42465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
42466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
42467  fi
42468
42469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42471
42472  else
42473    # We're on a posix platform. Hooray! :)
42474    path="$POTENTIAL_FREETYPE_LIB_PATH"
42475    has_space=`$ECHO "$path" | $GREP " "`
42476    if test "x$has_space" != x; then
42477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42480    fi
42481
42482    # Use eval to expand a potential ~
42483    eval path="$path"
42484    if test ! -f "$path" && test ! -d "$path"; then
42485      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42486    fi
42487
42488    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
42489  fi
42490
42491
42492    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
42494$as_echo_n "checking for freetype includes... " >&6; }
42495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
42496$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
42497    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
42498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
42499$as_echo_n "checking for freetype libraries... " >&6; }
42500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
42501$as_echo "$FREETYPE_LIB_PATH" >&6; }
42502  fi
42503
42504        if test "x$FOUND_FREETYPE" != xyes; then
42505          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
42506        fi
42507      else
42508        # User specified only one of lib or include. This is an error.
42509        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
42510          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
42511$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
42512          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
42513        else
42514          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
42515$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
42516          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
42517        fi
42518      fi
42519    else
42520      # User did not specify settings, but we need freetype. Try to locate it.
42521
42522      if test "x$BUNDLE_FREETYPE" = x; then
42523        # If not specified, default is to bundle freetype only on windows
42524        if test "x$OPENJDK_TARGET_OS" = xwindows; then
42525          BUNDLE_FREETYPE=yes
42526        else
42527          BUNDLE_FREETYPE=no
42528        fi
42529      fi
42530
42531      if test "x$FOUND_FREETYPE" != xyes; then
42532        # Check builddeps
42533
42534
42535  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42536    # Source the builddeps file again, to make sure it uses the latest variables!
42537    . $builddepsfile
42538    # Look for a target and build machine specific resource!
42539    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42540    if test "x$resource" = x; then
42541      # Ok, lets instead look for a target specific resource
42542      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
42543    fi
42544    if test "x$resource" = x; then
42545      # Ok, lets instead look for a build specific resource
42546      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
42547    fi
42548    if test "x$resource" = x; then
42549      # Ok, lets instead look for a generic resource
42550      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
42551      resource=${builddep_freetype2}
42552    fi
42553    if test "x$resource" != x; then
42554      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
42555$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
42556      # If the resource in the builddeps.conf file is an existing directory,
42557      # for example /java/linux/cups
42558      if test -d ${resource}; then
42559        depdir=${resource}
42560      else
42561
42562  # freetype2 is for example mymodule
42563  # $resource is for example libs/general/libmymod_1_2_3.zip
42564  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
42565  # $with_builddeps_dir is for example /localhome/builddeps
42566  # depdir is the name of the variable into which we store the depdir, eg MYMOD
42567  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
42568  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
42569  filename=`basename $resource`
42570  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
42571  filebase=${filename%%.*}
42572  extension=${filename#*.}
42573  installdir=$with_builddeps_dir/$filebase
42574  if test ! -f $installdir/$filename.unpacked; then
42575    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
42576$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
42577    if test ! -d $installdir; then
42578      mkdir -p $installdir
42579    fi
42580    if test ! -d $installdir; then
42581      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
42582    fi
42583    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
42584    touch $tmpfile
42585    if test ! -f $tmpfile; then
42586      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
42587    fi
42588
42589  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
42590  # $tmpfile is the local file name for the downloaded file.
42591  VALID_TOOL=no
42592  if test "x$BDEPS_FTP" = xwget; then
42593    VALID_TOOL=yes
42594    wget -O $tmpfile $with_builddeps_server/$resource
42595  fi
42596  if test "x$BDEPS_FTP" = xlftp; then
42597    VALID_TOOL=yes
42598    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
42599  fi
42600  if test "x$BDEPS_FTP" = xftp; then
42601    VALID_TOOL=yes
42602    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
42603    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
42604    FTPUSERPWD=${FTPSERVER%%@*}
42605    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
42606      FTPUSER=${userpwd%%:*}
42607      FTPPWD=${userpwd#*@}
42608      FTPSERVER=${FTPSERVER#*@}
42609    else
42610      FTPUSER=ftp
42611      FTPPWD=ftp
42612    fi
42613    # the "pass" command does not work on some
42614    # ftp clients (read ftp.exe) but if it works,
42615    # passive mode is better!
42616    ( \
42617        echo "user $FTPUSER $FTPPWD"        ; \
42618        echo "pass"                         ; \
42619        echo "bin"                          ; \
42620        echo "get $FTPPATH $tmpfile"              ; \
42621    ) | ftp -in $FTPSERVER
42622  fi
42623  if test "x$VALID_TOOL" != xyes; then
42624    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
42625  fi
42626
42627    mv $tmpfile $installdir/$filename
42628    if test ! -s $installdir/$filename; then
42629      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
42630    fi
42631    case "$extension" in
42632      zip)  echo "Unzipping $installdir/$filename..."
42633        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
42634        ;;
42635      tar.gz) echo "Untaring $installdir/$filename..."
42636        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42637        ;;
42638      tgz) echo "Untaring $installdir/$filename..."
42639        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42640        ;;
42641      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
42642        ;;
42643    esac
42644  fi
42645  if test -f $installdir/$filename.unpacked; then
42646    depdir=$installdir
42647  fi
42648
42649      fi
42650      # Source the builddeps file again, because in the previous command, the depdir
42651      # was updated to point at the current build dependency install directory.
42652      . $builddepsfile
42653      # Now extract variables from the builddeps.conf files.
42654      theroot=${builddep_freetype2_ROOT}
42655      thecflags=${builddep_freetype2_CFLAGS}
42656      thelibs=${builddep_freetype2_LIBS}
42657      if test "x$depdir" = x; then
42658        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
42659      fi
42660      FREETYPE=$depdir
42661      if test "x$theroot" != x; then
42662        FREETYPE="$theroot"
42663      fi
42664      if test "x$thecflags" != x; then
42665        FREETYPE_CFLAGS="$thecflags"
42666      fi
42667      if test "x$thelibs" != x; then
42668        FREETYPE_LIBS="$thelibs"
42669      fi
42670      FOUND_FREETYPE=yes
42671      else FOUND_FREETYPE=no
42672
42673    fi
42674    else FOUND_FREETYPE=no
42675
42676  fi
42677
42678        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42679        if test "x$FOUND_FREETYPE" = xyes; then
42680          if test "x$BUNDLE_FREETYPE" = xyes; then
42681            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
42682$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
42683            FOUND_FREETYPE=no
42684          else
42685            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42686$as_echo_n "checking for freetype... " >&6; }
42687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
42688$as_echo "yes (using builddeps)" >&6; }
42689          fi
42690        fi
42691      fi
42692
42693      if test "x$FOUND_FREETYPE" != xyes; then
42694        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
42695        if test "x$PKG_CONFIG" != x; then
42696
42697pkg_failed=no
42698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
42699$as_echo_n "checking for FREETYPE... " >&6; }
42700
42701if test -n "$FREETYPE_CFLAGS"; then
42702    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
42703 elif test -n "$PKG_CONFIG"; then
42704    if test -n "$PKG_CONFIG" && \
42705    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42706  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42707  ac_status=$?
42708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42709  test $ac_status = 0; }; then
42710  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
42711else
42712  pkg_failed=yes
42713fi
42714 else
42715    pkg_failed=untried
42716fi
42717if test -n "$FREETYPE_LIBS"; then
42718    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
42719 elif test -n "$PKG_CONFIG"; then
42720    if test -n "$PKG_CONFIG" && \
42721    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42722  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42723  ac_status=$?
42724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42725  test $ac_status = 0; }; then
42726  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
42727else
42728  pkg_failed=yes
42729fi
42730 else
42731    pkg_failed=untried
42732fi
42733
42734
42735
42736if test $pkg_failed = yes; then
42737
42738if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42739        _pkg_short_errors_supported=yes
42740else
42741        _pkg_short_errors_supported=no
42742fi
42743        if test $_pkg_short_errors_supported = yes; then
42744	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
42745        else
42746	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
42747        fi
42748	# Put the nasty error message in config.log where it belongs
42749	echo "$FREETYPE_PKG_ERRORS" >&5
42750
42751	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42752$as_echo "no" >&6; }
42753                FOUND_FREETYPE=no
42754elif test $pkg_failed = untried; then
42755	FOUND_FREETYPE=no
42756else
42757	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
42758	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
42759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42760$as_echo "yes" >&6; }
42761	FOUND_FREETYPE=yes
42762fi
42763          if test "x$FOUND_FREETYPE" = xyes; then
42764            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
42765            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
42766            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
42767            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42768              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
42769            fi
42770            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42771            if test "x$BUNDLE_FREETYPE" = xyes; then
42772              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
42773$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
42774              FOUND_FREETYPE=no
42775            else
42776              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42777$as_echo_n "checking for freetype... " >&6; }
42778              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
42779$as_echo "yes (using pkg-config)" >&6; }
42780            fi
42781          fi
42782        fi
42783      fi
42784
42785      if test "x$FOUND_FREETYPE" != xyes; then
42786        # Check in well-known locations
42787        if test "x$OPENJDK_TARGET_OS" = xwindows; then
42788          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
42789
42790  windows_path="$FREETYPE_BASE_DIR"
42791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42792    unix_path=`$CYGPATH -u "$windows_path"`
42793    FREETYPE_BASE_DIR="$unix_path"
42794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42796    FREETYPE_BASE_DIR="$unix_path"
42797  fi
42798
42799
42800  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
42801  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
42802  METHOD="well-known location"
42803
42804  # First check if the files exists.
42805  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
42806    # We found an arbitrary include file. That's a good sign.
42807    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
42808$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
42809    FOUND_FREETYPE=yes
42810
42811    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
42812    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
42813      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
42814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
42815      FOUND_FREETYPE=no
42816    else
42817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
42818        # On Windows, we will need both .lib and .dll file.
42819        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
42820          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
42821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
42822          FOUND_FREETYPE=no
42823        fi
42824      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
42825        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
42826        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
42827      fi
42828    fi
42829  fi
42830
42831  if test "x$FOUND_FREETYPE" = xyes; then
42832
42833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42834
42835  # Input might be given as Windows format, start by converting to
42836  # unix format.
42837  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42838  new_path=`$CYGPATH -u "$path"`
42839
42840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42843  # "foo.exe" is OK but "foo" is an error.
42844  #
42845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42846  # It is also a way to make sure we got the proper file name for the real test later on.
42847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42848  if test "x$test_shortpath" = x; then
42849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42851    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
42852  fi
42853
42854  # Call helper function which possibly converts this using DOS-style short mode.
42855  # If so, the updated path is stored in $new_path.
42856
42857  input_path="$new_path"
42858  # Check if we need to convert this using DOS-style short mode. If the path
42859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42860  # take no chances and rewrite it.
42861  # Note: m4 eats our [], so we need to use [ and ] instead.
42862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42863  if test "x$has_forbidden_chars" != x; then
42864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42868      # Going to short mode and back again did indeed matter. Since short mode is
42869      # case insensitive, let's make it lowercase to improve readability.
42870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42871      # Now convert it back to Unix-stile (cygpath)
42872      input_path=`$CYGPATH -u "$shortmode_path"`
42873      new_path="$input_path"
42874    fi
42875  fi
42876
42877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42878  if test "x$test_cygdrive_prefix" = x; then
42879    # As a simple fix, exclude /usr/bin since it's not a real path.
42880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42882      # a path prefixed by /cygdrive for fixpath to work.
42883      new_path="$CYGWIN_ROOT_PATH$input_path"
42884    fi
42885  fi
42886
42887
42888  if test "x$path" != "x$new_path"; then
42889    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42892  fi
42893
42894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42895
42896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42897  has_colon=`$ECHO $path | $GREP ^.:`
42898  new_path="$path"
42899  if test "x$has_colon" = x; then
42900    # Not in mixed or Windows style, start by that.
42901    new_path=`cmd //c echo $path`
42902  fi
42903
42904
42905  input_path="$new_path"
42906  # Check if we need to convert this using DOS-style short mode. If the path
42907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42908  # take no chances and rewrite it.
42909  # Note: m4 eats our [], so we need to use [ and ] instead.
42910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42911  if test "x$has_forbidden_chars" != x; then
42912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42914  fi
42915
42916
42917  windows_path="$new_path"
42918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42919    unix_path=`$CYGPATH -u "$windows_path"`
42920    new_path="$unix_path"
42921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42923    new_path="$unix_path"
42924  fi
42925
42926  if test "x$path" != "x$new_path"; then
42927    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42930  fi
42931
42932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42934
42935  else
42936    # We're on a posix platform. Hooray! :)
42937    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42938    has_space=`$ECHO "$path" | $GREP " "`
42939    if test "x$has_space" != x; then
42940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42942      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42943    fi
42944
42945    # Use eval to expand a potential ~
42946    eval path="$path"
42947    if test ! -f "$path" && test ! -d "$path"; then
42948      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42949    fi
42950
42951    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
42952  fi
42953
42954
42955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42956
42957  # Input might be given as Windows format, start by converting to
42958  # unix format.
42959  path="$POTENTIAL_FREETYPE_LIB_PATH"
42960  new_path=`$CYGPATH -u "$path"`
42961
42962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42965  # "foo.exe" is OK but "foo" is an error.
42966  #
42967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42968  # It is also a way to make sure we got the proper file name for the real test later on.
42969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42970  if test "x$test_shortpath" = x; then
42971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
42974  fi
42975
42976  # Call helper function which possibly converts this using DOS-style short mode.
42977  # If so, the updated path is stored in $new_path.
42978
42979  input_path="$new_path"
42980  # Check if we need to convert this using DOS-style short mode. If the path
42981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42982  # take no chances and rewrite it.
42983  # Note: m4 eats our [], so we need to use [ and ] instead.
42984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42985  if test "x$has_forbidden_chars" != x; then
42986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42990      # Going to short mode and back again did indeed matter. Since short mode is
42991      # case insensitive, let's make it lowercase to improve readability.
42992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42993      # Now convert it back to Unix-stile (cygpath)
42994      input_path=`$CYGPATH -u "$shortmode_path"`
42995      new_path="$input_path"
42996    fi
42997  fi
42998
42999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43000  if test "x$test_cygdrive_prefix" = x; then
43001    # As a simple fix, exclude /usr/bin since it's not a real path.
43002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43004      # a path prefixed by /cygdrive for fixpath to work.
43005      new_path="$CYGWIN_ROOT_PATH$input_path"
43006    fi
43007  fi
43008
43009
43010  if test "x$path" != "x$new_path"; then
43011    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43014  fi
43015
43016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43017
43018  path="$POTENTIAL_FREETYPE_LIB_PATH"
43019  has_colon=`$ECHO $path | $GREP ^.:`
43020  new_path="$path"
43021  if test "x$has_colon" = x; then
43022    # Not in mixed or Windows style, start by that.
43023    new_path=`cmd //c echo $path`
43024  fi
43025
43026
43027  input_path="$new_path"
43028  # Check if we need to convert this using DOS-style short mode. If the path
43029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43030  # take no chances and rewrite it.
43031  # Note: m4 eats our [], so we need to use [ and ] instead.
43032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43033  if test "x$has_forbidden_chars" != x; then
43034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43036  fi
43037
43038
43039  windows_path="$new_path"
43040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43041    unix_path=`$CYGPATH -u "$windows_path"`
43042    new_path="$unix_path"
43043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43045    new_path="$unix_path"
43046  fi
43047
43048  if test "x$path" != "x$new_path"; then
43049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43052  fi
43053
43054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43056
43057  else
43058    # We're on a posix platform. Hooray! :)
43059    path="$POTENTIAL_FREETYPE_LIB_PATH"
43060    has_space=`$ECHO "$path" | $GREP " "`
43061    if test "x$has_space" != x; then
43062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43065    fi
43066
43067    # Use eval to expand a potential ~
43068    eval path="$path"
43069    if test ! -f "$path" && test ! -d "$path"; then
43070      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43071    fi
43072
43073    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43074  fi
43075
43076
43077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43079$as_echo_n "checking for freetype includes... " >&6; }
43080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43084$as_echo_n "checking for freetype libraries... " >&6; }
43085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43086$as_echo "$FREETYPE_LIB_PATH" >&6; }
43087  fi
43088
43089          if test "x$FOUND_FREETYPE" != xyes; then
43090            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
43091
43092  windows_path="$FREETYPE_BASE_DIR"
43093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43094    unix_path=`$CYGPATH -u "$windows_path"`
43095    FREETYPE_BASE_DIR="$unix_path"
43096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43098    FREETYPE_BASE_DIR="$unix_path"
43099  fi
43100
43101
43102  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43103  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43104  METHOD="well-known location"
43105
43106  # First check if the files exists.
43107  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43108    # We found an arbitrary include file. That's a good sign.
43109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43110$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43111    FOUND_FREETYPE=yes
43112
43113    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43114    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43115      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43116$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43117      FOUND_FREETYPE=no
43118    else
43119      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43120        # On Windows, we will need both .lib and .dll file.
43121        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43122          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43123$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43124          FOUND_FREETYPE=no
43125        fi
43126      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
43127        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43128        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43129      fi
43130    fi
43131  fi
43132
43133  if test "x$FOUND_FREETYPE" = xyes; then
43134
43135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43136
43137  # Input might be given as Windows format, start by converting to
43138  # unix format.
43139  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43140  new_path=`$CYGPATH -u "$path"`
43141
43142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43145  # "foo.exe" is OK but "foo" is an error.
43146  #
43147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43148  # It is also a way to make sure we got the proper file name for the real test later on.
43149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43150  if test "x$test_shortpath" = x; then
43151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43154  fi
43155
43156  # Call helper function which possibly converts this using DOS-style short mode.
43157  # If so, the updated path is stored in $new_path.
43158
43159  input_path="$new_path"
43160  # Check if we need to convert this using DOS-style short mode. If the path
43161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43162  # take no chances and rewrite it.
43163  # Note: m4 eats our [], so we need to use [ and ] instead.
43164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43165  if test "x$has_forbidden_chars" != x; then
43166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43170      # Going to short mode and back again did indeed matter. Since short mode is
43171      # case insensitive, let's make it lowercase to improve readability.
43172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43173      # Now convert it back to Unix-stile (cygpath)
43174      input_path=`$CYGPATH -u "$shortmode_path"`
43175      new_path="$input_path"
43176    fi
43177  fi
43178
43179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43180  if test "x$test_cygdrive_prefix" = x; then
43181    # As a simple fix, exclude /usr/bin since it's not a real path.
43182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43184      # a path prefixed by /cygdrive for fixpath to work.
43185      new_path="$CYGWIN_ROOT_PATH$input_path"
43186    fi
43187  fi
43188
43189
43190  if test "x$path" != "x$new_path"; then
43191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43194  fi
43195
43196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43197
43198  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43199  has_colon=`$ECHO $path | $GREP ^.:`
43200  new_path="$path"
43201  if test "x$has_colon" = x; then
43202    # Not in mixed or Windows style, start by that.
43203    new_path=`cmd //c echo $path`
43204  fi
43205
43206
43207  input_path="$new_path"
43208  # Check if we need to convert this using DOS-style short mode. If the path
43209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43210  # take no chances and rewrite it.
43211  # Note: m4 eats our [], so we need to use [ and ] instead.
43212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43213  if test "x$has_forbidden_chars" != x; then
43214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43216  fi
43217
43218
43219  windows_path="$new_path"
43220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43221    unix_path=`$CYGPATH -u "$windows_path"`
43222    new_path="$unix_path"
43223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43225    new_path="$unix_path"
43226  fi
43227
43228  if test "x$path" != "x$new_path"; then
43229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43232  fi
43233
43234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43236
43237  else
43238    # We're on a posix platform. Hooray! :)
43239    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43240    has_space=`$ECHO "$path" | $GREP " "`
43241    if test "x$has_space" != x; then
43242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43245    fi
43246
43247    # Use eval to expand a potential ~
43248    eval path="$path"
43249    if test ! -f "$path" && test ! -d "$path"; then
43250      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43251    fi
43252
43253    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43254  fi
43255
43256
43257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43258
43259  # Input might be given as Windows format, start by converting to
43260  # unix format.
43261  path="$POTENTIAL_FREETYPE_LIB_PATH"
43262  new_path=`$CYGPATH -u "$path"`
43263
43264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43267  # "foo.exe" is OK but "foo" is an error.
43268  #
43269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43270  # It is also a way to make sure we got the proper file name for the real test later on.
43271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43272  if test "x$test_shortpath" = x; then
43273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43275    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43276  fi
43277
43278  # Call helper function which possibly converts this using DOS-style short mode.
43279  # If so, the updated path is stored in $new_path.
43280
43281  input_path="$new_path"
43282  # Check if we need to convert this using DOS-style short mode. If the path
43283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43284  # take no chances and rewrite it.
43285  # Note: m4 eats our [], so we need to use [ and ] instead.
43286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43287  if test "x$has_forbidden_chars" != x; then
43288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43292      # Going to short mode and back again did indeed matter. Since short mode is
43293      # case insensitive, let's make it lowercase to improve readability.
43294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43295      # Now convert it back to Unix-stile (cygpath)
43296      input_path=`$CYGPATH -u "$shortmode_path"`
43297      new_path="$input_path"
43298    fi
43299  fi
43300
43301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43302  if test "x$test_cygdrive_prefix" = x; then
43303    # As a simple fix, exclude /usr/bin since it's not a real path.
43304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43306      # a path prefixed by /cygdrive for fixpath to work.
43307      new_path="$CYGWIN_ROOT_PATH$input_path"
43308    fi
43309  fi
43310
43311
43312  if test "x$path" != "x$new_path"; then
43313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43316  fi
43317
43318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43319
43320  path="$POTENTIAL_FREETYPE_LIB_PATH"
43321  has_colon=`$ECHO $path | $GREP ^.:`
43322  new_path="$path"
43323  if test "x$has_colon" = x; then
43324    # Not in mixed or Windows style, start by that.
43325    new_path=`cmd //c echo $path`
43326  fi
43327
43328
43329  input_path="$new_path"
43330  # Check if we need to convert this using DOS-style short mode. If the path
43331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43332  # take no chances and rewrite it.
43333  # Note: m4 eats our [], so we need to use [ and ] instead.
43334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43335  if test "x$has_forbidden_chars" != x; then
43336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43338  fi
43339
43340
43341  windows_path="$new_path"
43342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43343    unix_path=`$CYGPATH -u "$windows_path"`
43344    new_path="$unix_path"
43345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43347    new_path="$unix_path"
43348  fi
43349
43350  if test "x$path" != "x$new_path"; then
43351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43354  fi
43355
43356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43358
43359  else
43360    # We're on a posix platform. Hooray! :)
43361    path="$POTENTIAL_FREETYPE_LIB_PATH"
43362    has_space=`$ECHO "$path" | $GREP " "`
43363    if test "x$has_space" != x; then
43364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43367    fi
43368
43369    # Use eval to expand a potential ~
43370    eval path="$path"
43371    if test ! -f "$path" && test ! -d "$path"; then
43372      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43373    fi
43374
43375    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43376  fi
43377
43378
43379    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43381$as_echo_n "checking for freetype includes... " >&6; }
43382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43383$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43384    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43386$as_echo_n "checking for freetype libraries... " >&6; }
43387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43388$as_echo "$FREETYPE_LIB_PATH" >&6; }
43389  fi
43390
43391          fi
43392        else
43393          if test "x$SYS_ROOT" = "x/"; then
43394            FREETYPE_ROOT=
43395          else
43396            FREETYPE_ROOT="$SYS_ROOT"
43397          fi
43398          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
43399
43400  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43401  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43402  METHOD="well-known location"
43403
43404  # First check if the files exists.
43405  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43406    # We found an arbitrary include file. That's a good sign.
43407    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43408$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43409    FOUND_FREETYPE=yes
43410
43411    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43412    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43413      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43414$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43415      FOUND_FREETYPE=no
43416    else
43417      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43418        # On Windows, we will need both .lib and .dll file.
43419        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43420          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43421$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43422          FOUND_FREETYPE=no
43423        fi
43424      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
43425        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43426        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43427      fi
43428    fi
43429  fi
43430
43431  if test "x$FOUND_FREETYPE" = xyes; then
43432
43433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43434
43435  # Input might be given as Windows format, start by converting to
43436  # unix format.
43437  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43438  new_path=`$CYGPATH -u "$path"`
43439
43440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43443  # "foo.exe" is OK but "foo" is an error.
43444  #
43445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43446  # It is also a way to make sure we got the proper file name for the real test later on.
43447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43448  if test "x$test_shortpath" = x; then
43449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43451    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43452  fi
43453
43454  # Call helper function which possibly converts this using DOS-style short mode.
43455  # If so, the updated path is stored in $new_path.
43456
43457  input_path="$new_path"
43458  # Check if we need to convert this using DOS-style short mode. If the path
43459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43460  # take no chances and rewrite it.
43461  # Note: m4 eats our [], so we need to use [ and ] instead.
43462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43463  if test "x$has_forbidden_chars" != x; then
43464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43468      # Going to short mode and back again did indeed matter. Since short mode is
43469      # case insensitive, let's make it lowercase to improve readability.
43470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43471      # Now convert it back to Unix-stile (cygpath)
43472      input_path=`$CYGPATH -u "$shortmode_path"`
43473      new_path="$input_path"
43474    fi
43475  fi
43476
43477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43478  if test "x$test_cygdrive_prefix" = x; then
43479    # As a simple fix, exclude /usr/bin since it's not a real path.
43480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43482      # a path prefixed by /cygdrive for fixpath to work.
43483      new_path="$CYGWIN_ROOT_PATH$input_path"
43484    fi
43485  fi
43486
43487
43488  if test "x$path" != "x$new_path"; then
43489    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43492  fi
43493
43494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43495
43496  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43497  has_colon=`$ECHO $path | $GREP ^.:`
43498  new_path="$path"
43499  if test "x$has_colon" = x; then
43500    # Not in mixed or Windows style, start by that.
43501    new_path=`cmd //c echo $path`
43502  fi
43503
43504
43505  input_path="$new_path"
43506  # Check if we need to convert this using DOS-style short mode. If the path
43507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43508  # take no chances and rewrite it.
43509  # Note: m4 eats our [], so we need to use [ and ] instead.
43510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43511  if test "x$has_forbidden_chars" != x; then
43512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43514  fi
43515
43516
43517  windows_path="$new_path"
43518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43519    unix_path=`$CYGPATH -u "$windows_path"`
43520    new_path="$unix_path"
43521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43523    new_path="$unix_path"
43524  fi
43525
43526  if test "x$path" != "x$new_path"; then
43527    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43530  fi
43531
43532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43534
43535  else
43536    # We're on a posix platform. Hooray! :)
43537    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43538    has_space=`$ECHO "$path" | $GREP " "`
43539    if test "x$has_space" != x; then
43540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43542      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43543    fi
43544
43545    # Use eval to expand a potential ~
43546    eval path="$path"
43547    if test ! -f "$path" && test ! -d "$path"; then
43548      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43549    fi
43550
43551    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43552  fi
43553
43554
43555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43556
43557  # Input might be given as Windows format, start by converting to
43558  # unix format.
43559  path="$POTENTIAL_FREETYPE_LIB_PATH"
43560  new_path=`$CYGPATH -u "$path"`
43561
43562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43565  # "foo.exe" is OK but "foo" is an error.
43566  #
43567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43568  # It is also a way to make sure we got the proper file name for the real test later on.
43569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43570  if test "x$test_shortpath" = x; then
43571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43573    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43574  fi
43575
43576  # Call helper function which possibly converts this using DOS-style short mode.
43577  # If so, the updated path is stored in $new_path.
43578
43579  input_path="$new_path"
43580  # Check if we need to convert this using DOS-style short mode. If the path
43581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43582  # take no chances and rewrite it.
43583  # Note: m4 eats our [], so we need to use [ and ] instead.
43584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43585  if test "x$has_forbidden_chars" != x; then
43586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43590      # Going to short mode and back again did indeed matter. Since short mode is
43591      # case insensitive, let's make it lowercase to improve readability.
43592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43593      # Now convert it back to Unix-stile (cygpath)
43594      input_path=`$CYGPATH -u "$shortmode_path"`
43595      new_path="$input_path"
43596    fi
43597  fi
43598
43599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43600  if test "x$test_cygdrive_prefix" = x; then
43601    # As a simple fix, exclude /usr/bin since it's not a real path.
43602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43604      # a path prefixed by /cygdrive for fixpath to work.
43605      new_path="$CYGWIN_ROOT_PATH$input_path"
43606    fi
43607  fi
43608
43609
43610  if test "x$path" != "x$new_path"; then
43611    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43614  fi
43615
43616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43617
43618  path="$POTENTIAL_FREETYPE_LIB_PATH"
43619  has_colon=`$ECHO $path | $GREP ^.:`
43620  new_path="$path"
43621  if test "x$has_colon" = x; then
43622    # Not in mixed or Windows style, start by that.
43623    new_path=`cmd //c echo $path`
43624  fi
43625
43626
43627  input_path="$new_path"
43628  # Check if we need to convert this using DOS-style short mode. If the path
43629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43630  # take no chances and rewrite it.
43631  # Note: m4 eats our [], so we need to use [ and ] instead.
43632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43633  if test "x$has_forbidden_chars" != x; then
43634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43636  fi
43637
43638
43639  windows_path="$new_path"
43640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641    unix_path=`$CYGPATH -u "$windows_path"`
43642    new_path="$unix_path"
43643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43645    new_path="$unix_path"
43646  fi
43647
43648  if test "x$path" != "x$new_path"; then
43649    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43651$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43652  fi
43653
43654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43656
43657  else
43658    # We're on a posix platform. Hooray! :)
43659    path="$POTENTIAL_FREETYPE_LIB_PATH"
43660    has_space=`$ECHO "$path" | $GREP " "`
43661    if test "x$has_space" != x; then
43662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43664      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43665    fi
43666
43667    # Use eval to expand a potential ~
43668    eval path="$path"
43669    if test ! -f "$path" && test ! -d "$path"; then
43670      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43671    fi
43672
43673    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43674  fi
43675
43676
43677    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43679$as_echo_n "checking for freetype includes... " >&6; }
43680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43681$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43682    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43684$as_echo_n "checking for freetype libraries... " >&6; }
43685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43686$as_echo "$FREETYPE_LIB_PATH" >&6; }
43687  fi
43688
43689
43690          if test "x$FOUND_FREETYPE" != xyes; then
43691            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
43692
43693  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43694  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43695  METHOD="well-known location"
43696
43697  # First check if the files exists.
43698  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43699    # We found an arbitrary include file. That's a good sign.
43700    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43701$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43702    FOUND_FREETYPE=yes
43703
43704    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43705    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43706      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43708      FOUND_FREETYPE=no
43709    else
43710      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43711        # On Windows, we will need both .lib and .dll file.
43712        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43715          FOUND_FREETYPE=no
43716        fi
43717      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43718        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43719        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43720      fi
43721    fi
43722  fi
43723
43724  if test "x$FOUND_FREETYPE" = xyes; then
43725
43726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43727
43728  # Input might be given as Windows format, start by converting to
43729  # unix format.
43730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43731  new_path=`$CYGPATH -u "$path"`
43732
43733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43736  # "foo.exe" is OK but "foo" is an error.
43737  #
43738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43739  # It is also a way to make sure we got the proper file name for the real test later on.
43740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43741  if test "x$test_shortpath" = x; then
43742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43745  fi
43746
43747  # Call helper function which possibly converts this using DOS-style short mode.
43748  # If so, the updated path is stored in $new_path.
43749
43750  input_path="$new_path"
43751  # Check if we need to convert this using DOS-style short mode. If the path
43752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43753  # take no chances and rewrite it.
43754  # Note: m4 eats our [], so we need to use [ and ] instead.
43755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43756  if test "x$has_forbidden_chars" != x; then
43757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43761      # Going to short mode and back again did indeed matter. Since short mode is
43762      # case insensitive, let's make it lowercase to improve readability.
43763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43764      # Now convert it back to Unix-stile (cygpath)
43765      input_path=`$CYGPATH -u "$shortmode_path"`
43766      new_path="$input_path"
43767    fi
43768  fi
43769
43770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43771  if test "x$test_cygdrive_prefix" = x; then
43772    # As a simple fix, exclude /usr/bin since it's not a real path.
43773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43775      # a path prefixed by /cygdrive for fixpath to work.
43776      new_path="$CYGWIN_ROOT_PATH$input_path"
43777    fi
43778  fi
43779
43780
43781  if test "x$path" != "x$new_path"; then
43782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43785  fi
43786
43787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43788
43789  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43790  has_colon=`$ECHO $path | $GREP ^.:`
43791  new_path="$path"
43792  if test "x$has_colon" = x; then
43793    # Not in mixed or Windows style, start by that.
43794    new_path=`cmd //c echo $path`
43795  fi
43796
43797
43798  input_path="$new_path"
43799  # Check if we need to convert this using DOS-style short mode. If the path
43800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43801  # take no chances and rewrite it.
43802  # Note: m4 eats our [], so we need to use [ and ] instead.
43803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43804  if test "x$has_forbidden_chars" != x; then
43805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43807  fi
43808
43809
43810  windows_path="$new_path"
43811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43812    unix_path=`$CYGPATH -u "$windows_path"`
43813    new_path="$unix_path"
43814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43816    new_path="$unix_path"
43817  fi
43818
43819  if test "x$path" != "x$new_path"; then
43820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43823  fi
43824
43825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43827
43828  else
43829    # We're on a posix platform. Hooray! :)
43830    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43831    has_space=`$ECHO "$path" | $GREP " "`
43832    if test "x$has_space" != x; then
43833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43836    fi
43837
43838    # Use eval to expand a potential ~
43839    eval path="$path"
43840    if test ! -f "$path" && test ! -d "$path"; then
43841      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43842    fi
43843
43844    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43845  fi
43846
43847
43848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43849
43850  # Input might be given as Windows format, start by converting to
43851  # unix format.
43852  path="$POTENTIAL_FREETYPE_LIB_PATH"
43853  new_path=`$CYGPATH -u "$path"`
43854
43855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43858  # "foo.exe" is OK but "foo" is an error.
43859  #
43860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43861  # It is also a way to make sure we got the proper file name for the real test later on.
43862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43863  if test "x$test_shortpath" = x; then
43864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43867  fi
43868
43869  # Call helper function which possibly converts this using DOS-style short mode.
43870  # If so, the updated path is stored in $new_path.
43871
43872  input_path="$new_path"
43873  # Check if we need to convert this using DOS-style short mode. If the path
43874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43875  # take no chances and rewrite it.
43876  # Note: m4 eats our [], so we need to use [ and ] instead.
43877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43878  if test "x$has_forbidden_chars" != x; then
43879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43883      # Going to short mode and back again did indeed matter. Since short mode is
43884      # case insensitive, let's make it lowercase to improve readability.
43885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43886      # Now convert it back to Unix-stile (cygpath)
43887      input_path=`$CYGPATH -u "$shortmode_path"`
43888      new_path="$input_path"
43889    fi
43890  fi
43891
43892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43893  if test "x$test_cygdrive_prefix" = x; then
43894    # As a simple fix, exclude /usr/bin since it's not a real path.
43895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43897      # a path prefixed by /cygdrive for fixpath to work.
43898      new_path="$CYGWIN_ROOT_PATH$input_path"
43899    fi
43900  fi
43901
43902
43903  if test "x$path" != "x$new_path"; then
43904    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43907  fi
43908
43909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43910
43911  path="$POTENTIAL_FREETYPE_LIB_PATH"
43912  has_colon=`$ECHO $path | $GREP ^.:`
43913  new_path="$path"
43914  if test "x$has_colon" = x; then
43915    # Not in mixed or Windows style, start by that.
43916    new_path=`cmd //c echo $path`
43917  fi
43918
43919
43920  input_path="$new_path"
43921  # Check if we need to convert this using DOS-style short mode. If the path
43922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43923  # take no chances and rewrite it.
43924  # Note: m4 eats our [], so we need to use [ and ] instead.
43925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43926  if test "x$has_forbidden_chars" != x; then
43927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43929  fi
43930
43931
43932  windows_path="$new_path"
43933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43934    unix_path=`$CYGPATH -u "$windows_path"`
43935    new_path="$unix_path"
43936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43938    new_path="$unix_path"
43939  fi
43940
43941  if test "x$path" != "x$new_path"; then
43942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43945  fi
43946
43947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43949
43950  else
43951    # We're on a posix platform. Hooray! :)
43952    path="$POTENTIAL_FREETYPE_LIB_PATH"
43953    has_space=`$ECHO "$path" | $GREP " "`
43954    if test "x$has_space" != x; then
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43958    fi
43959
43960    # Use eval to expand a potential ~
43961    eval path="$path"
43962    if test ! -f "$path" && test ! -d "$path"; then
43963      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43964    fi
43965
43966    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43967  fi
43968
43969
43970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43972$as_echo_n "checking for freetype includes... " >&6; }
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43977$as_echo_n "checking for freetype libraries... " >&6; }
43978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43979$as_echo "$FREETYPE_LIB_PATH" >&6; }
43980  fi
43981
43982          fi
43983
43984          if test "x$FOUND_FREETYPE" != xyes; then
43985            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
43986            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43987
43988  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43989  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
43990  METHOD="well-known location"
43991
43992  # First check if the files exists.
43993  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43994    # We found an arbitrary include file. That's a good sign.
43995    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43996$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43997    FOUND_FREETYPE=yes
43998
43999    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44000    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44001      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44002$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44003      FOUND_FREETYPE=no
44004    else
44005      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44006        # On Windows, we will need both .lib and .dll file.
44007        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44008          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44009$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44010          FOUND_FREETYPE=no
44011        fi
44012      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
44013        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44014        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44015      fi
44016    fi
44017  fi
44018
44019  if test "x$FOUND_FREETYPE" = xyes; then
44020
44021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44022
44023  # Input might be given as Windows format, start by converting to
44024  # unix format.
44025  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44026  new_path=`$CYGPATH -u "$path"`
44027
44028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44031  # "foo.exe" is OK but "foo" is an error.
44032  #
44033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44034  # It is also a way to make sure we got the proper file name for the real test later on.
44035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44036  if test "x$test_shortpath" = x; then
44037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44039    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44040  fi
44041
44042  # Call helper function which possibly converts this using DOS-style short mode.
44043  # If so, the updated path is stored in $new_path.
44044
44045  input_path="$new_path"
44046  # Check if we need to convert this using DOS-style short mode. If the path
44047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44048  # take no chances and rewrite it.
44049  # Note: m4 eats our [], so we need to use [ and ] instead.
44050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44051  if test "x$has_forbidden_chars" != x; then
44052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44056      # Going to short mode and back again did indeed matter. Since short mode is
44057      # case insensitive, let's make it lowercase to improve readability.
44058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44059      # Now convert it back to Unix-stile (cygpath)
44060      input_path=`$CYGPATH -u "$shortmode_path"`
44061      new_path="$input_path"
44062    fi
44063  fi
44064
44065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44066  if test "x$test_cygdrive_prefix" = x; then
44067    # As a simple fix, exclude /usr/bin since it's not a real path.
44068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44070      # a path prefixed by /cygdrive for fixpath to work.
44071      new_path="$CYGWIN_ROOT_PATH$input_path"
44072    fi
44073  fi
44074
44075
44076  if test "x$path" != "x$new_path"; then
44077    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44080  fi
44081
44082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44083
44084  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44085  has_colon=`$ECHO $path | $GREP ^.:`
44086  new_path="$path"
44087  if test "x$has_colon" = x; then
44088    # Not in mixed or Windows style, start by that.
44089    new_path=`cmd //c echo $path`
44090  fi
44091
44092
44093  input_path="$new_path"
44094  # Check if we need to convert this using DOS-style short mode. If the path
44095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44096  # take no chances and rewrite it.
44097  # Note: m4 eats our [], so we need to use [ and ] instead.
44098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44099  if test "x$has_forbidden_chars" != x; then
44100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44102  fi
44103
44104
44105  windows_path="$new_path"
44106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44107    unix_path=`$CYGPATH -u "$windows_path"`
44108    new_path="$unix_path"
44109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44111    new_path="$unix_path"
44112  fi
44113
44114  if test "x$path" != "x$new_path"; then
44115    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44117$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44118  fi
44119
44120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44122
44123  else
44124    # We're on a posix platform. Hooray! :)
44125    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44126    has_space=`$ECHO "$path" | $GREP " "`
44127    if test "x$has_space" != x; then
44128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44129$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44130      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44131    fi
44132
44133    # Use eval to expand a potential ~
44134    eval path="$path"
44135    if test ! -f "$path" && test ! -d "$path"; then
44136      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44137    fi
44138
44139    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44140  fi
44141
44142
44143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44144
44145  # Input might be given as Windows format, start by converting to
44146  # unix format.
44147  path="$POTENTIAL_FREETYPE_LIB_PATH"
44148  new_path=`$CYGPATH -u "$path"`
44149
44150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44153  # "foo.exe" is OK but "foo" is an error.
44154  #
44155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44156  # It is also a way to make sure we got the proper file name for the real test later on.
44157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44158  if test "x$test_shortpath" = x; then
44159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44162  fi
44163
44164  # Call helper function which possibly converts this using DOS-style short mode.
44165  # If so, the updated path is stored in $new_path.
44166
44167  input_path="$new_path"
44168  # Check if we need to convert this using DOS-style short mode. If the path
44169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44170  # take no chances and rewrite it.
44171  # Note: m4 eats our [], so we need to use [ and ] instead.
44172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44173  if test "x$has_forbidden_chars" != x; then
44174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44178      # Going to short mode and back again did indeed matter. Since short mode is
44179      # case insensitive, let's make it lowercase to improve readability.
44180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44181      # Now convert it back to Unix-stile (cygpath)
44182      input_path=`$CYGPATH -u "$shortmode_path"`
44183      new_path="$input_path"
44184    fi
44185  fi
44186
44187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44188  if test "x$test_cygdrive_prefix" = x; then
44189    # As a simple fix, exclude /usr/bin since it's not a real path.
44190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44192      # a path prefixed by /cygdrive for fixpath to work.
44193      new_path="$CYGWIN_ROOT_PATH$input_path"
44194    fi
44195  fi
44196
44197
44198  if test "x$path" != "x$new_path"; then
44199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44202  fi
44203
44204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44205
44206  path="$POTENTIAL_FREETYPE_LIB_PATH"
44207  has_colon=`$ECHO $path | $GREP ^.:`
44208  new_path="$path"
44209  if test "x$has_colon" = x; then
44210    # Not in mixed or Windows style, start by that.
44211    new_path=`cmd //c echo $path`
44212  fi
44213
44214
44215  input_path="$new_path"
44216  # Check if we need to convert this using DOS-style short mode. If the path
44217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44218  # take no chances and rewrite it.
44219  # Note: m4 eats our [], so we need to use [ and ] instead.
44220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44221  if test "x$has_forbidden_chars" != x; then
44222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44224  fi
44225
44226
44227  windows_path="$new_path"
44228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44229    unix_path=`$CYGPATH -u "$windows_path"`
44230    new_path="$unix_path"
44231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44233    new_path="$unix_path"
44234  fi
44235
44236  if test "x$path" != "x$new_path"; then
44237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44240  fi
44241
44242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44244
44245  else
44246    # We're on a posix platform. Hooray! :)
44247    path="$POTENTIAL_FREETYPE_LIB_PATH"
44248    has_space=`$ECHO "$path" | $GREP " "`
44249    if test "x$has_space" != x; then
44250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44252      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44253    fi
44254
44255    # Use eval to expand a potential ~
44256    eval path="$path"
44257    if test ! -f "$path" && test ! -d "$path"; then
44258      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44259    fi
44260
44261    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44262  fi
44263
44264
44265    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44267$as_echo_n "checking for freetype includes... " >&6; }
44268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44269$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44270    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44272$as_echo_n "checking for freetype libraries... " >&6; }
44273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44274$as_echo "$FREETYPE_LIB_PATH" >&6; }
44275  fi
44276
44277            else
44278
44279  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44280  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
44281  METHOD="well-known location"
44282
44283  # First check if the files exists.
44284  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44285    # We found an arbitrary include file. That's a good sign.
44286    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44287$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44288    FOUND_FREETYPE=yes
44289
44290    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44291    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44292      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44294      FOUND_FREETYPE=no
44295    else
44296      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44297        # On Windows, we will need both .lib and .dll file.
44298        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44299          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44300$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44301          FOUND_FREETYPE=no
44302        fi
44303      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
44304        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44305        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44306      fi
44307    fi
44308  fi
44309
44310  if test "x$FOUND_FREETYPE" = xyes; then
44311
44312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313
44314  # Input might be given as Windows format, start by converting to
44315  # unix format.
44316  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44317  new_path=`$CYGPATH -u "$path"`
44318
44319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44322  # "foo.exe" is OK but "foo" is an error.
44323  #
44324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44325  # It is also a way to make sure we got the proper file name for the real test later on.
44326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44327  if test "x$test_shortpath" = x; then
44328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44331  fi
44332
44333  # Call helper function which possibly converts this using DOS-style short mode.
44334  # If so, the updated path is stored in $new_path.
44335
44336  input_path="$new_path"
44337  # Check if we need to convert this using DOS-style short mode. If the path
44338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44339  # take no chances and rewrite it.
44340  # Note: m4 eats our [], so we need to use [ and ] instead.
44341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44342  if test "x$has_forbidden_chars" != x; then
44343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44347      # Going to short mode and back again did indeed matter. Since short mode is
44348      # case insensitive, let's make it lowercase to improve readability.
44349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44350      # Now convert it back to Unix-stile (cygpath)
44351      input_path=`$CYGPATH -u "$shortmode_path"`
44352      new_path="$input_path"
44353    fi
44354  fi
44355
44356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44357  if test "x$test_cygdrive_prefix" = x; then
44358    # As a simple fix, exclude /usr/bin since it's not a real path.
44359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44361      # a path prefixed by /cygdrive for fixpath to work.
44362      new_path="$CYGWIN_ROOT_PATH$input_path"
44363    fi
44364  fi
44365
44366
44367  if test "x$path" != "x$new_path"; then
44368    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44371  fi
44372
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374
44375  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44376  has_colon=`$ECHO $path | $GREP ^.:`
44377  new_path="$path"
44378  if test "x$has_colon" = x; then
44379    # Not in mixed or Windows style, start by that.
44380    new_path=`cmd //c echo $path`
44381  fi
44382
44383
44384  input_path="$new_path"
44385  # Check if we need to convert this using DOS-style short mode. If the path
44386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387  # take no chances and rewrite it.
44388  # Note: m4 eats our [], so we need to use [ and ] instead.
44389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44390  if test "x$has_forbidden_chars" != x; then
44391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44393  fi
44394
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405  if test "x$path" != "x$new_path"; then
44406    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44409  fi
44410
44411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44413
44414  else
44415    # We're on a posix platform. Hooray! :)
44416    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44417    has_space=`$ECHO "$path" | $GREP " "`
44418    if test "x$has_space" != x; then
44419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44422    fi
44423
44424    # Use eval to expand a potential ~
44425    eval path="$path"
44426    if test ! -f "$path" && test ! -d "$path"; then
44427      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44428    fi
44429
44430    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44431  fi
44432
44433
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435
44436  # Input might be given as Windows format, start by converting to
44437  # unix format.
44438  path="$POTENTIAL_FREETYPE_LIB_PATH"
44439  new_path=`$CYGPATH -u "$path"`
44440
44441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44444  # "foo.exe" is OK but "foo" is an error.
44445  #
44446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44447  # It is also a way to make sure we got the proper file name for the real test later on.
44448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44449  if test "x$test_shortpath" = x; then
44450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44453  fi
44454
44455  # Call helper function which possibly converts this using DOS-style short mode.
44456  # If so, the updated path is stored in $new_path.
44457
44458  input_path="$new_path"
44459  # Check if we need to convert this using DOS-style short mode. If the path
44460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44461  # take no chances and rewrite it.
44462  # Note: m4 eats our [], so we need to use [ and ] instead.
44463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44464  if test "x$has_forbidden_chars" != x; then
44465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44469      # Going to short mode and back again did indeed matter. Since short mode is
44470      # case insensitive, let's make it lowercase to improve readability.
44471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44472      # Now convert it back to Unix-stile (cygpath)
44473      input_path=`$CYGPATH -u "$shortmode_path"`
44474      new_path="$input_path"
44475    fi
44476  fi
44477
44478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44479  if test "x$test_cygdrive_prefix" = x; then
44480    # As a simple fix, exclude /usr/bin since it's not a real path.
44481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44483      # a path prefixed by /cygdrive for fixpath to work.
44484      new_path="$CYGWIN_ROOT_PATH$input_path"
44485    fi
44486  fi
44487
44488
44489  if test "x$path" != "x$new_path"; then
44490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44493  fi
44494
44495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44496
44497  path="$POTENTIAL_FREETYPE_LIB_PATH"
44498  has_colon=`$ECHO $path | $GREP ^.:`
44499  new_path="$path"
44500  if test "x$has_colon" = x; then
44501    # Not in mixed or Windows style, start by that.
44502    new_path=`cmd //c echo $path`
44503  fi
44504
44505
44506  input_path="$new_path"
44507  # Check if we need to convert this using DOS-style short mode. If the path
44508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44509  # take no chances and rewrite it.
44510  # Note: m4 eats our [], so we need to use [ and ] instead.
44511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44512  if test "x$has_forbidden_chars" != x; then
44513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44515  fi
44516
44517
44518  windows_path="$new_path"
44519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44520    unix_path=`$CYGPATH -u "$windows_path"`
44521    new_path="$unix_path"
44522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44524    new_path="$unix_path"
44525  fi
44526
44527  if test "x$path" != "x$new_path"; then
44528    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44531  fi
44532
44533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44535
44536  else
44537    # We're on a posix platform. Hooray! :)
44538    path="$POTENTIAL_FREETYPE_LIB_PATH"
44539    has_space=`$ECHO "$path" | $GREP " "`
44540    if test "x$has_space" != x; then
44541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44544    fi
44545
44546    # Use eval to expand a potential ~
44547    eval path="$path"
44548    if test ! -f "$path" && test ! -d "$path"; then
44549      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44550    fi
44551
44552    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44553  fi
44554
44555
44556    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44558$as_echo_n "checking for freetype includes... " >&6; }
44559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44560$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44561    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44563$as_echo_n "checking for freetype libraries... " >&6; }
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44565$as_echo "$FREETYPE_LIB_PATH" >&6; }
44566  fi
44567
44568              if test "x$FOUND_FREETYPE" != xyes; then
44569
44570  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44571  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
44572  METHOD="well-known location"
44573
44574  # First check if the files exists.
44575  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44576    # We found an arbitrary include file. That's a good sign.
44577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44578$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44579    FOUND_FREETYPE=yes
44580
44581    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44582    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44583      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44584$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44585      FOUND_FREETYPE=no
44586    else
44587      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44588        # On Windows, we will need both .lib and .dll file.
44589        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44590          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44591$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44592          FOUND_FREETYPE=no
44593        fi
44594      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
44595        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44596        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44597      fi
44598    fi
44599  fi
44600
44601  if test "x$FOUND_FREETYPE" = xyes; then
44602
44603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44604
44605  # Input might be given as Windows format, start by converting to
44606  # unix format.
44607  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44608  new_path=`$CYGPATH -u "$path"`
44609
44610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44613  # "foo.exe" is OK but "foo" is an error.
44614  #
44615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44616  # It is also a way to make sure we got the proper file name for the real test later on.
44617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44618  if test "x$test_shortpath" = x; then
44619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44620$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44621    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44622  fi
44623
44624  # Call helper function which possibly converts this using DOS-style short mode.
44625  # If so, the updated path is stored in $new_path.
44626
44627  input_path="$new_path"
44628  # Check if we need to convert this using DOS-style short mode. If the path
44629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44630  # take no chances and rewrite it.
44631  # Note: m4 eats our [], so we need to use [ and ] instead.
44632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44633  if test "x$has_forbidden_chars" != x; then
44634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44638      # Going to short mode and back again did indeed matter. Since short mode is
44639      # case insensitive, let's make it lowercase to improve readability.
44640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44641      # Now convert it back to Unix-stile (cygpath)
44642      input_path=`$CYGPATH -u "$shortmode_path"`
44643      new_path="$input_path"
44644    fi
44645  fi
44646
44647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44648  if test "x$test_cygdrive_prefix" = x; then
44649    # As a simple fix, exclude /usr/bin since it's not a real path.
44650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44652      # a path prefixed by /cygdrive for fixpath to work.
44653      new_path="$CYGWIN_ROOT_PATH$input_path"
44654    fi
44655  fi
44656
44657
44658  if test "x$path" != "x$new_path"; then
44659    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44661$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44662  fi
44663
44664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44665
44666  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44667  has_colon=`$ECHO $path | $GREP ^.:`
44668  new_path="$path"
44669  if test "x$has_colon" = x; then
44670    # Not in mixed or Windows style, start by that.
44671    new_path=`cmd //c echo $path`
44672  fi
44673
44674
44675  input_path="$new_path"
44676  # Check if we need to convert this using DOS-style short mode. If the path
44677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44678  # take no chances and rewrite it.
44679  # Note: m4 eats our [], so we need to use [ and ] instead.
44680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44681  if test "x$has_forbidden_chars" != x; then
44682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44684  fi
44685
44686
44687  windows_path="$new_path"
44688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44689    unix_path=`$CYGPATH -u "$windows_path"`
44690    new_path="$unix_path"
44691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44693    new_path="$unix_path"
44694  fi
44695
44696  if test "x$path" != "x$new_path"; then
44697    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44700  fi
44701
44702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44704
44705  else
44706    # We're on a posix platform. Hooray! :)
44707    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44708    has_space=`$ECHO "$path" | $GREP " "`
44709    if test "x$has_space" != x; then
44710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44711$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44713    fi
44714
44715    # Use eval to expand a potential ~
44716    eval path="$path"
44717    if test ! -f "$path" && test ! -d "$path"; then
44718      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44719    fi
44720
44721    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44722  fi
44723
44724
44725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44726
44727  # Input might be given as Windows format, start by converting to
44728  # unix format.
44729  path="$POTENTIAL_FREETYPE_LIB_PATH"
44730  new_path=`$CYGPATH -u "$path"`
44731
44732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44735  # "foo.exe" is OK but "foo" is an error.
44736  #
44737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44738  # It is also a way to make sure we got the proper file name for the real test later on.
44739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44740  if test "x$test_shortpath" = x; then
44741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44742$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44743    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44744  fi
44745
44746  # Call helper function which possibly converts this using DOS-style short mode.
44747  # If so, the updated path is stored in $new_path.
44748
44749  input_path="$new_path"
44750  # Check if we need to convert this using DOS-style short mode. If the path
44751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44752  # take no chances and rewrite it.
44753  # Note: m4 eats our [], so we need to use [ and ] instead.
44754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44755  if test "x$has_forbidden_chars" != x; then
44756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44760      # Going to short mode and back again did indeed matter. Since short mode is
44761      # case insensitive, let's make it lowercase to improve readability.
44762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44763      # Now convert it back to Unix-stile (cygpath)
44764      input_path=`$CYGPATH -u "$shortmode_path"`
44765      new_path="$input_path"
44766    fi
44767  fi
44768
44769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44770  if test "x$test_cygdrive_prefix" = x; then
44771    # As a simple fix, exclude /usr/bin since it's not a real path.
44772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44774      # a path prefixed by /cygdrive for fixpath to work.
44775      new_path="$CYGWIN_ROOT_PATH$input_path"
44776    fi
44777  fi
44778
44779
44780  if test "x$path" != "x$new_path"; then
44781    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44784  fi
44785
44786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44787
44788  path="$POTENTIAL_FREETYPE_LIB_PATH"
44789  has_colon=`$ECHO $path | $GREP ^.:`
44790  new_path="$path"
44791  if test "x$has_colon" = x; then
44792    # Not in mixed or Windows style, start by that.
44793    new_path=`cmd //c echo $path`
44794  fi
44795
44796
44797  input_path="$new_path"
44798  # Check if we need to convert this using DOS-style short mode. If the path
44799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44800  # take no chances and rewrite it.
44801  # Note: m4 eats our [], so we need to use [ and ] instead.
44802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44803  if test "x$has_forbidden_chars" != x; then
44804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44806  fi
44807
44808
44809  windows_path="$new_path"
44810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44811    unix_path=`$CYGPATH -u "$windows_path"`
44812    new_path="$unix_path"
44813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44815    new_path="$unix_path"
44816  fi
44817
44818  if test "x$path" != "x$new_path"; then
44819    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44822  fi
44823
44824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44826
44827  else
44828    # We're on a posix platform. Hooray! :)
44829    path="$POTENTIAL_FREETYPE_LIB_PATH"
44830    has_space=`$ECHO "$path" | $GREP " "`
44831    if test "x$has_space" != x; then
44832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44834      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44835    fi
44836
44837    # Use eval to expand a potential ~
44838    eval path="$path"
44839    if test ! -f "$path" && test ! -d "$path"; then
44840      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44841    fi
44842
44843    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44844  fi
44845
44846
44847    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44849$as_echo_n "checking for freetype includes... " >&6; }
44850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44851$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44852    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44854$as_echo_n "checking for freetype libraries... " >&6; }
44855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44856$as_echo "$FREETYPE_LIB_PATH" >&6; }
44857  fi
44858
44859              fi
44860            fi
44861          fi
44862        fi
44863      fi # end check in well-known locations
44864
44865      if test "x$FOUND_FREETYPE" != xyes; then
44866
44867  # Print a helpful message on how to acquire the necessary build dependency.
44868  # freetype is the help tag: freetype, cups, pulse, alsa etc
44869  MISSING_DEPENDENCY=freetype
44870
44871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872    cygwin_help $MISSING_DEPENDENCY
44873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44874    msys_help $MISSING_DEPENDENCY
44875  else
44876    PKGHANDLER_COMMAND=
44877
44878    case $PKGHANDLER in
44879      apt-get)
44880        apt_help     $MISSING_DEPENDENCY ;;
44881      yum)
44882        yum_help     $MISSING_DEPENDENCY ;;
44883      port)
44884        port_help    $MISSING_DEPENDENCY ;;
44885      pkgutil)
44886        pkgutil_help $MISSING_DEPENDENCY ;;
44887      pkgadd)
44888        pkgadd_help  $MISSING_DEPENDENCY ;;
44889    esac
44890
44891    if test "x$PKGHANDLER_COMMAND" != x; then
44892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44893    fi
44894  fi
44895
44896        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
44897      fi
44898    fi # end user specified settings
44899
44900    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
44901    if test "x$FREETYPE_CFLAGS" = x; then
44902
44903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44904
44905  # Input might be given as Windows format, start by converting to
44906  # unix format.
44907  path="$FREETYPE_INCLUDE_PATH"
44908  new_path=`$CYGPATH -u "$path"`
44909
44910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44913  # "foo.exe" is OK but "foo" is an error.
44914  #
44915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44916  # It is also a way to make sure we got the proper file name for the real test later on.
44917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44918  if test "x$test_shortpath" = x; then
44919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44920$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44921    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
44922  fi
44923
44924  # Call helper function which possibly converts this using DOS-style short mode.
44925  # If so, the updated path is stored in $new_path.
44926
44927  input_path="$new_path"
44928  # Check if we need to convert this using DOS-style short mode. If the path
44929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44930  # take no chances and rewrite it.
44931  # Note: m4 eats our [], so we need to use [ and ] instead.
44932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44933  if test "x$has_forbidden_chars" != x; then
44934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44938      # Going to short mode and back again did indeed matter. Since short mode is
44939      # case insensitive, let's make it lowercase to improve readability.
44940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44941      # Now convert it back to Unix-stile (cygpath)
44942      input_path=`$CYGPATH -u "$shortmode_path"`
44943      new_path="$input_path"
44944    fi
44945  fi
44946
44947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44948  if test "x$test_cygdrive_prefix" = x; then
44949    # As a simple fix, exclude /usr/bin since it's not a real path.
44950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44952      # a path prefixed by /cygdrive for fixpath to work.
44953      new_path="$CYGWIN_ROOT_PATH$input_path"
44954    fi
44955  fi
44956
44957
44958  if test "x$path" != "x$new_path"; then
44959    FREETYPE_INCLUDE_PATH="$new_path"
44960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44961$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44962  fi
44963
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965
44966  path="$FREETYPE_INCLUDE_PATH"
44967  has_colon=`$ECHO $path | $GREP ^.:`
44968  new_path="$path"
44969  if test "x$has_colon" = x; then
44970    # Not in mixed or Windows style, start by that.
44971    new_path=`cmd //c echo $path`
44972  fi
44973
44974
44975  input_path="$new_path"
44976  # Check if we need to convert this using DOS-style short mode. If the path
44977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44978  # take no chances and rewrite it.
44979  # Note: m4 eats our [], so we need to use [ and ] instead.
44980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44981  if test "x$has_forbidden_chars" != x; then
44982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44984  fi
44985
44986
44987  windows_path="$new_path"
44988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44989    unix_path=`$CYGPATH -u "$windows_path"`
44990    new_path="$unix_path"
44991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44993    new_path="$unix_path"
44994  fi
44995
44996  if test "x$path" != "x$new_path"; then
44997    FREETYPE_INCLUDE_PATH="$new_path"
44998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44999$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45000  fi
45001
45002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45004
45005  else
45006    # We're on a posix platform. Hooray! :)
45007    path="$FREETYPE_INCLUDE_PATH"
45008    has_space=`$ECHO "$path" | $GREP " "`
45009    if test "x$has_space" != x; then
45010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45011$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45013    fi
45014
45015    # Use eval to expand a potential ~
45016    eval path="$path"
45017    if test ! -f "$path" && test ! -d "$path"; then
45018      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45019    fi
45020
45021    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45022  fi
45023
45024      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
45025        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
45026      else
45027        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
45028      fi
45029    fi
45030
45031    if test "x$FREETYPE_LIBS" = x; then
45032
45033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45034
45035  # Input might be given as Windows format, start by converting to
45036  # unix format.
45037  path="$FREETYPE_LIB_PATH"
45038  new_path=`$CYGPATH -u "$path"`
45039
45040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45043  # "foo.exe" is OK but "foo" is an error.
45044  #
45045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45046  # It is also a way to make sure we got the proper file name for the real test later on.
45047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45048  if test "x$test_shortpath" = x; then
45049    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45050$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45051    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
45052  fi
45053
45054  # Call helper function which possibly converts this using DOS-style short mode.
45055  # If so, the updated path is stored in $new_path.
45056
45057  input_path="$new_path"
45058  # Check if we need to convert this using DOS-style short mode. If the path
45059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45060  # take no chances and rewrite it.
45061  # Note: m4 eats our [], so we need to use [ and ] instead.
45062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45063  if test "x$has_forbidden_chars" != x; then
45064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45068      # Going to short mode and back again did indeed matter. Since short mode is
45069      # case insensitive, let's make it lowercase to improve readability.
45070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45071      # Now convert it back to Unix-stile (cygpath)
45072      input_path=`$CYGPATH -u "$shortmode_path"`
45073      new_path="$input_path"
45074    fi
45075  fi
45076
45077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45078  if test "x$test_cygdrive_prefix" = x; then
45079    # As a simple fix, exclude /usr/bin since it's not a real path.
45080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45082      # a path prefixed by /cygdrive for fixpath to work.
45083      new_path="$CYGWIN_ROOT_PATH$input_path"
45084    fi
45085  fi
45086
45087
45088  if test "x$path" != "x$new_path"; then
45089    FREETYPE_LIB_PATH="$new_path"
45090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
45091$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45092  fi
45093
45094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45095
45096  path="$FREETYPE_LIB_PATH"
45097  has_colon=`$ECHO $path | $GREP ^.:`
45098  new_path="$path"
45099  if test "x$has_colon" = x; then
45100    # Not in mixed or Windows style, start by that.
45101    new_path=`cmd //c echo $path`
45102  fi
45103
45104
45105  input_path="$new_path"
45106  # Check if we need to convert this using DOS-style short mode. If the path
45107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45108  # take no chances and rewrite it.
45109  # Note: m4 eats our [], so we need to use [ and ] instead.
45110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45111  if test "x$has_forbidden_chars" != x; then
45112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45114  fi
45115
45116
45117  windows_path="$new_path"
45118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45119    unix_path=`$CYGPATH -u "$windows_path"`
45120    new_path="$unix_path"
45121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45123    new_path="$unix_path"
45124  fi
45125
45126  if test "x$path" != "x$new_path"; then
45127    FREETYPE_LIB_PATH="$new_path"
45128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
45129$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45130  fi
45131
45132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45134
45135  else
45136    # We're on a posix platform. Hooray! :)
45137    path="$FREETYPE_LIB_PATH"
45138    has_space=`$ECHO "$path" | $GREP " "`
45139    if test "x$has_space" != x; then
45140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45141$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45142      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45143    fi
45144
45145    # Use eval to expand a potential ~
45146    eval path="$path"
45147    if test ! -f "$path" && test ! -d "$path"; then
45148      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45149    fi
45150
45151    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45152  fi
45153
45154      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45155        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
45156      else
45157        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
45158      fi
45159    fi
45160
45161    # Try to compile it
45162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
45163$as_echo_n "checking if we can compile and link with freetype... " >&6; }
45164    ac_ext=cpp
45165ac_cpp='$CXXCPP $CPPFLAGS'
45166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45169
45170    PREV_CXXCFLAGS="$CXXFLAGS"
45171    PREV_LIBS="$LIBS"
45172    PREV_CXX="$CXX"
45173    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
45174    LIBS="$LIBS $FREETYPE_LIBS"
45175    CXX="$FIXPATH $CXX"
45176    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45177/* end confdefs.h.  */
45178
45179          #include<ft2build.h>
45180          #include FT_FREETYPE_H
45181          int main () {
45182            FT_Init_FreeType(NULL);
45183            return 0;
45184          }
45185
45186_ACEOF
45187if ac_fn_cxx_try_link "$LINENO"; then :
45188
45189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45190$as_echo "yes" >&6; }
45191
45192else
45193
45194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45195$as_echo "no" >&6; }
45196          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
45197$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
45199$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
45200
45201
45202  # Print a helpful message on how to acquire the necessary build dependency.
45203  # freetype is the help tag: freetype, cups, pulse, alsa etc
45204  MISSING_DEPENDENCY=freetype
45205
45206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45207    cygwin_help $MISSING_DEPENDENCY
45208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45209    msys_help $MISSING_DEPENDENCY
45210  else
45211    PKGHANDLER_COMMAND=
45212
45213    case $PKGHANDLER in
45214      apt-get)
45215        apt_help     $MISSING_DEPENDENCY ;;
45216      yum)
45217        yum_help     $MISSING_DEPENDENCY ;;
45218      port)
45219        port_help    $MISSING_DEPENDENCY ;;
45220      pkgutil)
45221        pkgutil_help $MISSING_DEPENDENCY ;;
45222      pkgadd)
45223        pkgadd_help  $MISSING_DEPENDENCY ;;
45224    esac
45225
45226    if test "x$PKGHANDLER_COMMAND" != x; then
45227      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45228    fi
45229  fi
45230
45231
45232          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
45233
45234
45235fi
45236rm -f core conftest.err conftest.$ac_objext \
45237    conftest$ac_exeext conftest.$ac_ext
45238    CXXCFLAGS="$PREV_CXXFLAGS"
45239    LIBS="$PREV_LIBS"
45240    CXX="$PREV_CXX"
45241    ac_ext=cpp
45242ac_cpp='$CXXCPP $CPPFLAGS'
45243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45246
45247
45248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
45249$as_echo_n "checking if we should bundle freetype... " >&6; }
45250    if test "x$BUNDLE_FREETYPE" = xyes; then
45251      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
45252    fi
45253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
45254$as_echo "$BUNDLE_FREETYPE" >&6; }
45255
45256  fi # end freetype needed
45257
45258
45259
45260
45261
45262
45263
45264  ###############################################################################
45265  #
45266  # Check for alsa headers and libraries. Used on Linux/GNU systems.
45267  #
45268
45269# Check whether --with-alsa was given.
45270if test "${with_alsa+set}" = set; then :
45271  withval=$with_alsa;
45272fi
45273
45274
45275# Check whether --with-alsa-include was given.
45276if test "${with_alsa_include+set}" = set; then :
45277  withval=$with_alsa_include;
45278fi
45279
45280
45281# Check whether --with-alsa-lib was given.
45282if test "${with_alsa_lib+set}" = set; then :
45283  withval=$with_alsa_lib;
45284fi
45285
45286
45287  if test "x$ALSA_NOT_NEEDED" = xyes; then
45288    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
45289      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
45290$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
45291    fi
45292    ALSA_CFLAGS=
45293    ALSA_LIBS=
45294  else
45295    ALSA_FOUND=no
45296
45297    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
45298      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
45299    fi
45300
45301    if test "x${with_alsa}" != x; then
45302      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
45303      ALSA_CFLAGS="-I${with_alsa}/include"
45304      ALSA_FOUND=yes
45305    fi
45306    if test "x${with_alsa_include}" != x; then
45307      ALSA_CFLAGS="-I${with_alsa_include}"
45308      ALSA_FOUND=yes
45309    fi
45310    if test "x${with_alsa_lib}" != x; then
45311      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
45312      ALSA_FOUND=yes
45313    fi
45314    if test "x$ALSA_FOUND" = xno; then
45315
45316
45317  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45318    # Source the builddeps file again, to make sure it uses the latest variables!
45319    . $builddepsfile
45320    # Look for a target and build machine specific resource!
45321    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45322    if test "x$resource" = x; then
45323      # Ok, lets instead look for a target specific resource
45324      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
45325    fi
45326    if test "x$resource" = x; then
45327      # Ok, lets instead look for a build specific resource
45328      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
45329    fi
45330    if test "x$resource" = x; then
45331      # Ok, lets instead look for a generic resource
45332      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
45333      resource=${builddep_alsa}
45334    fi
45335    if test "x$resource" != x; then
45336      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
45337$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
45338      # If the resource in the builddeps.conf file is an existing directory,
45339      # for example /java/linux/cups
45340      if test -d ${resource}; then
45341        depdir=${resource}
45342      else
45343
45344  # alsa is for example mymodule
45345  # $resource is for example libs/general/libmymod_1_2_3.zip
45346  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45347  # $with_builddeps_dir is for example /localhome/builddeps
45348  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45349  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45350  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45351  filename=`basename $resource`
45352  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45353  filebase=${filename%%.*}
45354  extension=${filename#*.}
45355  installdir=$with_builddeps_dir/$filebase
45356  if test ! -f $installdir/$filename.unpacked; then
45357    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
45358$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45359    if test ! -d $installdir; then
45360      mkdir -p $installdir
45361    fi
45362    if test ! -d $installdir; then
45363      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45364    fi
45365    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
45366    touch $tmpfile
45367    if test ! -f $tmpfile; then
45368      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45369    fi
45370
45371  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45372  # $tmpfile is the local file name for the downloaded file.
45373  VALID_TOOL=no
45374  if test "x$BDEPS_FTP" = xwget; then
45375    VALID_TOOL=yes
45376    wget -O $tmpfile $with_builddeps_server/$resource
45377  fi
45378  if test "x$BDEPS_FTP" = xlftp; then
45379    VALID_TOOL=yes
45380    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45381  fi
45382  if test "x$BDEPS_FTP" = xftp; then
45383    VALID_TOOL=yes
45384    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45385    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45386    FTPUSERPWD=${FTPSERVER%%@*}
45387    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45388      FTPUSER=${userpwd%%:*}
45389      FTPPWD=${userpwd#*@}
45390      FTPSERVER=${FTPSERVER#*@}
45391    else
45392      FTPUSER=ftp
45393      FTPPWD=ftp
45394    fi
45395    # the "pass" command does not work on some
45396    # ftp clients (read ftp.exe) but if it works,
45397    # passive mode is better!
45398    ( \
45399        echo "user $FTPUSER $FTPPWD"        ; \
45400        echo "pass"                         ; \
45401        echo "bin"                          ; \
45402        echo "get $FTPPATH $tmpfile"              ; \
45403    ) | ftp -in $FTPSERVER
45404  fi
45405  if test "x$VALID_TOOL" != xyes; then
45406    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45407  fi
45408
45409    mv $tmpfile $installdir/$filename
45410    if test ! -s $installdir/$filename; then
45411      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45412    fi
45413    case "$extension" in
45414      zip)  echo "Unzipping $installdir/$filename..."
45415        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45416        ;;
45417      tar.gz) echo "Untaring $installdir/$filename..."
45418        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45419        ;;
45420      tgz) echo "Untaring $installdir/$filename..."
45421        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45422        ;;
45423      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45424        ;;
45425    esac
45426  fi
45427  if test -f $installdir/$filename.unpacked; then
45428    depdir=$installdir
45429  fi
45430
45431      fi
45432      # Source the builddeps file again, because in the previous command, the depdir
45433      # was updated to point at the current build dependency install directory.
45434      . $builddepsfile
45435      # Now extract variables from the builddeps.conf files.
45436      theroot=${builddep_alsa_ROOT}
45437      thecflags=${builddep_alsa_CFLAGS}
45438      thelibs=${builddep_alsa_LIBS}
45439      if test "x$depdir" = x; then
45440        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
45441      fi
45442      ALSA=$depdir
45443      if test "x$theroot" != x; then
45444        ALSA="$theroot"
45445      fi
45446      if test "x$thecflags" != x; then
45447        ALSA_CFLAGS="$thecflags"
45448      fi
45449      if test "x$thelibs" != x; then
45450        ALSA_LIBS="$thelibs"
45451      fi
45452      ALSA_FOUND=yes
45453      else ALSA_FOUND=no
45454
45455    fi
45456    else ALSA_FOUND=no
45457
45458  fi
45459
45460    fi
45461    if test "x$ALSA_FOUND" = xno; then
45462
45463pkg_failed=no
45464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
45465$as_echo_n "checking for ALSA... " >&6; }
45466
45467if test -n "$ALSA_CFLAGS"; then
45468    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
45469 elif test -n "$PKG_CONFIG"; then
45470    if test -n "$PKG_CONFIG" && \
45471    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45472  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45473  ac_status=$?
45474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45475  test $ac_status = 0; }; then
45476  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
45477else
45478  pkg_failed=yes
45479fi
45480 else
45481    pkg_failed=untried
45482fi
45483if test -n "$ALSA_LIBS"; then
45484    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
45485 elif test -n "$PKG_CONFIG"; then
45486    if test -n "$PKG_CONFIG" && \
45487    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45488  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45489  ac_status=$?
45490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45491  test $ac_status = 0; }; then
45492  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
45493else
45494  pkg_failed=yes
45495fi
45496 else
45497    pkg_failed=untried
45498fi
45499
45500
45501
45502if test $pkg_failed = yes; then
45503
45504if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45505        _pkg_short_errors_supported=yes
45506else
45507        _pkg_short_errors_supported=no
45508fi
45509        if test $_pkg_short_errors_supported = yes; then
45510	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
45511        else
45512	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
45513        fi
45514	# Put the nasty error message in config.log where it belongs
45515	echo "$ALSA_PKG_ERRORS" >&5
45516
45517	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45518$as_echo "no" >&6; }
45519                ALSA_FOUND=no
45520elif test $pkg_failed = untried; then
45521	ALSA_FOUND=no
45522else
45523	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
45524	ALSA_LIBS=$pkg_cv_ALSA_LIBS
45525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45526$as_echo "yes" >&6; }
45527	ALSA_FOUND=yes
45528fi
45529    fi
45530    if test "x$ALSA_FOUND" = xno; then
45531      for ac_header in alsa/asoundlib.h
45532do :
45533  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
45534if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
45535  cat >>confdefs.h <<_ACEOF
45536#define HAVE_ALSA_ASOUNDLIB_H 1
45537_ACEOF
45538
45539            ALSA_FOUND=yes
45540            ALSA_CFLAGS=-Iignoreme
45541            ALSA_LIBS=-lasound
45542            DEFAULT_ALSA=yes
45543
45544else
45545  ALSA_FOUND=no
45546fi
45547
45548done
45549
45550    fi
45551    if test "x$ALSA_FOUND" = xno; then
45552
45553  # Print a helpful message on how to acquire the necessary build dependency.
45554  # alsa is the help tag: freetype, cups, pulse, alsa etc
45555  MISSING_DEPENDENCY=alsa
45556
45557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45558    cygwin_help $MISSING_DEPENDENCY
45559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45560    msys_help $MISSING_DEPENDENCY
45561  else
45562    PKGHANDLER_COMMAND=
45563
45564    case $PKGHANDLER in
45565      apt-get)
45566        apt_help     $MISSING_DEPENDENCY ;;
45567      yum)
45568        yum_help     $MISSING_DEPENDENCY ;;
45569      port)
45570        port_help    $MISSING_DEPENDENCY ;;
45571      pkgutil)
45572        pkgutil_help $MISSING_DEPENDENCY ;;
45573      pkgadd)
45574        pkgadd_help  $MISSING_DEPENDENCY ;;
45575    esac
45576
45577    if test "x$PKGHANDLER_COMMAND" != x; then
45578      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45579    fi
45580  fi
45581
45582      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
45583    fi
45584  fi
45585
45586
45587
45588
45589
45590
45591  ###############################################################################
45592  #
45593  # Check for the jpeg library
45594  #
45595
45596  USE_EXTERNAL_LIBJPEG=true
45597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
45598$as_echo_n "checking for main in -ljpeg... " >&6; }
45599if ${ac_cv_lib_jpeg_main+:} false; then :
45600  $as_echo_n "(cached) " >&6
45601else
45602  ac_check_lib_save_LIBS=$LIBS
45603LIBS="-ljpeg  $LIBS"
45604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45605/* end confdefs.h.  */
45606
45607
45608int
45609main ()
45610{
45611return main ();
45612  ;
45613  return 0;
45614}
45615_ACEOF
45616if ac_fn_cxx_try_link "$LINENO"; then :
45617  ac_cv_lib_jpeg_main=yes
45618else
45619  ac_cv_lib_jpeg_main=no
45620fi
45621rm -f core conftest.err conftest.$ac_objext \
45622    conftest$ac_exeext conftest.$ac_ext
45623LIBS=$ac_check_lib_save_LIBS
45624fi
45625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
45626$as_echo "$ac_cv_lib_jpeg_main" >&6; }
45627if test "x$ac_cv_lib_jpeg_main" = xyes; then :
45628  cat >>confdefs.h <<_ACEOF
45629#define HAVE_LIBJPEG 1
45630_ACEOF
45631
45632  LIBS="-ljpeg $LIBS"
45633
45634else
45635   USE_EXTERNAL_LIBJPEG=false
45636      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
45637$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
45638
45639fi
45640
45641
45642
45643  ###############################################################################
45644  #
45645  # Check for the gif library
45646  #
45647
45648
45649# Check whether --with-giflib was given.
45650if test "${with_giflib+set}" = set; then :
45651  withval=$with_giflib;
45652fi
45653
45654
45655
45656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
45657$as_echo_n "checking for which giflib to use... " >&6; }
45658
45659  # default is bundled
45660  DEFAULT_GIFLIB=bundled
45661
45662  #
45663  # if user didn't specify, use DEFAULT_GIFLIB
45664  #
45665  if test "x${with_giflib}" = "x"; then
45666    with_giflib=${DEFAULT_GIFLIB}
45667  fi
45668
45669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
45670$as_echo "${with_giflib}" >&6; }
45671
45672  if test "x${with_giflib}" = "xbundled"; then
45673    USE_EXTERNAL_LIBGIF=false
45674  elif test "x${with_giflib}" = "xsystem"; then
45675    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
45676if test "x$ac_cv_header_gif_lib_h" = xyes; then :
45677
45678else
45679   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
45680fi
45681
45682
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
45684$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
45685if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
45686  $as_echo_n "(cached) " >&6
45687else
45688  ac_check_lib_save_LIBS=$LIBS
45689LIBS="-lgif  $LIBS"
45690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45691/* end confdefs.h.  */
45692
45693/* Override any GCC internal prototype to avoid an error.
45694   Use char because int might match the return type of a GCC
45695   builtin and then its argument prototype would still apply.  */
45696#ifdef __cplusplus
45697extern "C"
45698#endif
45699char DGifGetCode ();
45700int
45701main ()
45702{
45703return DGifGetCode ();
45704  ;
45705  return 0;
45706}
45707_ACEOF
45708if ac_fn_cxx_try_link "$LINENO"; then :
45709  ac_cv_lib_gif_DGifGetCode=yes
45710else
45711  ac_cv_lib_gif_DGifGetCode=no
45712fi
45713rm -f core conftest.err conftest.$ac_objext \
45714    conftest$ac_exeext conftest.$ac_ext
45715LIBS=$ac_check_lib_save_LIBS
45716fi
45717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
45718$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
45719if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
45720  cat >>confdefs.h <<_ACEOF
45721#define HAVE_LIBGIF 1
45722_ACEOF
45723
45724  LIBS="-lgif $LIBS"
45725
45726else
45727   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
45728fi
45729
45730
45731    USE_EXTERNAL_LIBGIF=true
45732  else
45733    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
45734  fi
45735
45736
45737  ###############################################################################
45738  #
45739  # Check for the zlib library
45740  #
45741
45742
45743# Check whether --with-zlib was given.
45744if test "${with_zlib+set}" = set; then :
45745  withval=$with_zlib;
45746fi
45747
45748
45749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
45750$as_echo_n "checking for compress in -lz... " >&6; }
45751if ${ac_cv_lib_z_compress+:} false; then :
45752  $as_echo_n "(cached) " >&6
45753else
45754  ac_check_lib_save_LIBS=$LIBS
45755LIBS="-lz  $LIBS"
45756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45757/* end confdefs.h.  */
45758
45759/* Override any GCC internal prototype to avoid an error.
45760   Use char because int might match the return type of a GCC
45761   builtin and then its argument prototype would still apply.  */
45762#ifdef __cplusplus
45763extern "C"
45764#endif
45765char compress ();
45766int
45767main ()
45768{
45769return compress ();
45770  ;
45771  return 0;
45772}
45773_ACEOF
45774if ac_fn_cxx_try_link "$LINENO"; then :
45775  ac_cv_lib_z_compress=yes
45776else
45777  ac_cv_lib_z_compress=no
45778fi
45779rm -f core conftest.err conftest.$ac_objext \
45780    conftest$ac_exeext conftest.$ac_ext
45781LIBS=$ac_check_lib_save_LIBS
45782fi
45783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
45784$as_echo "$ac_cv_lib_z_compress" >&6; }
45785if test "x$ac_cv_lib_z_compress" = xyes; then :
45786   ZLIB_FOUND=yes
45787else
45788   ZLIB_FOUND=no
45789fi
45790
45791
45792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
45793$as_echo_n "checking for which zlib to use... " >&6; }
45794
45795  DEFAULT_ZLIB=bundled
45796  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45797    #
45798    # On macosx default is system...on others default is
45799    #
45800    DEFAULT_ZLIB=system
45801  fi
45802
45803  if test "x${ZLIB_FOUND}" != "xyes"; then
45804    #
45805    # If we don't find any system...set default to bundled
45806    #
45807    DEFAULT_ZLIB=bundled
45808  fi
45809
45810  #
45811  # If user didn't specify, use DEFAULT_ZLIB
45812  #
45813  if test "x${with_zlib}" = "x"; then
45814    with_zlib=${DEFAULT_ZLIB}
45815  fi
45816
45817  if test "x${with_zlib}" = "xbundled"; then
45818    USE_EXTERNAL_LIBZ=false
45819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
45820$as_echo "bundled" >&6; }
45821  elif test "x${with_zlib}" = "xsystem"; then
45822    if test "x${ZLIB_FOUND}" = "xyes"; then
45823      USE_EXTERNAL_LIBZ=true
45824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
45825$as_echo "system" >&6; }
45826    else
45827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
45828$as_echo "system not found" >&6; }
45829      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
45830    fi
45831  else
45832    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
45833  fi
45834
45835
45836
45837  ###############################################################################
45838  LIBZIP_CAN_USE_MMAP=true
45839
45840
45841
45842  ###############################################################################
45843  #
45844  # Check if altzone exists in time.h
45845  #
45846
45847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45848/* end confdefs.h.  */
45849#include <time.h>
45850int
45851main ()
45852{
45853return (int)altzone;
45854  ;
45855  return 0;
45856}
45857_ACEOF
45858if ac_fn_cxx_try_link "$LINENO"; then :
45859  has_altzone=yes
45860else
45861  has_altzone=no
45862fi
45863rm -f core conftest.err conftest.$ac_objext \
45864    conftest$ac_exeext conftest.$ac_ext
45865  if test "x$has_altzone" = xyes; then
45866
45867$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
45868
45869  fi
45870
45871  ###############################################################################
45872  #
45873  # Check the maths library
45874  #
45875
45876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
45877$as_echo_n "checking for cos in -lm... " >&6; }
45878if ${ac_cv_lib_m_cos+:} false; then :
45879  $as_echo_n "(cached) " >&6
45880else
45881  ac_check_lib_save_LIBS=$LIBS
45882LIBS="-lm  $LIBS"
45883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45884/* end confdefs.h.  */
45885
45886/* Override any GCC internal prototype to avoid an error.
45887   Use char because int might match the return type of a GCC
45888   builtin and then its argument prototype would still apply.  */
45889#ifdef __cplusplus
45890extern "C"
45891#endif
45892char cos ();
45893int
45894main ()
45895{
45896return cos ();
45897  ;
45898  return 0;
45899}
45900_ACEOF
45901if ac_fn_cxx_try_link "$LINENO"; then :
45902  ac_cv_lib_m_cos=yes
45903else
45904  ac_cv_lib_m_cos=no
45905fi
45906rm -f core conftest.err conftest.$ac_objext \
45907    conftest$ac_exeext conftest.$ac_ext
45908LIBS=$ac_check_lib_save_LIBS
45909fi
45910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
45911$as_echo "$ac_cv_lib_m_cos" >&6; }
45912if test "x$ac_cv_lib_m_cos" = xyes; then :
45913  cat >>confdefs.h <<_ACEOF
45914#define HAVE_LIBM 1
45915_ACEOF
45916
45917  LIBS="-lm $LIBS"
45918
45919else
45920
45921        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
45922$as_echo "$as_me: Maths library was not found" >&6;}
45923
45924
45925fi
45926
45927
45928
45929  ###############################################################################
45930  #
45931  # Check for libdl.so
45932
45933  save_LIBS="$LIBS"
45934  LIBS=""
45935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
45936$as_echo_n "checking for dlopen in -ldl... " >&6; }
45937if ${ac_cv_lib_dl_dlopen+:} false; then :
45938  $as_echo_n "(cached) " >&6
45939else
45940  ac_check_lib_save_LIBS=$LIBS
45941LIBS="-ldl  $LIBS"
45942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45943/* end confdefs.h.  */
45944
45945/* Override any GCC internal prototype to avoid an error.
45946   Use char because int might match the return type of a GCC
45947   builtin and then its argument prototype would still apply.  */
45948#ifdef __cplusplus
45949extern "C"
45950#endif
45951char dlopen ();
45952int
45953main ()
45954{
45955return dlopen ();
45956  ;
45957  return 0;
45958}
45959_ACEOF
45960if ac_fn_cxx_try_link "$LINENO"; then :
45961  ac_cv_lib_dl_dlopen=yes
45962else
45963  ac_cv_lib_dl_dlopen=no
45964fi
45965rm -f core conftest.err conftest.$ac_objext \
45966    conftest$ac_exeext conftest.$ac_ext
45967LIBS=$ac_check_lib_save_LIBS
45968fi
45969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
45970$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
45971if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
45972  cat >>confdefs.h <<_ACEOF
45973#define HAVE_LIBDL 1
45974_ACEOF
45975
45976  LIBS="-ldl $LIBS"
45977
45978fi
45979
45980  LIBDL="$LIBS"
45981
45982  LIBS="$save_LIBS"
45983
45984
45985  ###############################################################################
45986  #
45987  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45988  # dynamic build is configured on command line.
45989  #
45990
45991# Check whether --with-stdc++lib was given.
45992if test "${with_stdc__lib+set}" = set; then :
45993  withval=$with_stdc__lib;
45994        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45995                && test "x$with_stdc__lib" != xdefault; then
45996          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45997        fi
45998
45999else
46000  with_stdc__lib=default
46001
46002fi
46003
46004
46005  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46006    # Test if -lstdc++ works.
46007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
46008$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
46009    ac_ext=cpp
46010ac_cpp='$CXXCPP $CPPFLAGS'
46011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46014
46015    OLD_CXXFLAGS="$CXXFLAGS"
46016    CXXFLAGS="$CXXFLAGS -lstdc++"
46017    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46018/* end confdefs.h.  */
46019
46020int
46021main ()
46022{
46023return 0;
46024  ;
46025  return 0;
46026}
46027_ACEOF
46028if ac_fn_cxx_try_link "$LINENO"; then :
46029  has_dynamic_libstdcxx=yes
46030else
46031  has_dynamic_libstdcxx=no
46032fi
46033rm -f core conftest.err conftest.$ac_objext \
46034    conftest$ac_exeext conftest.$ac_ext
46035    CXXFLAGS="$OLD_CXXFLAGS"
46036    ac_ext=cpp
46037ac_cpp='$CXXCPP $CPPFLAGS'
46038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46041
46042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
46043$as_echo "$has_dynamic_libstdcxx" >&6; }
46044
46045    # Test if stdc++ can be linked statically.
46046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
46047$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
46048    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
46049    ac_ext=cpp
46050ac_cpp='$CXXCPP $CPPFLAGS'
46051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46054
46055    OLD_LIBS="$LIBS"
46056    OLD_CXX="$CXX"
46057    LIBS="$STATIC_STDCXX_FLAGS"
46058    CXX="$CC"
46059    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46060/* end confdefs.h.  */
46061
46062int
46063main ()
46064{
46065return 0;
46066  ;
46067  return 0;
46068}
46069_ACEOF
46070if ac_fn_cxx_try_link "$LINENO"; then :
46071  has_static_libstdcxx=yes
46072else
46073  has_static_libstdcxx=no
46074fi
46075rm -f core conftest.err conftest.$ac_objext \
46076    conftest$ac_exeext conftest.$ac_ext
46077    LIBS="$OLD_LIBS"
46078    CXX="$OLD_CXX"
46079    ac_ext=cpp
46080ac_cpp='$CXXCPP $CPPFLAGS'
46081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46084
46085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
46086$as_echo "$has_static_libstdcxx" >&6; }
46087
46088    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
46089      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
46090    fi
46091
46092    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
46093      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
46094    fi
46095
46096    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
46097      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
46098    fi
46099
46100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
46101$as_echo_n "checking how to link with libstdc++... " >&6; }
46102    # If dynamic was requested, it's available since it would fail above otherwise.
46103    # If dynamic wasn't requested, go with static unless it isn't available.
46104    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46105      LIBCXX="$LIBCXX -lstdc++"
46106      LDCXX="$CXX"
46107      STATIC_CXX_SETTING="STATIC_CXX=false"
46108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
46109$as_echo "dynamic" >&6; }
46110    else
46111      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
46112      LDCXX="$CC"
46113      STATIC_CXX_SETTING="STATIC_CXX=true"
46114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
46115$as_echo "static" >&6; }
46116    fi
46117  fi
46118
46119
46120  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46121    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
46122
46123pkg_failed=no
46124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
46125$as_echo_n "checking for LIBFFI... " >&6; }
46126
46127if test -n "$LIBFFI_CFLAGS"; then
46128    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
46129 elif test -n "$PKG_CONFIG"; then
46130    if test -n "$PKG_CONFIG" && \
46131    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
46132  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
46133  ac_status=$?
46134  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46135  test $ac_status = 0; }; then
46136  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
46137else
46138  pkg_failed=yes
46139fi
46140 else
46141    pkg_failed=untried
46142fi
46143if test -n "$LIBFFI_LIBS"; then
46144    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
46145 elif test -n "$PKG_CONFIG"; then
46146    if test -n "$PKG_CONFIG" && \
46147    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
46148  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
46149  ac_status=$?
46150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46151  test $ac_status = 0; }; then
46152  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
46153else
46154  pkg_failed=yes
46155fi
46156 else
46157    pkg_failed=untried
46158fi
46159
46160
46161
46162if test $pkg_failed = yes; then
46163
46164if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46165        _pkg_short_errors_supported=yes
46166else
46167        _pkg_short_errors_supported=no
46168fi
46169        if test $_pkg_short_errors_supported = yes; then
46170	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
46171        else
46172	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
46173        fi
46174	# Put the nasty error message in config.log where it belongs
46175	echo "$LIBFFI_PKG_ERRORS" >&5
46176
46177	as_fn_error $? "Package requirements (libffi) were not met:
46178
46179$LIBFFI_PKG_ERRORS
46180
46181Consider adjusting the PKG_CONFIG_PATH environment variable if you
46182installed software in a non-standard prefix.
46183
46184Alternatively, you may set the environment variables LIBFFI_CFLAGS
46185and LIBFFI_LIBS to avoid the need to call pkg-config.
46186See the pkg-config man page for more details.
46187" "$LINENO" 5
46188elif test $pkg_failed = untried; then
46189	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46191as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
46192is in your PATH or set the PKG_CONFIG environment variable to the full
46193path to pkg-config.
46194
46195Alternatively, you may set the environment variables LIBFFI_CFLAGS
46196and LIBFFI_LIBS to avoid the need to call pkg-config.
46197See the pkg-config man page for more details.
46198
46199To get pkg-config, see <http://pkg-config.freedesktop.org/>.
46200See \`config.log' for more details" "$LINENO" 5; }
46201else
46202	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
46203	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46205$as_echo "yes" >&6; }
46206	:
46207fi
46208
46209  fi
46210
46211  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46212    # Extract the first word of "llvm-config", so it can be a program name with args.
46213set dummy llvm-config; ac_word=$2
46214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46215$as_echo_n "checking for $ac_word... " >&6; }
46216if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
46217  $as_echo_n "(cached) " >&6
46218else
46219  if test -n "$LLVM_CONFIG"; then
46220  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
46221else
46222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46223for as_dir in $PATH
46224do
46225  IFS=$as_save_IFS
46226  test -z "$as_dir" && as_dir=.
46227    for ac_exec_ext in '' $ac_executable_extensions; do
46228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46229    ac_cv_prog_LLVM_CONFIG="llvm-config"
46230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46231    break 2
46232  fi
46233done
46234  done
46235IFS=$as_save_IFS
46236
46237fi
46238fi
46239LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
46240if test -n "$LLVM_CONFIG"; then
46241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
46242$as_echo "$LLVM_CONFIG" >&6; }
46243else
46244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46245$as_echo "no" >&6; }
46246fi
46247
46248
46249
46250    if test "x$LLVM_CONFIG" != xllvm-config; then
46251      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
46252    fi
46253
46254    llvm_components="jit mcjit engine nativecodegen native"
46255    unset LLVM_CFLAGS
46256    for flag in $("$LLVM_CONFIG" --cxxflags); do
46257      if echo "${flag}" | grep -q '^-[ID]'; then
46258        if test "${flag}" != "-D_DEBUG" ; then
46259          if test "${LLVM_CFLAGS}" != "" ; then
46260            LLVM_CFLAGS="${LLVM_CFLAGS} "
46261          fi
46262          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
46263        fi
46264      fi
46265    done
46266    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
46267    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
46268
46269    unset LLVM_LDFLAGS
46270    for flag in $("${LLVM_CONFIG}" --ldflags); do
46271      if echo "${flag}" | grep -q '^-L'; then
46272        if test "${LLVM_LDFLAGS}" != ""; then
46273          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
46274        fi
46275        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
46276      fi
46277    done
46278
46279    unset LLVM_LIBS
46280    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
46281      if echo "${flag}" | grep -q '^-l'; then
46282        if test "${LLVM_LIBS}" != ""; then
46283          LLVM_LIBS="${LLVM_LIBS} "
46284        fi
46285        LLVM_LIBS="${LLVM_LIBS}${flag}"
46286      fi
46287    done
46288
46289
46290
46291
46292  fi
46293
46294  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46295  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
46296    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46297  fi
46298
46299  # TODO better (platform agnostic) test
46300  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
46301    LIBCXX="-lstdc++"
46302  fi
46303
46304
46305
46306
46307
46308###############################################################################
46309#
46310# We need to do some final tweaking, when everything else is done.
46311#
46312###############################################################################
46313
46314
46315  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
46316
46317
46318  # The name of the Service Agent jar.
46319  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
46320  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46321    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
46322  fi
46323
46324
46325
46326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
46327$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
46328
46329    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
46330      ENABLE_INTREE_EC=yes
46331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46332$as_echo "yes" >&6; }
46333    else
46334      ENABLE_INTREE_EC=no
46335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46336$as_echo "no" >&6; }
46337    fi
46338
46339
46340
46341
46342###############################################################################
46343#
46344# Configure parts of the build that only affect the build performance,
46345# not the result.
46346#
46347###############################################################################
46348
46349
46350  # How many cores do we have on this build system?
46351
46352# Check whether --with-num-cores was given.
46353if test "${with_num_cores+set}" = set; then :
46354  withval=$with_num_cores;
46355fi
46356
46357  if test "x$with_num_cores" = x; then
46358    # The number of cores were not specified, try to probe them.
46359
46360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
46361$as_echo_n "checking for number of cores... " >&6; }
46362  NUM_CORES=1
46363  FOUND_CORES=no
46364
46365  if test -f /proc/cpuinfo; then
46366    # Looks like a Linux (or cygwin) system
46367    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
46368    FOUND_CORES=yes
46369  elif test -x /usr/sbin/psrinfo; then
46370    # Looks like a Solaris system
46371    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
46372    FOUND_CORES=yes
46373  elif test -x /usr/sbin/system_profiler; then
46374    # Looks like a MacOSX system
46375    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
46376    FOUND_CORES=yes
46377  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
46378    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
46379    FOUND_CORES=yes
46380  elif test -n "$NUMBER_OF_PROCESSORS"; then
46381    # On windows, look in the env
46382    NUM_CORES=$NUMBER_OF_PROCESSORS
46383    FOUND_CORES=yes
46384  fi
46385
46386  if test "x$FOUND_CORES" = xyes; then
46387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
46388$as_echo "$NUM_CORES" >&6; }
46389  else
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
46391$as_echo "could not detect number of cores, defaulting to 1" >&6; }
46392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
46393$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
46394  fi
46395
46396  else
46397    NUM_CORES=$with_num_cores
46398  fi
46399
46400
46401
46402  # How much memory do we have on this build system?
46403
46404# Check whether --with-memory-size was given.
46405if test "${with_memory_size+set}" = set; then :
46406  withval=$with_memory_size;
46407fi
46408
46409  if test "x$with_memory_size" = x; then
46410    # The memory size was not specified, try to probe it.
46411
46412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
46413$as_echo_n "checking for memory size... " >&6; }
46414  # Default to 1024 MB
46415  MEMORY_SIZE=1024
46416  FOUND_MEM=no
46417
46418  if test -f /proc/meminfo; then
46419    # Looks like a Linux (or cygwin) system
46420    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
46421    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
46422    FOUND_MEM=yes
46423  elif test -x /usr/sbin/prtconf; then
46424    # Looks like a Solaris or AIX system
46425    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
46426    FOUND_MEM=yes
46427  elif test -x /usr/sbin/system_profiler; then
46428    # Looks like a MacOSX system
46429    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
46430    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
46431    FOUND_MEM=yes
46432  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
46433    # Windows, but without cygwin
46434    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
46435    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
46436    FOUND_MEM=yes
46437  fi
46438
46439  if test "x$FOUND_MEM" = xyes; then
46440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
46441$as_echo "$MEMORY_SIZE MB" >&6; }
46442  else
46443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
46444$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
46445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
46446$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
46447  fi
46448
46449  else
46450    MEMORY_SIZE=$with_memory_size
46451  fi
46452
46453
46454
46455  # Provide a decent default number of parallel jobs for make depending on
46456  # number of cores, amount of memory and machine architecture.
46457
46458# Check whether --with-jobs was given.
46459if test "${with_jobs+set}" = set; then :
46460  withval=$with_jobs;
46461fi
46462
46463  if test "x$with_jobs" = x; then
46464    # Number of jobs was not specified, calculate.
46465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
46466$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
46467    # Approximate memory in GB, rounding up a bit.
46468    memory_gb=`expr $MEMORY_SIZE / 1100`
46469    # Pick the lowest of memory in gb and number of cores.
46470    if test "$memory_gb" -lt "$NUM_CORES"; then
46471      JOBS="$memory_gb"
46472    else
46473      JOBS="$NUM_CORES"
46474      # On bigger machines, leave some room for other processes to run
46475      if test "$JOBS" -gt "4"; then
46476        JOBS=`expr $JOBS '*' 90 / 100`
46477      fi
46478    fi
46479    # Cap number of jobs to 16
46480    if test "$JOBS" -gt "16"; then
46481      JOBS=16
46482    fi
46483    if test "$JOBS" -eq "0"; then
46484      JOBS=1
46485    fi
46486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
46487$as_echo "$JOBS" >&6; }
46488  else
46489    JOBS=$with_jobs
46490  fi
46491
46492
46493
46494# Setup smart javac (after cores and memory have been setup)
46495
46496
46497# Check whether --with-sjavac-server-java was given.
46498if test "${with_sjavac_server_java+set}" = set; then :
46499  withval=$with_sjavac_server_java;
46500fi
46501
46502
46503  if test "x$with_sjavac_server_java" != x; then
46504    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
46505    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
46506    if test "x$FOUND_VERSION" = x; then
46507      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
46508    fi
46509  else
46510    SJAVAC_SERVER_JAVA=""
46511    # Hotspot specific options.
46512
46513  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
46514  $ECHO "Command: $JAVA -verbosegc -version" >&5
46515  OUTPUT=`$JAVA -verbosegc -version 2>&1`
46516  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46517  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46518  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46519    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
46520    JVM_ARG_OK=true
46521  else
46522    $ECHO "Arg failed:" >&5
46523    $ECHO "$OUTPUT" >&5
46524    JVM_ARG_OK=false
46525  fi
46526
46527    # JRockit specific options.
46528
46529  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
46530  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
46531  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
46532  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46533  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46534  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46535    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
46536    JVM_ARG_OK=true
46537  else
46538    $ECHO "Arg failed:" >&5
46539    $ECHO "$OUTPUT" >&5
46540    JVM_ARG_OK=false
46541  fi
46542
46543    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
46544  fi
46545
46546
46547  if test "$MEMORY_SIZE" -gt "2500"; then
46548
46549  $ECHO "Check if jvm arg is ok: -d64" >&5
46550  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
46551  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
46552  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46553  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46554  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46555    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
46556    JVM_ARG_OK=true
46557  else
46558    $ECHO "Arg failed:" >&5
46559    $ECHO "$OUTPUT" >&5
46560    JVM_ARG_OK=false
46561  fi
46562
46563    if test "$JVM_ARG_OK" = true; then
46564      JVM_64BIT=true
46565      JVM_ARG_OK=false
46566    fi
46567  fi
46568
46569  if test "$JVM_64BIT" = true; then
46570    if test "$MEMORY_SIZE" -gt "17000"; then
46571
46572  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
46573  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
46574  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
46575  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46576  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46577  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46578    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
46579    JVM_ARG_OK=true
46580  else
46581    $ECHO "Arg failed:" >&5
46582    $ECHO "$OUTPUT" >&5
46583    JVM_ARG_OK=false
46584  fi
46585
46586    fi
46587    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
46588
46589  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
46590  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
46591  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
46592  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46593  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46594  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46595    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
46596    JVM_ARG_OK=true
46597  else
46598    $ECHO "Arg failed:" >&5
46599    $ECHO "$OUTPUT" >&5
46600    JVM_ARG_OK=false
46601  fi
46602
46603    fi
46604    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
46605
46606  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
46607  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
46608  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
46609  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46610  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46611  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46612    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
46613    JVM_ARG_OK=true
46614  else
46615    $ECHO "Arg failed:" >&5
46616    $ECHO "$OUTPUT" >&5
46617    JVM_ARG_OK=false
46618  fi
46619
46620    fi
46621    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
46622
46623  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
46624  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
46625  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
46626  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46627  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46628  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46629    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
46630    JVM_ARG_OK=true
46631  else
46632    $ECHO "Arg failed:" >&5
46633    $ECHO "$OUTPUT" >&5
46634    JVM_ARG_OK=false
46635  fi
46636
46637    fi
46638  fi
46639  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
46640
46641  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
46642  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
46643  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
46644  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46645  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46646  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46647    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
46648    JVM_ARG_OK=true
46649  else
46650    $ECHO "Arg failed:" >&5
46651    $ECHO "$OUTPUT" >&5
46652    JVM_ARG_OK=false
46653  fi
46654
46655  fi
46656  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
46657
46658  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
46659  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
46660  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
46661  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46662  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46663  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46664    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
46665    JVM_ARG_OK=true
46666  else
46667    $ECHO "Arg failed:" >&5
46668    $ECHO "$OUTPUT" >&5
46669    JVM_ARG_OK=false
46670  fi
46671
46672  fi
46673  if test "$JVM_ARG_OK" = false; then
46674
46675  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
46676  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
46677  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
46678  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46679  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46680  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46681    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
46682    JVM_ARG_OK=true
46683  else
46684    $ECHO "Arg failed:" >&5
46685    $ECHO "$OUTPUT" >&5
46686    JVM_ARG_OK=false
46687  fi
46688
46689  fi
46690
46691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
46692$as_echo_n "checking whether to use sjavac... " >&6; }
46693  # Check whether --enable-sjavac was given.
46694if test "${enable_sjavac+set}" = set; then :
46695  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
46696else
46697  ENABLE_SJAVAC='no'
46698fi
46699
46700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
46701$as_echo "$ENABLE_SJAVAC" >&6; }
46702
46703
46704  if test "x$ENABLE_SJAVAC" = xyes; then
46705    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
46706  else
46707    SJAVAC_SERVER_DIR=
46708  fi
46709
46710
46711
46712# Can the C/C++ compiler use precompiled headers?
46713
46714
46715  ###############################################################################
46716  #
46717  # Can the C/C++ compiler use precompiled headers?
46718  #
46719  # Check whether --enable-precompiled-headers was given.
46720if test "${enable_precompiled_headers+set}" = set; then :
46721  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
46722else
46723  ENABLE_PRECOMPH=yes
46724fi
46725
46726
46727  USE_PRECOMPILED_HEADER=1
46728  if test "x$ENABLE_PRECOMPH" = xno; then
46729    USE_PRECOMPILED_HEADER=0
46730  fi
46731
46732  if test "x$ENABLE_PRECOMPH" = xyes; then
46733    # Check that the compiler actually supports precomp headers.
46734    if test "x$GCC" = xyes; then
46735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
46736$as_echo_n "checking that precompiled headers work... " >&6; }
46737      echo "int alfa();" > conftest.h
46738      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
46739      if test ! -f conftest.hpp.gch; then
46740        USE_PRECOMPILED_HEADER=0
46741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46742$as_echo "no" >&6; }
46743      else
46744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46745$as_echo "yes" >&6; }
46746      fi
46747      rm -f conftest.h conftest.hpp.gch
46748    fi
46749  fi
46750
46751
46752
46753
46754# Setup use of ccache, if available
46755
46756  # Check whether --enable-ccache was given.
46757if test "${enable_ccache+set}" = set; then :
46758  enableval=$enable_ccache;
46759fi
46760
46761
46762  CCACHE=
46763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
46764$as_echo_n "checking is ccache enabled... " >&6; }
46765  ENABLE_CCACHE=$enable_ccache
46766  if test "x$enable_ccache" = xyes; then
46767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46768$as_echo "yes" >&6; }
46769    OLD_PATH="$PATH"
46770    if test "x$TOOLS_DIR" != x; then
46771      PATH=$TOOLS_DIR:$PATH
46772    fi
46773    BASIC_REQUIRE_PROG(CCACHE, ccache)
46774    CCACHE_STATUS="enabled"
46775    PATH="$OLD_PATH"
46776  elif test "x$enable_ccache" = xno; then
46777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
46778$as_echo "no, explicitly disabled" >&6; }
46779  elif test "x$enable_ccache" = x; then
46780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46781$as_echo "no" >&6; }
46782  else
46783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
46784$as_echo "unknown" >&6; }
46785    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
46786  fi
46787
46788
46789
46790# Check whether --with-ccache-dir was given.
46791if test "${with_ccache_dir+set}" = set; then :
46792  withval=$with_ccache_dir;
46793fi
46794
46795
46796  if test "x$with_ccache_dir" != x; then
46797    # When using a non home ccache directory, assume the use is to share ccache files
46798    # with other users. Thus change the umask.
46799    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
46800    if test "x$CCACHE" = x; then
46801      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
46802$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
46803    fi
46804  fi
46805
46806  if test "x$CCACHE" != x; then
46807
46808  if test "x$CCACHE" != x; then
46809    # Only use ccache if it is 3.1.4 or later, which supports
46810    # precompiled headers.
46811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
46812$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
46813    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
46814    if test "x$HAS_GOOD_CCACHE" = x; then
46815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
46816$as_echo "no, disabling ccache" >&6; }
46817      CCACHE=
46818      CCACHE_STATUS="disabled"
46819    else
46820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46821$as_echo "yes" >&6; }
46822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
46823$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
46824      PUSHED_FLAGS="$CXXFLAGS"
46825      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
46826      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46827/* end confdefs.h.  */
46828
46829int
46830main ()
46831{
46832
46833  ;
46834  return 0;
46835}
46836_ACEOF
46837if ac_fn_cxx_try_compile "$LINENO"; then :
46838  CC_KNOWS_CCACHE_TRICK=yes
46839else
46840  CC_KNOWS_CCACHE_TRICK=no
46841fi
46842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46843      CXXFLAGS="$PUSHED_FLAGS"
46844      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
46845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46846$as_echo "yes" >&6; }
46847      else
46848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
46849$as_echo "no, disabling ccaching of precompiled headers" >&6; }
46850        CCACHE=
46851        CCACHE_STATUS="disabled"
46852      fi
46853    fi
46854  fi
46855
46856  if test "x$CCACHE" != x; then
46857    CCACHE_SLOPPINESS=time_macros
46858    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
46859    CCACHE_FLAGS=-fpch-preprocess
46860
46861    if test "x$SET_CCACHE_DIR" != x; then
46862      mkdir -p $CCACHE_DIR > /dev/null 2>&1
46863      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
46864    fi
46865  fi
46866
46867  fi
46868
46869
46870###############################################################################
46871#
46872# And now the finish...
46873#
46874###############################################################################
46875
46876# Check for some common pitfalls
46877
46878  if test x"$OPENJDK_BUILD_OS" = xwindows; then
46879    file_to_test="$SRC_ROOT/LICENSE"
46880    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
46881      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
46882    fi
46883  fi
46884
46885
46886  # Did user specify any unknown variables?
46887
46888  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
46889    # Replace the separating ! with spaces before presenting for end user.
46890    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
46891    as_fn_error $? "The following variables are unknown to configure: $unknown_variables" "$LINENO" 5
46892  fi
46893
46894
46895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
46896$as_echo_n "checking if build directory is on local disk... " >&6; }
46897
46898  # df -l lists only local disks; if the given directory is not found then
46899  # a non-zero exit code is given
46900  if test "x$DF" = x; then
46901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46902      # msys does not have df; use Windows "net use" instead.
46903      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
46904      if test "x$IS_NETWORK_DISK" = x; then
46905        OUTPUT_DIR_IS_LOCAL="yes"
46906      else
46907        OUTPUT_DIR_IS_LOCAL="no"
46908      fi
46909    else
46910      # No df here, say it's local
46911      OUTPUT_DIR_IS_LOCAL="yes"
46912    fi
46913  else
46914    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
46915      OUTPUT_DIR_IS_LOCAL="yes"
46916    else
46917      OUTPUT_DIR_IS_LOCAL="no"
46918    fi
46919  fi
46920
46921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
46922$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
46923
46924
46925
46926  # Check if the user has any old-style ALT_ variables set.
46927  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
46928
46929  # Before generating output files, test if they exist. If they do, this is a reconfigure.
46930  # Since we can't properly handle the dependencies for this, warn the user about the situation
46931  if test -e $OUTPUT_ROOT/spec.gmk; then
46932    IS_RECONFIGURE=yes
46933  else
46934    IS_RECONFIGURE=no
46935  fi
46936
46937
46938# At the end, call the custom hook. (Dummy macro if no custom sources available)
46939
46940
46941# We're messing a bit with internal autoconf variables to put the config.status
46942# in the output directory instead of the current directory.
46943CONFIG_STATUS="$OUTPUT_ROOT/config.status"
46944
46945# Create the actual output files. Now the main work of configure is done.
46946cat >confcache <<\_ACEOF
46947# This file is a shell script that caches the results of configure
46948# tests run on this system so they can be shared between configure
46949# scripts and configure runs, see configure's option --config-cache.
46950# It is not useful on other systems.  If it contains results you don't
46951# want to keep, you may remove or edit it.
46952#
46953# config.status only pays attention to the cache file if you give it
46954# the --recheck option to rerun configure.
46955#
46956# `ac_cv_env_foo' variables (set or unset) will be overridden when
46957# loading this file, other *unset* `ac_cv_foo' will be assigned the
46958# following values.
46959
46960_ACEOF
46961
46962# The following way of writing the cache mishandles newlines in values,
46963# but we know of no workaround that is simple, portable, and efficient.
46964# So, we kill variables containing newlines.
46965# Ultrix sh set writes to stderr and can't be redirected directly,
46966# and sets the high bit in the cache file unless we assign to the vars.
46967(
46968  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
46969    eval ac_val=\$$ac_var
46970    case $ac_val in #(
46971    *${as_nl}*)
46972      case $ac_var in #(
46973      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
46974$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
46975      esac
46976      case $ac_var in #(
46977      _ | IFS | as_nl) ;; #(
46978      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
46979      *) { eval $ac_var=; unset $ac_var;} ;;
46980      esac ;;
46981    esac
46982  done
46983
46984  (set) 2>&1 |
46985    case $as_nl`(ac_space=' '; set) 2>&1` in #(
46986    *${as_nl}ac_space=\ *)
46987      # `set' does not quote correctly, so add quotes: double-quote
46988      # substitution turns \\\\ into \\, and sed turns \\ into \.
46989      sed -n \
46990	"s/'/'\\\\''/g;
46991	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
46992      ;; #(
46993    *)
46994      # `set' quotes correctly as required by POSIX, so do not add quotes.
46995      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
46996      ;;
46997    esac |
46998    sort
46999) |
47000  sed '
47001     /^ac_cv_env_/b end
47002     t clear
47003     :clear
47004     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
47005     t end
47006     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
47007     :end' >>confcache
47008if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
47009  if test -w "$cache_file"; then
47010    if test "x$cache_file" != "x/dev/null"; then
47011      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
47012$as_echo "$as_me: updating cache $cache_file" >&6;}
47013      if test ! -f "$cache_file" || test -h "$cache_file"; then
47014	cat confcache >"$cache_file"
47015      else
47016        case $cache_file in #(
47017        */* | ?:*)
47018	  mv -f confcache "$cache_file"$$ &&
47019	  mv -f "$cache_file"$$ "$cache_file" ;; #(
47020        *)
47021	  mv -f confcache "$cache_file" ;;
47022	esac
47023      fi
47024    fi
47025  else
47026    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
47027$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
47028  fi
47029fi
47030rm -f confcache
47031
47032test "x$prefix" = xNONE && prefix=$ac_default_prefix
47033# Let make expand exec_prefix.
47034test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
47035
47036DEFS=-DHAVE_CONFIG_H
47037
47038ac_libobjs=
47039ac_ltlibobjs=
47040U=
47041for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
47042  # 1. Remove the extension, and $U if already installed.
47043  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
47044  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
47045  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
47046  #    will be set to the directory where LIBOBJS objects are built.
47047  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
47048  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
47049done
47050LIBOBJS=$ac_libobjs
47051
47052LTLIBOBJS=$ac_ltlibobjs
47053
47054
47055
47056: "${CONFIG_STATUS=./config.status}"
47057ac_write_fail=0
47058ac_clean_files_save=$ac_clean_files
47059ac_clean_files="$ac_clean_files $CONFIG_STATUS"
47060{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
47061$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
47062as_write_fail=0
47063cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
47064#! $SHELL
47065# Generated by $as_me.
47066# Run this file to recreate the current configuration.
47067# Compiler output produced by configure, useful for debugging
47068# configure, is in config.log if it exists.
47069
47070debug=false
47071ac_cs_recheck=false
47072ac_cs_silent=false
47073
47074SHELL=\${CONFIG_SHELL-$SHELL}
47075export SHELL
47076_ASEOF
47077cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
47078## -------------------- ##
47079## M4sh Initialization. ##
47080## -------------------- ##
47081
47082# Be more Bourne compatible
47083DUALCASE=1; export DUALCASE # for MKS sh
47084if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
47085  emulate sh
47086  NULLCMD=:
47087  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
47088  # is contrary to our usage.  Disable this feature.
47089  alias -g '${1+"$@"}'='"$@"'
47090  setopt NO_GLOB_SUBST
47091else
47092  case `(set -o) 2>/dev/null` in #(
47093  *posix*) :
47094    set -o posix ;; #(
47095  *) :
47096     ;;
47097esac
47098fi
47099
47100
47101as_nl='
47102'
47103export as_nl
47104# Printing a long string crashes Solaris 7 /usr/bin/printf.
47105as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47106as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
47107as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47108# Prefer a ksh shell builtin over an external printf program on Solaris,
47109# but without wasting forks for bash or zsh.
47110if test -z "$BASH_VERSION$ZSH_VERSION" \
47111    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47112  as_echo='print -r --'
47113  as_echo_n='print -rn --'
47114elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47115  as_echo='printf %s\n'
47116  as_echo_n='printf %s'
47117else
47118  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
47119    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
47120    as_echo_n='/usr/ucb/echo -n'
47121  else
47122    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
47123    as_echo_n_body='eval
47124      arg=$1;
47125      case $arg in #(
47126      *"$as_nl"*)
47127	expr "X$arg" : "X\\(.*\\)$as_nl";
47128	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
47129      esac;
47130      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
47131    '
47132    export as_echo_n_body
47133    as_echo_n='sh -c $as_echo_n_body as_echo'
47134  fi
47135  export as_echo_body
47136  as_echo='sh -c $as_echo_body as_echo'
47137fi
47138
47139# The user is always right.
47140if test "${PATH_SEPARATOR+set}" != set; then
47141  PATH_SEPARATOR=:
47142  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
47143    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
47144      PATH_SEPARATOR=';'
47145  }
47146fi
47147
47148
47149# IFS
47150# We need space, tab and new line, in precisely that order.  Quoting is
47151# there to prevent editors from complaining about space-tab.
47152# (If _AS_PATH_WALK were called with IFS unset, it would disable word
47153# splitting by setting IFS to empty value.)
47154IFS=" ""	$as_nl"
47155
47156# Find who we are.  Look in the path if we contain no directory separator.
47157as_myself=
47158case $0 in #((
47159  *[\\/]* ) as_myself=$0 ;;
47160  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47161for as_dir in $PATH
47162do
47163  IFS=$as_save_IFS
47164  test -z "$as_dir" && as_dir=.
47165    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
47166  done
47167IFS=$as_save_IFS
47168
47169     ;;
47170esac
47171# We did not find ourselves, most probably we were run as `sh COMMAND'
47172# in which case we are not to be found in the path.
47173if test "x$as_myself" = x; then
47174  as_myself=$0
47175fi
47176if test ! -f "$as_myself"; then
47177  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
47178  exit 1
47179fi
47180
47181# Unset variables that we do not need and which cause bugs (e.g. in
47182# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
47183# suppresses any "Segmentation fault" message there.  '((' could
47184# trigger a bug in pdksh 5.2.14.
47185for as_var in BASH_ENV ENV MAIL MAILPATH
47186do eval test x\${$as_var+set} = xset \
47187  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
47188done
47189PS1='$ '
47190PS2='> '
47191PS4='+ '
47192
47193# NLS nuisances.
47194LC_ALL=C
47195export LC_ALL
47196LANGUAGE=C
47197export LANGUAGE
47198
47199# CDPATH.
47200(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
47201
47202
47203# as_fn_error STATUS ERROR [LINENO LOG_FD]
47204# ----------------------------------------
47205# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
47206# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
47207# script with STATUS, using 1 if that was 0.
47208as_fn_error ()
47209{
47210  as_status=$1; test $as_status -eq 0 && as_status=1
47211  if test "$4"; then
47212    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
47213    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
47214  fi
47215  $as_echo "$as_me: error: $2" >&2
47216  as_fn_exit $as_status
47217} # as_fn_error
47218
47219
47220# as_fn_set_status STATUS
47221# -----------------------
47222# Set $? to STATUS, without forking.
47223as_fn_set_status ()
47224{
47225  return $1
47226} # as_fn_set_status
47227
47228# as_fn_exit STATUS
47229# -----------------
47230# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
47231as_fn_exit ()
47232{
47233  set +e
47234  as_fn_set_status $1
47235  exit $1
47236} # as_fn_exit
47237
47238# as_fn_unset VAR
47239# ---------------
47240# Portably unset VAR.
47241as_fn_unset ()
47242{
47243  { eval $1=; unset $1;}
47244}
47245as_unset=as_fn_unset
47246# as_fn_append VAR VALUE
47247# ----------------------
47248# Append the text in VALUE to the end of the definition contained in VAR. Take
47249# advantage of any shell optimizations that allow amortized linear growth over
47250# repeated appends, instead of the typical quadratic growth present in naive
47251# implementations.
47252if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
47253  eval 'as_fn_append ()
47254  {
47255    eval $1+=\$2
47256  }'
47257else
47258  as_fn_append ()
47259  {
47260    eval $1=\$$1\$2
47261  }
47262fi # as_fn_append
47263
47264# as_fn_arith ARG...
47265# ------------------
47266# Perform arithmetic evaluation on the ARGs, and store the result in the
47267# global $as_val. Take advantage of shells that can avoid forks. The arguments
47268# must be portable across $(()) and expr.
47269if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
47270  eval 'as_fn_arith ()
47271  {
47272    as_val=$(( $* ))
47273  }'
47274else
47275  as_fn_arith ()
47276  {
47277    as_val=`expr "$@" || test $? -eq 1`
47278  }
47279fi # as_fn_arith
47280
47281
47282if expr a : '\(a\)' >/dev/null 2>&1 &&
47283   test "X`expr 00001 : '.*\(...\)'`" = X001; then
47284  as_expr=expr
47285else
47286  as_expr=false
47287fi
47288
47289if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
47290  as_basename=basename
47291else
47292  as_basename=false
47293fi
47294
47295if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
47296  as_dirname=dirname
47297else
47298  as_dirname=false
47299fi
47300
47301as_me=`$as_basename -- "$0" ||
47302$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
47303	 X"$0" : 'X\(//\)$' \| \
47304	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
47305$as_echo X/"$0" |
47306    sed '/^.*\/\([^/][^/]*\)\/*$/{
47307	    s//\1/
47308	    q
47309	  }
47310	  /^X\/\(\/\/\)$/{
47311	    s//\1/
47312	    q
47313	  }
47314	  /^X\/\(\/\).*/{
47315	    s//\1/
47316	    q
47317	  }
47318	  s/.*/./; q'`
47319
47320# Avoid depending upon Character Ranges.
47321as_cr_letters='abcdefghijklmnopqrstuvwxyz'
47322as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
47323as_cr_Letters=$as_cr_letters$as_cr_LETTERS
47324as_cr_digits='0123456789'
47325as_cr_alnum=$as_cr_Letters$as_cr_digits
47326
47327ECHO_C= ECHO_N= ECHO_T=
47328case `echo -n x` in #(((((
47329-n*)
47330  case `echo 'xy\c'` in
47331  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
47332  xy)  ECHO_C='\c';;
47333  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
47334       ECHO_T='	';;
47335  esac;;
47336*)
47337  ECHO_N='-n';;
47338esac
47339
47340rm -f conf$$ conf$$.exe conf$$.file
47341if test -d conf$$.dir; then
47342  rm -f conf$$.dir/conf$$.file
47343else
47344  rm -f conf$$.dir
47345  mkdir conf$$.dir 2>/dev/null
47346fi
47347if (echo >conf$$.file) 2>/dev/null; then
47348  if ln -s conf$$.file conf$$ 2>/dev/null; then
47349    as_ln_s='ln -s'
47350    # ... but there are two gotchas:
47351    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
47352    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
47353    # In both cases, we have to default to `cp -pR'.
47354    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
47355      as_ln_s='cp -pR'
47356  elif ln conf$$.file conf$$ 2>/dev/null; then
47357    as_ln_s=ln
47358  else
47359    as_ln_s='cp -pR'
47360  fi
47361else
47362  as_ln_s='cp -pR'
47363fi
47364rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
47365rmdir conf$$.dir 2>/dev/null
47366
47367
47368# as_fn_mkdir_p
47369# -------------
47370# Create "$as_dir" as a directory, including parents if necessary.
47371as_fn_mkdir_p ()
47372{
47373
47374  case $as_dir in #(
47375  -*) as_dir=./$as_dir;;
47376  esac
47377  test -d "$as_dir" || eval $as_mkdir_p || {
47378    as_dirs=
47379    while :; do
47380      case $as_dir in #(
47381      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
47382      *) as_qdir=$as_dir;;
47383      esac
47384      as_dirs="'$as_qdir' $as_dirs"
47385      as_dir=`$as_dirname -- "$as_dir" ||
47386$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47387	 X"$as_dir" : 'X\(//\)[^/]' \| \
47388	 X"$as_dir" : 'X\(//\)$' \| \
47389	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
47390$as_echo X"$as_dir" |
47391    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47392	    s//\1/
47393	    q
47394	  }
47395	  /^X\(\/\/\)[^/].*/{
47396	    s//\1/
47397	    q
47398	  }
47399	  /^X\(\/\/\)$/{
47400	    s//\1/
47401	    q
47402	  }
47403	  /^X\(\/\).*/{
47404	    s//\1/
47405	    q
47406	  }
47407	  s/.*/./; q'`
47408      test -d "$as_dir" && break
47409    done
47410    test -z "$as_dirs" || eval "mkdir $as_dirs"
47411  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
47412
47413
47414} # as_fn_mkdir_p
47415if mkdir -p . 2>/dev/null; then
47416  as_mkdir_p='mkdir -p "$as_dir"'
47417else
47418  test -d ./-p && rmdir ./-p
47419  as_mkdir_p=false
47420fi
47421
47422
47423# as_fn_executable_p FILE
47424# -----------------------
47425# Test if FILE is an executable regular file.
47426as_fn_executable_p ()
47427{
47428  test -f "$1" && test -x "$1"
47429} # as_fn_executable_p
47430as_test_x='test -x'
47431as_executable_p=as_fn_executable_p
47432
47433# Sed expression to map a string onto a valid CPP name.
47434as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
47435
47436# Sed expression to map a string onto a valid variable name.
47437as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
47438
47439
47440exec 6>&1
47441## ----------------------------------- ##
47442## Main body of $CONFIG_STATUS script. ##
47443## ----------------------------------- ##
47444_ASEOF
47445test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
47446
47447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47448# Save the log message, to keep $0 and so on meaningful, and to
47449# report actual input values of CONFIG_FILES etc. instead of their
47450# values after options handling.
47451ac_log="
47452This file was extended by OpenJDK $as_me jdk8, which was
47453generated by GNU Autoconf 2.69.  Invocation command line was
47454
47455  CONFIG_FILES    = $CONFIG_FILES
47456  CONFIG_HEADERS  = $CONFIG_HEADERS
47457  CONFIG_LINKS    = $CONFIG_LINKS
47458  CONFIG_COMMANDS = $CONFIG_COMMANDS
47459  $ $0 $@
47460
47461on `(hostname || uname -n) 2>/dev/null | sed 1q`
47462"
47463
47464_ACEOF
47465
47466case $ac_config_files in *"
47467"*) set x $ac_config_files; shift; ac_config_files=$*;;
47468esac
47469
47470case $ac_config_headers in *"
47471"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
47472esac
47473
47474
47475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47476# Files that config.status was made for.
47477config_files="$ac_config_files"
47478config_headers="$ac_config_headers"
47479
47480_ACEOF
47481
47482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47483ac_cs_usage="\
47484\`$as_me' instantiates files and other configuration actions
47485from templates according to the current configuration.  Unless the files
47486and actions are specified as TAGs, all are instantiated by default.
47487
47488Usage: $0 [OPTION]... [TAG]...
47489
47490  -h, --help       print this help, then exit
47491  -V, --version    print version number and configuration settings, then exit
47492      --config     print configuration, then exit
47493  -q, --quiet, --silent
47494                   do not print progress messages
47495  -d, --debug      don't remove temporary files
47496      --recheck    update $as_me by reconfiguring in the same conditions
47497      --file=FILE[:TEMPLATE]
47498                   instantiate the configuration file FILE
47499      --header=FILE[:TEMPLATE]
47500                   instantiate the configuration header FILE
47501
47502Configuration files:
47503$config_files
47504
47505Configuration headers:
47506$config_headers
47507
47508Report bugs to <build-dev@openjdk.java.net>.
47509OpenJDK home page: <http://openjdk.java.net>."
47510
47511_ACEOF
47512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47513ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
47514ac_cs_version="\\
47515OpenJDK config.status jdk8
47516configured by $0, generated by GNU Autoconf 2.69,
47517  with options \\"\$ac_cs_config\\"
47518
47519Copyright (C) 2012 Free Software Foundation, Inc.
47520This config.status script is free software; the Free Software Foundation
47521gives unlimited permission to copy, distribute and modify it."
47522
47523ac_pwd='$ac_pwd'
47524srcdir='$srcdir'
47525AWK='$AWK'
47526test -n "\$AWK" || AWK=awk
47527_ACEOF
47528
47529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47530# The default lists apply if the user does not specify any file.
47531ac_need_defaults=:
47532while test $# != 0
47533do
47534  case $1 in
47535  --*=?*)
47536    ac_option=`expr "X$1" : 'X\([^=]*\)='`
47537    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
47538    ac_shift=:
47539    ;;
47540  --*=)
47541    ac_option=`expr "X$1" : 'X\([^=]*\)='`
47542    ac_optarg=
47543    ac_shift=:
47544    ;;
47545  *)
47546    ac_option=$1
47547    ac_optarg=$2
47548    ac_shift=shift
47549    ;;
47550  esac
47551
47552  case $ac_option in
47553  # Handling of the options.
47554  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
47555    ac_cs_recheck=: ;;
47556  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
47557    $as_echo "$ac_cs_version"; exit ;;
47558  --config | --confi | --conf | --con | --co | --c )
47559    $as_echo "$ac_cs_config"; exit ;;
47560  --debug | --debu | --deb | --de | --d | -d )
47561    debug=: ;;
47562  --file | --fil | --fi | --f )
47563    $ac_shift
47564    case $ac_optarg in
47565    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47566    '') as_fn_error $? "missing file argument" ;;
47567    esac
47568    as_fn_append CONFIG_FILES " '$ac_optarg'"
47569    ac_need_defaults=false;;
47570  --header | --heade | --head | --hea )
47571    $ac_shift
47572    case $ac_optarg in
47573    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47574    esac
47575    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
47576    ac_need_defaults=false;;
47577  --he | --h)
47578    # Conflict between --help and --header
47579    as_fn_error $? "ambiguous option: \`$1'
47580Try \`$0 --help' for more information.";;
47581  --help | --hel | -h )
47582    $as_echo "$ac_cs_usage"; exit ;;
47583  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
47584  | -silent | --silent | --silen | --sile | --sil | --si | --s)
47585    ac_cs_silent=: ;;
47586
47587  # This is an error.
47588  -*) as_fn_error $? "unrecognized option: \`$1'
47589Try \`$0 --help' for more information." ;;
47590
47591  *) as_fn_append ac_config_targets " $1"
47592     ac_need_defaults=false ;;
47593
47594  esac
47595  shift
47596done
47597
47598ac_configure_extra_args=
47599
47600if $ac_cs_silent; then
47601  exec 6>/dev/null
47602  ac_configure_extra_args="$ac_configure_extra_args --silent"
47603fi
47604
47605_ACEOF
47606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47607if \$ac_cs_recheck; then
47608  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
47609  shift
47610  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
47611  CONFIG_SHELL='$SHELL'
47612  export CONFIG_SHELL
47613  exec "\$@"
47614fi
47615
47616_ACEOF
47617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47618exec 5>>config.log
47619{
47620  echo
47621  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
47622## Running $as_me. ##
47623_ASBOX
47624  $as_echo "$ac_log"
47625} >&5
47626
47627_ACEOF
47628cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47629_ACEOF
47630
47631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47632
47633# Handling of arguments.
47634for ac_config_target in $ac_config_targets
47635do
47636  case $ac_config_target in
47637    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
47638    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
47639    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
47640    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
47641    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
47642    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
47643    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
47644
47645  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
47646  esac
47647done
47648
47649
47650# If the user did not use the arguments to specify the items to instantiate,
47651# then the envvar interface is used.  Set only those that are not.
47652# We use the long form for the default assignment because of an extremely
47653# bizarre bug on SunOS 4.1.3.
47654if $ac_need_defaults; then
47655  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
47656  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
47657fi
47658
47659# Have a temporary directory for convenience.  Make it in the build tree
47660# simply because there is no reason against having it here, and in addition,
47661# creating and moving files from /tmp can sometimes cause problems.
47662# Hook for its removal unless debugging.
47663# Note that there is a small window in which the directory will not be cleaned:
47664# after its creation but before its name has been assigned to `$tmp'.
47665$debug ||
47666{
47667  tmp= ac_tmp=
47668  trap 'exit_status=$?
47669  : "${ac_tmp:=$tmp}"
47670  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
47671' 0
47672  trap 'as_fn_exit 1' 1 2 13 15
47673}
47674# Create a (secure) tmp directory for tmp files.
47675
47676{
47677  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
47678  test -d "$tmp"
47679}  ||
47680{
47681  tmp=./conf$$-$RANDOM
47682  (umask 077 && mkdir "$tmp")
47683} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
47684ac_tmp=$tmp
47685
47686# Set up the scripts for CONFIG_FILES section.
47687# No need to generate them if there are no CONFIG_FILES.
47688# This happens for instance with `./config.status config.h'.
47689if test -n "$CONFIG_FILES"; then
47690
47691
47692ac_cr=`echo X | tr X '\015'`
47693# On cygwin, bash can eat \r inside `` if the user requested igncr.
47694# But we know of no other shell where ac_cr would be empty at this
47695# point, so we can use a bashism as a fallback.
47696if test "x$ac_cr" = x; then
47697  eval ac_cr=\$\'\\r\'
47698fi
47699ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
47700if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
47701  ac_cs_awk_cr='\\r'
47702else
47703  ac_cs_awk_cr=$ac_cr
47704fi
47705
47706echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
47707_ACEOF
47708
47709
47710{
47711  echo "cat >conf$$subs.awk <<_ACEOF" &&
47712  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
47713  echo "_ACEOF"
47714} >conf$$subs.sh ||
47715  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47716ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
47717ac_delim='%!_!# '
47718for ac_last_try in false false false false false :; do
47719  . ./conf$$subs.sh ||
47720    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47721
47722  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
47723  if test $ac_delim_n = $ac_delim_num; then
47724    break
47725  elif $ac_last_try; then
47726    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47727  else
47728    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47729  fi
47730done
47731rm -f conf$$subs.sh
47732
47733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47734cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
47735_ACEOF
47736sed -n '
47737h
47738s/^/S["/; s/!.*/"]=/
47739p
47740g
47741s/^[^!]*!//
47742:repl
47743t repl
47744s/'"$ac_delim"'$//
47745t delim
47746:nl
47747h
47748s/\(.\{148\}\)..*/\1/
47749t more1
47750s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
47751p
47752n
47753b repl
47754:more1
47755s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47756p
47757g
47758s/.\{148\}//
47759t nl
47760:delim
47761h
47762s/\(.\{148\}\)..*/\1/
47763t more2
47764s/["\\]/\\&/g; s/^/"/; s/$/"/
47765p
47766b
47767:more2
47768s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47769p
47770g
47771s/.\{148\}//
47772t delim
47773' <conf$$subs.awk | sed '
47774/^[^""]/{
47775  N
47776  s/\n//
47777}
47778' >>$CONFIG_STATUS || ac_write_fail=1
47779rm -f conf$$subs.awk
47780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47781_ACAWK
47782cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
47783  for (key in S) S_is_set[key] = 1
47784  FS = ""
47785
47786}
47787{
47788  line = $ 0
47789  nfields = split(line, field, "@")
47790  substed = 0
47791  len = length(field[1])
47792  for (i = 2; i < nfields; i++) {
47793    key = field[i]
47794    keylen = length(key)
47795    if (S_is_set[key]) {
47796      value = S[key]
47797      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
47798      len += length(value) + length(field[++i])
47799      substed = 1
47800    } else
47801      len += 1 + keylen
47802  }
47803
47804  print line
47805}
47806
47807_ACAWK
47808_ACEOF
47809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47810if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
47811  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
47812else
47813  cat
47814fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
47815  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
47816_ACEOF
47817
47818# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
47819# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
47820# trailing colons and then remove the whole line if VPATH becomes empty
47821# (actually we leave an empty line to preserve line numbers).
47822if test "x$srcdir" = x.; then
47823  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
47824h
47825s///
47826s/^/:/
47827s/[	 ]*$/:/
47828s/:\$(srcdir):/:/g
47829s/:\${srcdir}:/:/g
47830s/:@srcdir@:/:/g
47831s/^:*//
47832s/:*$//
47833x
47834s/\(=[	 ]*\).*/\1/
47835G
47836s/\n//
47837s/^[^=]*=[	 ]*$//
47838}'
47839fi
47840
47841cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47842fi # test -n "$CONFIG_FILES"
47843
47844# Set up the scripts for CONFIG_HEADERS section.
47845# No need to generate them if there are no CONFIG_HEADERS.
47846# This happens for instance with `./config.status Makefile'.
47847if test -n "$CONFIG_HEADERS"; then
47848cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
47849BEGIN {
47850_ACEOF
47851
47852# Transform confdefs.h into an awk script `defines.awk', embedded as
47853# here-document in config.status, that substitutes the proper values into
47854# config.h.in to produce config.h.
47855
47856# Create a delimiter string that does not exist in confdefs.h, to ease
47857# handling of long lines.
47858ac_delim='%!_!# '
47859for ac_last_try in false false :; do
47860  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
47861  if test -z "$ac_tt"; then
47862    break
47863  elif $ac_last_try; then
47864    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
47865  else
47866    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47867  fi
47868done
47869
47870# For the awk script, D is an array of macro values keyed by name,
47871# likewise P contains macro parameters if any.  Preserve backslash
47872# newline sequences.
47873
47874ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
47875sed -n '
47876s/.\{148\}/&'"$ac_delim"'/g
47877t rset
47878:rset
47879s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
47880t def
47881d
47882:def
47883s/\\$//
47884t bsnl
47885s/["\\]/\\&/g
47886s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
47887D["\1"]=" \3"/p
47888s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
47889d
47890:bsnl
47891s/["\\]/\\&/g
47892s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
47893D["\1"]=" \3\\\\\\n"\\/p
47894t cont
47895s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
47896t cont
47897d
47898:cont
47899n
47900s/.\{148\}/&'"$ac_delim"'/g
47901t clear
47902:clear
47903s/\\$//
47904t bsnlc
47905s/["\\]/\\&/g; s/^/"/; s/$/"/p
47906d
47907:bsnlc
47908s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
47909b cont
47910' <confdefs.h | sed '
47911s/'"$ac_delim"'/"\\\
47912"/g' >>$CONFIG_STATUS || ac_write_fail=1
47913
47914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47915  for (key in D) D_is_set[key] = 1
47916  FS = ""
47917}
47918/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
47919  line = \$ 0
47920  split(line, arg, " ")
47921  if (arg[1] == "#") {
47922    defundef = arg[2]
47923    mac1 = arg[3]
47924  } else {
47925    defundef = substr(arg[1], 2)
47926    mac1 = arg[2]
47927  }
47928  split(mac1, mac2, "(") #)
47929  macro = mac2[1]
47930  prefix = substr(line, 1, index(line, defundef) - 1)
47931  if (D_is_set[macro]) {
47932    # Preserve the white space surrounding the "#".
47933    print prefix "define", macro P[macro] D[macro]
47934    next
47935  } else {
47936    # Replace #undef with comments.  This is necessary, for example,
47937    # in the case of _POSIX_SOURCE, which is predefined and required
47938    # on some systems where configure will not decide to define it.
47939    if (defundef == "undef") {
47940      print "/*", prefix defundef, macro, "*/"
47941      next
47942    }
47943  }
47944}
47945{ print }
47946_ACAWK
47947_ACEOF
47948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47949  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
47950fi # test -n "$CONFIG_HEADERS"
47951
47952
47953eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
47954shift
47955for ac_tag
47956do
47957  case $ac_tag in
47958  :[FHLC]) ac_mode=$ac_tag; continue;;
47959  esac
47960  case $ac_mode$ac_tag in
47961  :[FHL]*:*);;
47962  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
47963  :[FH]-) ac_tag=-:-;;
47964  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
47965  esac
47966  ac_save_IFS=$IFS
47967  IFS=:
47968  set x $ac_tag
47969  IFS=$ac_save_IFS
47970  shift
47971  ac_file=$1
47972  shift
47973
47974  case $ac_mode in
47975  :L) ac_source=$1;;
47976  :[FH])
47977    ac_file_inputs=
47978    for ac_f
47979    do
47980      case $ac_f in
47981      -) ac_f="$ac_tmp/stdin";;
47982      *) # Look for the file first in the build tree, then in the source tree
47983	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
47984	 # because $ac_f cannot contain `:'.
47985	 test -f "$ac_f" ||
47986	   case $ac_f in
47987	   [\\/$]*) false;;
47988	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
47989	   esac ||
47990	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
47991      esac
47992      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
47993      as_fn_append ac_file_inputs " '$ac_f'"
47994    done
47995
47996    # Let's still pretend it is `configure' which instantiates (i.e., don't
47997    # use $as_me), people would be surprised to read:
47998    #    /* config.h.  Generated by config.status.  */
47999    configure_input='Generated from '`
48000	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
48001	`' by configure.'
48002    if test x"$ac_file" != x-; then
48003      configure_input="$ac_file.  $configure_input"
48004      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
48005$as_echo "$as_me: creating $ac_file" >&6;}
48006    fi
48007    # Neutralize special characters interpreted by sed in replacement strings.
48008    case $configure_input in #(
48009    *\&* | *\|* | *\\* )
48010       ac_sed_conf_input=`$as_echo "$configure_input" |
48011       sed 's/[\\\\&|]/\\\\&/g'`;; #(
48012    *) ac_sed_conf_input=$configure_input;;
48013    esac
48014
48015    case $ac_tag in
48016    *:-:* | *:-) cat >"$ac_tmp/stdin" \
48017      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
48018    esac
48019    ;;
48020  esac
48021
48022  ac_dir=`$as_dirname -- "$ac_file" ||
48023$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48024	 X"$ac_file" : 'X\(//\)[^/]' \| \
48025	 X"$ac_file" : 'X\(//\)$' \| \
48026	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
48027$as_echo X"$ac_file" |
48028    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48029	    s//\1/
48030	    q
48031	  }
48032	  /^X\(\/\/\)[^/].*/{
48033	    s//\1/
48034	    q
48035	  }
48036	  /^X\(\/\/\)$/{
48037	    s//\1/
48038	    q
48039	  }
48040	  /^X\(\/\).*/{
48041	    s//\1/
48042	    q
48043	  }
48044	  s/.*/./; q'`
48045  as_dir="$ac_dir"; as_fn_mkdir_p
48046  ac_builddir=.
48047
48048case "$ac_dir" in
48049.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
48050*)
48051  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
48052  # A ".." for each directory in $ac_dir_suffix.
48053  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
48054  case $ac_top_builddir_sub in
48055  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
48056  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
48057  esac ;;
48058esac
48059ac_abs_top_builddir=$ac_pwd
48060ac_abs_builddir=$ac_pwd$ac_dir_suffix
48061# for backward compatibility:
48062ac_top_builddir=$ac_top_build_prefix
48063
48064case $srcdir in
48065  .)  # We are building in place.
48066    ac_srcdir=.
48067    ac_top_srcdir=$ac_top_builddir_sub
48068    ac_abs_top_srcdir=$ac_pwd ;;
48069  [\\/]* | ?:[\\/]* )  # Absolute name.
48070    ac_srcdir=$srcdir$ac_dir_suffix;
48071    ac_top_srcdir=$srcdir
48072    ac_abs_top_srcdir=$srcdir ;;
48073  *) # Relative name.
48074    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
48075    ac_top_srcdir=$ac_top_build_prefix$srcdir
48076    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
48077esac
48078ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
48079
48080
48081  case $ac_mode in
48082  :F)
48083  #
48084  # CONFIG_FILE
48085  #
48086
48087_ACEOF
48088
48089cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48090# If the template does not know about datarootdir, expand it.
48091# FIXME: This hack should be removed a few years after 2.60.
48092ac_datarootdir_hack=; ac_datarootdir_seen=
48093ac_sed_dataroot='
48094/datarootdir/ {
48095  p
48096  q
48097}
48098/@datadir@/p
48099/@docdir@/p
48100/@infodir@/p
48101/@localedir@/p
48102/@mandir@/p'
48103case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
48104*datarootdir*) ac_datarootdir_seen=yes;;
48105*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
48106  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
48107$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
48108_ACEOF
48109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48110  ac_datarootdir_hack='
48111  s&@datadir@&$datadir&g
48112  s&@docdir@&$docdir&g
48113  s&@infodir@&$infodir&g
48114  s&@localedir@&$localedir&g
48115  s&@mandir@&$mandir&g
48116  s&\\\${datarootdir}&$datarootdir&g' ;;
48117esac
48118_ACEOF
48119
48120# Neutralize VPATH when `$srcdir' = `.'.
48121# Shell code in configure.ac might set extrasub.
48122# FIXME: do we really want to maintain this feature?
48123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48124ac_sed_extra="$ac_vpsub
48125$extrasub
48126_ACEOF
48127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48128:t
48129/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
48130s|@configure_input@|$ac_sed_conf_input|;t t
48131s&@top_builddir@&$ac_top_builddir_sub&;t t
48132s&@top_build_prefix@&$ac_top_build_prefix&;t t
48133s&@srcdir@&$ac_srcdir&;t t
48134s&@abs_srcdir@&$ac_abs_srcdir&;t t
48135s&@top_srcdir@&$ac_top_srcdir&;t t
48136s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
48137s&@builddir@&$ac_builddir&;t t
48138s&@abs_builddir@&$ac_abs_builddir&;t t
48139s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
48140$ac_datarootdir_hack
48141"
48142eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
48143  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48144
48145test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
48146  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
48147  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
48148      "$ac_tmp/out"`; test -z "$ac_out"; } &&
48149  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
48150which seems to be undefined.  Please make sure it is defined" >&5
48151$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
48152which seems to be undefined.  Please make sure it is defined" >&2;}
48153
48154  rm -f "$ac_tmp/stdin"
48155  case $ac_file in
48156  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
48157  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
48158  esac \
48159  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48160 ;;
48161  :H)
48162  #
48163  # CONFIG_HEADER
48164  #
48165  if test x"$ac_file" != x-; then
48166    {
48167      $as_echo "/* $configure_input  */" \
48168      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
48169    } >"$ac_tmp/config.h" \
48170      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48171    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
48172      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
48173$as_echo "$as_me: $ac_file is unchanged" >&6;}
48174    else
48175      rm -f "$ac_file"
48176      mv "$ac_tmp/config.h" "$ac_file" \
48177	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
48178    fi
48179  else
48180    $as_echo "/* $configure_input  */" \
48181      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
48182      || as_fn_error $? "could not create -" "$LINENO" 5
48183  fi
48184 ;;
48185
48186
48187  esac
48188
48189done # for ac_tag
48190
48191
48192as_fn_exit 0
48193_ACEOF
48194ac_clean_files=$ac_clean_files_save
48195
48196test $ac_write_fail = 0 ||
48197  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
48198
48199
48200# configure is writing to config.log, and then calls config.status.
48201# config.status does its own redirection, appending to config.log.
48202# Unfortunately, on DOS this fails, as config.log is still kept open
48203# by configure, so config.status won't be able to write to it; its
48204# output is simply discarded.  So we exec the FD to /dev/null,
48205# effectively closing config.log, so it can be properly (re)opened and
48206# appended to by config.status.  When coming back to configure, we
48207# need to make the FD available again.
48208if test "$no_create" != yes; then
48209  ac_cs_success=:
48210  ac_config_status_args=
48211  test "$silent" = yes &&
48212    ac_config_status_args="$ac_config_status_args --quiet"
48213  exec 5>/dev/null
48214  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
48215  exec 5>>config.log
48216  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
48217  # would make configure fail if this is the last instruction.
48218  $ac_cs_success || as_fn_exit 1
48219fi
48220if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
48221  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
48222$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
48223fi
48224
48225
48226# Try to move the config.log file to the output directory.
48227if test -e ./config.log; then
48228  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
48229fi
48230
48231# Make the compare script executable
48232$CHMOD +x $OUTPUT_ROOT/compare.sh
48233
48234# Finally output some useful information to the user
48235
48236  # Finally output some useful information to the user
48237
48238  printf "\n"
48239  printf "====================================================\n"
48240  printf "A new configuration has been successfully created in\n"
48241  printf "$OUTPUT_ROOT\n"
48242  if test "x$CONFIGURE_COMMAND_LINE" != x; then
48243    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
48244  else
48245    printf "using default settings.\n"
48246  fi
48247
48248  printf "\n"
48249  printf "Configuration summary:\n"
48250  printf "* Debug level:    $DEBUG_LEVEL\n"
48251  printf "* JDK variant:    $JDK_VARIANT\n"
48252  printf "* JVM variants:   $with_jvm_variants\n"
48253  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
48254
48255  printf "\n"
48256  printf "Tools summary:\n"
48257  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
48258    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
48259  fi
48260  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
48261  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
48262  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
48263
48264  printf "\n"
48265  printf "Build performance summary:\n"
48266  printf "* Cores to use:   $JOBS\n"
48267  printf "* Memory limit:   $MEMORY_SIZE MB\n"
48268  if test "x$CCACHE_STATUS" != "x"; then
48269    printf "* ccache status:  $CCACHE_STATUS\n"
48270  fi
48271  printf "\n"
48272
48273  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
48274    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
48275    printf "will result in longer build times.\n"
48276    printf "\n"
48277  fi
48278
48279  if test "x$FOUND_ALT_VARIABLES" != "x"; then
48280    printf "WARNING: You have old-style ALT_ environment variables set.\n"
48281    printf "These are not respected, and will be ignored. It is recommended\n"
48282    printf "that you clean your environment. The following variables are set:\n"
48283    printf "$FOUND_ALT_VARIABLES\n"
48284    printf "\n"
48285  fi
48286
48287  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
48288    printf "WARNING: Your build output directory is not on a local disk.\n"
48289    printf "This will severely degrade build performance!\n"
48290    printf "It is recommended that you create an output directory on a local disk,\n"
48291    printf "and run the configure script again from that directory.\n"
48292    printf "\n"
48293  fi
48294
48295  if test "x$IS_RECONFIGURE" = "xyes"; then
48296    printf "WARNING: The result of this configuration has overridden an older\n"
48297    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
48298    printf "proper build. Failure to do so might result in strange build problems.\n"
48299    printf "\n"
48300  fi
48301
48302