generated-configure.sh revision 955:30b0abaa7185
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
1169CCACHE'
1170
1171
1172# Initialize some variables set by options.
1173ac_init_help=
1174ac_init_version=false
1175ac_unrecognized_opts=
1176ac_unrecognized_sep=
1177# The variables have the same names as the options, with
1178# dashes changed to underlines.
1179cache_file=/dev/null
1180exec_prefix=NONE
1181no_create=
1182no_recursion=
1183prefix=NONE
1184program_prefix=NONE
1185program_suffix=NONE
1186program_transform_name=s,x,x,
1187silent=
1188site=
1189srcdir=
1190verbose=
1191x_includes=NONE
1192x_libraries=NONE
1193
1194# Installation directory options.
1195# These are left unexpanded so users can "make install exec_prefix=/foo"
1196# and all the variables that are supposed to be based on exec_prefix
1197# by default will actually change.
1198# Use braces instead of parens because sh, perl, etc. also accept them.
1199# (The list follows the same order as the GNU Coding Standards.)
1200bindir='${exec_prefix}/bin'
1201sbindir='${exec_prefix}/sbin'
1202libexecdir='${exec_prefix}/libexec'
1203datarootdir='${prefix}/share'
1204datadir='${datarootdir}'
1205sysconfdir='${prefix}/etc'
1206sharedstatedir='${prefix}/com'
1207localstatedir='${prefix}/var'
1208includedir='${prefix}/include'
1209oldincludedir='/usr/include'
1210docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1211infodir='${datarootdir}/info'
1212htmldir='${docdir}'
1213dvidir='${docdir}'
1214pdfdir='${docdir}'
1215psdir='${docdir}'
1216libdir='${exec_prefix}/lib'
1217localedir='${datarootdir}/locale'
1218mandir='${datarootdir}/man'
1219
1220ac_prev=
1221ac_dashdash=
1222for ac_option
1223do
1224  # If the previous option needs an argument, assign it.
1225  if test -n "$ac_prev"; then
1226    eval $ac_prev=\$ac_option
1227    ac_prev=
1228    continue
1229  fi
1230
1231  case $ac_option in
1232  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1233  *=)   ac_optarg= ;;
1234  *)    ac_optarg=yes ;;
1235  esac
1236
1237  # Accept the important Cygnus configure options, so we can diagnose typos.
1238
1239  case $ac_dashdash$ac_option in
1240  --)
1241    ac_dashdash=yes ;;
1242
1243  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1244    ac_prev=bindir ;;
1245  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1246    bindir=$ac_optarg ;;
1247
1248  -build | --build | --buil | --bui | --bu)
1249    ac_prev=build_alias ;;
1250  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1251    build_alias=$ac_optarg ;;
1252
1253  -cache-file | --cache-file | --cache-fil | --cache-fi \
1254  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1255    ac_prev=cache_file ;;
1256  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1257  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1258    cache_file=$ac_optarg ;;
1259
1260  --config-cache | -C)
1261    cache_file=config.cache ;;
1262
1263  -datadir | --datadir | --datadi | --datad)
1264    ac_prev=datadir ;;
1265  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1266    datadir=$ac_optarg ;;
1267
1268  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1269  | --dataroo | --dataro | --datar)
1270    ac_prev=datarootdir ;;
1271  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1272  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1273    datarootdir=$ac_optarg ;;
1274
1275  -disable-* | --disable-*)
1276    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1277    # Reject names that are not valid shell variable names.
1278    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1279      as_fn_error $? "invalid feature name: $ac_useropt"
1280    ac_useropt_orig=$ac_useropt
1281    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1282    case $ac_user_opts in
1283      *"
1284"enable_$ac_useropt"
1285"*) ;;
1286      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1287	 ac_unrecognized_sep=', ';;
1288    esac
1289    eval enable_$ac_useropt=no ;;
1290
1291  -docdir | --docdir | --docdi | --doc | --do)
1292    ac_prev=docdir ;;
1293  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1294    docdir=$ac_optarg ;;
1295
1296  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1297    ac_prev=dvidir ;;
1298  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1299    dvidir=$ac_optarg ;;
1300
1301  -enable-* | --enable-*)
1302    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1303    # Reject names that are not valid shell variable names.
1304    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1305      as_fn_error $? "invalid feature name: $ac_useropt"
1306    ac_useropt_orig=$ac_useropt
1307    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1308    case $ac_user_opts in
1309      *"
1310"enable_$ac_useropt"
1311"*) ;;
1312      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1313	 ac_unrecognized_sep=', ';;
1314    esac
1315    eval enable_$ac_useropt=\$ac_optarg ;;
1316
1317  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1318  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1319  | --exec | --exe | --ex)
1320    ac_prev=exec_prefix ;;
1321  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1322  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1323  | --exec=* | --exe=* | --ex=*)
1324    exec_prefix=$ac_optarg ;;
1325
1326  -gas | --gas | --ga | --g)
1327    # Obsolete; use --with-gas.
1328    with_gas=yes ;;
1329
1330  -help | --help | --hel | --he | -h)
1331    ac_init_help=long ;;
1332  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1333    ac_init_help=recursive ;;
1334  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1335    ac_init_help=short ;;
1336
1337  -host | --host | --hos | --ho)
1338    ac_prev=host_alias ;;
1339  -host=* | --host=* | --hos=* | --ho=*)
1340    host_alias=$ac_optarg ;;
1341
1342  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1343    ac_prev=htmldir ;;
1344  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1345  | --ht=*)
1346    htmldir=$ac_optarg ;;
1347
1348  -includedir | --includedir | --includedi | --included | --include \
1349  | --includ | --inclu | --incl | --inc)
1350    ac_prev=includedir ;;
1351  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1352  | --includ=* | --inclu=* | --incl=* | --inc=*)
1353    includedir=$ac_optarg ;;
1354
1355  -infodir | --infodir | --infodi | --infod | --info | --inf)
1356    ac_prev=infodir ;;
1357  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1358    infodir=$ac_optarg ;;
1359
1360  -libdir | --libdir | --libdi | --libd)
1361    ac_prev=libdir ;;
1362  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1363    libdir=$ac_optarg ;;
1364
1365  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1366  | --libexe | --libex | --libe)
1367    ac_prev=libexecdir ;;
1368  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1369  | --libexe=* | --libex=* | --libe=*)
1370    libexecdir=$ac_optarg ;;
1371
1372  -localedir | --localedir | --localedi | --localed | --locale)
1373    ac_prev=localedir ;;
1374  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1375    localedir=$ac_optarg ;;
1376
1377  -localstatedir | --localstatedir | --localstatedi | --localstated \
1378  | --localstate | --localstat | --localsta | --localst | --locals)
1379    ac_prev=localstatedir ;;
1380  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1381  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1382    localstatedir=$ac_optarg ;;
1383
1384  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1385    ac_prev=mandir ;;
1386  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1387    mandir=$ac_optarg ;;
1388
1389  -nfp | --nfp | --nf)
1390    # Obsolete; use --without-fp.
1391    with_fp=no ;;
1392
1393  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1394  | --no-cr | --no-c | -n)
1395    no_create=yes ;;
1396
1397  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1398  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1399    no_recursion=yes ;;
1400
1401  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1402  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1403  | --oldin | --oldi | --old | --ol | --o)
1404    ac_prev=oldincludedir ;;
1405  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1406  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1407  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1408    oldincludedir=$ac_optarg ;;
1409
1410  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1411    ac_prev=prefix ;;
1412  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1413    prefix=$ac_optarg ;;
1414
1415  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1416  | --program-pre | --program-pr | --program-p)
1417    ac_prev=program_prefix ;;
1418  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1419  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1420    program_prefix=$ac_optarg ;;
1421
1422  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1423  | --program-suf | --program-su | --program-s)
1424    ac_prev=program_suffix ;;
1425  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1426  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1427    program_suffix=$ac_optarg ;;
1428
1429  -program-transform-name | --program-transform-name \
1430  | --program-transform-nam | --program-transform-na \
1431  | --program-transform-n | --program-transform- \
1432  | --program-transform | --program-transfor \
1433  | --program-transfo | --program-transf \
1434  | --program-trans | --program-tran \
1435  | --progr-tra | --program-tr | --program-t)
1436    ac_prev=program_transform_name ;;
1437  -program-transform-name=* | --program-transform-name=* \
1438  | --program-transform-nam=* | --program-transform-na=* \
1439  | --program-transform-n=* | --program-transform-=* \
1440  | --program-transform=* | --program-transfor=* \
1441  | --program-transfo=* | --program-transf=* \
1442  | --program-trans=* | --program-tran=* \
1443  | --progr-tra=* | --program-tr=* | --program-t=*)
1444    program_transform_name=$ac_optarg ;;
1445
1446  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1447    ac_prev=pdfdir ;;
1448  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1449    pdfdir=$ac_optarg ;;
1450
1451  -psdir | --psdir | --psdi | --psd | --ps)
1452    ac_prev=psdir ;;
1453  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1454    psdir=$ac_optarg ;;
1455
1456  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1457  | -silent | --silent | --silen | --sile | --sil)
1458    silent=yes ;;
1459
1460  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1461    ac_prev=sbindir ;;
1462  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1463  | --sbi=* | --sb=*)
1464    sbindir=$ac_optarg ;;
1465
1466  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1467  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1468  | --sharedst | --shareds | --shared | --share | --shar \
1469  | --sha | --sh)
1470    ac_prev=sharedstatedir ;;
1471  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1472  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1473  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1474  | --sha=* | --sh=*)
1475    sharedstatedir=$ac_optarg ;;
1476
1477  -site | --site | --sit)
1478    ac_prev=site ;;
1479  -site=* | --site=* | --sit=*)
1480    site=$ac_optarg ;;
1481
1482  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1483    ac_prev=srcdir ;;
1484  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1485    srcdir=$ac_optarg ;;
1486
1487  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1488  | --syscon | --sysco | --sysc | --sys | --sy)
1489    ac_prev=sysconfdir ;;
1490  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1491  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1492    sysconfdir=$ac_optarg ;;
1493
1494  -target | --target | --targe | --targ | --tar | --ta | --t)
1495    ac_prev=target_alias ;;
1496  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1497    target_alias=$ac_optarg ;;
1498
1499  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1500    verbose=yes ;;
1501
1502  -version | --version | --versio | --versi | --vers | -V)
1503    ac_init_version=: ;;
1504
1505  -with-* | --with-*)
1506    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1507    # Reject names that are not valid shell variable names.
1508    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1509      as_fn_error $? "invalid package name: $ac_useropt"
1510    ac_useropt_orig=$ac_useropt
1511    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1512    case $ac_user_opts in
1513      *"
1514"with_$ac_useropt"
1515"*) ;;
1516      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1517	 ac_unrecognized_sep=', ';;
1518    esac
1519    eval with_$ac_useropt=\$ac_optarg ;;
1520
1521  -without-* | --without-*)
1522    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1523    # Reject names that are not valid shell variable names.
1524    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1525      as_fn_error $? "invalid package name: $ac_useropt"
1526    ac_useropt_orig=$ac_useropt
1527    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1528    case $ac_user_opts in
1529      *"
1530"with_$ac_useropt"
1531"*) ;;
1532      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1533	 ac_unrecognized_sep=', ';;
1534    esac
1535    eval with_$ac_useropt=no ;;
1536
1537  --x)
1538    # Obsolete; use --with-x.
1539    with_x=yes ;;
1540
1541  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1542  | --x-incl | --x-inc | --x-in | --x-i)
1543    ac_prev=x_includes ;;
1544  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1545  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1546    x_includes=$ac_optarg ;;
1547
1548  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1549  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1550    ac_prev=x_libraries ;;
1551  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1552  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1553    x_libraries=$ac_optarg ;;
1554
1555  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1556Try \`$0 --help' for more information"
1557    ;;
1558
1559  *=*)
1560    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1561    # Reject names that are not valid shell variable names.
1562    case $ac_envvar in #(
1563      '' | [0-9]* | *[!_$as_cr_alnum]* )
1564      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1565    esac
1566    eval $ac_envvar=\$ac_optarg
1567    export $ac_envvar ;;
1568
1569  *)
1570    # FIXME: should be removed in autoconf 3.0.
1571    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1572    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1573      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1574    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1575    ;;
1576
1577  esac
1578done
1579
1580if test -n "$ac_prev"; then
1581  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1582  as_fn_error $? "missing argument to $ac_option"
1583fi
1584
1585if test -n "$ac_unrecognized_opts"; then
1586  case $enable_option_checking in
1587    no) ;;
1588    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1589    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1590  esac
1591fi
1592
1593# Check all directory arguments for consistency.
1594for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1595		datadir sysconfdir sharedstatedir localstatedir includedir \
1596		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1597		libdir localedir mandir
1598do
1599  eval ac_val=\$$ac_var
1600  # Remove trailing slashes.
1601  case $ac_val in
1602    */ )
1603      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1604      eval $ac_var=\$ac_val;;
1605  esac
1606  # Be sure to have absolute directory names.
1607  case $ac_val in
1608    [\\/$]* | ?:[\\/]* )  continue;;
1609    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1610  esac
1611  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1612done
1613
1614# There might be people who depend on the old broken behavior: `$host'
1615# used to hold the argument of --host etc.
1616# FIXME: To remove some day.
1617build=$build_alias
1618host=$host_alias
1619target=$target_alias
1620
1621# FIXME: To remove some day.
1622if test "x$host_alias" != x; then
1623  if test "x$build_alias" = x; then
1624    cross_compiling=maybe
1625  elif test "x$build_alias" != "x$host_alias"; then
1626    cross_compiling=yes
1627  fi
1628fi
1629
1630ac_tool_prefix=
1631test -n "$host_alias" && ac_tool_prefix=$host_alias-
1632
1633test "$silent" = yes && exec 6>/dev/null
1634
1635
1636ac_pwd=`pwd` && test -n "$ac_pwd" &&
1637ac_ls_di=`ls -di .` &&
1638ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1639  as_fn_error $? "working directory cannot be determined"
1640test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1641  as_fn_error $? "pwd does not report name of working directory"
1642
1643
1644# Find the source files, if location was not specified.
1645if test -z "$srcdir"; then
1646  ac_srcdir_defaulted=yes
1647  # Try the directory containing this script, then the parent directory.
1648  ac_confdir=`$as_dirname -- "$as_myself" ||
1649$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1650	 X"$as_myself" : 'X\(//\)[^/]' \| \
1651	 X"$as_myself" : 'X\(//\)$' \| \
1652	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1653$as_echo X"$as_myself" |
1654    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1655	    s//\1/
1656	    q
1657	  }
1658	  /^X\(\/\/\)[^/].*/{
1659	    s//\1/
1660	    q
1661	  }
1662	  /^X\(\/\/\)$/{
1663	    s//\1/
1664	    q
1665	  }
1666	  /^X\(\/\).*/{
1667	    s//\1/
1668	    q
1669	  }
1670	  s/.*/./; q'`
1671  srcdir=$ac_confdir
1672  if test ! -r "$srcdir/$ac_unique_file"; then
1673    srcdir=..
1674  fi
1675else
1676  ac_srcdir_defaulted=no
1677fi
1678if test ! -r "$srcdir/$ac_unique_file"; then
1679  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1680  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1681fi
1682ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1683ac_abs_confdir=`(
1684	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1685	pwd)`
1686# When building in place, set srcdir=.
1687if test "$ac_abs_confdir" = "$ac_pwd"; then
1688  srcdir=.
1689fi
1690# Remove unnecessary trailing slashes from srcdir.
1691# Double slashes in file names in object file debugging info
1692# mess up M-x gdb in Emacs.
1693case $srcdir in
1694*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1695esac
1696for ac_var in $ac_precious_vars; do
1697  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1698  eval ac_env_${ac_var}_value=\$${ac_var}
1699  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1700  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1701done
1702
1703#
1704# Report the --help message.
1705#
1706if test "$ac_init_help" = "long"; then
1707  # Omit some internal or obsolete options to make the list less imposing.
1708  # This message is too long to be a string in the A/UX 3.1 sh.
1709  cat <<_ACEOF
1710\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1711
1712Usage: $0 [OPTION]... [VAR=VALUE]...
1713
1714To assign environment variables (e.g., CC, CFLAGS...), specify them as
1715VAR=VALUE.  See below for descriptions of some of the useful variables.
1716
1717Defaults for the options are specified in brackets.
1718
1719Configuration:
1720  -h, --help              display this help and exit
1721      --help=short        display options specific to this package
1722      --help=recursive    display the short help of all the included packages
1723  -V, --version           display version information and exit
1724  -q, --quiet, --silent   do not print \`checking ...' messages
1725      --cache-file=FILE   cache test results in FILE [disabled]
1726  -C, --config-cache      alias for \`--cache-file=config.cache'
1727  -n, --no-create         do not create output files
1728      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1729
1730Installation directories:
1731  --prefix=PREFIX         install architecture-independent files in PREFIX
1732                          [$ac_default_prefix]
1733  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1734                          [PREFIX]
1735
1736By default, \`make install' will install all the files in
1737\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1738an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1739for instance \`--prefix=\$HOME'.
1740
1741For better control, use the options below.
1742
1743Fine tuning of the installation directories:
1744  --bindir=DIR            user executables [EPREFIX/bin]
1745  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1746  --libexecdir=DIR        program executables [EPREFIX/libexec]
1747  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1748  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1749  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1750  --libdir=DIR            object code libraries [EPREFIX/lib]
1751  --includedir=DIR        C header files [PREFIX/include]
1752  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1753  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1754  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1755  --infodir=DIR           info documentation [DATAROOTDIR/info]
1756  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1757  --mandir=DIR            man documentation [DATAROOTDIR/man]
1758  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1759  --htmldir=DIR           html documentation [DOCDIR]
1760  --dvidir=DIR            dvi documentation [DOCDIR]
1761  --pdfdir=DIR            pdf documentation [DOCDIR]
1762  --psdir=DIR             ps documentation [DOCDIR]
1763_ACEOF
1764
1765  cat <<\_ACEOF
1766
1767X features:
1768  --x-includes=DIR    X include files are in DIR
1769  --x-libraries=DIR   X library files are in DIR
1770
1771System types:
1772  --build=BUILD     configure for building on BUILD [guessed]
1773  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1774  --target=TARGET   configure for building compilers for TARGET [HOST]
1775_ACEOF
1776fi
1777
1778if test -n "$ac_init_help"; then
1779  case $ac_init_help in
1780     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1781   esac
1782  cat <<\_ACEOF
1783
1784Optional Features:
1785  --disable-option-checking  ignore unrecognized --enable/--with options
1786  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1787  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1788  --enable-openjdk-only   suppress building custom source even if present
1789                          [disabled]
1790  --enable-debug          set the debug level to fastdebug (shorthand for
1791                          --with-debug-level=fastdebug) [disabled]
1792  --disable-headful       disable building headful support (graphical UI
1793                          support) [enabled]
1794  --enable-hotspot-test-in-build
1795                          run the Queens test after Hotspot build [disabled]
1796  --enable-unlimited-crypto
1797                          Enable unlimited crypto policy [disabled]
1798  --disable-debug-symbols disable generation of debug symbols [enabled]
1799  --disable-zip-debug-info
1800                          disable zipping of debug-info files [enabled]
1801  --enable-macosx-runtime-support
1802                          Deprecated. Option is kept for backwards
1803                          compatibility and is ignored
1804  --disable-freetype-bundling
1805                          disable bundling of the freetype library with the
1806                          build result [enabled on Windows or when using
1807                          --with-freetype, disabled otherwise]
1808  --enable-sjavac         use sjavac to do fast incremental compiles
1809                          [disabled]
1810  --disable-precompiled-headers
1811                          disable using precompiled headers when compiling C++
1812                          [enabled]
1813  --enable-ccache         enable using ccache to speed up recompilations
1814                          [disabled]
1815
1816Optional Packages:
1817  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1818  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1819  --with-custom-make-dir  use this directory for custom build/make files
1820  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1821                          support it), e.g. --with-target-bits=32 [guessed]
1822  --with-sys-root         pass this sys-root to the compilers and tools (for
1823                          cross-compiling)
1824  --with-tools-dir        search this directory for compilers and tools (for
1825                          cross-compiling)
1826  --with-devkit           use this directory as base for tools-dir and
1827                          sys-root (for cross-compiling)
1828  --with-jdk-variant      JDK variant to build (normal) [normal]
1829  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1830  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1831                          client, minimal1, kernel, zero, zeroshark, core)
1832                          [server]
1833  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1834                          [release]
1835  --with-conf-name        use this as the name of the configuration [generated
1836                          from important configuration options]
1837  --with-builddeps-conf   use this configuration file for the builddeps
1838  --with-builddeps-server download and use build dependencies from this server
1839                          url
1840  --with-builddeps-dir    store downloaded build dependencies here
1841                          [/localhome/builddeps]
1842  --with-builddeps-group  chgrp the downloaded build dependencies to this
1843                          group
1844  --with-cacerts-file     specify alternative cacerts file
1845  --with-milestone        Set milestone value for build [internal]
1846  --with-update-version   Set update version value for build [b00]
1847  --with-user-release-suffix
1848                          Add a custom string to the version string if build
1849                          number isn't set.[username_builddateb00]
1850  --with-build-number     Set build number value for build [b00]
1851  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1852  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1853                          invocations of the Boot JDK, overriding the default
1854                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1855                          -enableassertions"
1856  --with-add-source-root  for each and every source directory, look in this
1857                          additional source root for the same directory; if it
1858                          exists and have files in it, include it in the build
1859  --with-override-source-root
1860                          for each and every source directory, look in this
1861                          override source root for the same directory; if it
1862                          exists, use that directory instead and ignore the
1863                          directory in the original source root
1864  --with-adds-and-overrides
1865                          use the subdirs 'adds' and 'overrides' in the
1866                          specified directory as add-source-root and
1867                          override-source-root
1868  --with-override-langtools
1869                          use this langtools dir for the build
1870  --with-override-corba   use this corba dir for the build
1871  --with-override-jaxp    use this jaxp dir for the build
1872  --with-override-jaxws   use this jaxws dir for the build
1873  --with-override-hotspot use this hotspot dir for the build
1874  --with-override-nashorn use this nashorn dir for the build
1875  --with-override-jdk     use this jdk dir for the build
1876  --with-import-hotspot   import hotspot binaries from this jdk image or
1877                          hotspot build dist dir instead of building from
1878                          source
1879  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1880                          only) [probed]
1881  --with-dxsdk            Deprecated. Option is kept for backwards
1882                          compatibility and is ignored
1883  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1884                          compatibility and is ignored
1885  --with-dxsdk-include    Deprecated. Option is kept for backwards
1886                          compatibility and is ignored
1887  --with-jtreg            Regression Test Harness [probed]
1888  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1889  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1890  --with-extra-ldflags    extra flags to be used when linking jdk
1891  --with-x                use the X Window System
1892  --with-cups             specify prefix directory for the cups package
1893                          (expecting the headers under PATH/include)
1894  --with-cups-include     specify directory for the cups include files
1895  --with-freetype         specify prefix directory for the freetype package
1896                          (expecting the libraries under PATH/lib and the
1897                          headers under PATH/include)
1898  --with-freetype-include specify directory for the freetype include files
1899  --with-freetype-lib     specify directory for the freetype library
1900  --with-alsa             specify prefix directory for the alsa package
1901                          (expecting the libraries under PATH/lib and the
1902                          headers under PATH/include)
1903  --with-alsa-include     specify directory for the alsa include files
1904  --with-alsa-lib         specify directory for the alsa library
1905  --with-giflib           use giflib from build system or OpenJDK source
1906                          (system, bundled) [bundled]
1907  --with-zlib             use zlib from build system or OpenJDK source
1908                          (system, bundled) [bundled]
1909  --with-stdc++lib=<static>,<dynamic>,<default>
1910                          force linking of the C++ runtime on Linux to either
1911                          static or dynamic, default is static with dynamic as
1912                          fallback
1913  --with-num-cores        number of cores in the build system, e.g.
1914                          --with-num-cores=8 [probed]
1915  --with-memory-size      memory (in MB) available in the build system, e.g.
1916                          --with-memory-size=1024 [probed]
1917  --with-jobs             number of parallel jobs to let make run [calculated
1918                          based on cores and memory]
1919  --with-sjavac-server-java
1920                          use this java binary for running the sjavac
1921                          background server [Boot JDK java]
1922  --with-ccache-dir       where to store ccache files [~/.ccache]
1923
1924Some influential environment variables:
1925  BASENAME    Override default value for BASENAME
1926  BASH        Override default value for BASH
1927  CAT         Override default value for CAT
1928  CHMOD       Override default value for CHMOD
1929  CMP         Override default value for CMP
1930  COMM        Override default value for COMM
1931  CP          Override default value for CP
1932  CPIO        Override default value for CPIO
1933  CUT         Override default value for CUT
1934  DATE        Override default value for DATE
1935  DIFF        Override default value for DIFF
1936  DIRNAME     Override default value for DIRNAME
1937  ECHO        Override default value for ECHO
1938  EXPR        Override default value for EXPR
1939  FILE        Override default value for FILE
1940  FIND        Override default value for FIND
1941  HEAD        Override default value for HEAD
1942  LN          Override default value for LN
1943  LS          Override default value for LS
1944  MKDIR       Override default value for MKDIR
1945  MKTEMP      Override default value for MKTEMP
1946  MV          Override default value for MV
1947  NAWK        Override default value for NAWK
1948  PRINTF      Override default value for PRINTF
1949  RM          Override default value for RM
1950  SH          Override default value for SH
1951  SORT        Override default value for SORT
1952  TAIL        Override default value for TAIL
1953  TAR         Override default value for TAR
1954  TEE         Override default value for TEE
1955  TOUCH       Override default value for TOUCH
1956  TR          Override default value for TR
1957  UNAME       Override default value for UNAME
1958  UNIQ        Override default value for UNIQ
1959  WC          Override default value for WC
1960  WHICH       Override default value for WHICH
1961  XARGS       Override default value for XARGS
1962  AWK         Override default value for AWK
1963  GREP        Override default value for GREP
1964  EGREP       Override default value for EGREP
1965  FGREP       Override default value for FGREP
1966  SED         Override default value for SED
1967  CYGPATH     Override default value for CYGPATH
1968  READLINK    Override default value for READLINK
1969  DF          Override default value for DF
1970  SETFILE     Override default value for SETFILE
1971  UNZIP       Override default value for UNZIP
1972  ZIP         Override default value for ZIP
1973  LDD         Override default value for LDD
1974  OTOOL       Override default value for OTOOL
1975  READELF     Override default value for READELF
1976  HG          Override default value for HG
1977  STAT        Override default value for STAT
1978  TIME        Override default value for TIME
1979  DSYMUTIL    Override default value for DSYMUTIL
1980  XATTR       Override default value for XATTR
1981  CODESIGN    Override default value for CODESIGN
1982  PKG_CONFIG  path to pkg-config utility
1983  BUILD_CC    Override default value for BUILD_CC
1984  BUILD_CXX   Override default value for BUILD_CXX
1985  BUILD_LD    Override default value for BUILD_LD
1986  CC          C compiler command
1987  CFLAGS      C compiler flags
1988  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1989              nonstandard directory <lib dir>
1990  LIBS        libraries to pass to the linker, e.g. -l<library>
1991  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1992              you have headers in a nonstandard directory <include dir>
1993  CXX         C++ compiler command
1994  CXXFLAGS    C++ compiler flags
1995  OBJC        Objective C compiler command
1996  OBJCFLAGS   Objective C compiler flags
1997  AR          Override default value for AR
1998  CPP         C preprocessor
1999  CXXCPP      C++ preprocessor
2000  AS          Override default value for AS
2001  NM          Override default value for NM
2002  GNM         Override default value for GNM
2003  STRIP       Override default value for STRIP
2004  MCS         Override default value for MCS
2005  OBJCOPY     Override default value for OBJCOPY
2006  OBJDUMP     Override default value for OBJDUMP
2007  LIPO        Override default value for LIPO
2008  JTREGEXE    Override default value for JTREGEXE
2009  XMKMF       Path to xmkmf, Makefile generator for X Window System
2010  FREETYPE_CFLAGS
2011              C compiler flags for FREETYPE, overriding pkg-config
2012  FREETYPE_LIBS
2013              linker flags for FREETYPE, overriding pkg-config
2014  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2015  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2016  LIBFFI_CFLAGS
2017              C compiler flags for LIBFFI, overriding pkg-config
2018  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2019  CCACHE      Override default value for CCACHE
2020
2021Use these variables to override the choices made by `configure' or to help
2022it to find libraries and programs with nonstandard names/locations.
2023
2024Report bugs to <build-dev@openjdk.java.net>.
2025OpenJDK home page: <http://openjdk.java.net>.
2026_ACEOF
2027ac_status=$?
2028fi
2029
2030if test "$ac_init_help" = "recursive"; then
2031  # If there are subdirs, report their specific --help.
2032  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2033    test -d "$ac_dir" ||
2034      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2035      continue
2036    ac_builddir=.
2037
2038case "$ac_dir" in
2039.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2040*)
2041  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2042  # A ".." for each directory in $ac_dir_suffix.
2043  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2044  case $ac_top_builddir_sub in
2045  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2046  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2047  esac ;;
2048esac
2049ac_abs_top_builddir=$ac_pwd
2050ac_abs_builddir=$ac_pwd$ac_dir_suffix
2051# for backward compatibility:
2052ac_top_builddir=$ac_top_build_prefix
2053
2054case $srcdir in
2055  .)  # We are building in place.
2056    ac_srcdir=.
2057    ac_top_srcdir=$ac_top_builddir_sub
2058    ac_abs_top_srcdir=$ac_pwd ;;
2059  [\\/]* | ?:[\\/]* )  # Absolute name.
2060    ac_srcdir=$srcdir$ac_dir_suffix;
2061    ac_top_srcdir=$srcdir
2062    ac_abs_top_srcdir=$srcdir ;;
2063  *) # Relative name.
2064    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2065    ac_top_srcdir=$ac_top_build_prefix$srcdir
2066    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2067esac
2068ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2069
2070    cd "$ac_dir" || { ac_status=$?; continue; }
2071    # Check for guested configure.
2072    if test -f "$ac_srcdir/configure.gnu"; then
2073      echo &&
2074      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2075    elif test -f "$ac_srcdir/configure"; then
2076      echo &&
2077      $SHELL "$ac_srcdir/configure" --help=recursive
2078    else
2079      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2080    fi || ac_status=$?
2081    cd "$ac_pwd" || { ac_status=$?; break; }
2082  done
2083fi
2084
2085test -n "$ac_init_help" && exit $ac_status
2086if $ac_init_version; then
2087  cat <<\_ACEOF
2088OpenJDK configure jdk8
2089generated by GNU Autoconf 2.69
2090
2091Copyright (C) 2012 Free Software Foundation, Inc.
2092This configure script is free software; the Free Software Foundation
2093gives unlimited permission to copy, distribute and modify it.
2094_ACEOF
2095  exit
2096fi
2097
2098## ------------------------ ##
2099## Autoconf initialization. ##
2100## ------------------------ ##
2101
2102# ac_fn_c_try_compile LINENO
2103# --------------------------
2104# Try to compile conftest.$ac_ext, and return whether this succeeded.
2105ac_fn_c_try_compile ()
2106{
2107  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108  rm -f conftest.$ac_objext
2109  if { { ac_try="$ac_compile"
2110case "(($ac_try" in
2111  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2112  *) ac_try_echo=$ac_try;;
2113esac
2114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2115$as_echo "$ac_try_echo"; } >&5
2116  (eval "$ac_compile") 2>conftest.err
2117  ac_status=$?
2118  if test -s conftest.err; then
2119    grep -v '^ *+' conftest.err >conftest.er1
2120    cat conftest.er1 >&5
2121    mv -f conftest.er1 conftest.err
2122  fi
2123  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2124  test $ac_status = 0; } && {
2125	 test -z "$ac_c_werror_flag" ||
2126	 test ! -s conftest.err
2127       } && test -s conftest.$ac_objext; then :
2128  ac_retval=0
2129else
2130  $as_echo "$as_me: failed program was:" >&5
2131sed 's/^/| /' conftest.$ac_ext >&5
2132
2133	ac_retval=1
2134fi
2135  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2136  as_fn_set_status $ac_retval
2137
2138} # ac_fn_c_try_compile
2139
2140# ac_fn_cxx_try_compile LINENO
2141# ----------------------------
2142# Try to compile conftest.$ac_ext, and return whether this succeeded.
2143ac_fn_cxx_try_compile ()
2144{
2145  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2146  rm -f conftest.$ac_objext
2147  if { { ac_try="$ac_compile"
2148case "(($ac_try" in
2149  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2150  *) ac_try_echo=$ac_try;;
2151esac
2152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2153$as_echo "$ac_try_echo"; } >&5
2154  (eval "$ac_compile") 2>conftest.err
2155  ac_status=$?
2156  if test -s conftest.err; then
2157    grep -v '^ *+' conftest.err >conftest.er1
2158    cat conftest.er1 >&5
2159    mv -f conftest.er1 conftest.err
2160  fi
2161  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2162  test $ac_status = 0; } && {
2163	 test -z "$ac_cxx_werror_flag" ||
2164	 test ! -s conftest.err
2165       } && test -s conftest.$ac_objext; then :
2166  ac_retval=0
2167else
2168  $as_echo "$as_me: failed program was:" >&5
2169sed 's/^/| /' conftest.$ac_ext >&5
2170
2171	ac_retval=1
2172fi
2173  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2174  as_fn_set_status $ac_retval
2175
2176} # ac_fn_cxx_try_compile
2177
2178# ac_fn_objc_try_compile LINENO
2179# -----------------------------
2180# Try to compile conftest.$ac_ext, and return whether this succeeded.
2181ac_fn_objc_try_compile ()
2182{
2183  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184  rm -f conftest.$ac_objext
2185  if { { ac_try="$ac_compile"
2186case "(($ac_try" in
2187  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2188  *) ac_try_echo=$ac_try;;
2189esac
2190eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2191$as_echo "$ac_try_echo"; } >&5
2192  (eval "$ac_compile") 2>conftest.err
2193  ac_status=$?
2194  if test -s conftest.err; then
2195    grep -v '^ *+' conftest.err >conftest.er1
2196    cat conftest.er1 >&5
2197    mv -f conftest.er1 conftest.err
2198  fi
2199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2200  test $ac_status = 0; } && {
2201	 test -z "$ac_objc_werror_flag" ||
2202	 test ! -s conftest.err
2203       } && test -s conftest.$ac_objext; then :
2204  ac_retval=0
2205else
2206  $as_echo "$as_me: failed program was:" >&5
2207sed 's/^/| /' conftest.$ac_ext >&5
2208
2209	ac_retval=1
2210fi
2211  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2212  as_fn_set_status $ac_retval
2213
2214} # ac_fn_objc_try_compile
2215
2216# ac_fn_c_try_cpp LINENO
2217# ----------------------
2218# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2219ac_fn_c_try_cpp ()
2220{
2221  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2222  if { { ac_try="$ac_cpp conftest.$ac_ext"
2223case "(($ac_try" in
2224  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2225  *) ac_try_echo=$ac_try;;
2226esac
2227eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2228$as_echo "$ac_try_echo"; } >&5
2229  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2230  ac_status=$?
2231  if test -s conftest.err; then
2232    grep -v '^ *+' conftest.err >conftest.er1
2233    cat conftest.er1 >&5
2234    mv -f conftest.er1 conftest.err
2235  fi
2236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2237  test $ac_status = 0; } > conftest.i && {
2238	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2239	 test ! -s conftest.err
2240       }; then :
2241  ac_retval=0
2242else
2243  $as_echo "$as_me: failed program was:" >&5
2244sed 's/^/| /' conftest.$ac_ext >&5
2245
2246    ac_retval=1
2247fi
2248  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2249  as_fn_set_status $ac_retval
2250
2251} # ac_fn_c_try_cpp
2252
2253# ac_fn_cxx_try_cpp LINENO
2254# ------------------------
2255# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2256ac_fn_cxx_try_cpp ()
2257{
2258  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259  if { { ac_try="$ac_cpp conftest.$ac_ext"
2260case "(($ac_try" in
2261  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2262  *) ac_try_echo=$ac_try;;
2263esac
2264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2265$as_echo "$ac_try_echo"; } >&5
2266  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2267  ac_status=$?
2268  if test -s conftest.err; then
2269    grep -v '^ *+' conftest.err >conftest.er1
2270    cat conftest.er1 >&5
2271    mv -f conftest.er1 conftest.err
2272  fi
2273  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2274  test $ac_status = 0; } > conftest.i && {
2275	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2276	 test ! -s conftest.err
2277       }; then :
2278  ac_retval=0
2279else
2280  $as_echo "$as_me: failed program was:" >&5
2281sed 's/^/| /' conftest.$ac_ext >&5
2282
2283    ac_retval=1
2284fi
2285  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2286  as_fn_set_status $ac_retval
2287
2288} # ac_fn_cxx_try_cpp
2289
2290# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2291# ---------------------------------------------------------
2292# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2293# the include files in INCLUDES and setting the cache variable VAR
2294# accordingly.
2295ac_fn_cxx_check_header_mongrel ()
2296{
2297  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298  if eval \${$3+:} false; then :
2299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2300$as_echo_n "checking for $2... " >&6; }
2301if eval \${$3+:} false; then :
2302  $as_echo_n "(cached) " >&6
2303fi
2304eval ac_res=\$$3
2305	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2306$as_echo "$ac_res" >&6; }
2307else
2308  # Is the header compilable?
2309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2310$as_echo_n "checking $2 usability... " >&6; }
2311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h.  */
2313$4
2314#include <$2>
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_header_compiler=yes
2318else
2319  ac_header_compiler=no
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2323$as_echo "$ac_header_compiler" >&6; }
2324
2325# Is the header present?
2326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2327$as_echo_n "checking $2 presence... " >&6; }
2328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330#include <$2>
2331_ACEOF
2332if ac_fn_cxx_try_cpp "$LINENO"; then :
2333  ac_header_preproc=yes
2334else
2335  ac_header_preproc=no
2336fi
2337rm -f conftest.err conftest.i conftest.$ac_ext
2338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2339$as_echo "$ac_header_preproc" >&6; }
2340
2341# So?  What about this header?
2342case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2343  yes:no: )
2344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2345$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2346    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2347$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2348    ;;
2349  no:yes:* )
2350    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2351$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2352    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2353$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2354    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2355$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2356    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2357$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2358    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2359$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2360( $as_echo "## ----------------------------------------- ##
2361## Report this to build-dev@openjdk.java.net ##
2362## ----------------------------------------- ##"
2363     ) | sed "s/^/$as_me: WARNING:     /" >&2
2364    ;;
2365esac
2366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2367$as_echo_n "checking for $2... " >&6; }
2368if eval \${$3+:} false; then :
2369  $as_echo_n "(cached) " >&6
2370else
2371  eval "$3=\$ac_header_compiler"
2372fi
2373eval ac_res=\$$3
2374	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2375$as_echo "$ac_res" >&6; }
2376fi
2377  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378
2379} # ac_fn_cxx_check_header_mongrel
2380
2381# ac_fn_cxx_try_run LINENO
2382# ------------------------
2383# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2384# that executables *can* be run.
2385ac_fn_cxx_try_run ()
2386{
2387  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388  if { { ac_try="$ac_link"
2389case "(($ac_try" in
2390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391  *) ac_try_echo=$ac_try;;
2392esac
2393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394$as_echo "$ac_try_echo"; } >&5
2395  (eval "$ac_link") 2>&5
2396  ac_status=$?
2397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2398  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2399  { { case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_try") 2>&5
2406  ac_status=$?
2407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2408  test $ac_status = 0; }; }; then :
2409  ac_retval=0
2410else
2411  $as_echo "$as_me: program exited with status $ac_status" >&5
2412       $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415       ac_retval=$ac_status
2416fi
2417  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2418  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419  as_fn_set_status $ac_retval
2420
2421} # ac_fn_cxx_try_run
2422
2423# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2424# ---------------------------------------------------------
2425# Tests whether HEADER exists and can be compiled using the include files in
2426# INCLUDES, setting the cache variable VAR accordingly.
2427ac_fn_cxx_check_header_compile ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431$as_echo_n "checking for $2... " >&6; }
2432if eval \${$3+:} false; then :
2433  $as_echo_n "(cached) " >&6
2434else
2435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2436/* end confdefs.h.  */
2437$4
2438#include <$2>
2439_ACEOF
2440if ac_fn_cxx_try_compile "$LINENO"; then :
2441  eval "$3=yes"
2442else
2443  eval "$3=no"
2444fi
2445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446fi
2447eval ac_res=\$$3
2448	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2449$as_echo "$ac_res" >&6; }
2450  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451
2452} # ac_fn_cxx_check_header_compile
2453
2454# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2455# ----------------------------------------------
2456# Tries to find the compile-time value of EXPR in a program that includes
2457# INCLUDES, setting VAR accordingly. Returns whether the value could be
2458# computed
2459ac_fn_cxx_compute_int ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  if test "$cross_compiling" = yes; then
2463    # Depending upon the size, compute the lo and hi bounds.
2464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2465/* end confdefs.h.  */
2466$4
2467int
2468main ()
2469{
2470static int test_array [1 - 2 * !(($2) >= 0)];
2471test_array [0] = 0;
2472return test_array [0];
2473
2474  ;
2475  return 0;
2476}
2477_ACEOF
2478if ac_fn_cxx_try_compile "$LINENO"; then :
2479  ac_lo=0 ac_mid=0
2480  while :; do
2481    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2482/* end confdefs.h.  */
2483$4
2484int
2485main ()
2486{
2487static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2488test_array [0] = 0;
2489return test_array [0];
2490
2491  ;
2492  return 0;
2493}
2494_ACEOF
2495if ac_fn_cxx_try_compile "$LINENO"; then :
2496  ac_hi=$ac_mid; break
2497else
2498  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2499			if test $ac_lo -le $ac_mid; then
2500			  ac_lo= ac_hi=
2501			  break
2502			fi
2503			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2504fi
2505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2506  done
2507else
2508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510$4
2511int
2512main ()
2513{
2514static int test_array [1 - 2 * !(($2) < 0)];
2515test_array [0] = 0;
2516return test_array [0];
2517
2518  ;
2519  return 0;
2520}
2521_ACEOF
2522if ac_fn_cxx_try_compile "$LINENO"; then :
2523  ac_hi=-1 ac_mid=-1
2524  while :; do
2525    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h.  */
2527$4
2528int
2529main ()
2530{
2531static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2532test_array [0] = 0;
2533return test_array [0];
2534
2535  ;
2536  return 0;
2537}
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  ac_lo=$ac_mid; break
2541else
2542  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2543			if test $ac_mid -le $ac_hi; then
2544			  ac_lo= ac_hi=
2545			  break
2546			fi
2547			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2548fi
2549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550  done
2551else
2552  ac_lo= ac_hi=
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555fi
2556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2557# Binary search between lo and hi bounds.
2558while test "x$ac_lo" != "x$ac_hi"; do
2559  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563int
2564main ()
2565{
2566static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2567test_array [0] = 0;
2568return test_array [0];
2569
2570  ;
2571  return 0;
2572}
2573_ACEOF
2574if ac_fn_cxx_try_compile "$LINENO"; then :
2575  ac_hi=$ac_mid
2576else
2577  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580done
2581case $ac_lo in #((
2582?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2583'') ac_retval=1 ;;
2584esac
2585  else
2586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587/* end confdefs.h.  */
2588$4
2589static long int longval () { return $2; }
2590static unsigned long int ulongval () { return $2; }
2591#include <stdio.h>
2592#include <stdlib.h>
2593int
2594main ()
2595{
2596
2597  FILE *f = fopen ("conftest.val", "w");
2598  if (! f)
2599    return 1;
2600  if (($2) < 0)
2601    {
2602      long int i = longval ();
2603      if (i != ($2))
2604	return 1;
2605      fprintf (f, "%ld", i);
2606    }
2607  else
2608    {
2609      unsigned long int i = ulongval ();
2610      if (i != ($2))
2611	return 1;
2612      fprintf (f, "%lu", i);
2613    }
2614  /* Do not output a trailing newline, as this causes \r\n confusion
2615     on some platforms.  */
2616  return ferror (f) || fclose (f) != 0;
2617
2618  ;
2619  return 0;
2620}
2621_ACEOF
2622if ac_fn_cxx_try_run "$LINENO"; then :
2623  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2624else
2625  ac_retval=1
2626fi
2627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2628  conftest.$ac_objext conftest.beam conftest.$ac_ext
2629rm -f conftest.val
2630
2631  fi
2632  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2633  as_fn_set_status $ac_retval
2634
2635} # ac_fn_cxx_compute_int
2636
2637# ac_fn_cxx_try_link LINENO
2638# -------------------------
2639# Try to link conftest.$ac_ext, and return whether this succeeded.
2640ac_fn_cxx_try_link ()
2641{
2642  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2643  rm -f conftest.$ac_objext conftest$ac_exeext
2644  if { { ac_try="$ac_link"
2645case "(($ac_try" in
2646  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647  *) ac_try_echo=$ac_try;;
2648esac
2649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2650$as_echo "$ac_try_echo"; } >&5
2651  (eval "$ac_link") 2>conftest.err
2652  ac_status=$?
2653  if test -s conftest.err; then
2654    grep -v '^ *+' conftest.err >conftest.er1
2655    cat conftest.er1 >&5
2656    mv -f conftest.er1 conftest.err
2657  fi
2658  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2659  test $ac_status = 0; } && {
2660	 test -z "$ac_cxx_werror_flag" ||
2661	 test ! -s conftest.err
2662       } && test -s conftest$ac_exeext && {
2663	 test "$cross_compiling" = yes ||
2664	 test -x conftest$ac_exeext
2665       }; then :
2666  ac_retval=0
2667else
2668  $as_echo "$as_me: failed program was:" >&5
2669sed 's/^/| /' conftest.$ac_ext >&5
2670
2671	ac_retval=1
2672fi
2673  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2674  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2675  # interfere with the next link command; also delete a directory that is
2676  # left behind by Apple's compiler.  We do this before executing the actions.
2677  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2678  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2679  as_fn_set_status $ac_retval
2680
2681} # ac_fn_cxx_try_link
2682
2683# ac_fn_cxx_check_func LINENO FUNC VAR
2684# ------------------------------------
2685# Tests whether FUNC exists, setting the cache variable VAR accordingly
2686ac_fn_cxx_check_func ()
2687{
2688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2690$as_echo_n "checking for $2... " >&6; }
2691if eval \${$3+:} false; then :
2692  $as_echo_n "(cached) " >&6
2693else
2694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695/* end confdefs.h.  */
2696/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2697   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2698#define $2 innocuous_$2
2699
2700/* System header to define __stub macros and hopefully few prototypes,
2701    which can conflict with char $2 (); below.
2702    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2703    <limits.h> exists even on freestanding compilers.  */
2704
2705#ifdef __STDC__
2706# include <limits.h>
2707#else
2708# include <assert.h>
2709#endif
2710
2711#undef $2
2712
2713/* Override any GCC internal prototype to avoid an error.
2714   Use char because int might match the return type of a GCC
2715   builtin and then its argument prototype would still apply.  */
2716#ifdef __cplusplus
2717extern "C"
2718#endif
2719char $2 ();
2720/* The GNU C library defines this for functions which it implements
2721    to always fail with ENOSYS.  Some functions are actually named
2722    something starting with __ and the normal name is an alias.  */
2723#if defined __stub_$2 || defined __stub___$2
2724choke me
2725#endif
2726
2727int
2728main ()
2729{
2730return $2 ();
2731  ;
2732  return 0;
2733}
2734_ACEOF
2735if ac_fn_cxx_try_link "$LINENO"; then :
2736  eval "$3=yes"
2737else
2738  eval "$3=no"
2739fi
2740rm -f core conftest.err conftest.$ac_objext \
2741    conftest$ac_exeext conftest.$ac_ext
2742fi
2743eval ac_res=\$$3
2744	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2745$as_echo "$ac_res" >&6; }
2746  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2747
2748} # ac_fn_cxx_check_func
2749
2750# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2751# -------------------------------------------------------
2752# Tests whether HEADER exists and can be compiled using the include files in
2753# INCLUDES, setting the cache variable VAR accordingly.
2754ac_fn_c_check_header_compile ()
2755{
2756  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2758$as_echo_n "checking for $2... " >&6; }
2759if eval \${$3+:} false; then :
2760  $as_echo_n "(cached) " >&6
2761else
2762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2763/* end confdefs.h.  */
2764$4
2765#include <$2>
2766_ACEOF
2767if ac_fn_c_try_compile "$LINENO"; then :
2768  eval "$3=yes"
2769else
2770  eval "$3=no"
2771fi
2772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2773fi
2774eval ac_res=\$$3
2775	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2776$as_echo "$ac_res" >&6; }
2777  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778
2779} # ac_fn_c_check_header_compile
2780cat >config.log <<_ACEOF
2781This file contains any messages produced by compilers while
2782running configure, to aid debugging if configure makes a mistake.
2783
2784It was created by OpenJDK $as_me jdk8, which was
2785generated by GNU Autoconf 2.69.  Invocation command line was
2786
2787  $ $0 $@
2788
2789_ACEOF
2790exec 5>>config.log
2791{
2792cat <<_ASUNAME
2793## --------- ##
2794## Platform. ##
2795## --------- ##
2796
2797hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2798uname -m = `(uname -m) 2>/dev/null || echo unknown`
2799uname -r = `(uname -r) 2>/dev/null || echo unknown`
2800uname -s = `(uname -s) 2>/dev/null || echo unknown`
2801uname -v = `(uname -v) 2>/dev/null || echo unknown`
2802
2803/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2804/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2805
2806/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2807/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2808/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2809/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2810/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2811/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2812/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2813
2814_ASUNAME
2815
2816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2817for as_dir in $PATH
2818do
2819  IFS=$as_save_IFS
2820  test -z "$as_dir" && as_dir=.
2821    $as_echo "PATH: $as_dir"
2822  done
2823IFS=$as_save_IFS
2824
2825} >&5
2826
2827cat >&5 <<_ACEOF
2828
2829
2830## ----------- ##
2831## Core tests. ##
2832## ----------- ##
2833
2834_ACEOF
2835
2836
2837# Keep a trace of the command line.
2838# Strip out --no-create and --no-recursion so they do not pile up.
2839# Strip out --silent because we don't want to record it for future runs.
2840# Also quote any args containing shell meta-characters.
2841# Make two passes to allow for proper duplicate-argument suppression.
2842ac_configure_args=
2843ac_configure_args0=
2844ac_configure_args1=
2845ac_must_keep_next=false
2846for ac_pass in 1 2
2847do
2848  for ac_arg
2849  do
2850    case $ac_arg in
2851    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2852    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2853    | -silent | --silent | --silen | --sile | --sil)
2854      continue ;;
2855    *\'*)
2856      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2857    esac
2858    case $ac_pass in
2859    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2860    2)
2861      as_fn_append ac_configure_args1 " '$ac_arg'"
2862      if test $ac_must_keep_next = true; then
2863	ac_must_keep_next=false # Got value, back to normal.
2864      else
2865	case $ac_arg in
2866	  *=* | --config-cache | -C | -disable-* | --disable-* \
2867	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2868	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2869	  | -with-* | --with-* | -without-* | --without-* | --x)
2870	    case "$ac_configure_args0 " in
2871	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2872	    esac
2873	    ;;
2874	  -* ) ac_must_keep_next=true ;;
2875	esac
2876      fi
2877      as_fn_append ac_configure_args " '$ac_arg'"
2878      ;;
2879    esac
2880  done
2881done
2882{ ac_configure_args0=; unset ac_configure_args0;}
2883{ ac_configure_args1=; unset ac_configure_args1;}
2884
2885# When interrupted or exit'd, cleanup temporary files, and complete
2886# config.log.  We remove comments because anyway the quotes in there
2887# would cause problems or look ugly.
2888# WARNING: Use '\'' to represent an apostrophe within the trap.
2889# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2890trap 'exit_status=$?
2891  # Save into config.log some information that might help in debugging.
2892  {
2893    echo
2894
2895    $as_echo "## ---------------- ##
2896## Cache variables. ##
2897## ---------------- ##"
2898    echo
2899    # The following way of writing the cache mishandles newlines in values,
2900(
2901  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2902    eval ac_val=\$$ac_var
2903    case $ac_val in #(
2904    *${as_nl}*)
2905      case $ac_var in #(
2906      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2907$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2908      esac
2909      case $ac_var in #(
2910      _ | IFS | as_nl) ;; #(
2911      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2912      *) { eval $ac_var=; unset $ac_var;} ;;
2913      esac ;;
2914    esac
2915  done
2916  (set) 2>&1 |
2917    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2918    *${as_nl}ac_space=\ *)
2919      sed -n \
2920	"s/'\''/'\''\\\\'\'''\''/g;
2921	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2922      ;; #(
2923    *)
2924      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2925      ;;
2926    esac |
2927    sort
2928)
2929    echo
2930
2931    $as_echo "## ----------------- ##
2932## Output variables. ##
2933## ----------------- ##"
2934    echo
2935    for ac_var in $ac_subst_vars
2936    do
2937      eval ac_val=\$$ac_var
2938      case $ac_val in
2939      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2940      esac
2941      $as_echo "$ac_var='\''$ac_val'\''"
2942    done | sort
2943    echo
2944
2945    if test -n "$ac_subst_files"; then
2946      $as_echo "## ------------------- ##
2947## File substitutions. ##
2948## ------------------- ##"
2949      echo
2950      for ac_var in $ac_subst_files
2951      do
2952	eval ac_val=\$$ac_var
2953	case $ac_val in
2954	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2955	esac
2956	$as_echo "$ac_var='\''$ac_val'\''"
2957      done | sort
2958      echo
2959    fi
2960
2961    if test -s confdefs.h; then
2962      $as_echo "## ----------- ##
2963## confdefs.h. ##
2964## ----------- ##"
2965      echo
2966      cat confdefs.h
2967      echo
2968    fi
2969    test "$ac_signal" != 0 &&
2970      $as_echo "$as_me: caught signal $ac_signal"
2971    $as_echo "$as_me: exit $exit_status"
2972  } >&5
2973  rm -f core *.core core.conftest.* &&
2974    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2975    exit $exit_status
2976' 0
2977for ac_signal in 1 2 13 15; do
2978  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2979done
2980ac_signal=0
2981
2982# confdefs.h avoids OS command line length limits that DEFS can exceed.
2983rm -f -r conftest* confdefs.h
2984
2985$as_echo "/* confdefs.h */" > confdefs.h
2986
2987# Predefined preprocessor variables.
2988
2989cat >>confdefs.h <<_ACEOF
2990#define PACKAGE_NAME "$PACKAGE_NAME"
2991_ACEOF
2992
2993cat >>confdefs.h <<_ACEOF
2994#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2995_ACEOF
2996
2997cat >>confdefs.h <<_ACEOF
2998#define PACKAGE_VERSION "$PACKAGE_VERSION"
2999_ACEOF
3000
3001cat >>confdefs.h <<_ACEOF
3002#define PACKAGE_STRING "$PACKAGE_STRING"
3003_ACEOF
3004
3005cat >>confdefs.h <<_ACEOF
3006#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3007_ACEOF
3008
3009cat >>confdefs.h <<_ACEOF
3010#define PACKAGE_URL "$PACKAGE_URL"
3011_ACEOF
3012
3013
3014# Let the site file select an alternate cache file if it wants to.
3015# Prefer an explicitly selected file to automatically selected ones.
3016ac_site_file1=NONE
3017ac_site_file2=NONE
3018if test -n "$CONFIG_SITE"; then
3019  # We do not want a PATH search for config.site.
3020  case $CONFIG_SITE in #((
3021    -*)  ac_site_file1=./$CONFIG_SITE;;
3022    */*) ac_site_file1=$CONFIG_SITE;;
3023    *)   ac_site_file1=./$CONFIG_SITE;;
3024  esac
3025elif test "x$prefix" != xNONE; then
3026  ac_site_file1=$prefix/share/config.site
3027  ac_site_file2=$prefix/etc/config.site
3028else
3029  ac_site_file1=$ac_default_prefix/share/config.site
3030  ac_site_file2=$ac_default_prefix/etc/config.site
3031fi
3032for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3033do
3034  test "x$ac_site_file" = xNONE && continue
3035  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3036    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3037$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3038    sed 's/^/| /' "$ac_site_file" >&5
3039    . "$ac_site_file" \
3040      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3042as_fn_error $? "failed to load site script $ac_site_file
3043See \`config.log' for more details" "$LINENO" 5; }
3044  fi
3045done
3046
3047if test -r "$cache_file"; then
3048  # Some versions of bash will fail to source /dev/null (special files
3049  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3050  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3051    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3052$as_echo "$as_me: loading cache $cache_file" >&6;}
3053    case $cache_file in
3054      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3055      *)                      . "./$cache_file";;
3056    esac
3057  fi
3058else
3059  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3060$as_echo "$as_me: creating cache $cache_file" >&6;}
3061  >$cache_file
3062fi
3063
3064# Check that the precious variables saved in the cache have kept the same
3065# value.
3066ac_cache_corrupted=false
3067for ac_var in $ac_precious_vars; do
3068  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3069  eval ac_new_set=\$ac_env_${ac_var}_set
3070  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3071  eval ac_new_val=\$ac_env_${ac_var}_value
3072  case $ac_old_set,$ac_new_set in
3073    set,)
3074      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3075$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3076      ac_cache_corrupted=: ;;
3077    ,set)
3078      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3079$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3080      ac_cache_corrupted=: ;;
3081    ,);;
3082    *)
3083      if test "x$ac_old_val" != "x$ac_new_val"; then
3084	# differences in whitespace do not lead to failure.
3085	ac_old_val_w=`echo x $ac_old_val`
3086	ac_new_val_w=`echo x $ac_new_val`
3087	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3088	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3089$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3090	  ac_cache_corrupted=:
3091	else
3092	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3093$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3094	  eval $ac_var=\$ac_old_val
3095	fi
3096	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3097$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3098	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3099$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3100      fi;;
3101  esac
3102  # Pass precious variables to config.status.
3103  if test "$ac_new_set" = set; then
3104    case $ac_new_val in
3105    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3106    *) ac_arg=$ac_var=$ac_new_val ;;
3107    esac
3108    case " $ac_configure_args " in
3109      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3110      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3111    esac
3112  fi
3113done
3114if $ac_cache_corrupted; then
3115  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3117  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3118$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3119  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3120fi
3121## -------------------- ##
3122## Main body of script. ##
3123## -------------------- ##
3124
3125ac_ext=c
3126ac_cpp='$CPP $CPPFLAGS'
3127ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3128ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3129ac_compiler_gnu=$ac_cv_c_compiler_gnu
3130
3131
3132
3133ac_aux_dir=
3134for ac_dir in build-aux "$srcdir"/build-aux; do
3135  if test -f "$ac_dir/install-sh"; then
3136    ac_aux_dir=$ac_dir
3137    ac_install_sh="$ac_aux_dir/install-sh -c"
3138    break
3139  elif test -f "$ac_dir/install.sh"; then
3140    ac_aux_dir=$ac_dir
3141    ac_install_sh="$ac_aux_dir/install.sh -c"
3142    break
3143  elif test -f "$ac_dir/shtool"; then
3144    ac_aux_dir=$ac_dir
3145    ac_install_sh="$ac_aux_dir/shtool install -c"
3146    break
3147  fi
3148done
3149if test -z "$ac_aux_dir"; then
3150  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3151fi
3152
3153# These three variables are undocumented and unsupported,
3154# and are intended to be withdrawn in a future Autoconf release.
3155# They can cause serious problems if a builder's source tree is in a directory
3156# whose full name contains unusual characters.
3157ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3158ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3159ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3160
3161
3162# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3163
3164#
3165# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3166# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3167#
3168# This code is free software; you can redistribute it and/or modify it
3169# under the terms of the GNU General Public License version 2 only, as
3170# published by the Free Software Foundation.  Oracle designates this
3171# particular file as subject to the "Classpath" exception as provided
3172# by Oracle in the LICENSE file that accompanied this code.
3173#
3174# This code is distributed in the hope that it will be useful, but WITHOUT
3175# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3176# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3177# version 2 for more details (a copy is included in the LICENSE file that
3178# accompanied this code).
3179#
3180# You should have received a copy of the GNU General Public License version
3181# 2 along with this work; if not, write to the Free Software Foundation,
3182# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3183#
3184# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3185# or visit www.oracle.com if you need additional information or have any
3186# questions.
3187#
3188
3189#
3190# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3191#
3192# This program is free software; you can redistribute it and/or modify
3193# it under the terms of the GNU General Public License as published by
3194# the Free Software Foundation; either version 2 of the License, or
3195# (at your option) any later version.
3196#
3197# This program is distributed in the hope that it will be useful, but
3198# WITHOUT ANY WARRANTY; without even the implied warranty of
3199# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3200# General Public License for more details.
3201#
3202# You should have received a copy of the GNU General Public License
3203# along with this program; if not, write to the Free Software
3204# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3205#
3206# As a special exception to the GNU General Public License, if you
3207# distribute this file as part of a program that contains a
3208# configuration script generated by Autoconf, you may include it under
3209# the same distribution terms that you use for the rest of that program.
3210
3211# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3212# ----------------------------------
3213# PKG_PROG_PKG_CONFIG
3214
3215# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3216#
3217# Check to see whether a particular set of modules exists.  Similar
3218# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3219#
3220#
3221# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3222# this or PKG_CHECK_MODULES is called, or make sure to call
3223# PKG_CHECK_EXISTS manually
3224# --------------------------------------------------------------
3225
3226
3227
3228# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3229# ---------------------------------------------
3230# _PKG_CONFIG
3231
3232# _PKG_SHORT_ERRORS_SUPPORTED
3233# -----------------------------
3234# _PKG_SHORT_ERRORS_SUPPORTED
3235
3236
3237# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3238# [ACTION-IF-NOT-FOUND])
3239#
3240#
3241# Note that if there is a possibility the first call to
3242# PKG_CHECK_MODULES might not happen, you should be sure to include an
3243# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3244#
3245#
3246# --------------------------------------------------------------
3247# PKG_CHECK_MODULES
3248
3249
3250# Include these first...
3251#
3252# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3254#
3255# This code is free software; you can redistribute it and/or modify it
3256# under the terms of the GNU General Public License version 2 only, as
3257# published by the Free Software Foundation.  Oracle designates this
3258# particular file as subject to the "Classpath" exception as provided
3259# by Oracle in the LICENSE file that accompanied this code.
3260#
3261# This code is distributed in the hope that it will be useful, but WITHOUT
3262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3264# version 2 for more details (a copy is included in the LICENSE file that
3265# accompanied this code).
3266#
3267# You should have received a copy of the GNU General Public License version
3268# 2 along with this work; if not, write to the Free Software Foundation,
3269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3270#
3271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3272# or visit www.oracle.com if you need additional information or have any
3273# questions.
3274#
3275
3276# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3277# If so, then append $1 to $2 \
3278# Also set JVM_ARG_OK to true/false depending on outcome.
3279
3280
3281# Appends a string to a path variable, only adding the : when needed.
3282
3283
3284# This will make sure the given variable points to a full and proper
3285# path. This means:
3286# 1) There will be no spaces in the path. On posix platforms,
3287#    spaces in the path will result in an error. On Windows,
3288#    the path will be rewritten using short-style to be space-free.
3289# 2) The path will be absolute, and it will be in unix-style (on
3290#     cygwin).
3291# $1: The name of the variable to fix
3292
3293
3294# This will make sure the given variable points to a executable
3295# with a full and proper path. This means:
3296# 1) There will be no spaces in the path. On posix platforms,
3297#    spaces in the path will result in an error. On Windows,
3298#    the path will be rewritten using short-style to be space-free.
3299# 2) The path will be absolute, and it will be in unix-style (on
3300#     cygwin).
3301# Any arguments given to the executable is preserved.
3302# If the input variable does not have a directory specification, then
3303# it need to be in the PATH.
3304# $1: The name of the variable to fix
3305
3306
3307
3308
3309# Register a --with argument but mark it as deprecated
3310# $1: The name of the with argument to deprecate, not including --with-
3311
3312
3313# Register a --enable argument but mark it as deprecated
3314# $1: The name of the with argument to deprecate, not including --enable-
3315# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3316
3317
3318
3319
3320# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3321# $1: variable to check
3322
3323
3324# Check that there are no unprocessed overridden variables left.
3325# If so, they are an incorrect argument and we will exit with an error.
3326
3327
3328# Setup a tool for the given variable. If correctly specified by the user,
3329# use that value, otherwise search for the tool using the supplied code snippet.
3330# $1: variable to set
3331# $2: code snippet to call to look for the tool
3332
3333
3334# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3335# $1: variable to set
3336# $2: executable name (or list of names) to look for
3337
3338
3339# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3340# $1: variable to set
3341# $2: executable name (or list of names) to look for
3342
3343
3344# Like BASIC_PATH_PROGS but fails if no tool was found.
3345# $1: variable to set
3346# $2: executable name (or list of names) to look for
3347
3348
3349# Like BASIC_SETUP_TOOL but fails if no tool was found.
3350# $1: variable to set
3351# $2: autoconf macro to call to look for the special tool
3352
3353
3354# Setup the most fundamental tools that relies on not much else to set up,
3355# but is used by much of the early bootstrap code.
3356
3357
3358# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3359
3360
3361
3362
3363
3364
3365
3366#%%% Simple tools %%%
3367
3368# Check if we have found a usable version of make
3369# $1: the path to a potential make binary (or empty)
3370# $2: the description on how we found this
3371
3372
3373# Goes looking for a usable version of GNU make.
3374
3375
3376
3377
3378
3379
3380# Check if build directory is on local disk. If not possible to determine,
3381# we prefer to claim it's local.
3382# Argument 1: directory to test
3383# Argument 2: what to do if it is on local disk
3384# Argument 3: what to do otherwise (remote disk or failure)
3385
3386
3387# Check that source files have basic read permissions set. This might
3388# not be the case in cygwin in certain conditions.
3389
3390
3391
3392
3393#
3394# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396#
3397# This code is free software; you can redistribute it and/or modify it
3398# under the terms of the GNU General Public License version 2 only, as
3399# published by the Free Software Foundation.  Oracle designates this
3400# particular file as subject to the "Classpath" exception as provided
3401# by Oracle in the LICENSE file that accompanied this code.
3402#
3403# This code is distributed in the hope that it will be useful, but WITHOUT
3404# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406# version 2 for more details (a copy is included in the LICENSE file that
3407# accompanied this code).
3408#
3409# You should have received a copy of the GNU General Public License version
3410# 2 along with this work; if not, write to the Free Software Foundation,
3411# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412#
3413# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414# or visit www.oracle.com if you need additional information or have any
3415# questions.
3416#
3417
3418
3419
3420
3421
3422# Helper function which possibly converts a path using DOS-style short mode.
3423# If so, the updated path is stored in $new_path.
3424# $1: The path to check
3425
3426
3427# Helper function which possibly converts a path using DOS-style short mode.
3428# If so, the updated path is stored in $new_path.
3429# $1: The path to check
3430
3431
3432# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3433# and could probably be heavily simplified. However, all changes in this
3434# area tend to need lot of testing in different scenarios, and in lack of
3435# proper unit testing, cleaning this up has not been deemed worth the effort
3436# at the moment.
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3447
3448
3449
3450
3451#
3452# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3453# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3454#
3455# This code is free software; you can redistribute it and/or modify it
3456# under the terms of the GNU General Public License version 2 only, as
3457# published by the Free Software Foundation.  Oracle designates this
3458# particular file as subject to the "Classpath" exception as provided
3459# by Oracle in the LICENSE file that accompanied this code.
3460#
3461# This code is distributed in the hope that it will be useful, but WITHOUT
3462# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3463# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3464# version 2 for more details (a copy is included in the LICENSE file that
3465# accompanied this code).
3466#
3467# You should have received a copy of the GNU General Public License version
3468# 2 along with this work; if not, write to the Free Software Foundation,
3469# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3470#
3471# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3472# or visit www.oracle.com if you need additional information or have any
3473# questions.
3474#
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486# ... then the rest
3487#
3488# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3489# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3490#
3491# This code is free software; you can redistribute it and/or modify it
3492# under the terms of the GNU General Public License version 2 only, as
3493# published by the Free Software Foundation.  Oracle designates this
3494# particular file as subject to the "Classpath" exception as provided
3495# by Oracle in the LICENSE file that accompanied this code.
3496#
3497# This code is distributed in the hope that it will be useful, but WITHOUT
3498# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3499# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3500# version 2 for more details (a copy is included in the LICENSE file that
3501# accompanied this code).
3502#
3503# You should have received a copy of the GNU General Public License version
3504# 2 along with this work; if not, write to the Free Software Foundation,
3505# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3506#
3507# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3508# or visit www.oracle.com if you need additional information or have any
3509# questions.
3510#
3511
3512# Execute the check given as argument, and verify the result
3513# If the Boot JDK was previously found, do nothing
3514# $1 A command line (typically autoconf macro) to execute
3515
3516
3517# Test: Is bootjdk explicitely set by command line arguments?
3518
3519
3520# Test: Is bootjdk available from builddeps?
3521
3522
3523# Test: Is $JAVA_HOME set?
3524
3525
3526# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3527
3528
3529# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3530
3531
3532# Look for a jdk in the given path. If there are multiple, try to select the newest.
3533# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3534# $1 = Path to directory containing jdk installations.
3535# $2 = String to append to the found JDK directory to get the proper JDK home
3536
3537
3538# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3539# environmental variable as base for where to look.
3540# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3541
3542
3543# Test: Is there a JDK installed in default, well-known locations?
3544
3545
3546# Check that a command-line tool in the Boot JDK is correct
3547# $1 = name of variable to assign
3548# $2 = name of binary
3549
3550
3551###############################################################################
3552#
3553# We need a Boot JDK to bootstrap the build.
3554#
3555
3556
3557
3558
3559
3560#
3561# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563#
3564# This code is free software; you can redistribute it and/or modify it
3565# under the terms of the GNU General Public License version 2 only, as
3566# published by the Free Software Foundation.  Oracle designates this
3567# particular file as subject to the "Classpath" exception as provided
3568# by Oracle in the LICENSE file that accompanied this code.
3569#
3570# This code is distributed in the hope that it will be useful, but WITHOUT
3571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573# version 2 for more details (a copy is included in the LICENSE file that
3574# accompanied this code).
3575#
3576# You should have received a copy of the GNU General Public License version
3577# 2 along with this work; if not, write to the Free Software Foundation,
3578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579#
3580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581# or visit www.oracle.com if you need additional information or have any
3582# questions.
3583#
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604#
3605# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3607#
3608# This code is free software; you can redistribute it and/or modify it
3609# under the terms of the GNU General Public License version 2 only, as
3610# published by the Free Software Foundation.  Oracle designates this
3611# particular file as subject to the "Classpath" exception as provided
3612# by Oracle in the LICENSE file that accompanied this code.
3613#
3614# This code is distributed in the hope that it will be useful, but WITHOUT
3615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3617# version 2 for more details (a copy is included in the LICENSE file that
3618# accompanied this code).
3619#
3620# You should have received a copy of the GNU General Public License version
3621# 2 along with this work; if not, write to the Free Software Foundation,
3622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3623#
3624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3625# or visit www.oracle.com if you need additional information or have any
3626# questions.
3627#
3628
3629
3630
3631
3632
3633cygwin_help() {
3634  case $1 in
3635    unzip)
3636      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3638      ;;
3639    zip)
3640      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3641      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3642      ;;
3643    make)
3644      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3645      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3646      ;;
3647    freetype)
3648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3649        HELP_MSG="To install freetype, run:
3650wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3651chmod +x /tmp/freetype-setup.exe
3652/tmp/freetype-setup.exe
3653Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3654After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3655      else
3656        HELP_MSG="You need to build a 64-bit version of freetype.
3657This is not readily available.
3658You can find source code and build instructions on
3659http://www.freetype.org/
3660If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3661      fi
3662      ;;
3663  esac
3664}
3665
3666msys_help() {
3667  PKGHANDLER_COMMAND=""
3668}
3669
3670apt_help() {
3671  case $1 in
3672    devkit)
3673      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3674    openjdk)
3675      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3676    alsa)
3677      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3678    cups)
3679      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3680    freetype)
3681      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3682    pulse)
3683      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3684    x11)
3685      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3686    ccache)
3687      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3688  esac
3689}
3690
3691yum_help() {
3692  case $1 in
3693    devkit)
3694      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3695    openjdk)
3696      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3697    alsa)
3698      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3699    cups)
3700      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3701    freetype)
3702      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3703    pulse)
3704      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3705    x11)
3706      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3707    ccache)
3708      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3709  esac
3710}
3711
3712port_help() {
3713  PKGHANDLER_COMMAND=""
3714}
3715
3716pkgutil_help() {
3717  PKGHANDLER_COMMAND=""
3718}
3719
3720pkgadd_help() {
3721  PKGHANDLER_COMMAND=""
3722}
3723
3724
3725
3726#
3727# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760###############################################################################
3761#
3762# Should we build only OpenJDK even if closed sources are present?
3763#
3764
3765
3766
3767
3768###############################################################################
3769#
3770# Setup version numbers
3771#
3772
3773
3774
3775
3776
3777
3778# Support for customization of the build process. Some build files
3779# will include counterparts from this location, if they exist. This allows
3780# for a degree of customization of the build targets and the rules/recipes
3781# to create them
3782
3783# Check whether --with-custom-make-dir was given.
3784if test "${with_custom_make_dir+set}" = set; then :
3785  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3786fi
3787
3788
3789
3790#
3791# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3792# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3793#
3794# This code is free software; you can redistribute it and/or modify it
3795# under the terms of the GNU General Public License version 2 only, as
3796# published by the Free Software Foundation.  Oracle designates this
3797# particular file as subject to the "Classpath" exception as provided
3798# by Oracle in the LICENSE file that accompanied this code.
3799#
3800# This code is distributed in the hope that it will be useful, but WITHOUT
3801# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3802# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3803# version 2 for more details (a copy is included in the LICENSE file that
3804# accompanied this code).
3805#
3806# You should have received a copy of the GNU General Public License version
3807# 2 along with this work; if not, write to the Free Software Foundation,
3808# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3809#
3810# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3811# or visit www.oracle.com if you need additional information or have any
3812# questions.
3813#
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831#
3832# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3833# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3834#
3835# This code is free software; you can redistribute it and/or modify it
3836# under the terms of the GNU General Public License version 2 only, as
3837# published by the Free Software Foundation.  Oracle designates this
3838# particular file as subject to the "Classpath" exception as provided
3839# by Oracle in the LICENSE file that accompanied this code.
3840#
3841# This code is distributed in the hope that it will be useful, but WITHOUT
3842# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3843# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3844# version 2 for more details (a copy is included in the LICENSE file that
3845# accompanied this code).
3846#
3847# You should have received a copy of the GNU General Public License version
3848# 2 along with this work; if not, write to the Free Software Foundation,
3849# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3850#
3851# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3852# or visit www.oracle.com if you need additional information or have any
3853# questions.
3854#
3855
3856# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3857# Converts autoconf style CPU name to OpenJDK style, into
3858# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3859
3860
3861# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3862# Converts autoconf style OS name to OpenJDK style, into
3863# VAR_OS and VAR_OS_API.
3864
3865
3866# Expects $host_os $host_cpu $build_os and $build_cpu
3867# and $with_target_bits to have been setup!
3868#
3869# Translate the standard triplet(quadruplet) definition
3870# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3871# OPENJDK_BUILD_OS, etc.
3872
3873
3874# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3875# accordingly. Must be done after setting up build and target system, but before
3876# doing anything else with these values.
3877
3878
3879# Setup the legacy variables, for controlling the old makefiles.
3880#
3881
3882
3883
3884
3885#%%% Build and target systems %%%
3886
3887
3888
3889
3890# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3891# Add -mX to various FLAGS variables.
3892
3893
3894
3895
3896
3897
3898#
3899# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3900# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3901#
3902# This code is free software; you can redistribute it and/or modify it
3903# under the terms of the GNU General Public License version 2 only, as
3904# published by the Free Software Foundation.  Oracle designates this
3905# particular file as subject to the "Classpath" exception as provided
3906# by Oracle in the LICENSE file that accompanied this code.
3907#
3908# This code is distributed in the hope that it will be useful, but WITHOUT
3909# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3910# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3911# version 2 for more details (a copy is included in the LICENSE file that
3912# accompanied this code).
3913#
3914# You should have received a copy of the GNU General Public License version
3915# 2 along with this work; if not, write to the Free Software Foundation,
3916# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3917#
3918# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3919# or visit www.oracle.com if you need additional information or have any
3920# questions.
3921#
3922
3923
3924
3925
3926
3927
3928
3929
3930#
3931# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3932# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3933#
3934# This code is free software; you can redistribute it and/or modify it
3935# under the terms of the GNU General Public License version 2 only, as
3936# published by the Free Software Foundation.  Oracle designates this
3937# particular file as subject to the "Classpath" exception as provided
3938# by Oracle in the LICENSE file that accompanied this code.
3939#
3940# This code is distributed in the hope that it will be useful, but WITHOUT
3941# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3942# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3943# version 2 for more details (a copy is included in the LICENSE file that
3944# accompanied this code).
3945#
3946# You should have received a copy of the GNU General Public License version
3947# 2 along with this work; if not, write to the Free Software Foundation,
3948# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3949#
3950# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3951# or visit www.oracle.com if you need additional information or have any
3952# questions.
3953#
3954
3955# $1 = compiler to test (CC or CXX)
3956# $2 = human readable name of compiler (C or C++)
3957
3958
3959
3960
3961
3962# $1 = compiler to test (CC or CXX)
3963# $2 = human readable name of compiler (C or C++)
3964# $3 = list of compiler names to search for
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3979#                                   [RUN-IF-FALSE])
3980# ------------------------------------------------------------
3981# Check that the c and c++ compilers support an argument
3982
3983
3984
3985
3986# Setup the JTREG paths
3987
3988
3989#
3990# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3991# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3992#
3993# This code is free software; you can redistribute it and/or modify it
3994# under the terms of the GNU General Public License version 2 only, as
3995# published by the Free Software Foundation.  Oracle designates this
3996# particular file as subject to the "Classpath" exception as provided
3997# by Oracle in the LICENSE file that accompanied this code.
3998#
3999# This code is distributed in the hope that it will be useful, but WITHOUT
4000# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4001# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4002# version 2 for more details (a copy is included in the LICENSE file that
4003# accompanied this code).
4004#
4005# You should have received a copy of the GNU General Public License version
4006# 2 along with this work; if not, write to the Free Software Foundation,
4007# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4008#
4009# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4010# or visit www.oracle.com if you need additional information or have any
4011# questions.
4012#
4013
4014
4015
4016
4017
4018
4019
4020# Check if the VS env variables were setup prior to running configure.
4021# If not, then find vcvarsall.bat and run it automatically, and integrate
4022# the set env variables into the spec file.
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033# This line needs to be here, verbatim, after all includes and the dummy hook
4034# definitions. It is replaced with custom functionality when building
4035# custom sources.
4036#CUSTOM_AUTOCONF_INCLUDE
4037
4038# Do not change or remove the following line, it is needed for consistency checks:
4039DATE_WHEN_GENERATED=1390994270
4040
4041###############################################################################
4042#
4043# Initialization / Boot-strapping
4044#
4045# The bootstrapping process needs to solve the "chicken or the egg" problem,
4046# thus it jumps back and forth, each time gaining something needed later on.
4047#
4048###############################################################################
4049
4050# Basic initialization that must happen first of all
4051
4052  # Save the original command line. This is passed to us by the wrapper configure script.
4053
4054  DATE_WHEN_CONFIGURED=`LANG=C date`
4055
4056  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4057$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4058  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4059$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4060
4061
4062  # Start with tools that do not need have cross compilation support
4063  # and can be expected to be found in the default PATH. These tools are
4064  # used by configure. Nor are these tools expected to be found in the
4065  # devkit from the builddeps server either, since they are
4066  # needed to download the devkit.
4067
4068  # First are all the simple required tools.
4069
4070
4071
4072  # Publish this variable in the help.
4073
4074
4075  if test "x$BASENAME" = x; then
4076    # The variable is not set by user, try to locate tool using the code snippet
4077    for ac_prog in basename
4078do
4079  # Extract the first word of "$ac_prog", so it can be a program name with args.
4080set dummy $ac_prog; ac_word=$2
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4082$as_echo_n "checking for $ac_word... " >&6; }
4083if ${ac_cv_path_BASENAME+:} false; then :
4084  $as_echo_n "(cached) " >&6
4085else
4086  case $BASENAME in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092for as_dir in $PATH
4093do
4094  IFS=$as_save_IFS
4095  test -z "$as_dir" && as_dir=.
4096    for ac_exec_ext in '' $ac_executable_extensions; do
4097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4100    break 2
4101  fi
4102done
4103  done
4104IFS=$as_save_IFS
4105
4106  ;;
4107esac
4108fi
4109BASENAME=$ac_cv_path_BASENAME
4110if test -n "$BASENAME"; then
4111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4112$as_echo "$BASENAME" >&6; }
4113else
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4115$as_echo "no" >&6; }
4116fi
4117
4118
4119  test -n "$BASENAME" && break
4120done
4121
4122  else
4123    # The variable is set, but is it from the command line or the environment?
4124
4125    # Try to remove the string !BASENAME! from our list.
4126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4128      # If it failed, the variable was not from the command line. Ignore it,
4129      # but warn the user (except for BASH, which is always set by the calling BASH).
4130      if test "xBASENAME" != xBASH; then
4131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4132$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4133      fi
4134      # Try to locate tool using the code snippet
4135      for ac_prog in basename
4136do
4137  # Extract the first word of "$ac_prog", so it can be a program name with args.
4138set dummy $ac_prog; ac_word=$2
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4140$as_echo_n "checking for $ac_word... " >&6; }
4141if ${ac_cv_path_BASENAME+:} false; then :
4142  $as_echo_n "(cached) " >&6
4143else
4144  case $BASENAME in
4145  [\\/]* | ?:[\\/]*)
4146  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4147  ;;
4148  *)
4149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150for as_dir in $PATH
4151do
4152  IFS=$as_save_IFS
4153  test -z "$as_dir" && as_dir=.
4154    for ac_exec_ext in '' $ac_executable_extensions; do
4155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4156    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4158    break 2
4159  fi
4160done
4161  done
4162IFS=$as_save_IFS
4163
4164  ;;
4165esac
4166fi
4167BASENAME=$ac_cv_path_BASENAME
4168if test -n "$BASENAME"; then
4169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4170$as_echo "$BASENAME" >&6; }
4171else
4172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4173$as_echo "no" >&6; }
4174fi
4175
4176
4177  test -n "$BASENAME" && break
4178done
4179
4180    else
4181      # If it succeeded, then it was overridden by the user. We will use it
4182      # for the tool.
4183
4184      # First remove it from the list of overridden variables, so we can test
4185      # for unknown variables in the end.
4186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4187
4188      # Check if the provided tool contains a complete path.
4189      tool_specified="$BASENAME"
4190      tool_basename="${tool_specified##*/}"
4191      if test "x$tool_basename" = "x$tool_specified"; then
4192        # A command without a complete path is provided, search $PATH.
4193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4194$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4195        # Extract the first word of "$tool_basename", so it can be a program name with args.
4196set dummy $tool_basename; ac_word=$2
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4198$as_echo_n "checking for $ac_word... " >&6; }
4199if ${ac_cv_path_BASENAME+:} false; then :
4200  $as_echo_n "(cached) " >&6
4201else
4202  case $BASENAME in
4203  [\\/]* | ?:[\\/]*)
4204  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4205  ;;
4206  *)
4207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208for as_dir in $PATH
4209do
4210  IFS=$as_save_IFS
4211  test -z "$as_dir" && as_dir=.
4212    for ac_exec_ext in '' $ac_executable_extensions; do
4213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4214    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4216    break 2
4217  fi
4218done
4219  done
4220IFS=$as_save_IFS
4221
4222  ;;
4223esac
4224fi
4225BASENAME=$ac_cv_path_BASENAME
4226if test -n "$BASENAME"; then
4227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4228$as_echo "$BASENAME" >&6; }
4229else
4230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4231$as_echo "no" >&6; }
4232fi
4233
4234
4235        if test "x$BASENAME" = x; then
4236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4237        fi
4238      else
4239        # Otherwise we believe it is a complete path. Use it as it is.
4240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4241$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4243$as_echo_n "checking for BASENAME... " >&6; }
4244        if test ! -x "$tool_specified"; then
4245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4246$as_echo "not found" >&6; }
4247          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4248        fi
4249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4250$as_echo "$tool_specified" >&6; }
4251      fi
4252    fi
4253  fi
4254
4255
4256
4257  if test "x$BASENAME" = x; then
4258    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4259  fi
4260
4261
4262
4263
4264
4265  # Publish this variable in the help.
4266
4267
4268  if test "x$BASH" = x; then
4269    # The variable is not set by user, try to locate tool using the code snippet
4270    for ac_prog in bash
4271do
4272  # Extract the first word of "$ac_prog", so it can be a program name with args.
4273set dummy $ac_prog; ac_word=$2
4274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4275$as_echo_n "checking for $ac_word... " >&6; }
4276if ${ac_cv_path_BASH+:} false; then :
4277  $as_echo_n "(cached) " >&6
4278else
4279  case $BASH in
4280  [\\/]* | ?:[\\/]*)
4281  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4282  ;;
4283  *)
4284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4285for as_dir in $PATH
4286do
4287  IFS=$as_save_IFS
4288  test -z "$as_dir" && as_dir=.
4289    for ac_exec_ext in '' $ac_executable_extensions; do
4290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4291    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4293    break 2
4294  fi
4295done
4296  done
4297IFS=$as_save_IFS
4298
4299  ;;
4300esac
4301fi
4302BASH=$ac_cv_path_BASH
4303if test -n "$BASH"; then
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4305$as_echo "$BASH" >&6; }
4306else
4307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308$as_echo "no" >&6; }
4309fi
4310
4311
4312  test -n "$BASH" && break
4313done
4314
4315  else
4316    # The variable is set, but is it from the command line or the environment?
4317
4318    # Try to remove the string !BASH! from our list.
4319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4321      # If it failed, the variable was not from the command line. Ignore it,
4322      # but warn the user (except for BASH, which is always set by the calling BASH).
4323      if test "xBASH" != xBASH; then
4324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4325$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4326      fi
4327      # Try to locate tool using the code snippet
4328      for ac_prog in bash
4329do
4330  # Extract the first word of "$ac_prog", so it can be a program name with args.
4331set dummy $ac_prog; ac_word=$2
4332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4333$as_echo_n "checking for $ac_word... " >&6; }
4334if ${ac_cv_path_BASH+:} false; then :
4335  $as_echo_n "(cached) " >&6
4336else
4337  case $BASH in
4338  [\\/]* | ?:[\\/]*)
4339  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4340  ;;
4341  *)
4342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4343for as_dir in $PATH
4344do
4345  IFS=$as_save_IFS
4346  test -z "$as_dir" && as_dir=.
4347    for ac_exec_ext in '' $ac_executable_extensions; do
4348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4349    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4351    break 2
4352  fi
4353done
4354  done
4355IFS=$as_save_IFS
4356
4357  ;;
4358esac
4359fi
4360BASH=$ac_cv_path_BASH
4361if test -n "$BASH"; then
4362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4363$as_echo "$BASH" >&6; }
4364else
4365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4366$as_echo "no" >&6; }
4367fi
4368
4369
4370  test -n "$BASH" && break
4371done
4372
4373    else
4374      # If it succeeded, then it was overridden by the user. We will use it
4375      # for the tool.
4376
4377      # First remove it from the list of overridden variables, so we can test
4378      # for unknown variables in the end.
4379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4380
4381      # Check if the provided tool contains a complete path.
4382      tool_specified="$BASH"
4383      tool_basename="${tool_specified##*/}"
4384      if test "x$tool_basename" = "x$tool_specified"; then
4385        # A command without a complete path is provided, search $PATH.
4386        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4387$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4388        # Extract the first word of "$tool_basename", so it can be a program name with args.
4389set dummy $tool_basename; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_BASH+:} false; then :
4393  $as_echo_n "(cached) " >&6
4394else
4395  case $BASH in
4396  [\\/]* | ?:[\\/]*)
4397  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4398  ;;
4399  *)
4400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403  IFS=$as_save_IFS
4404  test -z "$as_dir" && as_dir=.
4405    for ac_exec_ext in '' $ac_executable_extensions; do
4406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4407    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409    break 2
4410  fi
4411done
4412  done
4413IFS=$as_save_IFS
4414
4415  ;;
4416esac
4417fi
4418BASH=$ac_cv_path_BASH
4419if test -n "$BASH"; then
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4421$as_echo "$BASH" >&6; }
4422else
4423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428        if test "x$BASH" = x; then
4429          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4430        fi
4431      else
4432        # Otherwise we believe it is a complete path. Use it as it is.
4433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4434$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4436$as_echo_n "checking for BASH... " >&6; }
4437        if test ! -x "$tool_specified"; then
4438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4439$as_echo "not found" >&6; }
4440          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4441        fi
4442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4443$as_echo "$tool_specified" >&6; }
4444      fi
4445    fi
4446  fi
4447
4448
4449
4450  if test "x$BASH" = x; then
4451    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4452  fi
4453
4454
4455
4456
4457
4458  # Publish this variable in the help.
4459
4460
4461  if test "x$CAT" = x; then
4462    # The variable is not set by user, try to locate tool using the code snippet
4463    for ac_prog in cat
4464do
4465  # Extract the first word of "$ac_prog", so it can be a program name with args.
4466set dummy $ac_prog; ac_word=$2
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468$as_echo_n "checking for $ac_word... " >&6; }
4469if ${ac_cv_path_CAT+:} false; then :
4470  $as_echo_n "(cached) " >&6
4471else
4472  case $CAT in
4473  [\\/]* | ?:[\\/]*)
4474  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4475  ;;
4476  *)
4477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4478for as_dir in $PATH
4479do
4480  IFS=$as_save_IFS
4481  test -z "$as_dir" && as_dir=.
4482    for ac_exec_ext in '' $ac_executable_extensions; do
4483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4484    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4486    break 2
4487  fi
4488done
4489  done
4490IFS=$as_save_IFS
4491
4492  ;;
4493esac
4494fi
4495CAT=$ac_cv_path_CAT
4496if test -n "$CAT"; then
4497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4498$as_echo "$CAT" >&6; }
4499else
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501$as_echo "no" >&6; }
4502fi
4503
4504
4505  test -n "$CAT" && break
4506done
4507
4508  else
4509    # The variable is set, but is it from the command line or the environment?
4510
4511    # Try to remove the string !CAT! from our list.
4512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4514      # If it failed, the variable was not from the command line. Ignore it,
4515      # but warn the user (except for BASH, which is always set by the calling BASH).
4516      if test "xCAT" != xBASH; then
4517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4518$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4519      fi
4520      # Try to locate tool using the code snippet
4521      for ac_prog in cat
4522do
4523  # Extract the first word of "$ac_prog", so it can be a program name with args.
4524set dummy $ac_prog; ac_word=$2
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
4527if ${ac_cv_path_CAT+:} false; then :
4528  $as_echo_n "(cached) " >&6
4529else
4530  case $CAT in
4531  [\\/]* | ?:[\\/]*)
4532  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4533  ;;
4534  *)
4535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in $PATH
4537do
4538  IFS=$as_save_IFS
4539  test -z "$as_dir" && as_dir=.
4540    for ac_exec_ext in '' $ac_executable_extensions; do
4541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4542    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4544    break 2
4545  fi
4546done
4547  done
4548IFS=$as_save_IFS
4549
4550  ;;
4551esac
4552fi
4553CAT=$ac_cv_path_CAT
4554if test -n "$CAT"; then
4555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4556$as_echo "$CAT" >&6; }
4557else
4558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
4560fi
4561
4562
4563  test -n "$CAT" && break
4564done
4565
4566    else
4567      # If it succeeded, then it was overridden by the user. We will use it
4568      # for the tool.
4569
4570      # First remove it from the list of overridden variables, so we can test
4571      # for unknown variables in the end.
4572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4573
4574      # Check if the provided tool contains a complete path.
4575      tool_specified="$CAT"
4576      tool_basename="${tool_specified##*/}"
4577      if test "x$tool_basename" = "x$tool_specified"; then
4578        # A command without a complete path is provided, search $PATH.
4579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4580$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4581        # Extract the first word of "$tool_basename", so it can be a program name with args.
4582set dummy $tool_basename; ac_word=$2
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4584$as_echo_n "checking for $ac_word... " >&6; }
4585if ${ac_cv_path_CAT+:} false; then :
4586  $as_echo_n "(cached) " >&6
4587else
4588  case $CAT in
4589  [\\/]* | ?:[\\/]*)
4590  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4591  ;;
4592  *)
4593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in $PATH
4595do
4596  IFS=$as_save_IFS
4597  test -z "$as_dir" && as_dir=.
4598    for ac_exec_ext in '' $ac_executable_extensions; do
4599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602    break 2
4603  fi
4604done
4605  done
4606IFS=$as_save_IFS
4607
4608  ;;
4609esac
4610fi
4611CAT=$ac_cv_path_CAT
4612if test -n "$CAT"; then
4613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4614$as_echo "$CAT" >&6; }
4615else
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
4618fi
4619
4620
4621        if test "x$CAT" = x; then
4622          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4623        fi
4624      else
4625        # Otherwise we believe it is a complete path. Use it as it is.
4626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4627$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4629$as_echo_n "checking for CAT... " >&6; }
4630        if test ! -x "$tool_specified"; then
4631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4632$as_echo "not found" >&6; }
4633          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4634        fi
4635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4636$as_echo "$tool_specified" >&6; }
4637      fi
4638    fi
4639  fi
4640
4641
4642
4643  if test "x$CAT" = x; then
4644    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4645  fi
4646
4647
4648
4649
4650
4651  # Publish this variable in the help.
4652
4653
4654  if test "x$CHMOD" = x; then
4655    # The variable is not set by user, try to locate tool using the code snippet
4656    for ac_prog in chmod
4657do
4658  # Extract the first word of "$ac_prog", so it can be a program name with args.
4659set dummy $ac_prog; ac_word=$2
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4661$as_echo_n "checking for $ac_word... " >&6; }
4662if ${ac_cv_path_CHMOD+:} false; then :
4663  $as_echo_n "(cached) " >&6
4664else
4665  case $CHMOD in
4666  [\\/]* | ?:[\\/]*)
4667  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4668  ;;
4669  *)
4670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671for as_dir in $PATH
4672do
4673  IFS=$as_save_IFS
4674  test -z "$as_dir" && as_dir=.
4675    for ac_exec_ext in '' $ac_executable_extensions; do
4676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4677    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679    break 2
4680  fi
4681done
4682  done
4683IFS=$as_save_IFS
4684
4685  ;;
4686esac
4687fi
4688CHMOD=$ac_cv_path_CHMOD
4689if test -n "$CHMOD"; then
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4691$as_echo "$CHMOD" >&6; }
4692else
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4694$as_echo "no" >&6; }
4695fi
4696
4697
4698  test -n "$CHMOD" && break
4699done
4700
4701  else
4702    # The variable is set, but is it from the command line or the environment?
4703
4704    # Try to remove the string !CHMOD! from our list.
4705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4707      # If it failed, the variable was not from the command line. Ignore it,
4708      # but warn the user (except for BASH, which is always set by the calling BASH).
4709      if test "xCHMOD" != xBASH; then
4710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4711$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4712      fi
4713      # Try to locate tool using the code snippet
4714      for ac_prog in chmod
4715do
4716  # Extract the first word of "$ac_prog", so it can be a program name with args.
4717set dummy $ac_prog; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
4720if ${ac_cv_path_CHMOD+:} false; then :
4721  $as_echo_n "(cached) " >&6
4722else
4723  case $CHMOD in
4724  [\\/]* | ?:[\\/]*)
4725  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4726  ;;
4727  *)
4728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in $PATH
4730do
4731  IFS=$as_save_IFS
4732  test -z "$as_dir" && as_dir=.
4733    for ac_exec_ext in '' $ac_executable_extensions; do
4734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4735    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737    break 2
4738  fi
4739done
4740  done
4741IFS=$as_save_IFS
4742
4743  ;;
4744esac
4745fi
4746CHMOD=$ac_cv_path_CHMOD
4747if test -n "$CHMOD"; then
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4749$as_echo "$CHMOD" >&6; }
4750else
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756  test -n "$CHMOD" && break
4757done
4758
4759    else
4760      # If it succeeded, then it was overridden by the user. We will use it
4761      # for the tool.
4762
4763      # First remove it from the list of overridden variables, so we can test
4764      # for unknown variables in the end.
4765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4766
4767      # Check if the provided tool contains a complete path.
4768      tool_specified="$CHMOD"
4769      tool_basename="${tool_specified##*/}"
4770      if test "x$tool_basename" = "x$tool_specified"; then
4771        # A command without a complete path is provided, search $PATH.
4772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4773$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4774        # Extract the first word of "$tool_basename", so it can be a program name with args.
4775set dummy $tool_basename; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_path_CHMOD+:} false; then :
4779  $as_echo_n "(cached) " >&6
4780else
4781  case $CHMOD in
4782  [\\/]* | ?:[\\/]*)
4783  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4784  ;;
4785  *)
4786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787for as_dir in $PATH
4788do
4789  IFS=$as_save_IFS
4790  test -z "$as_dir" && as_dir=.
4791    for ac_exec_ext in '' $ac_executable_extensions; do
4792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4793    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4795    break 2
4796  fi
4797done
4798  done
4799IFS=$as_save_IFS
4800
4801  ;;
4802esac
4803fi
4804CHMOD=$ac_cv_path_CHMOD
4805if test -n "$CHMOD"; then
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4807$as_echo "$CHMOD" >&6; }
4808else
4809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814        if test "x$CHMOD" = x; then
4815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4816        fi
4817      else
4818        # Otherwise we believe it is a complete path. Use it as it is.
4819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
4820$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
4822$as_echo_n "checking for CHMOD... " >&6; }
4823        if test ! -x "$tool_specified"; then
4824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4825$as_echo "not found" >&6; }
4826          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
4827        fi
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4829$as_echo "$tool_specified" >&6; }
4830      fi
4831    fi
4832  fi
4833
4834
4835
4836  if test "x$CHMOD" = x; then
4837    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
4838  fi
4839
4840
4841
4842
4843
4844  # Publish this variable in the help.
4845
4846
4847  if test "x$CMP" = x; then
4848    # The variable is not set by user, try to locate tool using the code snippet
4849    for ac_prog in cmp
4850do
4851  # Extract the first word of "$ac_prog", so it can be a program name with args.
4852set dummy $ac_prog; ac_word=$2
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854$as_echo_n "checking for $ac_word... " >&6; }
4855if ${ac_cv_path_CMP+:} false; then :
4856  $as_echo_n "(cached) " >&6
4857else
4858  case $CMP in
4859  [\\/]* | ?:[\\/]*)
4860  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4861  ;;
4862  *)
4863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864for as_dir in $PATH
4865do
4866  IFS=$as_save_IFS
4867  test -z "$as_dir" && as_dir=.
4868    for ac_exec_ext in '' $ac_executable_extensions; do
4869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4870    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4872    break 2
4873  fi
4874done
4875  done
4876IFS=$as_save_IFS
4877
4878  ;;
4879esac
4880fi
4881CMP=$ac_cv_path_CMP
4882if test -n "$CMP"; then
4883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4884$as_echo "$CMP" >&6; }
4885else
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889
4890
4891  test -n "$CMP" && break
4892done
4893
4894  else
4895    # The variable is set, but is it from the command line or the environment?
4896
4897    # Try to remove the string !CMP! from our list.
4898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
4899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4900      # If it failed, the variable was not from the command line. Ignore it,
4901      # but warn the user (except for BASH, which is always set by the calling BASH).
4902      if test "xCMP" != xBASH; then
4903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
4904$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
4905      fi
4906      # Try to locate tool using the code snippet
4907      for ac_prog in cmp
4908do
4909  # Extract the first word of "$ac_prog", so it can be a program name with args.
4910set dummy $ac_prog; ac_word=$2
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4912$as_echo_n "checking for $ac_word... " >&6; }
4913if ${ac_cv_path_CMP+:} false; then :
4914  $as_echo_n "(cached) " >&6
4915else
4916  case $CMP in
4917  [\\/]* | ?:[\\/]*)
4918  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4919  ;;
4920  *)
4921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
4924  IFS=$as_save_IFS
4925  test -z "$as_dir" && as_dir=.
4926    for ac_exec_ext in '' $ac_executable_extensions; do
4927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4928    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930    break 2
4931  fi
4932done
4933  done
4934IFS=$as_save_IFS
4935
4936  ;;
4937esac
4938fi
4939CMP=$ac_cv_path_CMP
4940if test -n "$CMP"; then
4941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4942$as_echo "$CMP" >&6; }
4943else
4944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
4946fi
4947
4948
4949  test -n "$CMP" && break
4950done
4951
4952    else
4953      # If it succeeded, then it was overridden by the user. We will use it
4954      # for the tool.
4955
4956      # First remove it from the list of overridden variables, so we can test
4957      # for unknown variables in the end.
4958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4959
4960      # Check if the provided tool contains a complete path.
4961      tool_specified="$CMP"
4962      tool_basename="${tool_specified##*/}"
4963      if test "x$tool_basename" = "x$tool_specified"; then
4964        # A command without a complete path is provided, search $PATH.
4965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
4966$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
4967        # Extract the first word of "$tool_basename", so it can be a program name with args.
4968set dummy $tool_basename; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_CMP+:} false; then :
4972  $as_echo_n "(cached) " >&6
4973else
4974  case $CMP in
4975  [\\/]* | ?:[\\/]*)
4976  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4977  ;;
4978  *)
4979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982  IFS=$as_save_IFS
4983  test -z "$as_dir" && as_dir=.
4984    for ac_exec_ext in '' $ac_executable_extensions; do
4985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988    break 2
4989  fi
4990done
4991  done
4992IFS=$as_save_IFS
4993
4994  ;;
4995esac
4996fi
4997CMP=$ac_cv_path_CMP
4998if test -n "$CMP"; then
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5000$as_echo "$CMP" >&6; }
5001else
5002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007        if test "x$CMP" = x; then
5008          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5009        fi
5010      else
5011        # Otherwise we believe it is a complete path. Use it as it is.
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5013$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5015$as_echo_n "checking for CMP... " >&6; }
5016        if test ! -x "$tool_specified"; then
5017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5018$as_echo "not found" >&6; }
5019          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5020        fi
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5022$as_echo "$tool_specified" >&6; }
5023      fi
5024    fi
5025  fi
5026
5027
5028
5029  if test "x$CMP" = x; then
5030    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5031  fi
5032
5033
5034
5035
5036
5037  # Publish this variable in the help.
5038
5039
5040  if test "x$COMM" = x; then
5041    # The variable is not set by user, try to locate tool using the code snippet
5042    for ac_prog in comm
5043do
5044  # Extract the first word of "$ac_prog", so it can be a program name with args.
5045set dummy $ac_prog; ac_word=$2
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047$as_echo_n "checking for $ac_word... " >&6; }
5048if ${ac_cv_path_COMM+:} false; then :
5049  $as_echo_n "(cached) " >&6
5050else
5051  case $COMM in
5052  [\\/]* | ?:[\\/]*)
5053  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5054  ;;
5055  *)
5056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059  IFS=$as_save_IFS
5060  test -z "$as_dir" && as_dir=.
5061    for ac_exec_ext in '' $ac_executable_extensions; do
5062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5063    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065    break 2
5066  fi
5067done
5068  done
5069IFS=$as_save_IFS
5070
5071  ;;
5072esac
5073fi
5074COMM=$ac_cv_path_COMM
5075if test -n "$COMM"; then
5076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5077$as_echo "$COMM" >&6; }
5078else
5079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080$as_echo "no" >&6; }
5081fi
5082
5083
5084  test -n "$COMM" && break
5085done
5086
5087  else
5088    # The variable is set, but is it from the command line or the environment?
5089
5090    # Try to remove the string !COMM! from our list.
5091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5093      # If it failed, the variable was not from the command line. Ignore it,
5094      # but warn the user (except for BASH, which is always set by the calling BASH).
5095      if test "xCOMM" != xBASH; then
5096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5097$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5098      fi
5099      # Try to locate tool using the code snippet
5100      for ac_prog in comm
5101do
5102  # Extract the first word of "$ac_prog", so it can be a program name with args.
5103set dummy $ac_prog; ac_word=$2
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5105$as_echo_n "checking for $ac_word... " >&6; }
5106if ${ac_cv_path_COMM+:} false; then :
5107  $as_echo_n "(cached) " >&6
5108else
5109  case $COMM in
5110  [\\/]* | ?:[\\/]*)
5111  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5112  ;;
5113  *)
5114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117  IFS=$as_save_IFS
5118  test -z "$as_dir" && as_dir=.
5119    for ac_exec_ext in '' $ac_executable_extensions; do
5120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5121    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5123    break 2
5124  fi
5125done
5126  done
5127IFS=$as_save_IFS
5128
5129  ;;
5130esac
5131fi
5132COMM=$ac_cv_path_COMM
5133if test -n "$COMM"; then
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5135$as_echo "$COMM" >&6; }
5136else
5137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138$as_echo "no" >&6; }
5139fi
5140
5141
5142  test -n "$COMM" && break
5143done
5144
5145    else
5146      # If it succeeded, then it was overridden by the user. We will use it
5147      # for the tool.
5148
5149      # First remove it from the list of overridden variables, so we can test
5150      # for unknown variables in the end.
5151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5152
5153      # Check if the provided tool contains a complete path.
5154      tool_specified="$COMM"
5155      tool_basename="${tool_specified##*/}"
5156      if test "x$tool_basename" = "x$tool_specified"; then
5157        # A command without a complete path is provided, search $PATH.
5158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5159$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5160        # Extract the first word of "$tool_basename", so it can be a program name with args.
5161set dummy $tool_basename; ac_word=$2
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
5164if ${ac_cv_path_COMM+:} false; then :
5165  $as_echo_n "(cached) " >&6
5166else
5167  case $COMM in
5168  [\\/]* | ?:[\\/]*)
5169  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5170  ;;
5171  *)
5172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175  IFS=$as_save_IFS
5176  test -z "$as_dir" && as_dir=.
5177    for ac_exec_ext in '' $ac_executable_extensions; do
5178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5179    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181    break 2
5182  fi
5183done
5184  done
5185IFS=$as_save_IFS
5186
5187  ;;
5188esac
5189fi
5190COMM=$ac_cv_path_COMM
5191if test -n "$COMM"; then
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5193$as_echo "$COMM" >&6; }
5194else
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
5197fi
5198
5199
5200        if test "x$COMM" = x; then
5201          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5202        fi
5203      else
5204        # Otherwise we believe it is a complete path. Use it as it is.
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5206$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5208$as_echo_n "checking for COMM... " >&6; }
5209        if test ! -x "$tool_specified"; then
5210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5211$as_echo "not found" >&6; }
5212          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5213        fi
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5215$as_echo "$tool_specified" >&6; }
5216      fi
5217    fi
5218  fi
5219
5220
5221
5222  if test "x$COMM" = x; then
5223    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5224  fi
5225
5226
5227
5228
5229
5230  # Publish this variable in the help.
5231
5232
5233  if test "x$CP" = x; then
5234    # The variable is not set by user, try to locate tool using the code snippet
5235    for ac_prog in cp
5236do
5237  # Extract the first word of "$ac_prog", so it can be a program name with args.
5238set dummy $ac_prog; ac_word=$2
5239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5240$as_echo_n "checking for $ac_word... " >&6; }
5241if ${ac_cv_path_CP+:} false; then :
5242  $as_echo_n "(cached) " >&6
5243else
5244  case $CP in
5245  [\\/]* | ?:[\\/]*)
5246  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5247  ;;
5248  *)
5249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250for as_dir in $PATH
5251do
5252  IFS=$as_save_IFS
5253  test -z "$as_dir" && as_dir=.
5254    for ac_exec_ext in '' $ac_executable_extensions; do
5255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5256    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5258    break 2
5259  fi
5260done
5261  done
5262IFS=$as_save_IFS
5263
5264  ;;
5265esac
5266fi
5267CP=$ac_cv_path_CP
5268if test -n "$CP"; then
5269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5270$as_echo "$CP" >&6; }
5271else
5272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5273$as_echo "no" >&6; }
5274fi
5275
5276
5277  test -n "$CP" && break
5278done
5279
5280  else
5281    # The variable is set, but is it from the command line or the environment?
5282
5283    # Try to remove the string !CP! from our list.
5284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5286      # If it failed, the variable was not from the command line. Ignore it,
5287      # but warn the user (except for BASH, which is always set by the calling BASH).
5288      if test "xCP" != xBASH; then
5289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5290$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5291      fi
5292      # Try to locate tool using the code snippet
5293      for ac_prog in cp
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if ${ac_cv_path_CP+:} false; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $CP in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5314    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325CP=$ac_cv_path_CP
5326if test -n "$CP"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5328$as_echo "$CP" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$CP" && break
5336done
5337
5338    else
5339      # If it succeeded, then it was overridden by the user. We will use it
5340      # for the tool.
5341
5342      # First remove it from the list of overridden variables, so we can test
5343      # for unknown variables in the end.
5344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5345
5346      # Check if the provided tool contains a complete path.
5347      tool_specified="$CP"
5348      tool_basename="${tool_specified##*/}"
5349      if test "x$tool_basename" = "x$tool_specified"; then
5350        # A command without a complete path is provided, search $PATH.
5351        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5352$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5353        # Extract the first word of "$tool_basename", so it can be a program name with args.
5354set dummy $tool_basename; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if ${ac_cv_path_CP+:} false; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $CP in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5372    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383CP=$ac_cv_path_CP
5384if test -n "$CP"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5386$as_echo "$CP" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393        if test "x$CP" = x; then
5394          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5395        fi
5396      else
5397        # Otherwise we believe it is a complete path. Use it as it is.
5398        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5399$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5401$as_echo_n "checking for CP... " >&6; }
5402        if test ! -x "$tool_specified"; then
5403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5404$as_echo "not found" >&6; }
5405          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5406        fi
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5408$as_echo "$tool_specified" >&6; }
5409      fi
5410    fi
5411  fi
5412
5413
5414
5415  if test "x$CP" = x; then
5416    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5417  fi
5418
5419
5420
5421
5422
5423  # Publish this variable in the help.
5424
5425
5426  if test "x$CPIO" = x; then
5427    # The variable is not set by user, try to locate tool using the code snippet
5428    for ac_prog in cpio
5429do
5430  # Extract the first word of "$ac_prog", so it can be a program name with args.
5431set dummy $ac_prog; ac_word=$2
5432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5433$as_echo_n "checking for $ac_word... " >&6; }
5434if ${ac_cv_path_CPIO+:} false; then :
5435  $as_echo_n "(cached) " >&6
5436else
5437  case $CPIO in
5438  [\\/]* | ?:[\\/]*)
5439  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5440  ;;
5441  *)
5442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445  IFS=$as_save_IFS
5446  test -z "$as_dir" && as_dir=.
5447    for ac_exec_ext in '' $ac_executable_extensions; do
5448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5449    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451    break 2
5452  fi
5453done
5454  done
5455IFS=$as_save_IFS
5456
5457  ;;
5458esac
5459fi
5460CPIO=$ac_cv_path_CPIO
5461if test -n "$CPIO"; then
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5463$as_echo "$CPIO" >&6; }
5464else
5465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
5467fi
5468
5469
5470  test -n "$CPIO" && break
5471done
5472
5473  else
5474    # The variable is set, but is it from the command line or the environment?
5475
5476    # Try to remove the string !CPIO! from our list.
5477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5479      # If it failed, the variable was not from the command line. Ignore it,
5480      # but warn the user (except for BASH, which is always set by the calling BASH).
5481      if test "xCPIO" != xBASH; then
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5483$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5484      fi
5485      # Try to locate tool using the code snippet
5486      for ac_prog in cpio
5487do
5488  # Extract the first word of "$ac_prog", so it can be a program name with args.
5489set dummy $ac_prog; ac_word=$2
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5491$as_echo_n "checking for $ac_word... " >&6; }
5492if ${ac_cv_path_CPIO+:} false; then :
5493  $as_echo_n "(cached) " >&6
5494else
5495  case $CPIO in
5496  [\\/]* | ?:[\\/]*)
5497  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5498  ;;
5499  *)
5500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503  IFS=$as_save_IFS
5504  test -z "$as_dir" && as_dir=.
5505    for ac_exec_ext in '' $ac_executable_extensions; do
5506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5507    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5509    break 2
5510  fi
5511done
5512  done
5513IFS=$as_save_IFS
5514
5515  ;;
5516esac
5517fi
5518CPIO=$ac_cv_path_CPIO
5519if test -n "$CPIO"; then
5520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5521$as_echo "$CPIO" >&6; }
5522else
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524$as_echo "no" >&6; }
5525fi
5526
5527
5528  test -n "$CPIO" && break
5529done
5530
5531    else
5532      # If it succeeded, then it was overridden by the user. We will use it
5533      # for the tool.
5534
5535      # First remove it from the list of overridden variables, so we can test
5536      # for unknown variables in the end.
5537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5538
5539      # Check if the provided tool contains a complete path.
5540      tool_specified="$CPIO"
5541      tool_basename="${tool_specified##*/}"
5542      if test "x$tool_basename" = "x$tool_specified"; then
5543        # A command without a complete path is provided, search $PATH.
5544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5545$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5546        # Extract the first word of "$tool_basename", so it can be a program name with args.
5547set dummy $tool_basename; ac_word=$2
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5549$as_echo_n "checking for $ac_word... " >&6; }
5550if ${ac_cv_path_CPIO+:} false; then :
5551  $as_echo_n "(cached) " >&6
5552else
5553  case $CPIO in
5554  [\\/]* | ?:[\\/]*)
5555  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5556  ;;
5557  *)
5558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559for as_dir in $PATH
5560do
5561  IFS=$as_save_IFS
5562  test -z "$as_dir" && as_dir=.
5563    for ac_exec_ext in '' $ac_executable_extensions; do
5564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5565    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5567    break 2
5568  fi
5569done
5570  done
5571IFS=$as_save_IFS
5572
5573  ;;
5574esac
5575fi
5576CPIO=$ac_cv_path_CPIO
5577if test -n "$CPIO"; then
5578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5579$as_echo "$CPIO" >&6; }
5580else
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582$as_echo "no" >&6; }
5583fi
5584
5585
5586        if test "x$CPIO" = x; then
5587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5588        fi
5589      else
5590        # Otherwise we believe it is a complete path. Use it as it is.
5591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5592$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5594$as_echo_n "checking for CPIO... " >&6; }
5595        if test ! -x "$tool_specified"; then
5596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5597$as_echo "not found" >&6; }
5598          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5599        fi
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5601$as_echo "$tool_specified" >&6; }
5602      fi
5603    fi
5604  fi
5605
5606
5607
5608  if test "x$CPIO" = x; then
5609    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5610  fi
5611
5612
5613
5614
5615
5616  # Publish this variable in the help.
5617
5618
5619  if test "x$CUT" = x; then
5620    # The variable is not set by user, try to locate tool using the code snippet
5621    for ac_prog in cut
5622do
5623  # Extract the first word of "$ac_prog", so it can be a program name with args.
5624set dummy $ac_prog; ac_word=$2
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5626$as_echo_n "checking for $ac_word... " >&6; }
5627if ${ac_cv_path_CUT+:} false; then :
5628  $as_echo_n "(cached) " >&6
5629else
5630  case $CUT in
5631  [\\/]* | ?:[\\/]*)
5632  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5633  ;;
5634  *)
5635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638  IFS=$as_save_IFS
5639  test -z "$as_dir" && as_dir=.
5640    for ac_exec_ext in '' $ac_executable_extensions; do
5641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5642    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644    break 2
5645  fi
5646done
5647  done
5648IFS=$as_save_IFS
5649
5650  ;;
5651esac
5652fi
5653CUT=$ac_cv_path_CUT
5654if test -n "$CUT"; then
5655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5656$as_echo "$CUT" >&6; }
5657else
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663  test -n "$CUT" && break
5664done
5665
5666  else
5667    # The variable is set, but is it from the command line or the environment?
5668
5669    # Try to remove the string !CUT! from our list.
5670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5672      # If it failed, the variable was not from the command line. Ignore it,
5673      # but warn the user (except for BASH, which is always set by the calling BASH).
5674      if test "xCUT" != xBASH; then
5675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5676$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5677      fi
5678      # Try to locate tool using the code snippet
5679      for ac_prog in cut
5680do
5681  # Extract the first word of "$ac_prog", so it can be a program name with args.
5682set dummy $ac_prog; ac_word=$2
5683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
5685if ${ac_cv_path_CUT+:} false; then :
5686  $as_echo_n "(cached) " >&6
5687else
5688  case $CUT in
5689  [\\/]* | ?:[\\/]*)
5690  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5691  ;;
5692  *)
5693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694for as_dir in $PATH
5695do
5696  IFS=$as_save_IFS
5697  test -z "$as_dir" && as_dir=.
5698    for ac_exec_ext in '' $ac_executable_extensions; do
5699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5700    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5702    break 2
5703  fi
5704done
5705  done
5706IFS=$as_save_IFS
5707
5708  ;;
5709esac
5710fi
5711CUT=$ac_cv_path_CUT
5712if test -n "$CUT"; then
5713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5714$as_echo "$CUT" >&6; }
5715else
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721  test -n "$CUT" && break
5722done
5723
5724    else
5725      # If it succeeded, then it was overridden by the user. We will use it
5726      # for the tool.
5727
5728      # First remove it from the list of overridden variables, so we can test
5729      # for unknown variables in the end.
5730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5731
5732      # Check if the provided tool contains a complete path.
5733      tool_specified="$CUT"
5734      tool_basename="${tool_specified##*/}"
5735      if test "x$tool_basename" = "x$tool_specified"; then
5736        # A command without a complete path is provided, search $PATH.
5737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5738$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5739        # Extract the first word of "$tool_basename", so it can be a program name with args.
5740set dummy $tool_basename; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CUT+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CUT in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CUT=$ac_cv_path_CUT
5770if test -n "$CUT"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5772$as_echo "$CUT" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779        if test "x$CUT" = x; then
5780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5781        fi
5782      else
5783        # Otherwise we believe it is a complete path. Use it as it is.
5784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5785$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5787$as_echo_n "checking for CUT... " >&6; }
5788        if test ! -x "$tool_specified"; then
5789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5790$as_echo "not found" >&6; }
5791          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5792        fi
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5794$as_echo "$tool_specified" >&6; }
5795      fi
5796    fi
5797  fi
5798
5799
5800
5801  if test "x$CUT" = x; then
5802    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5803  fi
5804
5805
5806
5807
5808
5809  # Publish this variable in the help.
5810
5811
5812  if test "x$DATE" = x; then
5813    # The variable is not set by user, try to locate tool using the code snippet
5814    for ac_prog in date
5815do
5816  # Extract the first word of "$ac_prog", so it can be a program name with args.
5817set dummy $ac_prog; ac_word=$2
5818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5819$as_echo_n "checking for $ac_word... " >&6; }
5820if ${ac_cv_path_DATE+:} false; then :
5821  $as_echo_n "(cached) " >&6
5822else
5823  case $DATE in
5824  [\\/]* | ?:[\\/]*)
5825  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5826  ;;
5827  *)
5828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831  IFS=$as_save_IFS
5832  test -z "$as_dir" && as_dir=.
5833    for ac_exec_ext in '' $ac_executable_extensions; do
5834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5835    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837    break 2
5838  fi
5839done
5840  done
5841IFS=$as_save_IFS
5842
5843  ;;
5844esac
5845fi
5846DATE=$ac_cv_path_DATE
5847if test -n "$DATE"; then
5848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5849$as_echo "$DATE" >&6; }
5850else
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852$as_echo "no" >&6; }
5853fi
5854
5855
5856  test -n "$DATE" && break
5857done
5858
5859  else
5860    # The variable is set, but is it from the command line or the environment?
5861
5862    # Try to remove the string !DATE! from our list.
5863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5865      # If it failed, the variable was not from the command line. Ignore it,
5866      # but warn the user (except for BASH, which is always set by the calling BASH).
5867      if test "xDATE" != xBASH; then
5868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5869$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5870      fi
5871      # Try to locate tool using the code snippet
5872      for ac_prog in date
5873do
5874  # Extract the first word of "$ac_prog", so it can be a program name with args.
5875set dummy $ac_prog; ac_word=$2
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5877$as_echo_n "checking for $ac_word... " >&6; }
5878if ${ac_cv_path_DATE+:} false; then :
5879  $as_echo_n "(cached) " >&6
5880else
5881  case $DATE in
5882  [\\/]* | ?:[\\/]*)
5883  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5884  ;;
5885  *)
5886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887for as_dir in $PATH
5888do
5889  IFS=$as_save_IFS
5890  test -z "$as_dir" && as_dir=.
5891    for ac_exec_ext in '' $ac_executable_extensions; do
5892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5893    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5895    break 2
5896  fi
5897done
5898  done
5899IFS=$as_save_IFS
5900
5901  ;;
5902esac
5903fi
5904DATE=$ac_cv_path_DATE
5905if test -n "$DATE"; then
5906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5907$as_echo "$DATE" >&6; }
5908else
5909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910$as_echo "no" >&6; }
5911fi
5912
5913
5914  test -n "$DATE" && break
5915done
5916
5917    else
5918      # If it succeeded, then it was overridden by the user. We will use it
5919      # for the tool.
5920
5921      # First remove it from the list of overridden variables, so we can test
5922      # for unknown variables in the end.
5923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5924
5925      # Check if the provided tool contains a complete path.
5926      tool_specified="$DATE"
5927      tool_basename="${tool_specified##*/}"
5928      if test "x$tool_basename" = "x$tool_specified"; then
5929        # A command without a complete path is provided, search $PATH.
5930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
5931$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
5932        # Extract the first word of "$tool_basename", so it can be a program name with args.
5933set dummy $tool_basename; ac_word=$2
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if ${ac_cv_path_DATE+:} false; then :
5937  $as_echo_n "(cached) " >&6
5938else
5939  case $DATE in
5940  [\\/]* | ?:[\\/]*)
5941  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5942  ;;
5943  *)
5944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5945for as_dir in $PATH
5946do
5947  IFS=$as_save_IFS
5948  test -z "$as_dir" && as_dir=.
5949    for ac_exec_ext in '' $ac_executable_extensions; do
5950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5951    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5953    break 2
5954  fi
5955done
5956  done
5957IFS=$as_save_IFS
5958
5959  ;;
5960esac
5961fi
5962DATE=$ac_cv_path_DATE
5963if test -n "$DATE"; then
5964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5965$as_echo "$DATE" >&6; }
5966else
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5968$as_echo "no" >&6; }
5969fi
5970
5971
5972        if test "x$DATE" = x; then
5973          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5974        fi
5975      else
5976        # Otherwise we believe it is a complete path. Use it as it is.
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
5978$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
5980$as_echo_n "checking for DATE... " >&6; }
5981        if test ! -x "$tool_specified"; then
5982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5983$as_echo "not found" >&6; }
5984          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
5985        fi
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5987$as_echo "$tool_specified" >&6; }
5988      fi
5989    fi
5990  fi
5991
5992
5993
5994  if test "x$DATE" = x; then
5995    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
5996  fi
5997
5998
5999
6000
6001
6002  # Publish this variable in the help.
6003
6004
6005  if test "x$DIFF" = x; then
6006    # The variable is not set by user, try to locate tool using the code snippet
6007    for ac_prog in gdiff diff
6008do
6009  # Extract the first word of "$ac_prog", so it can be a program name with args.
6010set dummy $ac_prog; ac_word=$2
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
6013if ${ac_cv_path_DIFF+:} false; then :
6014  $as_echo_n "(cached) " >&6
6015else
6016  case $DIFF in
6017  [\\/]* | ?:[\\/]*)
6018  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6019  ;;
6020  *)
6021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024  IFS=$as_save_IFS
6025  test -z "$as_dir" && as_dir=.
6026    for ac_exec_ext in '' $ac_executable_extensions; do
6027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6028    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030    break 2
6031  fi
6032done
6033  done
6034IFS=$as_save_IFS
6035
6036  ;;
6037esac
6038fi
6039DIFF=$ac_cv_path_DIFF
6040if test -n "$DIFF"; then
6041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6042$as_echo "$DIFF" >&6; }
6043else
6044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6045$as_echo "no" >&6; }
6046fi
6047
6048
6049  test -n "$DIFF" && break
6050done
6051
6052  else
6053    # The variable is set, but is it from the command line or the environment?
6054
6055    # Try to remove the string !DIFF! from our list.
6056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6058      # If it failed, the variable was not from the command line. Ignore it,
6059      # but warn the user (except for BASH, which is always set by the calling BASH).
6060      if test "xDIFF" != xBASH; then
6061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6062$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6063      fi
6064      # Try to locate tool using the code snippet
6065      for ac_prog in gdiff diff
6066do
6067  # Extract the first word of "$ac_prog", so it can be a program name with args.
6068set dummy $ac_prog; ac_word=$2
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
6071if ${ac_cv_path_DIFF+:} false; then :
6072  $as_echo_n "(cached) " >&6
6073else
6074  case $DIFF in
6075  [\\/]* | ?:[\\/]*)
6076  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6077  ;;
6078  *)
6079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082  IFS=$as_save_IFS
6083  test -z "$as_dir" && as_dir=.
6084    for ac_exec_ext in '' $ac_executable_extensions; do
6085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6086    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6088    break 2
6089  fi
6090done
6091  done
6092IFS=$as_save_IFS
6093
6094  ;;
6095esac
6096fi
6097DIFF=$ac_cv_path_DIFF
6098if test -n "$DIFF"; then
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6100$as_echo "$DIFF" >&6; }
6101else
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107  test -n "$DIFF" && break
6108done
6109
6110    else
6111      # If it succeeded, then it was overridden by the user. We will use it
6112      # for the tool.
6113
6114      # First remove it from the list of overridden variables, so we can test
6115      # for unknown variables in the end.
6116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6117
6118      # Check if the provided tool contains a complete path.
6119      tool_specified="$DIFF"
6120      tool_basename="${tool_specified##*/}"
6121      if test "x$tool_basename" = "x$tool_specified"; then
6122        # A command without a complete path is provided, search $PATH.
6123        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6124$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6125        # Extract the first word of "$tool_basename", so it can be a program name with args.
6126set dummy $tool_basename; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_DIFF+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $DIFF in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155DIFF=$ac_cv_path_DIFF
6156if test -n "$DIFF"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6158$as_echo "$DIFF" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165        if test "x$DIFF" = x; then
6166          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6167        fi
6168      else
6169        # Otherwise we believe it is a complete path. Use it as it is.
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6171$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6173$as_echo_n "checking for DIFF... " >&6; }
6174        if test ! -x "$tool_specified"; then
6175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6176$as_echo "not found" >&6; }
6177          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6178        fi
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6180$as_echo "$tool_specified" >&6; }
6181      fi
6182    fi
6183  fi
6184
6185
6186
6187  if test "x$DIFF" = x; then
6188    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6189  fi
6190
6191
6192
6193
6194
6195  # Publish this variable in the help.
6196
6197
6198  if test "x$DIRNAME" = x; then
6199    # The variable is not set by user, try to locate tool using the code snippet
6200    for ac_prog in dirname
6201do
6202  # Extract the first word of "$ac_prog", so it can be a program name with args.
6203set dummy $ac_prog; ac_word=$2
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6205$as_echo_n "checking for $ac_word... " >&6; }
6206if ${ac_cv_path_DIRNAME+:} false; then :
6207  $as_echo_n "(cached) " >&6
6208else
6209  case $DIRNAME in
6210  [\\/]* | ?:[\\/]*)
6211  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6212  ;;
6213  *)
6214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6215for as_dir in $PATH
6216do
6217  IFS=$as_save_IFS
6218  test -z "$as_dir" && as_dir=.
6219    for ac_exec_ext in '' $ac_executable_extensions; do
6220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6221    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6223    break 2
6224  fi
6225done
6226  done
6227IFS=$as_save_IFS
6228
6229  ;;
6230esac
6231fi
6232DIRNAME=$ac_cv_path_DIRNAME
6233if test -n "$DIRNAME"; then
6234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6235$as_echo "$DIRNAME" >&6; }
6236else
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6238$as_echo "no" >&6; }
6239fi
6240
6241
6242  test -n "$DIRNAME" && break
6243done
6244
6245  else
6246    # The variable is set, but is it from the command line or the environment?
6247
6248    # Try to remove the string !DIRNAME! from our list.
6249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6251      # If it failed, the variable was not from the command line. Ignore it,
6252      # but warn the user (except for BASH, which is always set by the calling BASH).
6253      if test "xDIRNAME" != xBASH; then
6254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6255$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6256      fi
6257      # Try to locate tool using the code snippet
6258      for ac_prog in dirname
6259do
6260  # Extract the first word of "$ac_prog", so it can be a program name with args.
6261set dummy $ac_prog; ac_word=$2
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6263$as_echo_n "checking for $ac_word... " >&6; }
6264if ${ac_cv_path_DIRNAME+:} false; then :
6265  $as_echo_n "(cached) " >&6
6266else
6267  case $DIRNAME in
6268  [\\/]* | ?:[\\/]*)
6269  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6270  ;;
6271  *)
6272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH
6274do
6275  IFS=$as_save_IFS
6276  test -z "$as_dir" && as_dir=.
6277    for ac_exec_ext in '' $ac_executable_extensions; do
6278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6279    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6281    break 2
6282  fi
6283done
6284  done
6285IFS=$as_save_IFS
6286
6287  ;;
6288esac
6289fi
6290DIRNAME=$ac_cv_path_DIRNAME
6291if test -n "$DIRNAME"; then
6292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6293$as_echo "$DIRNAME" >&6; }
6294else
6295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6296$as_echo "no" >&6; }
6297fi
6298
6299
6300  test -n "$DIRNAME" && break
6301done
6302
6303    else
6304      # If it succeeded, then it was overridden by the user. We will use it
6305      # for the tool.
6306
6307      # First remove it from the list of overridden variables, so we can test
6308      # for unknown variables in the end.
6309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6310
6311      # Check if the provided tool contains a complete path.
6312      tool_specified="$DIRNAME"
6313      tool_basename="${tool_specified##*/}"
6314      if test "x$tool_basename" = "x$tool_specified"; then
6315        # A command without a complete path is provided, search $PATH.
6316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6317$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6318        # Extract the first word of "$tool_basename", so it can be a program name with args.
6319set dummy $tool_basename; ac_word=$2
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6321$as_echo_n "checking for $ac_word... " >&6; }
6322if ${ac_cv_path_DIRNAME+:} false; then :
6323  $as_echo_n "(cached) " >&6
6324else
6325  case $DIRNAME in
6326  [\\/]* | ?:[\\/]*)
6327  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6328  ;;
6329  *)
6330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331for as_dir in $PATH
6332do
6333  IFS=$as_save_IFS
6334  test -z "$as_dir" && as_dir=.
6335    for ac_exec_ext in '' $ac_executable_extensions; do
6336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6337    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339    break 2
6340  fi
6341done
6342  done
6343IFS=$as_save_IFS
6344
6345  ;;
6346esac
6347fi
6348DIRNAME=$ac_cv_path_DIRNAME
6349if test -n "$DIRNAME"; then
6350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6351$as_echo "$DIRNAME" >&6; }
6352else
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354$as_echo "no" >&6; }
6355fi
6356
6357
6358        if test "x$DIRNAME" = x; then
6359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6360        fi
6361      else
6362        # Otherwise we believe it is a complete path. Use it as it is.
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6364$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6366$as_echo_n "checking for DIRNAME... " >&6; }
6367        if test ! -x "$tool_specified"; then
6368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6369$as_echo "not found" >&6; }
6370          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6371        fi
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6373$as_echo "$tool_specified" >&6; }
6374      fi
6375    fi
6376  fi
6377
6378
6379
6380  if test "x$DIRNAME" = x; then
6381    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6382  fi
6383
6384
6385
6386
6387
6388  # Publish this variable in the help.
6389
6390
6391  if test "x$ECHO" = x; then
6392    # The variable is not set by user, try to locate tool using the code snippet
6393    for ac_prog in echo
6394do
6395  # Extract the first word of "$ac_prog", so it can be a program name with args.
6396set dummy $ac_prog; ac_word=$2
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6398$as_echo_n "checking for $ac_word... " >&6; }
6399if ${ac_cv_path_ECHO+:} false; then :
6400  $as_echo_n "(cached) " >&6
6401else
6402  case $ECHO in
6403  [\\/]* | ?:[\\/]*)
6404  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6405  ;;
6406  *)
6407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410  IFS=$as_save_IFS
6411  test -z "$as_dir" && as_dir=.
6412    for ac_exec_ext in '' $ac_executable_extensions; do
6413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6414    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416    break 2
6417  fi
6418done
6419  done
6420IFS=$as_save_IFS
6421
6422  ;;
6423esac
6424fi
6425ECHO=$ac_cv_path_ECHO
6426if test -n "$ECHO"; then
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6428$as_echo "$ECHO" >&6; }
6429else
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434
6435  test -n "$ECHO" && break
6436done
6437
6438  else
6439    # The variable is set, but is it from the command line or the environment?
6440
6441    # Try to remove the string !ECHO! from our list.
6442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6444      # If it failed, the variable was not from the command line. Ignore it,
6445      # but warn the user (except for BASH, which is always set by the calling BASH).
6446      if test "xECHO" != xBASH; then
6447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6448$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6449      fi
6450      # Try to locate tool using the code snippet
6451      for ac_prog in echo
6452do
6453  # Extract the first word of "$ac_prog", so it can be a program name with args.
6454set dummy $ac_prog; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if ${ac_cv_path_ECHO+:} false; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $ECHO in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6472    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483ECHO=$ac_cv_path_ECHO
6484if test -n "$ECHO"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6486$as_echo "$ECHO" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493  test -n "$ECHO" && break
6494done
6495
6496    else
6497      # If it succeeded, then it was overridden by the user. We will use it
6498      # for the tool.
6499
6500      # First remove it from the list of overridden variables, so we can test
6501      # for unknown variables in the end.
6502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6503
6504      # Check if the provided tool contains a complete path.
6505      tool_specified="$ECHO"
6506      tool_basename="${tool_specified##*/}"
6507      if test "x$tool_basename" = "x$tool_specified"; then
6508        # A command without a complete path is provided, search $PATH.
6509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6510$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6511        # Extract the first word of "$tool_basename", so it can be a program name with args.
6512set dummy $tool_basename; ac_word=$2
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514$as_echo_n "checking for $ac_word... " >&6; }
6515if ${ac_cv_path_ECHO+:} false; then :
6516  $as_echo_n "(cached) " >&6
6517else
6518  case $ECHO in
6519  [\\/]* | ?:[\\/]*)
6520  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6521  ;;
6522  *)
6523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524for as_dir in $PATH
6525do
6526  IFS=$as_save_IFS
6527  test -z "$as_dir" && as_dir=.
6528    for ac_exec_ext in '' $ac_executable_extensions; do
6529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532    break 2
6533  fi
6534done
6535  done
6536IFS=$as_save_IFS
6537
6538  ;;
6539esac
6540fi
6541ECHO=$ac_cv_path_ECHO
6542if test -n "$ECHO"; then
6543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6544$as_echo "$ECHO" >&6; }
6545else
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547$as_echo "no" >&6; }
6548fi
6549
6550
6551        if test "x$ECHO" = x; then
6552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6553        fi
6554      else
6555        # Otherwise we believe it is a complete path. Use it as it is.
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6557$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6559$as_echo_n "checking for ECHO... " >&6; }
6560        if test ! -x "$tool_specified"; then
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6562$as_echo "not found" >&6; }
6563          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6564        fi
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6566$as_echo "$tool_specified" >&6; }
6567      fi
6568    fi
6569  fi
6570
6571
6572
6573  if test "x$ECHO" = x; then
6574    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6575  fi
6576
6577
6578
6579
6580
6581  # Publish this variable in the help.
6582
6583
6584  if test "x$EXPR" = x; then
6585    # The variable is not set by user, try to locate tool using the code snippet
6586    for ac_prog in expr
6587do
6588  # Extract the first word of "$ac_prog", so it can be a program name with args.
6589set dummy $ac_prog; ac_word=$2
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6591$as_echo_n "checking for $ac_word... " >&6; }
6592if ${ac_cv_path_EXPR+:} false; then :
6593  $as_echo_n "(cached) " >&6
6594else
6595  case $EXPR in
6596  [\\/]* | ?:[\\/]*)
6597  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6598  ;;
6599  *)
6600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6601for as_dir in $PATH
6602do
6603  IFS=$as_save_IFS
6604  test -z "$as_dir" && as_dir=.
6605    for ac_exec_ext in '' $ac_executable_extensions; do
6606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6607    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6609    break 2
6610  fi
6611done
6612  done
6613IFS=$as_save_IFS
6614
6615  ;;
6616esac
6617fi
6618EXPR=$ac_cv_path_EXPR
6619if test -n "$EXPR"; then
6620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6621$as_echo "$EXPR" >&6; }
6622else
6623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6624$as_echo "no" >&6; }
6625fi
6626
6627
6628  test -n "$EXPR" && break
6629done
6630
6631  else
6632    # The variable is set, but is it from the command line or the environment?
6633
6634    # Try to remove the string !EXPR! from our list.
6635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6637      # If it failed, the variable was not from the command line. Ignore it,
6638      # but warn the user (except for BASH, which is always set by the calling BASH).
6639      if test "xEXPR" != xBASH; then
6640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6641$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6642      fi
6643      # Try to locate tool using the code snippet
6644      for ac_prog in expr
6645do
6646  # Extract the first word of "$ac_prog", so it can be a program name with args.
6647set dummy $ac_prog; ac_word=$2
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649$as_echo_n "checking for $ac_word... " >&6; }
6650if ${ac_cv_path_EXPR+:} false; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  case $EXPR in
6654  [\\/]* | ?:[\\/]*)
6655  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6656  ;;
6657  *)
6658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659for as_dir in $PATH
6660do
6661  IFS=$as_save_IFS
6662  test -z "$as_dir" && as_dir=.
6663    for ac_exec_ext in '' $ac_executable_extensions; do
6664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6665    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6667    break 2
6668  fi
6669done
6670  done
6671IFS=$as_save_IFS
6672
6673  ;;
6674esac
6675fi
6676EXPR=$ac_cv_path_EXPR
6677if test -n "$EXPR"; then
6678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6679$as_echo "$EXPR" >&6; }
6680else
6681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6682$as_echo "no" >&6; }
6683fi
6684
6685
6686  test -n "$EXPR" && break
6687done
6688
6689    else
6690      # If it succeeded, then it was overridden by the user. We will use it
6691      # for the tool.
6692
6693      # First remove it from the list of overridden variables, so we can test
6694      # for unknown variables in the end.
6695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6696
6697      # Check if the provided tool contains a complete path.
6698      tool_specified="$EXPR"
6699      tool_basename="${tool_specified##*/}"
6700      if test "x$tool_basename" = "x$tool_specified"; then
6701        # A command without a complete path is provided, search $PATH.
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6703$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6704        # Extract the first word of "$tool_basename", so it can be a program name with args.
6705set dummy $tool_basename; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_EXPR+:} false; then :
6709  $as_echo_n "(cached) " >&6
6710else
6711  case $EXPR in
6712  [\\/]* | ?:[\\/]*)
6713  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6714  ;;
6715  *)
6716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in $PATH
6718do
6719  IFS=$as_save_IFS
6720  test -z "$as_dir" && as_dir=.
6721    for ac_exec_ext in '' $ac_executable_extensions; do
6722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725    break 2
6726  fi
6727done
6728  done
6729IFS=$as_save_IFS
6730
6731  ;;
6732esac
6733fi
6734EXPR=$ac_cv_path_EXPR
6735if test -n "$EXPR"; then
6736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6737$as_echo "$EXPR" >&6; }
6738else
6739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
6743
6744        if test "x$EXPR" = x; then
6745          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6746        fi
6747      else
6748        # Otherwise we believe it is a complete path. Use it as it is.
6749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6750$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6752$as_echo_n "checking for EXPR... " >&6; }
6753        if test ! -x "$tool_specified"; then
6754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6755$as_echo "not found" >&6; }
6756          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6757        fi
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6759$as_echo "$tool_specified" >&6; }
6760      fi
6761    fi
6762  fi
6763
6764
6765
6766  if test "x$EXPR" = x; then
6767    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6768  fi
6769
6770
6771
6772
6773
6774  # Publish this variable in the help.
6775
6776
6777  if test "x$FILE" = x; then
6778    # The variable is not set by user, try to locate tool using the code snippet
6779    for ac_prog in file
6780do
6781  # Extract the first word of "$ac_prog", so it can be a program name with args.
6782set dummy $ac_prog; ac_word=$2
6783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784$as_echo_n "checking for $ac_word... " >&6; }
6785if ${ac_cv_path_FILE+:} false; then :
6786  $as_echo_n "(cached) " >&6
6787else
6788  case $FILE in
6789  [\\/]* | ?:[\\/]*)
6790  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6791  ;;
6792  *)
6793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6794for as_dir in $PATH
6795do
6796  IFS=$as_save_IFS
6797  test -z "$as_dir" && as_dir=.
6798    for ac_exec_ext in '' $ac_executable_extensions; do
6799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6800    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6802    break 2
6803  fi
6804done
6805  done
6806IFS=$as_save_IFS
6807
6808  ;;
6809esac
6810fi
6811FILE=$ac_cv_path_FILE
6812if test -n "$FILE"; then
6813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6814$as_echo "$FILE" >&6; }
6815else
6816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6817$as_echo "no" >&6; }
6818fi
6819
6820
6821  test -n "$FILE" && break
6822done
6823
6824  else
6825    # The variable is set, but is it from the command line or the environment?
6826
6827    # Try to remove the string !FILE! from our list.
6828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6830      # If it failed, the variable was not from the command line. Ignore it,
6831      # but warn the user (except for BASH, which is always set by the calling BASH).
6832      if test "xFILE" != xBASH; then
6833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6834$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6835      fi
6836      # Try to locate tool using the code snippet
6837      for ac_prog in file
6838do
6839  # Extract the first word of "$ac_prog", so it can be a program name with args.
6840set dummy $ac_prog; ac_word=$2
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842$as_echo_n "checking for $ac_word... " >&6; }
6843if ${ac_cv_path_FILE+:} false; then :
6844  $as_echo_n "(cached) " >&6
6845else
6846  case $FILE in
6847  [\\/]* | ?:[\\/]*)
6848  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6849  ;;
6850  *)
6851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852for as_dir in $PATH
6853do
6854  IFS=$as_save_IFS
6855  test -z "$as_dir" && as_dir=.
6856    for ac_exec_ext in '' $ac_executable_extensions; do
6857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860    break 2
6861  fi
6862done
6863  done
6864IFS=$as_save_IFS
6865
6866  ;;
6867esac
6868fi
6869FILE=$ac_cv_path_FILE
6870if test -n "$FILE"; then
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6872$as_echo "$FILE" >&6; }
6873else
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876fi
6877
6878
6879  test -n "$FILE" && break
6880done
6881
6882    else
6883      # If it succeeded, then it was overridden by the user. We will use it
6884      # for the tool.
6885
6886      # First remove it from the list of overridden variables, so we can test
6887      # for unknown variables in the end.
6888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6889
6890      # Check if the provided tool contains a complete path.
6891      tool_specified="$FILE"
6892      tool_basename="${tool_specified##*/}"
6893      if test "x$tool_basename" = "x$tool_specified"; then
6894        # A command without a complete path is provided, search $PATH.
6895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6896$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6897        # Extract the first word of "$tool_basename", so it can be a program name with args.
6898set dummy $tool_basename; ac_word=$2
6899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900$as_echo_n "checking for $ac_word... " >&6; }
6901if ${ac_cv_path_FILE+:} false; then :
6902  $as_echo_n "(cached) " >&6
6903else
6904  case $FILE in
6905  [\\/]* | ?:[\\/]*)
6906  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6907  ;;
6908  *)
6909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910for as_dir in $PATH
6911do
6912  IFS=$as_save_IFS
6913  test -z "$as_dir" && as_dir=.
6914    for ac_exec_ext in '' $ac_executable_extensions; do
6915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6916    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918    break 2
6919  fi
6920done
6921  done
6922IFS=$as_save_IFS
6923
6924  ;;
6925esac
6926fi
6927FILE=$ac_cv_path_FILE
6928if test -n "$FILE"; then
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6930$as_echo "$FILE" >&6; }
6931else
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6933$as_echo "no" >&6; }
6934fi
6935
6936
6937        if test "x$FILE" = x; then
6938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6939        fi
6940      else
6941        # Otherwise we believe it is a complete path. Use it as it is.
6942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
6943$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
6944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
6945$as_echo_n "checking for FILE... " >&6; }
6946        if test ! -x "$tool_specified"; then
6947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6948$as_echo "not found" >&6; }
6949          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
6950        fi
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6952$as_echo "$tool_specified" >&6; }
6953      fi
6954    fi
6955  fi
6956
6957
6958
6959  if test "x$FILE" = x; then
6960    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
6961  fi
6962
6963
6964
6965
6966
6967  # Publish this variable in the help.
6968
6969
6970  if test "x$FIND" = x; then
6971    # The variable is not set by user, try to locate tool using the code snippet
6972    for ac_prog in find
6973do
6974  # Extract the first word of "$ac_prog", so it can be a program name with args.
6975set dummy $ac_prog; ac_word=$2
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6977$as_echo_n "checking for $ac_word... " >&6; }
6978if ${ac_cv_path_FIND+:} false; then :
6979  $as_echo_n "(cached) " >&6
6980else
6981  case $FIND in
6982  [\\/]* | ?:[\\/]*)
6983  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
6984  ;;
6985  *)
6986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6987for as_dir in $PATH
6988do
6989  IFS=$as_save_IFS
6990  test -z "$as_dir" && as_dir=.
6991    for ac_exec_ext in '' $ac_executable_extensions; do
6992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6993    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
6994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6995    break 2
6996  fi
6997done
6998  done
6999IFS=$as_save_IFS
7000
7001  ;;
7002esac
7003fi
7004FIND=$ac_cv_path_FIND
7005if test -n "$FIND"; then
7006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7007$as_echo "$FIND" >&6; }
7008else
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7010$as_echo "no" >&6; }
7011fi
7012
7013
7014  test -n "$FIND" && break
7015done
7016
7017  else
7018    # The variable is set, but is it from the command line or the environment?
7019
7020    # Try to remove the string !FIND! from our list.
7021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7023      # If it failed, the variable was not from the command line. Ignore it,
7024      # but warn the user (except for BASH, which is always set by the calling BASH).
7025      if test "xFIND" != xBASH; then
7026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7027$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7028      fi
7029      # Try to locate tool using the code snippet
7030      for ac_prog in find
7031do
7032  # Extract the first word of "$ac_prog", so it can be a program name with args.
7033set dummy $ac_prog; ac_word=$2
7034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7035$as_echo_n "checking for $ac_word... " >&6; }
7036if ${ac_cv_path_FIND+:} false; then :
7037  $as_echo_n "(cached) " >&6
7038else
7039  case $FIND in
7040  [\\/]* | ?:[\\/]*)
7041  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7042  ;;
7043  *)
7044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7045for as_dir in $PATH
7046do
7047  IFS=$as_save_IFS
7048  test -z "$as_dir" && as_dir=.
7049    for ac_exec_ext in '' $ac_executable_extensions; do
7050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7051    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7053    break 2
7054  fi
7055done
7056  done
7057IFS=$as_save_IFS
7058
7059  ;;
7060esac
7061fi
7062FIND=$ac_cv_path_FIND
7063if test -n "$FIND"; then
7064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7065$as_echo "$FIND" >&6; }
7066else
7067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7068$as_echo "no" >&6; }
7069fi
7070
7071
7072  test -n "$FIND" && break
7073done
7074
7075    else
7076      # If it succeeded, then it was overridden by the user. We will use it
7077      # for the tool.
7078
7079      # First remove it from the list of overridden variables, so we can test
7080      # for unknown variables in the end.
7081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7082
7083      # Check if the provided tool contains a complete path.
7084      tool_specified="$FIND"
7085      tool_basename="${tool_specified##*/}"
7086      if test "x$tool_basename" = "x$tool_specified"; then
7087        # A command without a complete path is provided, search $PATH.
7088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7089$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7090        # Extract the first word of "$tool_basename", so it can be a program name with args.
7091set dummy $tool_basename; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
7094if ${ac_cv_path_FIND+:} false; then :
7095  $as_echo_n "(cached) " >&6
7096else
7097  case $FIND in
7098  [\\/]* | ?:[\\/]*)
7099  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7100  ;;
7101  *)
7102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in $PATH
7104do
7105  IFS=$as_save_IFS
7106  test -z "$as_dir" && as_dir=.
7107    for ac_exec_ext in '' $ac_executable_extensions; do
7108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111    break 2
7112  fi
7113done
7114  done
7115IFS=$as_save_IFS
7116
7117  ;;
7118esac
7119fi
7120FIND=$ac_cv_path_FIND
7121if test -n "$FIND"; then
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7123$as_echo "$FIND" >&6; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130        if test "x$FIND" = x; then
7131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7132        fi
7133      else
7134        # Otherwise we believe it is a complete path. Use it as it is.
7135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7136$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7138$as_echo_n "checking for FIND... " >&6; }
7139        if test ! -x "$tool_specified"; then
7140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7141$as_echo "not found" >&6; }
7142          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7143        fi
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7145$as_echo "$tool_specified" >&6; }
7146      fi
7147    fi
7148  fi
7149
7150
7151
7152  if test "x$FIND" = x; then
7153    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7154  fi
7155
7156
7157
7158
7159
7160  # Publish this variable in the help.
7161
7162
7163  if test "x$HEAD" = x; then
7164    # The variable is not set by user, try to locate tool using the code snippet
7165    for ac_prog in head
7166do
7167  # Extract the first word of "$ac_prog", so it can be a program name with args.
7168set dummy $ac_prog; ac_word=$2
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170$as_echo_n "checking for $ac_word... " >&6; }
7171if ${ac_cv_path_HEAD+:} false; then :
7172  $as_echo_n "(cached) " >&6
7173else
7174  case $HEAD in
7175  [\\/]* | ?:[\\/]*)
7176  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7177  ;;
7178  *)
7179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180for as_dir in $PATH
7181do
7182  IFS=$as_save_IFS
7183  test -z "$as_dir" && as_dir=.
7184    for ac_exec_ext in '' $ac_executable_extensions; do
7185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188    break 2
7189  fi
7190done
7191  done
7192IFS=$as_save_IFS
7193
7194  ;;
7195esac
7196fi
7197HEAD=$ac_cv_path_HEAD
7198if test -n "$HEAD"; then
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7200$as_echo "$HEAD" >&6; }
7201else
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
7204fi
7205
7206
7207  test -n "$HEAD" && break
7208done
7209
7210  else
7211    # The variable is set, but is it from the command line or the environment?
7212
7213    # Try to remove the string !HEAD! from our list.
7214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7216      # If it failed, the variable was not from the command line. Ignore it,
7217      # but warn the user (except for BASH, which is always set by the calling BASH).
7218      if test "xHEAD" != xBASH; then
7219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7220$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7221      fi
7222      # Try to locate tool using the code snippet
7223      for ac_prog in head
7224do
7225  # Extract the first word of "$ac_prog", so it can be a program name with args.
7226set dummy $ac_prog; ac_word=$2
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228$as_echo_n "checking for $ac_word... " >&6; }
7229if ${ac_cv_path_HEAD+:} false; then :
7230  $as_echo_n "(cached) " >&6
7231else
7232  case $HEAD in
7233  [\\/]* | ?:[\\/]*)
7234  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7235  ;;
7236  *)
7237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238for as_dir in $PATH
7239do
7240  IFS=$as_save_IFS
7241  test -z "$as_dir" && as_dir=.
7242    for ac_exec_ext in '' $ac_executable_extensions; do
7243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246    break 2
7247  fi
7248done
7249  done
7250IFS=$as_save_IFS
7251
7252  ;;
7253esac
7254fi
7255HEAD=$ac_cv_path_HEAD
7256if test -n "$HEAD"; then
7257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7258$as_echo "$HEAD" >&6; }
7259else
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263
7264
7265  test -n "$HEAD" && break
7266done
7267
7268    else
7269      # If it succeeded, then it was overridden by the user. We will use it
7270      # for the tool.
7271
7272      # First remove it from the list of overridden variables, so we can test
7273      # for unknown variables in the end.
7274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7275
7276      # Check if the provided tool contains a complete path.
7277      tool_specified="$HEAD"
7278      tool_basename="${tool_specified##*/}"
7279      if test "x$tool_basename" = "x$tool_specified"; then
7280        # A command without a complete path is provided, search $PATH.
7281        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7282$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7283        # Extract the first word of "$tool_basename", so it can be a program name with args.
7284set dummy $tool_basename; ac_word=$2
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7286$as_echo_n "checking for $ac_word... " >&6; }
7287if ${ac_cv_path_HEAD+:} false; then :
7288  $as_echo_n "(cached) " >&6
7289else
7290  case $HEAD in
7291  [\\/]* | ?:[\\/]*)
7292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7293  ;;
7294  *)
7295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7296for as_dir in $PATH
7297do
7298  IFS=$as_save_IFS
7299  test -z "$as_dir" && as_dir=.
7300    for ac_exec_ext in '' $ac_executable_extensions; do
7301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7304    break 2
7305  fi
7306done
7307  done
7308IFS=$as_save_IFS
7309
7310  ;;
7311esac
7312fi
7313HEAD=$ac_cv_path_HEAD
7314if test -n "$HEAD"; then
7315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7316$as_echo "$HEAD" >&6; }
7317else
7318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7319$as_echo "no" >&6; }
7320fi
7321
7322
7323        if test "x$HEAD" = x; then
7324          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7325        fi
7326      else
7327        # Otherwise we believe it is a complete path. Use it as it is.
7328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7329$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7331$as_echo_n "checking for HEAD... " >&6; }
7332        if test ! -x "$tool_specified"; then
7333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7334$as_echo "not found" >&6; }
7335          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7336        fi
7337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7338$as_echo "$tool_specified" >&6; }
7339      fi
7340    fi
7341  fi
7342
7343
7344
7345  if test "x$HEAD" = x; then
7346    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7347  fi
7348
7349
7350
7351
7352
7353  # Publish this variable in the help.
7354
7355
7356  if test "x$LN" = x; then
7357    # The variable is not set by user, try to locate tool using the code snippet
7358    for ac_prog in ln
7359do
7360  # Extract the first word of "$ac_prog", so it can be a program name with args.
7361set dummy $ac_prog; ac_word=$2
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7363$as_echo_n "checking for $ac_word... " >&6; }
7364if ${ac_cv_path_LN+:} false; then :
7365  $as_echo_n "(cached) " >&6
7366else
7367  case $LN in
7368  [\\/]* | ?:[\\/]*)
7369  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7370  ;;
7371  *)
7372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7373for as_dir in $PATH
7374do
7375  IFS=$as_save_IFS
7376  test -z "$as_dir" && as_dir=.
7377    for ac_exec_ext in '' $ac_executable_extensions; do
7378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7379    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7381    break 2
7382  fi
7383done
7384  done
7385IFS=$as_save_IFS
7386
7387  ;;
7388esac
7389fi
7390LN=$ac_cv_path_LN
7391if test -n "$LN"; then
7392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7393$as_echo "$LN" >&6; }
7394else
7395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7396$as_echo "no" >&6; }
7397fi
7398
7399
7400  test -n "$LN" && break
7401done
7402
7403  else
7404    # The variable is set, but is it from the command line or the environment?
7405
7406    # Try to remove the string !LN! from our list.
7407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7409      # If it failed, the variable was not from the command line. Ignore it,
7410      # but warn the user (except for BASH, which is always set by the calling BASH).
7411      if test "xLN" != xBASH; then
7412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7413$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7414      fi
7415      # Try to locate tool using the code snippet
7416      for ac_prog in ln
7417do
7418  # Extract the first word of "$ac_prog", so it can be a program name with args.
7419set dummy $ac_prog; ac_word=$2
7420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7421$as_echo_n "checking for $ac_word... " >&6; }
7422if ${ac_cv_path_LN+:} false; then :
7423  $as_echo_n "(cached) " >&6
7424else
7425  case $LN in
7426  [\\/]* | ?:[\\/]*)
7427  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7428  ;;
7429  *)
7430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7431for as_dir in $PATH
7432do
7433  IFS=$as_save_IFS
7434  test -z "$as_dir" && as_dir=.
7435    for ac_exec_ext in '' $ac_executable_extensions; do
7436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7437    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7439    break 2
7440  fi
7441done
7442  done
7443IFS=$as_save_IFS
7444
7445  ;;
7446esac
7447fi
7448LN=$ac_cv_path_LN
7449if test -n "$LN"; then
7450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7451$as_echo "$LN" >&6; }
7452else
7453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7454$as_echo "no" >&6; }
7455fi
7456
7457
7458  test -n "$LN" && break
7459done
7460
7461    else
7462      # If it succeeded, then it was overridden by the user. We will use it
7463      # for the tool.
7464
7465      # First remove it from the list of overridden variables, so we can test
7466      # for unknown variables in the end.
7467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7468
7469      # Check if the provided tool contains a complete path.
7470      tool_specified="$LN"
7471      tool_basename="${tool_specified##*/}"
7472      if test "x$tool_basename" = "x$tool_specified"; then
7473        # A command without a complete path is provided, search $PATH.
7474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7475$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7476        # Extract the first word of "$tool_basename", so it can be a program name with args.
7477set dummy $tool_basename; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_LN+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $LN in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506LN=$ac_cv_path_LN
7507if test -n "$LN"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7509$as_echo "$LN" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516        if test "x$LN" = x; then
7517          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7518        fi
7519      else
7520        # Otherwise we believe it is a complete path. Use it as it is.
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7522$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7524$as_echo_n "checking for LN... " >&6; }
7525        if test ! -x "$tool_specified"; then
7526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7527$as_echo "not found" >&6; }
7528          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7529        fi
7530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7531$as_echo "$tool_specified" >&6; }
7532      fi
7533    fi
7534  fi
7535
7536
7537
7538  if test "x$LN" = x; then
7539    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7540  fi
7541
7542
7543
7544
7545
7546  # Publish this variable in the help.
7547
7548
7549  if test "x$LS" = x; then
7550    # The variable is not set by user, try to locate tool using the code snippet
7551    for ac_prog in ls
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_LS+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $LS in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583LS=$ac_cv_path_LS
7584if test -n "$LS"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7586$as_echo "$LS" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$LS" && break
7594done
7595
7596  else
7597    # The variable is set, but is it from the command line or the environment?
7598
7599    # Try to remove the string !LS! from our list.
7600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7602      # If it failed, the variable was not from the command line. Ignore it,
7603      # but warn the user (except for BASH, which is always set by the calling BASH).
7604      if test "xLS" != xBASH; then
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7606$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7607      fi
7608      # Try to locate tool using the code snippet
7609      for ac_prog in ls
7610do
7611  # Extract the first word of "$ac_prog", so it can be a program name with args.
7612set dummy $ac_prog; ac_word=$2
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614$as_echo_n "checking for $ac_word... " >&6; }
7615if ${ac_cv_path_LS+:} false; then :
7616  $as_echo_n "(cached) " >&6
7617else
7618  case $LS in
7619  [\\/]* | ?:[\\/]*)
7620  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7621  ;;
7622  *)
7623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7624for as_dir in $PATH
7625do
7626  IFS=$as_save_IFS
7627  test -z "$as_dir" && as_dir=.
7628    for ac_exec_ext in '' $ac_executable_extensions; do
7629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7630    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7632    break 2
7633  fi
7634done
7635  done
7636IFS=$as_save_IFS
7637
7638  ;;
7639esac
7640fi
7641LS=$ac_cv_path_LS
7642if test -n "$LS"; then
7643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7644$as_echo "$LS" >&6; }
7645else
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647$as_echo "no" >&6; }
7648fi
7649
7650
7651  test -n "$LS" && break
7652done
7653
7654    else
7655      # If it succeeded, then it was overridden by the user. We will use it
7656      # for the tool.
7657
7658      # First remove it from the list of overridden variables, so we can test
7659      # for unknown variables in the end.
7660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7661
7662      # Check if the provided tool contains a complete path.
7663      tool_specified="$LS"
7664      tool_basename="${tool_specified##*/}"
7665      if test "x$tool_basename" = "x$tool_specified"; then
7666        # A command without a complete path is provided, search $PATH.
7667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7668$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7669        # Extract the first word of "$tool_basename", so it can be a program name with args.
7670set dummy $tool_basename; ac_word=$2
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672$as_echo_n "checking for $ac_word... " >&6; }
7673if ${ac_cv_path_LS+:} false; then :
7674  $as_echo_n "(cached) " >&6
7675else
7676  case $LS in
7677  [\\/]* | ?:[\\/]*)
7678  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7679  ;;
7680  *)
7681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in $PATH
7683do
7684  IFS=$as_save_IFS
7685  test -z "$as_dir" && as_dir=.
7686    for ac_exec_ext in '' $ac_executable_extensions; do
7687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7690    break 2
7691  fi
7692done
7693  done
7694IFS=$as_save_IFS
7695
7696  ;;
7697esac
7698fi
7699LS=$ac_cv_path_LS
7700if test -n "$LS"; then
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7702$as_echo "$LS" >&6; }
7703else
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705$as_echo "no" >&6; }
7706fi
7707
7708
7709        if test "x$LS" = x; then
7710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7711        fi
7712      else
7713        # Otherwise we believe it is a complete path. Use it as it is.
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7715$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7717$as_echo_n "checking for LS... " >&6; }
7718        if test ! -x "$tool_specified"; then
7719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7720$as_echo "not found" >&6; }
7721          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7722        fi
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7724$as_echo "$tool_specified" >&6; }
7725      fi
7726    fi
7727  fi
7728
7729
7730
7731  if test "x$LS" = x; then
7732    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7733  fi
7734
7735
7736
7737
7738
7739  # Publish this variable in the help.
7740
7741
7742  if test "x$MKDIR" = x; then
7743    # The variable is not set by user, try to locate tool using the code snippet
7744    for ac_prog in mkdir
7745do
7746  # Extract the first word of "$ac_prog", so it can be a program name with args.
7747set dummy $ac_prog; ac_word=$2
7748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7749$as_echo_n "checking for $ac_word... " >&6; }
7750if ${ac_cv_path_MKDIR+:} false; then :
7751  $as_echo_n "(cached) " >&6
7752else
7753  case $MKDIR in
7754  [\\/]* | ?:[\\/]*)
7755  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7756  ;;
7757  *)
7758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7759for as_dir in $PATH
7760do
7761  IFS=$as_save_IFS
7762  test -z "$as_dir" && as_dir=.
7763    for ac_exec_ext in '' $ac_executable_extensions; do
7764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7765    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7767    break 2
7768  fi
7769done
7770  done
7771IFS=$as_save_IFS
7772
7773  ;;
7774esac
7775fi
7776MKDIR=$ac_cv_path_MKDIR
7777if test -n "$MKDIR"; then
7778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7779$as_echo "$MKDIR" >&6; }
7780else
7781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7782$as_echo "no" >&6; }
7783fi
7784
7785
7786  test -n "$MKDIR" && break
7787done
7788
7789  else
7790    # The variable is set, but is it from the command line or the environment?
7791
7792    # Try to remove the string !MKDIR! from our list.
7793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7795      # If it failed, the variable was not from the command line. Ignore it,
7796      # but warn the user (except for BASH, which is always set by the calling BASH).
7797      if test "xMKDIR" != xBASH; then
7798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7799$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7800      fi
7801      # Try to locate tool using the code snippet
7802      for ac_prog in mkdir
7803do
7804  # Extract the first word of "$ac_prog", so it can be a program name with args.
7805set dummy $ac_prog; ac_word=$2
7806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7807$as_echo_n "checking for $ac_word... " >&6; }
7808if ${ac_cv_path_MKDIR+:} false; then :
7809  $as_echo_n "(cached) " >&6
7810else
7811  case $MKDIR in
7812  [\\/]* | ?:[\\/]*)
7813  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7814  ;;
7815  *)
7816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7817for as_dir in $PATH
7818do
7819  IFS=$as_save_IFS
7820  test -z "$as_dir" && as_dir=.
7821    for ac_exec_ext in '' $ac_executable_extensions; do
7822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7823    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7825    break 2
7826  fi
7827done
7828  done
7829IFS=$as_save_IFS
7830
7831  ;;
7832esac
7833fi
7834MKDIR=$ac_cv_path_MKDIR
7835if test -n "$MKDIR"; then
7836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7837$as_echo "$MKDIR" >&6; }
7838else
7839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7840$as_echo "no" >&6; }
7841fi
7842
7843
7844  test -n "$MKDIR" && break
7845done
7846
7847    else
7848      # If it succeeded, then it was overridden by the user. We will use it
7849      # for the tool.
7850
7851      # First remove it from the list of overridden variables, so we can test
7852      # for unknown variables in the end.
7853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7854
7855      # Check if the provided tool contains a complete path.
7856      tool_specified="$MKDIR"
7857      tool_basename="${tool_specified##*/}"
7858      if test "x$tool_basename" = "x$tool_specified"; then
7859        # A command without a complete path is provided, search $PATH.
7860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7861$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7862        # Extract the first word of "$tool_basename", so it can be a program name with args.
7863set dummy $tool_basename; ac_word=$2
7864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865$as_echo_n "checking for $ac_word... " >&6; }
7866if ${ac_cv_path_MKDIR+:} false; then :
7867  $as_echo_n "(cached) " >&6
7868else
7869  case $MKDIR in
7870  [\\/]* | ?:[\\/]*)
7871  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7872  ;;
7873  *)
7874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7875for as_dir in $PATH
7876do
7877  IFS=$as_save_IFS
7878  test -z "$as_dir" && as_dir=.
7879    for ac_exec_ext in '' $ac_executable_extensions; do
7880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7881    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7883    break 2
7884  fi
7885done
7886  done
7887IFS=$as_save_IFS
7888
7889  ;;
7890esac
7891fi
7892MKDIR=$ac_cv_path_MKDIR
7893if test -n "$MKDIR"; then
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7895$as_echo "$MKDIR" >&6; }
7896else
7897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7898$as_echo "no" >&6; }
7899fi
7900
7901
7902        if test "x$MKDIR" = x; then
7903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7904        fi
7905      else
7906        # Otherwise we believe it is a complete path. Use it as it is.
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
7908$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
7910$as_echo_n "checking for MKDIR... " >&6; }
7911        if test ! -x "$tool_specified"; then
7912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7913$as_echo "not found" >&6; }
7914          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
7915        fi
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7917$as_echo "$tool_specified" >&6; }
7918      fi
7919    fi
7920  fi
7921
7922
7923
7924  if test "x$MKDIR" = x; then
7925    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
7926  fi
7927
7928
7929
7930
7931
7932  # Publish this variable in the help.
7933
7934
7935  if test "x$MKTEMP" = x; then
7936    # The variable is not set by user, try to locate tool using the code snippet
7937    for ac_prog in mktemp
7938do
7939  # Extract the first word of "$ac_prog", so it can be a program name with args.
7940set dummy $ac_prog; ac_word=$2
7941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7942$as_echo_n "checking for $ac_word... " >&6; }
7943if ${ac_cv_path_MKTEMP+:} false; then :
7944  $as_echo_n "(cached) " >&6
7945else
7946  case $MKTEMP in
7947  [\\/]* | ?:[\\/]*)
7948  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
7949  ;;
7950  *)
7951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952for as_dir in $PATH
7953do
7954  IFS=$as_save_IFS
7955  test -z "$as_dir" && as_dir=.
7956    for ac_exec_ext in '' $ac_executable_extensions; do
7957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7958    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
7959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7960    break 2
7961  fi
7962done
7963  done
7964IFS=$as_save_IFS
7965
7966  ;;
7967esac
7968fi
7969MKTEMP=$ac_cv_path_MKTEMP
7970if test -n "$MKTEMP"; then
7971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
7972$as_echo "$MKTEMP" >&6; }
7973else
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7975$as_echo "no" >&6; }
7976fi
7977
7978
7979  test -n "$MKTEMP" && break
7980done
7981
7982  else
7983    # The variable is set, but is it from the command line or the environment?
7984
7985    # Try to remove the string !MKTEMP! from our list.
7986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
7987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7988      # If it failed, the variable was not from the command line. Ignore it,
7989      # but warn the user (except for BASH, which is always set by the calling BASH).
7990      if test "xMKTEMP" != xBASH; then
7991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
7992$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
7993      fi
7994      # Try to locate tool using the code snippet
7995      for ac_prog in mktemp
7996do
7997  # Extract the first word of "$ac_prog", so it can be a program name with args.
7998set dummy $ac_prog; ac_word=$2
7999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8000$as_echo_n "checking for $ac_word... " >&6; }
8001if ${ac_cv_path_MKTEMP+:} false; then :
8002  $as_echo_n "(cached) " >&6
8003else
8004  case $MKTEMP in
8005  [\\/]* | ?:[\\/]*)
8006  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8007  ;;
8008  *)
8009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8010for as_dir in $PATH
8011do
8012  IFS=$as_save_IFS
8013  test -z "$as_dir" && as_dir=.
8014    for ac_exec_ext in '' $ac_executable_extensions; do
8015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8016    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8018    break 2
8019  fi
8020done
8021  done
8022IFS=$as_save_IFS
8023
8024  ;;
8025esac
8026fi
8027MKTEMP=$ac_cv_path_MKTEMP
8028if test -n "$MKTEMP"; then
8029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8030$as_echo "$MKTEMP" >&6; }
8031else
8032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8033$as_echo "no" >&6; }
8034fi
8035
8036
8037  test -n "$MKTEMP" && break
8038done
8039
8040    else
8041      # If it succeeded, then it was overridden by the user. We will use it
8042      # for the tool.
8043
8044      # First remove it from the list of overridden variables, so we can test
8045      # for unknown variables in the end.
8046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8047
8048      # Check if the provided tool contains a complete path.
8049      tool_specified="$MKTEMP"
8050      tool_basename="${tool_specified##*/}"
8051      if test "x$tool_basename" = "x$tool_specified"; then
8052        # A command without a complete path is provided, search $PATH.
8053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8054$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8055        # Extract the first word of "$tool_basename", so it can be a program name with args.
8056set dummy $tool_basename; ac_word=$2
8057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if ${ac_cv_path_MKTEMP+:} false; then :
8060  $as_echo_n "(cached) " >&6
8061else
8062  case $MKTEMP in
8063  [\\/]* | ?:[\\/]*)
8064  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8065  ;;
8066  *)
8067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070  IFS=$as_save_IFS
8071  test -z "$as_dir" && as_dir=.
8072    for ac_exec_ext in '' $ac_executable_extensions; do
8073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8074    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8076    break 2
8077  fi
8078done
8079  done
8080IFS=$as_save_IFS
8081
8082  ;;
8083esac
8084fi
8085MKTEMP=$ac_cv_path_MKTEMP
8086if test -n "$MKTEMP"; then
8087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8088$as_echo "$MKTEMP" >&6; }
8089else
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
8092fi
8093
8094
8095        if test "x$MKTEMP" = x; then
8096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8097        fi
8098      else
8099        # Otherwise we believe it is a complete path. Use it as it is.
8100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8101$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8103$as_echo_n "checking for MKTEMP... " >&6; }
8104        if test ! -x "$tool_specified"; then
8105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8106$as_echo "not found" >&6; }
8107          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8108        fi
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8110$as_echo "$tool_specified" >&6; }
8111      fi
8112    fi
8113  fi
8114
8115
8116
8117  if test "x$MKTEMP" = x; then
8118    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8119  fi
8120
8121
8122
8123
8124
8125  # Publish this variable in the help.
8126
8127
8128  if test "x$MV" = x; then
8129    # The variable is not set by user, try to locate tool using the code snippet
8130    for ac_prog in mv
8131do
8132  # Extract the first word of "$ac_prog", so it can be a program name with args.
8133set dummy $ac_prog; ac_word=$2
8134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8135$as_echo_n "checking for $ac_word... " >&6; }
8136if ${ac_cv_path_MV+:} false; then :
8137  $as_echo_n "(cached) " >&6
8138else
8139  case $MV in
8140  [\\/]* | ?:[\\/]*)
8141  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8142  ;;
8143  *)
8144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8145for as_dir in $PATH
8146do
8147  IFS=$as_save_IFS
8148  test -z "$as_dir" && as_dir=.
8149    for ac_exec_ext in '' $ac_executable_extensions; do
8150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8151    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8153    break 2
8154  fi
8155done
8156  done
8157IFS=$as_save_IFS
8158
8159  ;;
8160esac
8161fi
8162MV=$ac_cv_path_MV
8163if test -n "$MV"; then
8164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8165$as_echo "$MV" >&6; }
8166else
8167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168$as_echo "no" >&6; }
8169fi
8170
8171
8172  test -n "$MV" && break
8173done
8174
8175  else
8176    # The variable is set, but is it from the command line or the environment?
8177
8178    # Try to remove the string !MV! from our list.
8179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8181      # If it failed, the variable was not from the command line. Ignore it,
8182      # but warn the user (except for BASH, which is always set by the calling BASH).
8183      if test "xMV" != xBASH; then
8184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8185$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8186      fi
8187      # Try to locate tool using the code snippet
8188      for ac_prog in mv
8189do
8190  # Extract the first word of "$ac_prog", so it can be a program name with args.
8191set dummy $ac_prog; ac_word=$2
8192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8193$as_echo_n "checking for $ac_word... " >&6; }
8194if ${ac_cv_path_MV+:} false; then :
8195  $as_echo_n "(cached) " >&6
8196else
8197  case $MV in
8198  [\\/]* | ?:[\\/]*)
8199  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8200  ;;
8201  *)
8202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8203for as_dir in $PATH
8204do
8205  IFS=$as_save_IFS
8206  test -z "$as_dir" && as_dir=.
8207    for ac_exec_ext in '' $ac_executable_extensions; do
8208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8209    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8211    break 2
8212  fi
8213done
8214  done
8215IFS=$as_save_IFS
8216
8217  ;;
8218esac
8219fi
8220MV=$ac_cv_path_MV
8221if test -n "$MV"; then
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8223$as_echo "$MV" >&6; }
8224else
8225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8226$as_echo "no" >&6; }
8227fi
8228
8229
8230  test -n "$MV" && break
8231done
8232
8233    else
8234      # If it succeeded, then it was overridden by the user. We will use it
8235      # for the tool.
8236
8237      # First remove it from the list of overridden variables, so we can test
8238      # for unknown variables in the end.
8239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8240
8241      # Check if the provided tool contains a complete path.
8242      tool_specified="$MV"
8243      tool_basename="${tool_specified##*/}"
8244      if test "x$tool_basename" = "x$tool_specified"; then
8245        # A command without a complete path is provided, search $PATH.
8246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8247$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8248        # Extract the first word of "$tool_basename", so it can be a program name with args.
8249set dummy $tool_basename; ac_word=$2
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251$as_echo_n "checking for $ac_word... " >&6; }
8252if ${ac_cv_path_MV+:} false; then :
8253  $as_echo_n "(cached) " >&6
8254else
8255  case $MV in
8256  [\\/]* | ?:[\\/]*)
8257  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8258  ;;
8259  *)
8260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261for as_dir in $PATH
8262do
8263  IFS=$as_save_IFS
8264  test -z "$as_dir" && as_dir=.
8265    for ac_exec_ext in '' $ac_executable_extensions; do
8266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269    break 2
8270  fi
8271done
8272  done
8273IFS=$as_save_IFS
8274
8275  ;;
8276esac
8277fi
8278MV=$ac_cv_path_MV
8279if test -n "$MV"; then
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8281$as_echo "$MV" >&6; }
8282else
8283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
8285fi
8286
8287
8288        if test "x$MV" = x; then
8289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8290        fi
8291      else
8292        # Otherwise we believe it is a complete path. Use it as it is.
8293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8294$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8296$as_echo_n "checking for MV... " >&6; }
8297        if test ! -x "$tool_specified"; then
8298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8299$as_echo "not found" >&6; }
8300          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8301        fi
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8303$as_echo "$tool_specified" >&6; }
8304      fi
8305    fi
8306  fi
8307
8308
8309
8310  if test "x$MV" = x; then
8311    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8312  fi
8313
8314
8315
8316
8317
8318  # Publish this variable in the help.
8319
8320
8321  if test "x$NAWK" = x; then
8322    # The variable is not set by user, try to locate tool using the code snippet
8323    for ac_prog in nawk gawk awk
8324do
8325  # Extract the first word of "$ac_prog", so it can be a program name with args.
8326set dummy $ac_prog; ac_word=$2
8327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8328$as_echo_n "checking for $ac_word... " >&6; }
8329if ${ac_cv_path_NAWK+:} false; then :
8330  $as_echo_n "(cached) " >&6
8331else
8332  case $NAWK in
8333  [\\/]* | ?:[\\/]*)
8334  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8335  ;;
8336  *)
8337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8338for as_dir in $PATH
8339do
8340  IFS=$as_save_IFS
8341  test -z "$as_dir" && as_dir=.
8342    for ac_exec_ext in '' $ac_executable_extensions; do
8343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8344    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8346    break 2
8347  fi
8348done
8349  done
8350IFS=$as_save_IFS
8351
8352  ;;
8353esac
8354fi
8355NAWK=$ac_cv_path_NAWK
8356if test -n "$NAWK"; then
8357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8358$as_echo "$NAWK" >&6; }
8359else
8360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
8362fi
8363
8364
8365  test -n "$NAWK" && break
8366done
8367
8368  else
8369    # The variable is set, but is it from the command line or the environment?
8370
8371    # Try to remove the string !NAWK! from our list.
8372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8374      # If it failed, the variable was not from the command line. Ignore it,
8375      # but warn the user (except for BASH, which is always set by the calling BASH).
8376      if test "xNAWK" != xBASH; then
8377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8378$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8379      fi
8380      # Try to locate tool using the code snippet
8381      for ac_prog in nawk gawk awk
8382do
8383  # Extract the first word of "$ac_prog", so it can be a program name with args.
8384set dummy $ac_prog; ac_word=$2
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8386$as_echo_n "checking for $ac_word... " >&6; }
8387if ${ac_cv_path_NAWK+:} false; then :
8388  $as_echo_n "(cached) " >&6
8389else
8390  case $NAWK in
8391  [\\/]* | ?:[\\/]*)
8392  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8393  ;;
8394  *)
8395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8396for as_dir in $PATH
8397do
8398  IFS=$as_save_IFS
8399  test -z "$as_dir" && as_dir=.
8400    for ac_exec_ext in '' $ac_executable_extensions; do
8401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8402    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8404    break 2
8405  fi
8406done
8407  done
8408IFS=$as_save_IFS
8409
8410  ;;
8411esac
8412fi
8413NAWK=$ac_cv_path_NAWK
8414if test -n "$NAWK"; then
8415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8416$as_echo "$NAWK" >&6; }
8417else
8418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8419$as_echo "no" >&6; }
8420fi
8421
8422
8423  test -n "$NAWK" && break
8424done
8425
8426    else
8427      # If it succeeded, then it was overridden by the user. We will use it
8428      # for the tool.
8429
8430      # First remove it from the list of overridden variables, so we can test
8431      # for unknown variables in the end.
8432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8433
8434      # Check if the provided tool contains a complete path.
8435      tool_specified="$NAWK"
8436      tool_basename="${tool_specified##*/}"
8437      if test "x$tool_basename" = "x$tool_specified"; then
8438        # A command without a complete path is provided, search $PATH.
8439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8440$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8441        # Extract the first word of "$tool_basename", so it can be a program name with args.
8442set dummy $tool_basename; ac_word=$2
8443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8444$as_echo_n "checking for $ac_word... " >&6; }
8445if ${ac_cv_path_NAWK+:} false; then :
8446  $as_echo_n "(cached) " >&6
8447else
8448  case $NAWK in
8449  [\\/]* | ?:[\\/]*)
8450  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8451  ;;
8452  *)
8453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8454for as_dir in $PATH
8455do
8456  IFS=$as_save_IFS
8457  test -z "$as_dir" && as_dir=.
8458    for ac_exec_ext in '' $ac_executable_extensions; do
8459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8460    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8462    break 2
8463  fi
8464done
8465  done
8466IFS=$as_save_IFS
8467
8468  ;;
8469esac
8470fi
8471NAWK=$ac_cv_path_NAWK
8472if test -n "$NAWK"; then
8473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8474$as_echo "$NAWK" >&6; }
8475else
8476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8477$as_echo "no" >&6; }
8478fi
8479
8480
8481        if test "x$NAWK" = x; then
8482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8483        fi
8484      else
8485        # Otherwise we believe it is a complete path. Use it as it is.
8486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8487$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8489$as_echo_n "checking for NAWK... " >&6; }
8490        if test ! -x "$tool_specified"; then
8491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8492$as_echo "not found" >&6; }
8493          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8494        fi
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8496$as_echo "$tool_specified" >&6; }
8497      fi
8498    fi
8499  fi
8500
8501
8502
8503  if test "x$NAWK" = x; then
8504    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8505  fi
8506
8507
8508
8509
8510
8511  # Publish this variable in the help.
8512
8513
8514  if test "x$PRINTF" = x; then
8515    # The variable is not set by user, try to locate tool using the code snippet
8516    for ac_prog in printf
8517do
8518  # Extract the first word of "$ac_prog", so it can be a program name with args.
8519set dummy $ac_prog; ac_word=$2
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521$as_echo_n "checking for $ac_word... " >&6; }
8522if ${ac_cv_path_PRINTF+:} false; then :
8523  $as_echo_n "(cached) " >&6
8524else
8525  case $PRINTF in
8526  [\\/]* | ?:[\\/]*)
8527  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8528  ;;
8529  *)
8530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531for as_dir in $PATH
8532do
8533  IFS=$as_save_IFS
8534  test -z "$as_dir" && as_dir=.
8535    for ac_exec_ext in '' $ac_executable_extensions; do
8536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539    break 2
8540  fi
8541done
8542  done
8543IFS=$as_save_IFS
8544
8545  ;;
8546esac
8547fi
8548PRINTF=$ac_cv_path_PRINTF
8549if test -n "$PRINTF"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8551$as_echo "$PRINTF" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558  test -n "$PRINTF" && break
8559done
8560
8561  else
8562    # The variable is set, but is it from the command line or the environment?
8563
8564    # Try to remove the string !PRINTF! from our list.
8565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8567      # If it failed, the variable was not from the command line. Ignore it,
8568      # but warn the user (except for BASH, which is always set by the calling BASH).
8569      if test "xPRINTF" != xBASH; then
8570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8571$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8572      fi
8573      # Try to locate tool using the code snippet
8574      for ac_prog in printf
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_PRINTF+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $PRINTF in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606PRINTF=$ac_cv_path_PRINTF
8607if test -n "$PRINTF"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8609$as_echo "$PRINTF" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$PRINTF" && break
8617done
8618
8619    else
8620      # If it succeeded, then it was overridden by the user. We will use it
8621      # for the tool.
8622
8623      # First remove it from the list of overridden variables, so we can test
8624      # for unknown variables in the end.
8625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8626
8627      # Check if the provided tool contains a complete path.
8628      tool_specified="$PRINTF"
8629      tool_basename="${tool_specified##*/}"
8630      if test "x$tool_basename" = "x$tool_specified"; then
8631        # A command without a complete path is provided, search $PATH.
8632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8633$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8634        # Extract the first word of "$tool_basename", so it can be a program name with args.
8635set dummy $tool_basename; ac_word=$2
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637$as_echo_n "checking for $ac_word... " >&6; }
8638if ${ac_cv_path_PRINTF+:} false; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  case $PRINTF in
8642  [\\/]* | ?:[\\/]*)
8643  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8644  ;;
8645  *)
8646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649  IFS=$as_save_IFS
8650  test -z "$as_dir" && as_dir=.
8651    for ac_exec_ext in '' $ac_executable_extensions; do
8652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655    break 2
8656  fi
8657done
8658  done
8659IFS=$as_save_IFS
8660
8661  ;;
8662esac
8663fi
8664PRINTF=$ac_cv_path_PRINTF
8665if test -n "$PRINTF"; then
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8667$as_echo "$PRINTF" >&6; }
8668else
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
8671fi
8672
8673
8674        if test "x$PRINTF" = x; then
8675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8676        fi
8677      else
8678        # Otherwise we believe it is a complete path. Use it as it is.
8679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8680$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8682$as_echo_n "checking for PRINTF... " >&6; }
8683        if test ! -x "$tool_specified"; then
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8685$as_echo "not found" >&6; }
8686          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8687        fi
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8689$as_echo "$tool_specified" >&6; }
8690      fi
8691    fi
8692  fi
8693
8694
8695
8696  if test "x$PRINTF" = x; then
8697    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8698  fi
8699
8700
8701
8702
8703
8704  # Publish this variable in the help.
8705
8706
8707  if test "x$RM" = x; then
8708    # The variable is not set by user, try to locate tool using the code snippet
8709    for ac_prog in rm
8710do
8711  # Extract the first word of "$ac_prog", so it can be a program name with args.
8712set dummy $ac_prog; ac_word=$2
8713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8714$as_echo_n "checking for $ac_word... " >&6; }
8715if ${ac_cv_path_RM+:} false; then :
8716  $as_echo_n "(cached) " >&6
8717else
8718  case $RM in
8719  [\\/]* | ?:[\\/]*)
8720  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8721  ;;
8722  *)
8723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8724for as_dir in $PATH
8725do
8726  IFS=$as_save_IFS
8727  test -z "$as_dir" && as_dir=.
8728    for ac_exec_ext in '' $ac_executable_extensions; do
8729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8730    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8732    break 2
8733  fi
8734done
8735  done
8736IFS=$as_save_IFS
8737
8738  ;;
8739esac
8740fi
8741RM=$ac_cv_path_RM
8742if test -n "$RM"; then
8743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8744$as_echo "$RM" >&6; }
8745else
8746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8747$as_echo "no" >&6; }
8748fi
8749
8750
8751  test -n "$RM" && break
8752done
8753
8754  else
8755    # The variable is set, but is it from the command line or the environment?
8756
8757    # Try to remove the string !RM! from our list.
8758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8760      # If it failed, the variable was not from the command line. Ignore it,
8761      # but warn the user (except for BASH, which is always set by the calling BASH).
8762      if test "xRM" != xBASH; then
8763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8764$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8765      fi
8766      # Try to locate tool using the code snippet
8767      for ac_prog in rm
8768do
8769  # Extract the first word of "$ac_prog", so it can be a program name with args.
8770set dummy $ac_prog; ac_word=$2
8771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8772$as_echo_n "checking for $ac_word... " >&6; }
8773if ${ac_cv_path_RM+:} false; then :
8774  $as_echo_n "(cached) " >&6
8775else
8776  case $RM in
8777  [\\/]* | ?:[\\/]*)
8778  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8779  ;;
8780  *)
8781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8782for as_dir in $PATH
8783do
8784  IFS=$as_save_IFS
8785  test -z "$as_dir" && as_dir=.
8786    for ac_exec_ext in '' $ac_executable_extensions; do
8787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8788    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8790    break 2
8791  fi
8792done
8793  done
8794IFS=$as_save_IFS
8795
8796  ;;
8797esac
8798fi
8799RM=$ac_cv_path_RM
8800if test -n "$RM"; then
8801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8802$as_echo "$RM" >&6; }
8803else
8804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8805$as_echo "no" >&6; }
8806fi
8807
8808
8809  test -n "$RM" && break
8810done
8811
8812    else
8813      # If it succeeded, then it was overridden by the user. We will use it
8814      # for the tool.
8815
8816      # First remove it from the list of overridden variables, so we can test
8817      # for unknown variables in the end.
8818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8819
8820      # Check if the provided tool contains a complete path.
8821      tool_specified="$RM"
8822      tool_basename="${tool_specified##*/}"
8823      if test "x$tool_basename" = "x$tool_specified"; then
8824        # A command without a complete path is provided, search $PATH.
8825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8826$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8827        # Extract the first word of "$tool_basename", so it can be a program name with args.
8828set dummy $tool_basename; ac_word=$2
8829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8830$as_echo_n "checking for $ac_word... " >&6; }
8831if ${ac_cv_path_RM+:} false; then :
8832  $as_echo_n "(cached) " >&6
8833else
8834  case $RM in
8835  [\\/]* | ?:[\\/]*)
8836  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8837  ;;
8838  *)
8839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8840for as_dir in $PATH
8841do
8842  IFS=$as_save_IFS
8843  test -z "$as_dir" && as_dir=.
8844    for ac_exec_ext in '' $ac_executable_extensions; do
8845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8846    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8848    break 2
8849  fi
8850done
8851  done
8852IFS=$as_save_IFS
8853
8854  ;;
8855esac
8856fi
8857RM=$ac_cv_path_RM
8858if test -n "$RM"; then
8859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8860$as_echo "$RM" >&6; }
8861else
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
8864fi
8865
8866
8867        if test "x$RM" = x; then
8868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8869        fi
8870      else
8871        # Otherwise we believe it is a complete path. Use it as it is.
8872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8873$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8875$as_echo_n "checking for RM... " >&6; }
8876        if test ! -x "$tool_specified"; then
8877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8878$as_echo "not found" >&6; }
8879          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8880        fi
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8882$as_echo "$tool_specified" >&6; }
8883      fi
8884    fi
8885  fi
8886
8887
8888
8889  if test "x$RM" = x; then
8890    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8891  fi
8892
8893
8894
8895
8896
8897  # Publish this variable in the help.
8898
8899
8900  if test "x$SH" = x; then
8901    # The variable is not set by user, try to locate tool using the code snippet
8902    for ac_prog in sh
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if ${ac_cv_path_SH+:} false; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $SH in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934SH=$ac_cv_path_SH
8935if test -n "$SH"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8937$as_echo "$SH" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$SH" && break
8945done
8946
8947  else
8948    # The variable is set, but is it from the command line or the environment?
8949
8950    # Try to remove the string !SH! from our list.
8951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
8952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8953      # If it failed, the variable was not from the command line. Ignore it,
8954      # but warn the user (except for BASH, which is always set by the calling BASH).
8955      if test "xSH" != xBASH; then
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
8957$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
8958      fi
8959      # Try to locate tool using the code snippet
8960      for ac_prog in sh
8961do
8962  # Extract the first word of "$ac_prog", so it can be a program name with args.
8963set dummy $ac_prog; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_SH+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $SH in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992SH=$ac_cv_path_SH
8993if test -n "$SH"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8995$as_echo "$SH" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002  test -n "$SH" && break
9003done
9004
9005    else
9006      # If it succeeded, then it was overridden by the user. We will use it
9007      # for the tool.
9008
9009      # First remove it from the list of overridden variables, so we can test
9010      # for unknown variables in the end.
9011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9012
9013      # Check if the provided tool contains a complete path.
9014      tool_specified="$SH"
9015      tool_basename="${tool_specified##*/}"
9016      if test "x$tool_basename" = "x$tool_specified"; then
9017        # A command without a complete path is provided, search $PATH.
9018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9019$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9020        # Extract the first word of "$tool_basename", so it can be a program name with args.
9021set dummy $tool_basename; ac_word=$2
9022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9023$as_echo_n "checking for $ac_word... " >&6; }
9024if ${ac_cv_path_SH+:} false; then :
9025  $as_echo_n "(cached) " >&6
9026else
9027  case $SH in
9028  [\\/]* | ?:[\\/]*)
9029  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9030  ;;
9031  *)
9032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9033for as_dir in $PATH
9034do
9035  IFS=$as_save_IFS
9036  test -z "$as_dir" && as_dir=.
9037    for ac_exec_ext in '' $ac_executable_extensions; do
9038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9039    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9041    break 2
9042  fi
9043done
9044  done
9045IFS=$as_save_IFS
9046
9047  ;;
9048esac
9049fi
9050SH=$ac_cv_path_SH
9051if test -n "$SH"; then
9052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9053$as_echo "$SH" >&6; }
9054else
9055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
9057fi
9058
9059
9060        if test "x$SH" = x; then
9061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9062        fi
9063      else
9064        # Otherwise we believe it is a complete path. Use it as it is.
9065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9066$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9068$as_echo_n "checking for SH... " >&6; }
9069        if test ! -x "$tool_specified"; then
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9071$as_echo "not found" >&6; }
9072          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9073        fi
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9075$as_echo "$tool_specified" >&6; }
9076      fi
9077    fi
9078  fi
9079
9080
9081
9082  if test "x$SH" = x; then
9083    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9084  fi
9085
9086
9087
9088
9089
9090  # Publish this variable in the help.
9091
9092
9093  if test "x$SORT" = x; then
9094    # The variable is not set by user, try to locate tool using the code snippet
9095    for ac_prog in sort
9096do
9097  # Extract the first word of "$ac_prog", so it can be a program name with args.
9098set dummy $ac_prog; ac_word=$2
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9100$as_echo_n "checking for $ac_word... " >&6; }
9101if ${ac_cv_path_SORT+:} false; then :
9102  $as_echo_n "(cached) " >&6
9103else
9104  case $SORT in
9105  [\\/]* | ?:[\\/]*)
9106  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9107  ;;
9108  *)
9109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9110for as_dir in $PATH
9111do
9112  IFS=$as_save_IFS
9113  test -z "$as_dir" && as_dir=.
9114    for ac_exec_ext in '' $ac_executable_extensions; do
9115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9116    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9118    break 2
9119  fi
9120done
9121  done
9122IFS=$as_save_IFS
9123
9124  ;;
9125esac
9126fi
9127SORT=$ac_cv_path_SORT
9128if test -n "$SORT"; then
9129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9130$as_echo "$SORT" >&6; }
9131else
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
9134fi
9135
9136
9137  test -n "$SORT" && break
9138done
9139
9140  else
9141    # The variable is set, but is it from the command line or the environment?
9142
9143    # Try to remove the string !SORT! from our list.
9144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9146      # If it failed, the variable was not from the command line. Ignore it,
9147      # but warn the user (except for BASH, which is always set by the calling BASH).
9148      if test "xSORT" != xBASH; then
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9150$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9151      fi
9152      # Try to locate tool using the code snippet
9153      for ac_prog in sort
9154do
9155  # Extract the first word of "$ac_prog", so it can be a program name with args.
9156set dummy $ac_prog; ac_word=$2
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9158$as_echo_n "checking for $ac_word... " >&6; }
9159if ${ac_cv_path_SORT+:} false; then :
9160  $as_echo_n "(cached) " >&6
9161else
9162  case $SORT in
9163  [\\/]* | ?:[\\/]*)
9164  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9165  ;;
9166  *)
9167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9168for as_dir in $PATH
9169do
9170  IFS=$as_save_IFS
9171  test -z "$as_dir" && as_dir=.
9172    for ac_exec_ext in '' $ac_executable_extensions; do
9173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9174    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9176    break 2
9177  fi
9178done
9179  done
9180IFS=$as_save_IFS
9181
9182  ;;
9183esac
9184fi
9185SORT=$ac_cv_path_SORT
9186if test -n "$SORT"; then
9187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9188$as_echo "$SORT" >&6; }
9189else
9190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9191$as_echo "no" >&6; }
9192fi
9193
9194
9195  test -n "$SORT" && break
9196done
9197
9198    else
9199      # If it succeeded, then it was overridden by the user. We will use it
9200      # for the tool.
9201
9202      # First remove it from the list of overridden variables, so we can test
9203      # for unknown variables in the end.
9204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9205
9206      # Check if the provided tool contains a complete path.
9207      tool_specified="$SORT"
9208      tool_basename="${tool_specified##*/}"
9209      if test "x$tool_basename" = "x$tool_specified"; then
9210        # A command without a complete path is provided, search $PATH.
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9212$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9213        # Extract the first word of "$tool_basename", so it can be a program name with args.
9214set dummy $tool_basename; ac_word=$2
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9216$as_echo_n "checking for $ac_word... " >&6; }
9217if ${ac_cv_path_SORT+:} false; then :
9218  $as_echo_n "(cached) " >&6
9219else
9220  case $SORT in
9221  [\\/]* | ?:[\\/]*)
9222  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9223  ;;
9224  *)
9225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9226for as_dir in $PATH
9227do
9228  IFS=$as_save_IFS
9229  test -z "$as_dir" && as_dir=.
9230    for ac_exec_ext in '' $ac_executable_extensions; do
9231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9232    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9234    break 2
9235  fi
9236done
9237  done
9238IFS=$as_save_IFS
9239
9240  ;;
9241esac
9242fi
9243SORT=$ac_cv_path_SORT
9244if test -n "$SORT"; then
9245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9246$as_echo "$SORT" >&6; }
9247else
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
9250fi
9251
9252
9253        if test "x$SORT" = x; then
9254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9255        fi
9256      else
9257        # Otherwise we believe it is a complete path. Use it as it is.
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9259$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9261$as_echo_n "checking for SORT... " >&6; }
9262        if test ! -x "$tool_specified"; then
9263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9264$as_echo "not found" >&6; }
9265          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9266        fi
9267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9268$as_echo "$tool_specified" >&6; }
9269      fi
9270    fi
9271  fi
9272
9273
9274
9275  if test "x$SORT" = x; then
9276    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9277  fi
9278
9279
9280
9281
9282
9283  # Publish this variable in the help.
9284
9285
9286  if test "x$TAIL" = x; then
9287    # The variable is not set by user, try to locate tool using the code snippet
9288    for ac_prog in tail
9289do
9290  # Extract the first word of "$ac_prog", so it can be a program name with args.
9291set dummy $ac_prog; ac_word=$2
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293$as_echo_n "checking for $ac_word... " >&6; }
9294if ${ac_cv_path_TAIL+:} false; then :
9295  $as_echo_n "(cached) " >&6
9296else
9297  case $TAIL in
9298  [\\/]* | ?:[\\/]*)
9299  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9300  ;;
9301  *)
9302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9303for as_dir in $PATH
9304do
9305  IFS=$as_save_IFS
9306  test -z "$as_dir" && as_dir=.
9307    for ac_exec_ext in '' $ac_executable_extensions; do
9308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9309    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9311    break 2
9312  fi
9313done
9314  done
9315IFS=$as_save_IFS
9316
9317  ;;
9318esac
9319fi
9320TAIL=$ac_cv_path_TAIL
9321if test -n "$TAIL"; then
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9323$as_echo "$TAIL" >&6; }
9324else
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
9327fi
9328
9329
9330  test -n "$TAIL" && break
9331done
9332
9333  else
9334    # The variable is set, but is it from the command line or the environment?
9335
9336    # Try to remove the string !TAIL! from our list.
9337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9339      # If it failed, the variable was not from the command line. Ignore it,
9340      # but warn the user (except for BASH, which is always set by the calling BASH).
9341      if test "xTAIL" != xBASH; then
9342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9343$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9344      fi
9345      # Try to locate tool using the code snippet
9346      for ac_prog in tail
9347do
9348  # Extract the first word of "$ac_prog", so it can be a program name with args.
9349set dummy $ac_prog; ac_word=$2
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9351$as_echo_n "checking for $ac_word... " >&6; }
9352if ${ac_cv_path_TAIL+:} false; then :
9353  $as_echo_n "(cached) " >&6
9354else
9355  case $TAIL in
9356  [\\/]* | ?:[\\/]*)
9357  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9358  ;;
9359  *)
9360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9361for as_dir in $PATH
9362do
9363  IFS=$as_save_IFS
9364  test -z "$as_dir" && as_dir=.
9365    for ac_exec_ext in '' $ac_executable_extensions; do
9366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9367    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9369    break 2
9370  fi
9371done
9372  done
9373IFS=$as_save_IFS
9374
9375  ;;
9376esac
9377fi
9378TAIL=$ac_cv_path_TAIL
9379if test -n "$TAIL"; then
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9381$as_echo "$TAIL" >&6; }
9382else
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
9385fi
9386
9387
9388  test -n "$TAIL" && break
9389done
9390
9391    else
9392      # If it succeeded, then it was overridden by the user. We will use it
9393      # for the tool.
9394
9395      # First remove it from the list of overridden variables, so we can test
9396      # for unknown variables in the end.
9397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9398
9399      # Check if the provided tool contains a complete path.
9400      tool_specified="$TAIL"
9401      tool_basename="${tool_specified##*/}"
9402      if test "x$tool_basename" = "x$tool_specified"; then
9403        # A command without a complete path is provided, search $PATH.
9404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9405$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9406        # Extract the first word of "$tool_basename", so it can be a program name with args.
9407set dummy $tool_basename; ac_word=$2
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9409$as_echo_n "checking for $ac_word... " >&6; }
9410if ${ac_cv_path_TAIL+:} false; then :
9411  $as_echo_n "(cached) " >&6
9412else
9413  case $TAIL in
9414  [\\/]* | ?:[\\/]*)
9415  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9416  ;;
9417  *)
9418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9419for as_dir in $PATH
9420do
9421  IFS=$as_save_IFS
9422  test -z "$as_dir" && as_dir=.
9423    for ac_exec_ext in '' $ac_executable_extensions; do
9424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9425    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9427    break 2
9428  fi
9429done
9430  done
9431IFS=$as_save_IFS
9432
9433  ;;
9434esac
9435fi
9436TAIL=$ac_cv_path_TAIL
9437if test -n "$TAIL"; then
9438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9439$as_echo "$TAIL" >&6; }
9440else
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9442$as_echo "no" >&6; }
9443fi
9444
9445
9446        if test "x$TAIL" = x; then
9447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9448        fi
9449      else
9450        # Otherwise we believe it is a complete path. Use it as it is.
9451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9452$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9454$as_echo_n "checking for TAIL... " >&6; }
9455        if test ! -x "$tool_specified"; then
9456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9457$as_echo "not found" >&6; }
9458          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9459        fi
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9461$as_echo "$tool_specified" >&6; }
9462      fi
9463    fi
9464  fi
9465
9466
9467
9468  if test "x$TAIL" = x; then
9469    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9470  fi
9471
9472
9473
9474
9475
9476  # Publish this variable in the help.
9477
9478
9479  if test "x$TAR" = x; then
9480    # The variable is not set by user, try to locate tool using the code snippet
9481    for ac_prog in tar
9482do
9483  # Extract the first word of "$ac_prog", so it can be a program name with args.
9484set dummy $ac_prog; ac_word=$2
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9486$as_echo_n "checking for $ac_word... " >&6; }
9487if ${ac_cv_path_TAR+:} false; then :
9488  $as_echo_n "(cached) " >&6
9489else
9490  case $TAR in
9491  [\\/]* | ?:[\\/]*)
9492  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9493  ;;
9494  *)
9495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9496for as_dir in $PATH
9497do
9498  IFS=$as_save_IFS
9499  test -z "$as_dir" && as_dir=.
9500    for ac_exec_ext in '' $ac_executable_extensions; do
9501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9502    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9504    break 2
9505  fi
9506done
9507  done
9508IFS=$as_save_IFS
9509
9510  ;;
9511esac
9512fi
9513TAR=$ac_cv_path_TAR
9514if test -n "$TAR"; then
9515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9516$as_echo "$TAR" >&6; }
9517else
9518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519$as_echo "no" >&6; }
9520fi
9521
9522
9523  test -n "$TAR" && break
9524done
9525
9526  else
9527    # The variable is set, but is it from the command line or the environment?
9528
9529    # Try to remove the string !TAR! from our list.
9530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9532      # If it failed, the variable was not from the command line. Ignore it,
9533      # but warn the user (except for BASH, which is always set by the calling BASH).
9534      if test "xTAR" != xBASH; then
9535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9536$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9537      fi
9538      # Try to locate tool using the code snippet
9539      for ac_prog in tar
9540do
9541  # Extract the first word of "$ac_prog", so it can be a program name with args.
9542set dummy $ac_prog; ac_word=$2
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9544$as_echo_n "checking for $ac_word... " >&6; }
9545if ${ac_cv_path_TAR+:} false; then :
9546  $as_echo_n "(cached) " >&6
9547else
9548  case $TAR in
9549  [\\/]* | ?:[\\/]*)
9550  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9551  ;;
9552  *)
9553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9554for as_dir in $PATH
9555do
9556  IFS=$as_save_IFS
9557  test -z "$as_dir" && as_dir=.
9558    for ac_exec_ext in '' $ac_executable_extensions; do
9559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9560    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9562    break 2
9563  fi
9564done
9565  done
9566IFS=$as_save_IFS
9567
9568  ;;
9569esac
9570fi
9571TAR=$ac_cv_path_TAR
9572if test -n "$TAR"; then
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9574$as_echo "$TAR" >&6; }
9575else
9576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9577$as_echo "no" >&6; }
9578fi
9579
9580
9581  test -n "$TAR" && break
9582done
9583
9584    else
9585      # If it succeeded, then it was overridden by the user. We will use it
9586      # for the tool.
9587
9588      # First remove it from the list of overridden variables, so we can test
9589      # for unknown variables in the end.
9590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9591
9592      # Check if the provided tool contains a complete path.
9593      tool_specified="$TAR"
9594      tool_basename="${tool_specified##*/}"
9595      if test "x$tool_basename" = "x$tool_specified"; then
9596        # A command without a complete path is provided, search $PATH.
9597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9598$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9599        # Extract the first word of "$tool_basename", so it can be a program name with args.
9600set dummy $tool_basename; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if ${ac_cv_path_TAR+:} false; then :
9604  $as_echo_n "(cached) " >&6
9605else
9606  case $TAR in
9607  [\\/]* | ?:[\\/]*)
9608  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9609  ;;
9610  *)
9611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614  IFS=$as_save_IFS
9615  test -z "$as_dir" && as_dir=.
9616    for ac_exec_ext in '' $ac_executable_extensions; do
9617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620    break 2
9621  fi
9622done
9623  done
9624IFS=$as_save_IFS
9625
9626  ;;
9627esac
9628fi
9629TAR=$ac_cv_path_TAR
9630if test -n "$TAR"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9632$as_echo "$TAR" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639        if test "x$TAR" = x; then
9640          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9641        fi
9642      else
9643        # Otherwise we believe it is a complete path. Use it as it is.
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9645$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9647$as_echo_n "checking for TAR... " >&6; }
9648        if test ! -x "$tool_specified"; then
9649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9650$as_echo "not found" >&6; }
9651          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9652        fi
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9654$as_echo "$tool_specified" >&6; }
9655      fi
9656    fi
9657  fi
9658
9659
9660
9661  if test "x$TAR" = x; then
9662    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9663  fi
9664
9665
9666
9667
9668
9669  # Publish this variable in the help.
9670
9671
9672  if test "x$TEE" = x; then
9673    # The variable is not set by user, try to locate tool using the code snippet
9674    for ac_prog in tee
9675do
9676  # Extract the first word of "$ac_prog", so it can be a program name with args.
9677set dummy $ac_prog; ac_word=$2
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679$as_echo_n "checking for $ac_word... " >&6; }
9680if ${ac_cv_path_TEE+:} false; then :
9681  $as_echo_n "(cached) " >&6
9682else
9683  case $TEE in
9684  [\\/]* | ?:[\\/]*)
9685  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9686  ;;
9687  *)
9688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689for as_dir in $PATH
9690do
9691  IFS=$as_save_IFS
9692  test -z "$as_dir" && as_dir=.
9693    for ac_exec_ext in '' $ac_executable_extensions; do
9694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697    break 2
9698  fi
9699done
9700  done
9701IFS=$as_save_IFS
9702
9703  ;;
9704esac
9705fi
9706TEE=$ac_cv_path_TEE
9707if test -n "$TEE"; then
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9709$as_echo "$TEE" >&6; }
9710else
9711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
9713fi
9714
9715
9716  test -n "$TEE" && break
9717done
9718
9719  else
9720    # The variable is set, but is it from the command line or the environment?
9721
9722    # Try to remove the string !TEE! from our list.
9723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9725      # If it failed, the variable was not from the command line. Ignore it,
9726      # but warn the user (except for BASH, which is always set by the calling BASH).
9727      if test "xTEE" != xBASH; then
9728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9729$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9730      fi
9731      # Try to locate tool using the code snippet
9732      for ac_prog in tee
9733do
9734  # Extract the first word of "$ac_prog", so it can be a program name with args.
9735set dummy $ac_prog; ac_word=$2
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737$as_echo_n "checking for $ac_word... " >&6; }
9738if ${ac_cv_path_TEE+:} false; then :
9739  $as_echo_n "(cached) " >&6
9740else
9741  case $TEE in
9742  [\\/]* | ?:[\\/]*)
9743  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9744  ;;
9745  *)
9746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747for as_dir in $PATH
9748do
9749  IFS=$as_save_IFS
9750  test -z "$as_dir" && as_dir=.
9751    for ac_exec_ext in '' $ac_executable_extensions; do
9752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755    break 2
9756  fi
9757done
9758  done
9759IFS=$as_save_IFS
9760
9761  ;;
9762esac
9763fi
9764TEE=$ac_cv_path_TEE
9765if test -n "$TEE"; then
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9767$as_echo "$TEE" >&6; }
9768else
9769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770$as_echo "no" >&6; }
9771fi
9772
9773
9774  test -n "$TEE" && break
9775done
9776
9777    else
9778      # If it succeeded, then it was overridden by the user. We will use it
9779      # for the tool.
9780
9781      # First remove it from the list of overridden variables, so we can test
9782      # for unknown variables in the end.
9783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9784
9785      # Check if the provided tool contains a complete path.
9786      tool_specified="$TEE"
9787      tool_basename="${tool_specified##*/}"
9788      if test "x$tool_basename" = "x$tool_specified"; then
9789        # A command without a complete path is provided, search $PATH.
9790        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9791$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9792        # Extract the first word of "$tool_basename", so it can be a program name with args.
9793set dummy $tool_basename; ac_word=$2
9794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795$as_echo_n "checking for $ac_word... " >&6; }
9796if ${ac_cv_path_TEE+:} false; then :
9797  $as_echo_n "(cached) " >&6
9798else
9799  case $TEE in
9800  [\\/]* | ?:[\\/]*)
9801  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9802  ;;
9803  *)
9804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9805for as_dir in $PATH
9806do
9807  IFS=$as_save_IFS
9808  test -z "$as_dir" && as_dir=.
9809    for ac_exec_ext in '' $ac_executable_extensions; do
9810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9811    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9813    break 2
9814  fi
9815done
9816  done
9817IFS=$as_save_IFS
9818
9819  ;;
9820esac
9821fi
9822TEE=$ac_cv_path_TEE
9823if test -n "$TEE"; then
9824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9825$as_echo "$TEE" >&6; }
9826else
9827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
9829fi
9830
9831
9832        if test "x$TEE" = x; then
9833          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9834        fi
9835      else
9836        # Otherwise we believe it is a complete path. Use it as it is.
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9838$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9840$as_echo_n "checking for TEE... " >&6; }
9841        if test ! -x "$tool_specified"; then
9842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9843$as_echo "not found" >&6; }
9844          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9845        fi
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9847$as_echo "$tool_specified" >&6; }
9848      fi
9849    fi
9850  fi
9851
9852
9853
9854  if test "x$TEE" = x; then
9855    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9856  fi
9857
9858
9859
9860
9861
9862  # Publish this variable in the help.
9863
9864
9865  if test "x$TOUCH" = x; then
9866    # The variable is not set by user, try to locate tool using the code snippet
9867    for ac_prog in touch
9868do
9869  # Extract the first word of "$ac_prog", so it can be a program name with args.
9870set dummy $ac_prog; ac_word=$2
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9872$as_echo_n "checking for $ac_word... " >&6; }
9873if ${ac_cv_path_TOUCH+:} false; then :
9874  $as_echo_n "(cached) " >&6
9875else
9876  case $TOUCH in
9877  [\\/]* | ?:[\\/]*)
9878  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9879  ;;
9880  *)
9881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9882for as_dir in $PATH
9883do
9884  IFS=$as_save_IFS
9885  test -z "$as_dir" && as_dir=.
9886    for ac_exec_ext in '' $ac_executable_extensions; do
9887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9888    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9890    break 2
9891  fi
9892done
9893  done
9894IFS=$as_save_IFS
9895
9896  ;;
9897esac
9898fi
9899TOUCH=$ac_cv_path_TOUCH
9900if test -n "$TOUCH"; then
9901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9902$as_echo "$TOUCH" >&6; }
9903else
9904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9905$as_echo "no" >&6; }
9906fi
9907
9908
9909  test -n "$TOUCH" && break
9910done
9911
9912  else
9913    # The variable is set, but is it from the command line or the environment?
9914
9915    # Try to remove the string !TOUCH! from our list.
9916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
9917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9918      # If it failed, the variable was not from the command line. Ignore it,
9919      # but warn the user (except for BASH, which is always set by the calling BASH).
9920      if test "xTOUCH" != xBASH; then
9921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
9922$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
9923      fi
9924      # Try to locate tool using the code snippet
9925      for ac_prog in touch
9926do
9927  # Extract the first word of "$ac_prog", so it can be a program name with args.
9928set dummy $ac_prog; ac_word=$2
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9930$as_echo_n "checking for $ac_word... " >&6; }
9931if ${ac_cv_path_TOUCH+:} false; then :
9932  $as_echo_n "(cached) " >&6
9933else
9934  case $TOUCH in
9935  [\\/]* | ?:[\\/]*)
9936  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9937  ;;
9938  *)
9939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940for as_dir in $PATH
9941do
9942  IFS=$as_save_IFS
9943  test -z "$as_dir" && as_dir=.
9944    for ac_exec_ext in '' $ac_executable_extensions; do
9945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9946    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948    break 2
9949  fi
9950done
9951  done
9952IFS=$as_save_IFS
9953
9954  ;;
9955esac
9956fi
9957TOUCH=$ac_cv_path_TOUCH
9958if test -n "$TOUCH"; then
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9960$as_echo "$TOUCH" >&6; }
9961else
9962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
9964fi
9965
9966
9967  test -n "$TOUCH" && break
9968done
9969
9970    else
9971      # If it succeeded, then it was overridden by the user. We will use it
9972      # for the tool.
9973
9974      # First remove it from the list of overridden variables, so we can test
9975      # for unknown variables in the end.
9976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9977
9978      # Check if the provided tool contains a complete path.
9979      tool_specified="$TOUCH"
9980      tool_basename="${tool_specified##*/}"
9981      if test "x$tool_basename" = "x$tool_specified"; then
9982        # A command without a complete path is provided, search $PATH.
9983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
9984$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
9985        # Extract the first word of "$tool_basename", so it can be a program name with args.
9986set dummy $tool_basename; ac_word=$2
9987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9988$as_echo_n "checking for $ac_word... " >&6; }
9989if ${ac_cv_path_TOUCH+:} false; then :
9990  $as_echo_n "(cached) " >&6
9991else
9992  case $TOUCH in
9993  [\\/]* | ?:[\\/]*)
9994  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9995  ;;
9996  *)
9997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9998for as_dir in $PATH
9999do
10000  IFS=$as_save_IFS
10001  test -z "$as_dir" && as_dir=.
10002    for ac_exec_ext in '' $ac_executable_extensions; do
10003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10004    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10006    break 2
10007  fi
10008done
10009  done
10010IFS=$as_save_IFS
10011
10012  ;;
10013esac
10014fi
10015TOUCH=$ac_cv_path_TOUCH
10016if test -n "$TOUCH"; then
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10018$as_echo "$TOUCH" >&6; }
10019else
10020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
10022fi
10023
10024
10025        if test "x$TOUCH" = x; then
10026          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10027        fi
10028      else
10029        # Otherwise we believe it is a complete path. Use it as it is.
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10031$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10033$as_echo_n "checking for TOUCH... " >&6; }
10034        if test ! -x "$tool_specified"; then
10035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10036$as_echo "not found" >&6; }
10037          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10038        fi
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10040$as_echo "$tool_specified" >&6; }
10041      fi
10042    fi
10043  fi
10044
10045
10046
10047  if test "x$TOUCH" = x; then
10048    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10049  fi
10050
10051
10052
10053
10054
10055  # Publish this variable in the help.
10056
10057
10058  if test "x$TR" = x; then
10059    # The variable is not set by user, try to locate tool using the code snippet
10060    for ac_prog in tr
10061do
10062  # Extract the first word of "$ac_prog", so it can be a program name with args.
10063set dummy $ac_prog; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if ${ac_cv_path_TR+:} false; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $TR in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092TR=$ac_cv_path_TR
10093if test -n "$TR"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10095$as_echo "$TR" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102  test -n "$TR" && break
10103done
10104
10105  else
10106    # The variable is set, but is it from the command line or the environment?
10107
10108    # Try to remove the string !TR! from our list.
10109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10111      # If it failed, the variable was not from the command line. Ignore it,
10112      # but warn the user (except for BASH, which is always set by the calling BASH).
10113      if test "xTR" != xBASH; then
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10115$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10116      fi
10117      # Try to locate tool using the code snippet
10118      for ac_prog in tr
10119do
10120  # Extract the first word of "$ac_prog", so it can be a program name with args.
10121set dummy $ac_prog; ac_word=$2
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10123$as_echo_n "checking for $ac_word... " >&6; }
10124if ${ac_cv_path_TR+:} false; then :
10125  $as_echo_n "(cached) " >&6
10126else
10127  case $TR in
10128  [\\/]* | ?:[\\/]*)
10129  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10130  ;;
10131  *)
10132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10133for as_dir in $PATH
10134do
10135  IFS=$as_save_IFS
10136  test -z "$as_dir" && as_dir=.
10137    for ac_exec_ext in '' $ac_executable_extensions; do
10138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10139    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10141    break 2
10142  fi
10143done
10144  done
10145IFS=$as_save_IFS
10146
10147  ;;
10148esac
10149fi
10150TR=$ac_cv_path_TR
10151if test -n "$TR"; then
10152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10153$as_echo "$TR" >&6; }
10154else
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
10157fi
10158
10159
10160  test -n "$TR" && break
10161done
10162
10163    else
10164      # If it succeeded, then it was overridden by the user. We will use it
10165      # for the tool.
10166
10167      # First remove it from the list of overridden variables, so we can test
10168      # for unknown variables in the end.
10169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10170
10171      # Check if the provided tool contains a complete path.
10172      tool_specified="$TR"
10173      tool_basename="${tool_specified##*/}"
10174      if test "x$tool_basename" = "x$tool_specified"; then
10175        # A command without a complete path is provided, search $PATH.
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10177$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10178        # Extract the first word of "$tool_basename", so it can be a program name with args.
10179set dummy $tool_basename; ac_word=$2
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10181$as_echo_n "checking for $ac_word... " >&6; }
10182if ${ac_cv_path_TR+:} false; then :
10183  $as_echo_n "(cached) " >&6
10184else
10185  case $TR in
10186  [\\/]* | ?:[\\/]*)
10187  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10188  ;;
10189  *)
10190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10191for as_dir in $PATH
10192do
10193  IFS=$as_save_IFS
10194  test -z "$as_dir" && as_dir=.
10195    for ac_exec_ext in '' $ac_executable_extensions; do
10196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10197    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10199    break 2
10200  fi
10201done
10202  done
10203IFS=$as_save_IFS
10204
10205  ;;
10206esac
10207fi
10208TR=$ac_cv_path_TR
10209if test -n "$TR"; then
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10211$as_echo "$TR" >&6; }
10212else
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10214$as_echo "no" >&6; }
10215fi
10216
10217
10218        if test "x$TR" = x; then
10219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10220        fi
10221      else
10222        # Otherwise we believe it is a complete path. Use it as it is.
10223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10224$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10226$as_echo_n "checking for TR... " >&6; }
10227        if test ! -x "$tool_specified"; then
10228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10229$as_echo "not found" >&6; }
10230          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10231        fi
10232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10233$as_echo "$tool_specified" >&6; }
10234      fi
10235    fi
10236  fi
10237
10238
10239
10240  if test "x$TR" = x; then
10241    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10242  fi
10243
10244
10245
10246
10247
10248  # Publish this variable in the help.
10249
10250
10251  if test "x$UNAME" = x; then
10252    # The variable is not set by user, try to locate tool using the code snippet
10253    for ac_prog in uname
10254do
10255  # Extract the first word of "$ac_prog", so it can be a program name with args.
10256set dummy $ac_prog; ac_word=$2
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10258$as_echo_n "checking for $ac_word... " >&6; }
10259if ${ac_cv_path_UNAME+:} false; then :
10260  $as_echo_n "(cached) " >&6
10261else
10262  case $UNAME in
10263  [\\/]* | ?:[\\/]*)
10264  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10265  ;;
10266  *)
10267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10268for as_dir in $PATH
10269do
10270  IFS=$as_save_IFS
10271  test -z "$as_dir" && as_dir=.
10272    for ac_exec_ext in '' $ac_executable_extensions; do
10273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10274    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10276    break 2
10277  fi
10278done
10279  done
10280IFS=$as_save_IFS
10281
10282  ;;
10283esac
10284fi
10285UNAME=$ac_cv_path_UNAME
10286if test -n "$UNAME"; then
10287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10288$as_echo "$UNAME" >&6; }
10289else
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292fi
10293
10294
10295  test -n "$UNAME" && break
10296done
10297
10298  else
10299    # The variable is set, but is it from the command line or the environment?
10300
10301    # Try to remove the string !UNAME! from our list.
10302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10304      # If it failed, the variable was not from the command line. Ignore it,
10305      # but warn the user (except for BASH, which is always set by the calling BASH).
10306      if test "xUNAME" != xBASH; then
10307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10308$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10309      fi
10310      # Try to locate tool using the code snippet
10311      for ac_prog in uname
10312do
10313  # Extract the first word of "$ac_prog", so it can be a program name with args.
10314set dummy $ac_prog; ac_word=$2
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316$as_echo_n "checking for $ac_word... " >&6; }
10317if ${ac_cv_path_UNAME+:} false; then :
10318  $as_echo_n "(cached) " >&6
10319else
10320  case $UNAME in
10321  [\\/]* | ?:[\\/]*)
10322  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10323  ;;
10324  *)
10325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326for as_dir in $PATH
10327do
10328  IFS=$as_save_IFS
10329  test -z "$as_dir" && as_dir=.
10330    for ac_exec_ext in '' $ac_executable_extensions; do
10331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10332    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334    break 2
10335  fi
10336done
10337  done
10338IFS=$as_save_IFS
10339
10340  ;;
10341esac
10342fi
10343UNAME=$ac_cv_path_UNAME
10344if test -n "$UNAME"; then
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10346$as_echo "$UNAME" >&6; }
10347else
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350fi
10351
10352
10353  test -n "$UNAME" && break
10354done
10355
10356    else
10357      # If it succeeded, then it was overridden by the user. We will use it
10358      # for the tool.
10359
10360      # First remove it from the list of overridden variables, so we can test
10361      # for unknown variables in the end.
10362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10363
10364      # Check if the provided tool contains a complete path.
10365      tool_specified="$UNAME"
10366      tool_basename="${tool_specified##*/}"
10367      if test "x$tool_basename" = "x$tool_specified"; then
10368        # A command without a complete path is provided, search $PATH.
10369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10370$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10371        # Extract the first word of "$tool_basename", so it can be a program name with args.
10372set dummy $tool_basename; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_UNAME+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $UNAME in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401UNAME=$ac_cv_path_UNAME
10402if test -n "$UNAME"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10404$as_echo "$UNAME" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411        if test "x$UNAME" = x; then
10412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10413        fi
10414      else
10415        # Otherwise we believe it is a complete path. Use it as it is.
10416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10417$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10419$as_echo_n "checking for UNAME... " >&6; }
10420        if test ! -x "$tool_specified"; then
10421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10422$as_echo "not found" >&6; }
10423          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10424        fi
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10426$as_echo "$tool_specified" >&6; }
10427      fi
10428    fi
10429  fi
10430
10431
10432
10433  if test "x$UNAME" = x; then
10434    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10435  fi
10436
10437
10438
10439
10440
10441  # Publish this variable in the help.
10442
10443
10444  if test "x$UNIQ" = x; then
10445    # The variable is not set by user, try to locate tool using the code snippet
10446    for ac_prog in uniq
10447do
10448  # Extract the first word of "$ac_prog", so it can be a program name with args.
10449set dummy $ac_prog; ac_word=$2
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10451$as_echo_n "checking for $ac_word... " >&6; }
10452if ${ac_cv_path_UNIQ+:} false; then :
10453  $as_echo_n "(cached) " >&6
10454else
10455  case $UNIQ in
10456  [\\/]* | ?:[\\/]*)
10457  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10458  ;;
10459  *)
10460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10461for as_dir in $PATH
10462do
10463  IFS=$as_save_IFS
10464  test -z "$as_dir" && as_dir=.
10465    for ac_exec_ext in '' $ac_executable_extensions; do
10466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10467    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10469    break 2
10470  fi
10471done
10472  done
10473IFS=$as_save_IFS
10474
10475  ;;
10476esac
10477fi
10478UNIQ=$ac_cv_path_UNIQ
10479if test -n "$UNIQ"; then
10480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10481$as_echo "$UNIQ" >&6; }
10482else
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484$as_echo "no" >&6; }
10485fi
10486
10487
10488  test -n "$UNIQ" && break
10489done
10490
10491  else
10492    # The variable is set, but is it from the command line or the environment?
10493
10494    # Try to remove the string !UNIQ! from our list.
10495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10497      # If it failed, the variable was not from the command line. Ignore it,
10498      # but warn the user (except for BASH, which is always set by the calling BASH).
10499      if test "xUNIQ" != xBASH; then
10500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10501$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10502      fi
10503      # Try to locate tool using the code snippet
10504      for ac_prog in uniq
10505do
10506  # Extract the first word of "$ac_prog", so it can be a program name with args.
10507set dummy $ac_prog; ac_word=$2
10508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10509$as_echo_n "checking for $ac_word... " >&6; }
10510if ${ac_cv_path_UNIQ+:} false; then :
10511  $as_echo_n "(cached) " >&6
10512else
10513  case $UNIQ in
10514  [\\/]* | ?:[\\/]*)
10515  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10516  ;;
10517  *)
10518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10519for as_dir in $PATH
10520do
10521  IFS=$as_save_IFS
10522  test -z "$as_dir" && as_dir=.
10523    for ac_exec_ext in '' $ac_executable_extensions; do
10524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10525    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10527    break 2
10528  fi
10529done
10530  done
10531IFS=$as_save_IFS
10532
10533  ;;
10534esac
10535fi
10536UNIQ=$ac_cv_path_UNIQ
10537if test -n "$UNIQ"; then
10538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10539$as_echo "$UNIQ" >&6; }
10540else
10541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
10543fi
10544
10545
10546  test -n "$UNIQ" && break
10547done
10548
10549    else
10550      # If it succeeded, then it was overridden by the user. We will use it
10551      # for the tool.
10552
10553      # First remove it from the list of overridden variables, so we can test
10554      # for unknown variables in the end.
10555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10556
10557      # Check if the provided tool contains a complete path.
10558      tool_specified="$UNIQ"
10559      tool_basename="${tool_specified##*/}"
10560      if test "x$tool_basename" = "x$tool_specified"; then
10561        # A command without a complete path is provided, search $PATH.
10562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10563$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10564        # Extract the first word of "$tool_basename", so it can be a program name with args.
10565set dummy $tool_basename; ac_word=$2
10566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10567$as_echo_n "checking for $ac_word... " >&6; }
10568if ${ac_cv_path_UNIQ+:} false; then :
10569  $as_echo_n "(cached) " >&6
10570else
10571  case $UNIQ in
10572  [\\/]* | ?:[\\/]*)
10573  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10574  ;;
10575  *)
10576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10577for as_dir in $PATH
10578do
10579  IFS=$as_save_IFS
10580  test -z "$as_dir" && as_dir=.
10581    for ac_exec_ext in '' $ac_executable_extensions; do
10582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10583    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10585    break 2
10586  fi
10587done
10588  done
10589IFS=$as_save_IFS
10590
10591  ;;
10592esac
10593fi
10594UNIQ=$ac_cv_path_UNIQ
10595if test -n "$UNIQ"; then
10596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10597$as_echo "$UNIQ" >&6; }
10598else
10599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
10601fi
10602
10603
10604        if test "x$UNIQ" = x; then
10605          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10606        fi
10607      else
10608        # Otherwise we believe it is a complete path. Use it as it is.
10609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10610$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10612$as_echo_n "checking for UNIQ... " >&6; }
10613        if test ! -x "$tool_specified"; then
10614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10615$as_echo "not found" >&6; }
10616          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10617        fi
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10619$as_echo "$tool_specified" >&6; }
10620      fi
10621    fi
10622  fi
10623
10624
10625
10626  if test "x$UNIQ" = x; then
10627    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10628  fi
10629
10630
10631
10632
10633
10634  # Publish this variable in the help.
10635
10636
10637  if test "x$WC" = x; then
10638    # The variable is not set by user, try to locate tool using the code snippet
10639    for ac_prog in wc
10640do
10641  # Extract the first word of "$ac_prog", so it can be a program name with args.
10642set dummy $ac_prog; ac_word=$2
10643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10644$as_echo_n "checking for $ac_word... " >&6; }
10645if ${ac_cv_path_WC+:} false; then :
10646  $as_echo_n "(cached) " >&6
10647else
10648  case $WC in
10649  [\\/]* | ?:[\\/]*)
10650  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10651  ;;
10652  *)
10653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10654for as_dir in $PATH
10655do
10656  IFS=$as_save_IFS
10657  test -z "$as_dir" && as_dir=.
10658    for ac_exec_ext in '' $ac_executable_extensions; do
10659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10660    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10662    break 2
10663  fi
10664done
10665  done
10666IFS=$as_save_IFS
10667
10668  ;;
10669esac
10670fi
10671WC=$ac_cv_path_WC
10672if test -n "$WC"; then
10673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10674$as_echo "$WC" >&6; }
10675else
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
10678fi
10679
10680
10681  test -n "$WC" && break
10682done
10683
10684  else
10685    # The variable is set, but is it from the command line or the environment?
10686
10687    # Try to remove the string !WC! from our list.
10688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10690      # If it failed, the variable was not from the command line. Ignore it,
10691      # but warn the user (except for BASH, which is always set by the calling BASH).
10692      if test "xWC" != xBASH; then
10693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10694$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10695      fi
10696      # Try to locate tool using the code snippet
10697      for ac_prog in wc
10698do
10699  # Extract the first word of "$ac_prog", so it can be a program name with args.
10700set dummy $ac_prog; ac_word=$2
10701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10702$as_echo_n "checking for $ac_word... " >&6; }
10703if ${ac_cv_path_WC+:} false; then :
10704  $as_echo_n "(cached) " >&6
10705else
10706  case $WC in
10707  [\\/]* | ?:[\\/]*)
10708  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10709  ;;
10710  *)
10711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10712for as_dir in $PATH
10713do
10714  IFS=$as_save_IFS
10715  test -z "$as_dir" && as_dir=.
10716    for ac_exec_ext in '' $ac_executable_extensions; do
10717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10718    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10720    break 2
10721  fi
10722done
10723  done
10724IFS=$as_save_IFS
10725
10726  ;;
10727esac
10728fi
10729WC=$ac_cv_path_WC
10730if test -n "$WC"; then
10731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10732$as_echo "$WC" >&6; }
10733else
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735$as_echo "no" >&6; }
10736fi
10737
10738
10739  test -n "$WC" && break
10740done
10741
10742    else
10743      # If it succeeded, then it was overridden by the user. We will use it
10744      # for the tool.
10745
10746      # First remove it from the list of overridden variables, so we can test
10747      # for unknown variables in the end.
10748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10749
10750      # Check if the provided tool contains a complete path.
10751      tool_specified="$WC"
10752      tool_basename="${tool_specified##*/}"
10753      if test "x$tool_basename" = "x$tool_specified"; then
10754        # A command without a complete path is provided, search $PATH.
10755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10756$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10757        # Extract the first word of "$tool_basename", so it can be a program name with args.
10758set dummy $tool_basename; ac_word=$2
10759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760$as_echo_n "checking for $ac_word... " >&6; }
10761if ${ac_cv_path_WC+:} false; then :
10762  $as_echo_n "(cached) " >&6
10763else
10764  case $WC in
10765  [\\/]* | ?:[\\/]*)
10766  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10767  ;;
10768  *)
10769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770for as_dir in $PATH
10771do
10772  IFS=$as_save_IFS
10773  test -z "$as_dir" && as_dir=.
10774    for ac_exec_ext in '' $ac_executable_extensions; do
10775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10776    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10778    break 2
10779  fi
10780done
10781  done
10782IFS=$as_save_IFS
10783
10784  ;;
10785esac
10786fi
10787WC=$ac_cv_path_WC
10788if test -n "$WC"; then
10789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10790$as_echo "$WC" >&6; }
10791else
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
10794fi
10795
10796
10797        if test "x$WC" = x; then
10798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10799        fi
10800      else
10801        # Otherwise we believe it is a complete path. Use it as it is.
10802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10803$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10805$as_echo_n "checking for WC... " >&6; }
10806        if test ! -x "$tool_specified"; then
10807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10808$as_echo "not found" >&6; }
10809          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10810        fi
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10812$as_echo "$tool_specified" >&6; }
10813      fi
10814    fi
10815  fi
10816
10817
10818
10819  if test "x$WC" = x; then
10820    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10821  fi
10822
10823
10824
10825
10826
10827  # Publish this variable in the help.
10828
10829
10830  if test "x$WHICH" = x; then
10831    # The variable is not set by user, try to locate tool using the code snippet
10832    for ac_prog in which
10833do
10834  # Extract the first word of "$ac_prog", so it can be a program name with args.
10835set dummy $ac_prog; ac_word=$2
10836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10837$as_echo_n "checking for $ac_word... " >&6; }
10838if ${ac_cv_path_WHICH+:} false; then :
10839  $as_echo_n "(cached) " >&6
10840else
10841  case $WHICH in
10842  [\\/]* | ?:[\\/]*)
10843  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10844  ;;
10845  *)
10846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10847for as_dir in $PATH
10848do
10849  IFS=$as_save_IFS
10850  test -z "$as_dir" && as_dir=.
10851    for ac_exec_ext in '' $ac_executable_extensions; do
10852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10853    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10855    break 2
10856  fi
10857done
10858  done
10859IFS=$as_save_IFS
10860
10861  ;;
10862esac
10863fi
10864WHICH=$ac_cv_path_WHICH
10865if test -n "$WHICH"; then
10866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10867$as_echo "$WHICH" >&6; }
10868else
10869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10870$as_echo "no" >&6; }
10871fi
10872
10873
10874  test -n "$WHICH" && break
10875done
10876
10877  else
10878    # The variable is set, but is it from the command line or the environment?
10879
10880    # Try to remove the string !WHICH! from our list.
10881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10883      # If it failed, the variable was not from the command line. Ignore it,
10884      # but warn the user (except for BASH, which is always set by the calling BASH).
10885      if test "xWHICH" != xBASH; then
10886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10887$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10888      fi
10889      # Try to locate tool using the code snippet
10890      for ac_prog in which
10891do
10892  # Extract the first word of "$ac_prog", so it can be a program name with args.
10893set dummy $ac_prog; ac_word=$2
10894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10895$as_echo_n "checking for $ac_word... " >&6; }
10896if ${ac_cv_path_WHICH+:} false; then :
10897  $as_echo_n "(cached) " >&6
10898else
10899  case $WHICH in
10900  [\\/]* | ?:[\\/]*)
10901  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10902  ;;
10903  *)
10904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10905for as_dir in $PATH
10906do
10907  IFS=$as_save_IFS
10908  test -z "$as_dir" && as_dir=.
10909    for ac_exec_ext in '' $ac_executable_extensions; do
10910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10911    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10913    break 2
10914  fi
10915done
10916  done
10917IFS=$as_save_IFS
10918
10919  ;;
10920esac
10921fi
10922WHICH=$ac_cv_path_WHICH
10923if test -n "$WHICH"; then
10924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10925$as_echo "$WHICH" >&6; }
10926else
10927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10928$as_echo "no" >&6; }
10929fi
10930
10931
10932  test -n "$WHICH" && break
10933done
10934
10935    else
10936      # If it succeeded, then it was overridden by the user. We will use it
10937      # for the tool.
10938
10939      # First remove it from the list of overridden variables, so we can test
10940      # for unknown variables in the end.
10941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10942
10943      # Check if the provided tool contains a complete path.
10944      tool_specified="$WHICH"
10945      tool_basename="${tool_specified##*/}"
10946      if test "x$tool_basename" = "x$tool_specified"; then
10947        # A command without a complete path is provided, search $PATH.
10948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
10949$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
10950        # Extract the first word of "$tool_basename", so it can be a program name with args.
10951set dummy $tool_basename; ac_word=$2
10952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10953$as_echo_n "checking for $ac_word... " >&6; }
10954if ${ac_cv_path_WHICH+:} false; then :
10955  $as_echo_n "(cached) " >&6
10956else
10957  case $WHICH in
10958  [\\/]* | ?:[\\/]*)
10959  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10960  ;;
10961  *)
10962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10963for as_dir in $PATH
10964do
10965  IFS=$as_save_IFS
10966  test -z "$as_dir" && as_dir=.
10967    for ac_exec_ext in '' $ac_executable_extensions; do
10968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10969    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10971    break 2
10972  fi
10973done
10974  done
10975IFS=$as_save_IFS
10976
10977  ;;
10978esac
10979fi
10980WHICH=$ac_cv_path_WHICH
10981if test -n "$WHICH"; then
10982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10983$as_echo "$WHICH" >&6; }
10984else
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
10987fi
10988
10989
10990        if test "x$WHICH" = x; then
10991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10992        fi
10993      else
10994        # Otherwise we believe it is a complete path. Use it as it is.
10995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
10996$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
10997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
10998$as_echo_n "checking for WHICH... " >&6; }
10999        if test ! -x "$tool_specified"; then
11000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11001$as_echo "not found" >&6; }
11002          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11003        fi
11004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11005$as_echo "$tool_specified" >&6; }
11006      fi
11007    fi
11008  fi
11009
11010
11011
11012  if test "x$WHICH" = x; then
11013    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11014  fi
11015
11016
11017
11018
11019
11020  # Publish this variable in the help.
11021
11022
11023  if test "x$XARGS" = x; then
11024    # The variable is not set by user, try to locate tool using the code snippet
11025    for ac_prog in xargs
11026do
11027  # Extract the first word of "$ac_prog", so it can be a program name with args.
11028set dummy $ac_prog; ac_word=$2
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11030$as_echo_n "checking for $ac_word... " >&6; }
11031if ${ac_cv_path_XARGS+:} false; then :
11032  $as_echo_n "(cached) " >&6
11033else
11034  case $XARGS in
11035  [\\/]* | ?:[\\/]*)
11036  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11037  ;;
11038  *)
11039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042  IFS=$as_save_IFS
11043  test -z "$as_dir" && as_dir=.
11044    for ac_exec_ext in '' $ac_executable_extensions; do
11045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11046    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11048    break 2
11049  fi
11050done
11051  done
11052IFS=$as_save_IFS
11053
11054  ;;
11055esac
11056fi
11057XARGS=$ac_cv_path_XARGS
11058if test -n "$XARGS"; then
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11060$as_echo "$XARGS" >&6; }
11061else
11062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063$as_echo "no" >&6; }
11064fi
11065
11066
11067  test -n "$XARGS" && break
11068done
11069
11070  else
11071    # The variable is set, but is it from the command line or the environment?
11072
11073    # Try to remove the string !XARGS! from our list.
11074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11076      # If it failed, the variable was not from the command line. Ignore it,
11077      # but warn the user (except for BASH, which is always set by the calling BASH).
11078      if test "xXARGS" != xBASH; then
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11080$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11081      fi
11082      # Try to locate tool using the code snippet
11083      for ac_prog in xargs
11084do
11085  # Extract the first word of "$ac_prog", so it can be a program name with args.
11086set dummy $ac_prog; ac_word=$2
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11088$as_echo_n "checking for $ac_word... " >&6; }
11089if ${ac_cv_path_XARGS+:} false; then :
11090  $as_echo_n "(cached) " >&6
11091else
11092  case $XARGS in
11093  [\\/]* | ?:[\\/]*)
11094  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11095  ;;
11096  *)
11097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100  IFS=$as_save_IFS
11101  test -z "$as_dir" && as_dir=.
11102    for ac_exec_ext in '' $ac_executable_extensions; do
11103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11104    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11106    break 2
11107  fi
11108done
11109  done
11110IFS=$as_save_IFS
11111
11112  ;;
11113esac
11114fi
11115XARGS=$ac_cv_path_XARGS
11116if test -n "$XARGS"; then
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11118$as_echo "$XARGS" >&6; }
11119else
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
11122fi
11123
11124
11125  test -n "$XARGS" && break
11126done
11127
11128    else
11129      # If it succeeded, then it was overridden by the user. We will use it
11130      # for the tool.
11131
11132      # First remove it from the list of overridden variables, so we can test
11133      # for unknown variables in the end.
11134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11135
11136      # Check if the provided tool contains a complete path.
11137      tool_specified="$XARGS"
11138      tool_basename="${tool_specified##*/}"
11139      if test "x$tool_basename" = "x$tool_specified"; then
11140        # A command without a complete path is provided, search $PATH.
11141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11142$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11143        # Extract the first word of "$tool_basename", so it can be a program name with args.
11144set dummy $tool_basename; ac_word=$2
11145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11146$as_echo_n "checking for $ac_word... " >&6; }
11147if ${ac_cv_path_XARGS+:} false; then :
11148  $as_echo_n "(cached) " >&6
11149else
11150  case $XARGS in
11151  [\\/]* | ?:[\\/]*)
11152  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11153  ;;
11154  *)
11155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11156for as_dir in $PATH
11157do
11158  IFS=$as_save_IFS
11159  test -z "$as_dir" && as_dir=.
11160    for ac_exec_ext in '' $ac_executable_extensions; do
11161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11162    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11164    break 2
11165  fi
11166done
11167  done
11168IFS=$as_save_IFS
11169
11170  ;;
11171esac
11172fi
11173XARGS=$ac_cv_path_XARGS
11174if test -n "$XARGS"; then
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11176$as_echo "$XARGS" >&6; }
11177else
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
11180fi
11181
11182
11183        if test "x$XARGS" = x; then
11184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11185        fi
11186      else
11187        # Otherwise we believe it is a complete path. Use it as it is.
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11189$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11191$as_echo_n "checking for XARGS... " >&6; }
11192        if test ! -x "$tool_specified"; then
11193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11194$as_echo "not found" >&6; }
11195          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11196        fi
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11198$as_echo "$tool_specified" >&6; }
11199      fi
11200    fi
11201  fi
11202
11203
11204
11205  if test "x$XARGS" = x; then
11206    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11207  fi
11208
11209
11210
11211  # Then required tools that require some special treatment.
11212
11213
11214  # Publish this variable in the help.
11215
11216
11217  if test "x$AWK" = x; then
11218    # The variable is not set by user, try to locate tool using the code snippet
11219    for ac_prog in gawk mawk nawk awk
11220do
11221  # Extract the first word of "$ac_prog", so it can be a program name with args.
11222set dummy $ac_prog; ac_word=$2
11223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11224$as_echo_n "checking for $ac_word... " >&6; }
11225if ${ac_cv_prog_AWK+:} false; then :
11226  $as_echo_n "(cached) " >&6
11227else
11228  if test -n "$AWK"; then
11229  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11230else
11231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11232for as_dir in $PATH
11233do
11234  IFS=$as_save_IFS
11235  test -z "$as_dir" && as_dir=.
11236    for ac_exec_ext in '' $ac_executable_extensions; do
11237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11238    ac_cv_prog_AWK="$ac_prog"
11239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11240    break 2
11241  fi
11242done
11243  done
11244IFS=$as_save_IFS
11245
11246fi
11247fi
11248AWK=$ac_cv_prog_AWK
11249if test -n "$AWK"; then
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11251$as_echo "$AWK" >&6; }
11252else
11253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11254$as_echo "no" >&6; }
11255fi
11256
11257
11258  test -n "$AWK" && break
11259done
11260
11261  else
11262    # The variable is set, but is it from the command line or the environment?
11263
11264    # Try to remove the string !AWK! from our list.
11265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11267      # If it failed, the variable was not from the command line. Ignore it,
11268      # but warn the user (except for BASH, which is always set by the calling BASH).
11269      if test "xAWK" != xBASH; then
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11271$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11272      fi
11273      # Try to locate tool using the code snippet
11274      for ac_prog in gawk mawk nawk awk
11275do
11276  # Extract the first word of "$ac_prog", so it can be a program name with args.
11277set dummy $ac_prog; ac_word=$2
11278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11279$as_echo_n "checking for $ac_word... " >&6; }
11280if ${ac_cv_prog_AWK+:} false; then :
11281  $as_echo_n "(cached) " >&6
11282else
11283  if test -n "$AWK"; then
11284  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11285else
11286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11287for as_dir in $PATH
11288do
11289  IFS=$as_save_IFS
11290  test -z "$as_dir" && as_dir=.
11291    for ac_exec_ext in '' $ac_executable_extensions; do
11292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11293    ac_cv_prog_AWK="$ac_prog"
11294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11295    break 2
11296  fi
11297done
11298  done
11299IFS=$as_save_IFS
11300
11301fi
11302fi
11303AWK=$ac_cv_prog_AWK
11304if test -n "$AWK"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11306$as_echo "$AWK" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313  test -n "$AWK" && break
11314done
11315
11316    else
11317      # If it succeeded, then it was overridden by the user. We will use it
11318      # for the tool.
11319
11320      # First remove it from the list of overridden variables, so we can test
11321      # for unknown variables in the end.
11322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11323
11324      # Check if the provided tool contains a complete path.
11325      tool_specified="$AWK"
11326      tool_basename="${tool_specified##*/}"
11327      if test "x$tool_basename" = "x$tool_specified"; then
11328        # A command without a complete path is provided, search $PATH.
11329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11330$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11331        # Extract the first word of "$tool_basename", so it can be a program name with args.
11332set dummy $tool_basename; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_path_AWK+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  case $AWK in
11339  [\\/]* | ?:[\\/]*)
11340  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11341  ;;
11342  *)
11343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11344for as_dir in $PATH
11345do
11346  IFS=$as_save_IFS
11347  test -z "$as_dir" && as_dir=.
11348    for ac_exec_ext in '' $ac_executable_extensions; do
11349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11350    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11352    break 2
11353  fi
11354done
11355  done
11356IFS=$as_save_IFS
11357
11358  ;;
11359esac
11360fi
11361AWK=$ac_cv_path_AWK
11362if test -n "$AWK"; then
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11364$as_echo "$AWK" >&6; }
11365else
11366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371        if test "x$AWK" = x; then
11372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11373        fi
11374      else
11375        # Otherwise we believe it is a complete path. Use it as it is.
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11377$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11379$as_echo_n "checking for AWK... " >&6; }
11380        if test ! -x "$tool_specified"; then
11381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11382$as_echo "not found" >&6; }
11383          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11384        fi
11385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11386$as_echo "$tool_specified" >&6; }
11387      fi
11388    fi
11389  fi
11390
11391
11392  if test "x$AWK" = x; then
11393    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11394  fi
11395
11396
11397
11398
11399  # Publish this variable in the help.
11400
11401
11402  if test "x$GREP" = x; then
11403    # The variable is not set by user, try to locate tool using the code snippet
11404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11405$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11406if ${ac_cv_path_GREP+:} false; then :
11407  $as_echo_n "(cached) " >&6
11408else
11409  if test -z "$GREP"; then
11410  ac_path_GREP_found=false
11411  # Loop through the user's path and test for each of PROGNAME-LIST
11412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11414do
11415  IFS=$as_save_IFS
11416  test -z "$as_dir" && as_dir=.
11417    for ac_prog in grep ggrep; do
11418    for ac_exec_ext in '' $ac_executable_extensions; do
11419      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11420      as_fn_executable_p "$ac_path_GREP" || continue
11421# Check for GNU ac_path_GREP and select it if it is found.
11422  # Check for GNU $ac_path_GREP
11423case `"$ac_path_GREP" --version 2>&1` in
11424*GNU*)
11425  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11426*)
11427  ac_count=0
11428  $as_echo_n 0123456789 >"conftest.in"
11429  while :
11430  do
11431    cat "conftest.in" "conftest.in" >"conftest.tmp"
11432    mv "conftest.tmp" "conftest.in"
11433    cp "conftest.in" "conftest.nl"
11434    $as_echo 'GREP' >> "conftest.nl"
11435    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11436    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11437    as_fn_arith $ac_count + 1 && ac_count=$as_val
11438    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11439      # Best one so far, save it but keep looking for a better one
11440      ac_cv_path_GREP="$ac_path_GREP"
11441      ac_path_GREP_max=$ac_count
11442    fi
11443    # 10*(2^10) chars as input seems more than enough
11444    test $ac_count -gt 10 && break
11445  done
11446  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11447esac
11448
11449      $ac_path_GREP_found && break 3
11450    done
11451  done
11452  done
11453IFS=$as_save_IFS
11454  if test -z "$ac_cv_path_GREP"; then
11455    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11456  fi
11457else
11458  ac_cv_path_GREP=$GREP
11459fi
11460
11461fi
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11463$as_echo "$ac_cv_path_GREP" >&6; }
11464 GREP="$ac_cv_path_GREP"
11465
11466
11467  else
11468    # The variable is set, but is it from the command line or the environment?
11469
11470    # Try to remove the string !GREP! from our list.
11471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11473      # If it failed, the variable was not from the command line. Ignore it,
11474      # but warn the user (except for BASH, which is always set by the calling BASH).
11475      if test "xGREP" != xBASH; then
11476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11477$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11478      fi
11479      # Try to locate tool using the code snippet
11480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11481$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11482if ${ac_cv_path_GREP+:} false; then :
11483  $as_echo_n "(cached) " >&6
11484else
11485  if test -z "$GREP"; then
11486  ac_path_GREP_found=false
11487  # Loop through the user's path and test for each of PROGNAME-LIST
11488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11489for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11490do
11491  IFS=$as_save_IFS
11492  test -z "$as_dir" && as_dir=.
11493    for ac_prog in grep ggrep; do
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11496      as_fn_executable_p "$ac_path_GREP" || continue
11497# Check for GNU ac_path_GREP and select it if it is found.
11498  # Check for GNU $ac_path_GREP
11499case `"$ac_path_GREP" --version 2>&1` in
11500*GNU*)
11501  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11502*)
11503  ac_count=0
11504  $as_echo_n 0123456789 >"conftest.in"
11505  while :
11506  do
11507    cat "conftest.in" "conftest.in" >"conftest.tmp"
11508    mv "conftest.tmp" "conftest.in"
11509    cp "conftest.in" "conftest.nl"
11510    $as_echo 'GREP' >> "conftest.nl"
11511    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11512    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11513    as_fn_arith $ac_count + 1 && ac_count=$as_val
11514    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11515      # Best one so far, save it but keep looking for a better one
11516      ac_cv_path_GREP="$ac_path_GREP"
11517      ac_path_GREP_max=$ac_count
11518    fi
11519    # 10*(2^10) chars as input seems more than enough
11520    test $ac_count -gt 10 && break
11521  done
11522  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11523esac
11524
11525      $ac_path_GREP_found && break 3
11526    done
11527  done
11528  done
11529IFS=$as_save_IFS
11530  if test -z "$ac_cv_path_GREP"; then
11531    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11532  fi
11533else
11534  ac_cv_path_GREP=$GREP
11535fi
11536
11537fi
11538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11539$as_echo "$ac_cv_path_GREP" >&6; }
11540 GREP="$ac_cv_path_GREP"
11541
11542
11543    else
11544      # If it succeeded, then it was overridden by the user. We will use it
11545      # for the tool.
11546
11547      # First remove it from the list of overridden variables, so we can test
11548      # for unknown variables in the end.
11549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11550
11551      # Check if the provided tool contains a complete path.
11552      tool_specified="$GREP"
11553      tool_basename="${tool_specified##*/}"
11554      if test "x$tool_basename" = "x$tool_specified"; then
11555        # A command without a complete path is provided, search $PATH.
11556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11557$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11558        # Extract the first word of "$tool_basename", so it can be a program name with args.
11559set dummy $tool_basename; ac_word=$2
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11561$as_echo_n "checking for $ac_word... " >&6; }
11562if ${ac_cv_path_GREP+:} false; then :
11563  $as_echo_n "(cached) " >&6
11564else
11565  case $GREP in
11566  [\\/]* | ?:[\\/]*)
11567  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11568  ;;
11569  *)
11570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11571for as_dir in $PATH
11572do
11573  IFS=$as_save_IFS
11574  test -z "$as_dir" && as_dir=.
11575    for ac_exec_ext in '' $ac_executable_extensions; do
11576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11577    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11579    break 2
11580  fi
11581done
11582  done
11583IFS=$as_save_IFS
11584
11585  ;;
11586esac
11587fi
11588GREP=$ac_cv_path_GREP
11589if test -n "$GREP"; then
11590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11591$as_echo "$GREP" >&6; }
11592else
11593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594$as_echo "no" >&6; }
11595fi
11596
11597
11598        if test "x$GREP" = x; then
11599          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11600        fi
11601      else
11602        # Otherwise we believe it is a complete path. Use it as it is.
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11604$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11606$as_echo_n "checking for GREP... " >&6; }
11607        if test ! -x "$tool_specified"; then
11608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11609$as_echo "not found" >&6; }
11610          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11611        fi
11612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11613$as_echo "$tool_specified" >&6; }
11614      fi
11615    fi
11616  fi
11617
11618
11619  if test "x$GREP" = x; then
11620    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11621  fi
11622
11623
11624
11625
11626  # Publish this variable in the help.
11627
11628
11629  if test "x$EGREP" = x; then
11630    # The variable is not set by user, try to locate tool using the code snippet
11631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11632$as_echo_n "checking for egrep... " >&6; }
11633if ${ac_cv_path_EGREP+:} false; then :
11634  $as_echo_n "(cached) " >&6
11635else
11636  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11637   then ac_cv_path_EGREP="$GREP -E"
11638   else
11639     if test -z "$EGREP"; then
11640  ac_path_EGREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in egrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_EGREP" || continue
11651# Check for GNU ac_path_EGREP and select it if it is found.
11652  # Check for GNU $ac_path_EGREP
11653case `"$ac_path_EGREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'EGREP' >> "conftest.nl"
11665    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_EGREP="$ac_path_EGREP"
11671      ac_path_EGREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_EGREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_EGREP"; then
11685    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_EGREP=$EGREP
11689fi
11690
11691   fi
11692fi
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11694$as_echo "$ac_cv_path_EGREP" >&6; }
11695 EGREP="$ac_cv_path_EGREP"
11696
11697
11698  else
11699    # The variable is set, but is it from the command line or the environment?
11700
11701    # Try to remove the string !EGREP! from our list.
11702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11704      # If it failed, the variable was not from the command line. Ignore it,
11705      # but warn the user (except for BASH, which is always set by the calling BASH).
11706      if test "xEGREP" != xBASH; then
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11708$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11709      fi
11710      # Try to locate tool using the code snippet
11711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11712$as_echo_n "checking for egrep... " >&6; }
11713if ${ac_cv_path_EGREP+:} false; then :
11714  $as_echo_n "(cached) " >&6
11715else
11716  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11717   then ac_cv_path_EGREP="$GREP -E"
11718   else
11719     if test -z "$EGREP"; then
11720  ac_path_EGREP_found=false
11721  # Loop through the user's path and test for each of PROGNAME-LIST
11722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11723for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11724do
11725  IFS=$as_save_IFS
11726  test -z "$as_dir" && as_dir=.
11727    for ac_prog in egrep; do
11728    for ac_exec_ext in '' $ac_executable_extensions; do
11729      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11730      as_fn_executable_p "$ac_path_EGREP" || continue
11731# Check for GNU ac_path_EGREP and select it if it is found.
11732  # Check for GNU $ac_path_EGREP
11733case `"$ac_path_EGREP" --version 2>&1` in
11734*GNU*)
11735  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11736*)
11737  ac_count=0
11738  $as_echo_n 0123456789 >"conftest.in"
11739  while :
11740  do
11741    cat "conftest.in" "conftest.in" >"conftest.tmp"
11742    mv "conftest.tmp" "conftest.in"
11743    cp "conftest.in" "conftest.nl"
11744    $as_echo 'EGREP' >> "conftest.nl"
11745    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11746    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11747    as_fn_arith $ac_count + 1 && ac_count=$as_val
11748    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11749      # Best one so far, save it but keep looking for a better one
11750      ac_cv_path_EGREP="$ac_path_EGREP"
11751      ac_path_EGREP_max=$ac_count
11752    fi
11753    # 10*(2^10) chars as input seems more than enough
11754    test $ac_count -gt 10 && break
11755  done
11756  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11757esac
11758
11759      $ac_path_EGREP_found && break 3
11760    done
11761  done
11762  done
11763IFS=$as_save_IFS
11764  if test -z "$ac_cv_path_EGREP"; then
11765    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11766  fi
11767else
11768  ac_cv_path_EGREP=$EGREP
11769fi
11770
11771   fi
11772fi
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11774$as_echo "$ac_cv_path_EGREP" >&6; }
11775 EGREP="$ac_cv_path_EGREP"
11776
11777
11778    else
11779      # If it succeeded, then it was overridden by the user. We will use it
11780      # for the tool.
11781
11782      # First remove it from the list of overridden variables, so we can test
11783      # for unknown variables in the end.
11784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11785
11786      # Check if the provided tool contains a complete path.
11787      tool_specified="$EGREP"
11788      tool_basename="${tool_specified##*/}"
11789      if test "x$tool_basename" = "x$tool_specified"; then
11790        # A command without a complete path is provided, search $PATH.
11791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11792$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11793        # Extract the first word of "$tool_basename", so it can be a program name with args.
11794set dummy $tool_basename; ac_word=$2
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11796$as_echo_n "checking for $ac_word... " >&6; }
11797if ${ac_cv_path_EGREP+:} false; then :
11798  $as_echo_n "(cached) " >&6
11799else
11800  case $EGREP in
11801  [\\/]* | ?:[\\/]*)
11802  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11803  ;;
11804  *)
11805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11806for as_dir in $PATH
11807do
11808  IFS=$as_save_IFS
11809  test -z "$as_dir" && as_dir=.
11810    for ac_exec_ext in '' $ac_executable_extensions; do
11811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11812    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11814    break 2
11815  fi
11816done
11817  done
11818IFS=$as_save_IFS
11819
11820  ;;
11821esac
11822fi
11823EGREP=$ac_cv_path_EGREP
11824if test -n "$EGREP"; then
11825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11826$as_echo "$EGREP" >&6; }
11827else
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
11830fi
11831
11832
11833        if test "x$EGREP" = x; then
11834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11835        fi
11836      else
11837        # Otherwise we believe it is a complete path. Use it as it is.
11838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11839$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11841$as_echo_n "checking for EGREP... " >&6; }
11842        if test ! -x "$tool_specified"; then
11843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11844$as_echo "not found" >&6; }
11845          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11846        fi
11847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11848$as_echo "$tool_specified" >&6; }
11849      fi
11850    fi
11851  fi
11852
11853
11854  if test "x$EGREP" = x; then
11855    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11856  fi
11857
11858
11859
11860
11861  # Publish this variable in the help.
11862
11863
11864  if test "x$FGREP" = x; then
11865    # The variable is not set by user, try to locate tool using the code snippet
11866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11867$as_echo_n "checking for fgrep... " >&6; }
11868if ${ac_cv_path_FGREP+:} false; then :
11869  $as_echo_n "(cached) " >&6
11870else
11871  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11872   then ac_cv_path_FGREP="$GREP -F"
11873   else
11874     if test -z "$FGREP"; then
11875  ac_path_FGREP_found=false
11876  # Loop through the user's path and test for each of PROGNAME-LIST
11877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11879do
11880  IFS=$as_save_IFS
11881  test -z "$as_dir" && as_dir=.
11882    for ac_prog in fgrep; do
11883    for ac_exec_ext in '' $ac_executable_extensions; do
11884      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11885      as_fn_executable_p "$ac_path_FGREP" || continue
11886# Check for GNU ac_path_FGREP and select it if it is found.
11887  # Check for GNU $ac_path_FGREP
11888case `"$ac_path_FGREP" --version 2>&1` in
11889*GNU*)
11890  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11891*)
11892  ac_count=0
11893  $as_echo_n 0123456789 >"conftest.in"
11894  while :
11895  do
11896    cat "conftest.in" "conftest.in" >"conftest.tmp"
11897    mv "conftest.tmp" "conftest.in"
11898    cp "conftest.in" "conftest.nl"
11899    $as_echo 'FGREP' >> "conftest.nl"
11900    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11901    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11902    as_fn_arith $ac_count + 1 && ac_count=$as_val
11903    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11904      # Best one so far, save it but keep looking for a better one
11905      ac_cv_path_FGREP="$ac_path_FGREP"
11906      ac_path_FGREP_max=$ac_count
11907    fi
11908    # 10*(2^10) chars as input seems more than enough
11909    test $ac_count -gt 10 && break
11910  done
11911  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11912esac
11913
11914      $ac_path_FGREP_found && break 3
11915    done
11916  done
11917  done
11918IFS=$as_save_IFS
11919  if test -z "$ac_cv_path_FGREP"; then
11920    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11921  fi
11922else
11923  ac_cv_path_FGREP=$FGREP
11924fi
11925
11926   fi
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11929$as_echo "$ac_cv_path_FGREP" >&6; }
11930 FGREP="$ac_cv_path_FGREP"
11931
11932
11933  else
11934    # The variable is set, but is it from the command line or the environment?
11935
11936    # Try to remove the string !FGREP! from our list.
11937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
11938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11939      # If it failed, the variable was not from the command line. Ignore it,
11940      # but warn the user (except for BASH, which is always set by the calling BASH).
11941      if test "xFGREP" != xBASH; then
11942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
11943$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
11944      fi
11945      # Try to locate tool using the code snippet
11946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11947$as_echo_n "checking for fgrep... " >&6; }
11948if ${ac_cv_path_FGREP+:} false; then :
11949  $as_echo_n "(cached) " >&6
11950else
11951  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11952   then ac_cv_path_FGREP="$GREP -F"
11953   else
11954     if test -z "$FGREP"; then
11955  ac_path_FGREP_found=false
11956  # Loop through the user's path and test for each of PROGNAME-LIST
11957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11959do
11960  IFS=$as_save_IFS
11961  test -z "$as_dir" && as_dir=.
11962    for ac_prog in fgrep; do
11963    for ac_exec_ext in '' $ac_executable_extensions; do
11964      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11965      as_fn_executable_p "$ac_path_FGREP" || continue
11966# Check for GNU ac_path_FGREP and select it if it is found.
11967  # Check for GNU $ac_path_FGREP
11968case `"$ac_path_FGREP" --version 2>&1` in
11969*GNU*)
11970  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11971*)
11972  ac_count=0
11973  $as_echo_n 0123456789 >"conftest.in"
11974  while :
11975  do
11976    cat "conftest.in" "conftest.in" >"conftest.tmp"
11977    mv "conftest.tmp" "conftest.in"
11978    cp "conftest.in" "conftest.nl"
11979    $as_echo 'FGREP' >> "conftest.nl"
11980    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11981    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11982    as_fn_arith $ac_count + 1 && ac_count=$as_val
11983    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11984      # Best one so far, save it but keep looking for a better one
11985      ac_cv_path_FGREP="$ac_path_FGREP"
11986      ac_path_FGREP_max=$ac_count
11987    fi
11988    # 10*(2^10) chars as input seems more than enough
11989    test $ac_count -gt 10 && break
11990  done
11991  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11992esac
11993
11994      $ac_path_FGREP_found && break 3
11995    done
11996  done
11997  done
11998IFS=$as_save_IFS
11999  if test -z "$ac_cv_path_FGREP"; then
12000    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12001  fi
12002else
12003  ac_cv_path_FGREP=$FGREP
12004fi
12005
12006   fi
12007fi
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12009$as_echo "$ac_cv_path_FGREP" >&6; }
12010 FGREP="$ac_cv_path_FGREP"
12011
12012
12013    else
12014      # If it succeeded, then it was overridden by the user. We will use it
12015      # for the tool.
12016
12017      # First remove it from the list of overridden variables, so we can test
12018      # for unknown variables in the end.
12019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12020
12021      # Check if the provided tool contains a complete path.
12022      tool_specified="$FGREP"
12023      tool_basename="${tool_specified##*/}"
12024      if test "x$tool_basename" = "x$tool_specified"; then
12025        # A command without a complete path is provided, search $PATH.
12026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12027$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12028        # Extract the first word of "$tool_basename", so it can be a program name with args.
12029set dummy $tool_basename; ac_word=$2
12030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12031$as_echo_n "checking for $ac_word... " >&6; }
12032if ${ac_cv_path_FGREP+:} false; then :
12033  $as_echo_n "(cached) " >&6
12034else
12035  case $FGREP in
12036  [\\/]* | ?:[\\/]*)
12037  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12038  ;;
12039  *)
12040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12041for as_dir in $PATH
12042do
12043  IFS=$as_save_IFS
12044  test -z "$as_dir" && as_dir=.
12045    for ac_exec_ext in '' $ac_executable_extensions; do
12046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12047    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12049    break 2
12050  fi
12051done
12052  done
12053IFS=$as_save_IFS
12054
12055  ;;
12056esac
12057fi
12058FGREP=$ac_cv_path_FGREP
12059if test -n "$FGREP"; then
12060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12061$as_echo "$FGREP" >&6; }
12062else
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064$as_echo "no" >&6; }
12065fi
12066
12067
12068        if test "x$FGREP" = x; then
12069          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12070        fi
12071      else
12072        # Otherwise we believe it is a complete path. Use it as it is.
12073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12074$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12076$as_echo_n "checking for FGREP... " >&6; }
12077        if test ! -x "$tool_specified"; then
12078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12079$as_echo "not found" >&6; }
12080          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12081        fi
12082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12083$as_echo "$tool_specified" >&6; }
12084      fi
12085    fi
12086  fi
12087
12088
12089  if test "x$FGREP" = x; then
12090    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12091  fi
12092
12093
12094
12095
12096  # Publish this variable in the help.
12097
12098
12099  if test "x$SED" = x; then
12100    # The variable is not set by user, try to locate tool using the code snippet
12101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12102$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12103if ${ac_cv_path_SED+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12107     for ac_i in 1 2 3 4 5 6 7; do
12108       ac_script="$ac_script$as_nl$ac_script"
12109     done
12110     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12111     { ac_script=; unset ac_script;}
12112     if test -z "$SED"; then
12113  ac_path_SED_found=false
12114  # Loop through the user's path and test for each of PROGNAME-LIST
12115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12116for as_dir in $PATH
12117do
12118  IFS=$as_save_IFS
12119  test -z "$as_dir" && as_dir=.
12120    for ac_prog in sed gsed; do
12121    for ac_exec_ext in '' $ac_executable_extensions; do
12122      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12123      as_fn_executable_p "$ac_path_SED" || continue
12124# Check for GNU ac_path_SED and select it if it is found.
12125  # Check for GNU $ac_path_SED
12126case `"$ac_path_SED" --version 2>&1` in
12127*GNU*)
12128  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12129*)
12130  ac_count=0
12131  $as_echo_n 0123456789 >"conftest.in"
12132  while :
12133  do
12134    cat "conftest.in" "conftest.in" >"conftest.tmp"
12135    mv "conftest.tmp" "conftest.in"
12136    cp "conftest.in" "conftest.nl"
12137    $as_echo '' >> "conftest.nl"
12138    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12139    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12140    as_fn_arith $ac_count + 1 && ac_count=$as_val
12141    if test $ac_count -gt ${ac_path_SED_max-0}; then
12142      # Best one so far, save it but keep looking for a better one
12143      ac_cv_path_SED="$ac_path_SED"
12144      ac_path_SED_max=$ac_count
12145    fi
12146    # 10*(2^10) chars as input seems more than enough
12147    test $ac_count -gt 10 && break
12148  done
12149  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12150esac
12151
12152      $ac_path_SED_found && break 3
12153    done
12154  done
12155  done
12156IFS=$as_save_IFS
12157  if test -z "$ac_cv_path_SED"; then
12158    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12159  fi
12160else
12161  ac_cv_path_SED=$SED
12162fi
12163
12164fi
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12166$as_echo "$ac_cv_path_SED" >&6; }
12167 SED="$ac_cv_path_SED"
12168  rm -f conftest.sed
12169
12170  else
12171    # The variable is set, but is it from the command line or the environment?
12172
12173    # Try to remove the string !SED! from our list.
12174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12176      # If it failed, the variable was not from the command line. Ignore it,
12177      # but warn the user (except for BASH, which is always set by the calling BASH).
12178      if test "xSED" != xBASH; then
12179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12180$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12181      fi
12182      # Try to locate tool using the code snippet
12183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12184$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12185if ${ac_cv_path_SED+:} false; then :
12186  $as_echo_n "(cached) " >&6
12187else
12188            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12189     for ac_i in 1 2 3 4 5 6 7; do
12190       ac_script="$ac_script$as_nl$ac_script"
12191     done
12192     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12193     { ac_script=; unset ac_script;}
12194     if test -z "$SED"; then
12195  ac_path_SED_found=false
12196  # Loop through the user's path and test for each of PROGNAME-LIST
12197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12198for as_dir in $PATH
12199do
12200  IFS=$as_save_IFS
12201  test -z "$as_dir" && as_dir=.
12202    for ac_prog in sed gsed; do
12203    for ac_exec_ext in '' $ac_executable_extensions; do
12204      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12205      as_fn_executable_p "$ac_path_SED" || continue
12206# Check for GNU ac_path_SED and select it if it is found.
12207  # Check for GNU $ac_path_SED
12208case `"$ac_path_SED" --version 2>&1` in
12209*GNU*)
12210  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12211*)
12212  ac_count=0
12213  $as_echo_n 0123456789 >"conftest.in"
12214  while :
12215  do
12216    cat "conftest.in" "conftest.in" >"conftest.tmp"
12217    mv "conftest.tmp" "conftest.in"
12218    cp "conftest.in" "conftest.nl"
12219    $as_echo '' >> "conftest.nl"
12220    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12221    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12222    as_fn_arith $ac_count + 1 && ac_count=$as_val
12223    if test $ac_count -gt ${ac_path_SED_max-0}; then
12224      # Best one so far, save it but keep looking for a better one
12225      ac_cv_path_SED="$ac_path_SED"
12226      ac_path_SED_max=$ac_count
12227    fi
12228    # 10*(2^10) chars as input seems more than enough
12229    test $ac_count -gt 10 && break
12230  done
12231  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12232esac
12233
12234      $ac_path_SED_found && break 3
12235    done
12236  done
12237  done
12238IFS=$as_save_IFS
12239  if test -z "$ac_cv_path_SED"; then
12240    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12241  fi
12242else
12243  ac_cv_path_SED=$SED
12244fi
12245
12246fi
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12248$as_echo "$ac_cv_path_SED" >&6; }
12249 SED="$ac_cv_path_SED"
12250  rm -f conftest.sed
12251
12252    else
12253      # If it succeeded, then it was overridden by the user. We will use it
12254      # for the tool.
12255
12256      # First remove it from the list of overridden variables, so we can test
12257      # for unknown variables in the end.
12258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12259
12260      # Check if the provided tool contains a complete path.
12261      tool_specified="$SED"
12262      tool_basename="${tool_specified##*/}"
12263      if test "x$tool_basename" = "x$tool_specified"; then
12264        # A command without a complete path is provided, search $PATH.
12265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12266$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12267        # Extract the first word of "$tool_basename", so it can be a program name with args.
12268set dummy $tool_basename; ac_word=$2
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270$as_echo_n "checking for $ac_word... " >&6; }
12271if ${ac_cv_path_SED+:} false; then :
12272  $as_echo_n "(cached) " >&6
12273else
12274  case $SED in
12275  [\\/]* | ?:[\\/]*)
12276  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12277  ;;
12278  *)
12279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280for as_dir in $PATH
12281do
12282  IFS=$as_save_IFS
12283  test -z "$as_dir" && as_dir=.
12284    for ac_exec_ext in '' $ac_executable_extensions; do
12285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288    break 2
12289  fi
12290done
12291  done
12292IFS=$as_save_IFS
12293
12294  ;;
12295esac
12296fi
12297SED=$ac_cv_path_SED
12298if test -n "$SED"; then
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12300$as_echo "$SED" >&6; }
12301else
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
12304fi
12305
12306
12307        if test "x$SED" = x; then
12308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12309        fi
12310      else
12311        # Otherwise we believe it is a complete path. Use it as it is.
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12313$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12315$as_echo_n "checking for SED... " >&6; }
12316        if test ! -x "$tool_specified"; then
12317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12318$as_echo "not found" >&6; }
12319          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12320        fi
12321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12322$as_echo "$tool_specified" >&6; }
12323      fi
12324    fi
12325  fi
12326
12327
12328  if test "x$SED" = x; then
12329    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12330  fi
12331
12332
12333
12334  # Always force rm.
12335  RM="$RM -f"
12336
12337  # pwd behaves differently on various platforms and some don't support the -L flag.
12338  # Always use the bash builtin pwd to get uniform behavior.
12339  THEPWDCMD=pwd
12340
12341  # These are not required on all platforms
12342
12343
12344  # Publish this variable in the help.
12345
12346
12347  if test "x$CYGPATH" = x; then
12348    # The variable is not set by user, try to locate tool using the code snippet
12349    for ac_prog in cygpath
12350do
12351  # Extract the first word of "$ac_prog", so it can be a program name with args.
12352set dummy $ac_prog; ac_word=$2
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12354$as_echo_n "checking for $ac_word... " >&6; }
12355if ${ac_cv_path_CYGPATH+:} false; then :
12356  $as_echo_n "(cached) " >&6
12357else
12358  case $CYGPATH in
12359  [\\/]* | ?:[\\/]*)
12360  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12361  ;;
12362  *)
12363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12364for as_dir in $PATH
12365do
12366  IFS=$as_save_IFS
12367  test -z "$as_dir" && as_dir=.
12368    for ac_exec_ext in '' $ac_executable_extensions; do
12369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12370    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12372    break 2
12373  fi
12374done
12375  done
12376IFS=$as_save_IFS
12377
12378  ;;
12379esac
12380fi
12381CYGPATH=$ac_cv_path_CYGPATH
12382if test -n "$CYGPATH"; then
12383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12384$as_echo "$CYGPATH" >&6; }
12385else
12386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
12388fi
12389
12390
12391  test -n "$CYGPATH" && break
12392done
12393
12394  else
12395    # The variable is set, but is it from the command line or the environment?
12396
12397    # Try to remove the string !CYGPATH! from our list.
12398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12400      # If it failed, the variable was not from the command line. Ignore it,
12401      # but warn the user (except for BASH, which is always set by the calling BASH).
12402      if test "xCYGPATH" != xBASH; then
12403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12404$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12405      fi
12406      # Try to locate tool using the code snippet
12407      for ac_prog in cygpath
12408do
12409  # Extract the first word of "$ac_prog", so it can be a program name with args.
12410set dummy $ac_prog; ac_word=$2
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12412$as_echo_n "checking for $ac_word... " >&6; }
12413if ${ac_cv_path_CYGPATH+:} false; then :
12414  $as_echo_n "(cached) " >&6
12415else
12416  case $CYGPATH in
12417  [\\/]* | ?:[\\/]*)
12418  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12419  ;;
12420  *)
12421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12422for as_dir in $PATH
12423do
12424  IFS=$as_save_IFS
12425  test -z "$as_dir" && as_dir=.
12426    for ac_exec_ext in '' $ac_executable_extensions; do
12427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12428    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12430    break 2
12431  fi
12432done
12433  done
12434IFS=$as_save_IFS
12435
12436  ;;
12437esac
12438fi
12439CYGPATH=$ac_cv_path_CYGPATH
12440if test -n "$CYGPATH"; then
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12442$as_echo "$CYGPATH" >&6; }
12443else
12444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
12446fi
12447
12448
12449  test -n "$CYGPATH" && break
12450done
12451
12452    else
12453      # If it succeeded, then it was overridden by the user. We will use it
12454      # for the tool.
12455
12456      # First remove it from the list of overridden variables, so we can test
12457      # for unknown variables in the end.
12458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12459
12460      # Check if the provided tool contains a complete path.
12461      tool_specified="$CYGPATH"
12462      tool_basename="${tool_specified##*/}"
12463      if test "x$tool_basename" = "x$tool_specified"; then
12464        # A command without a complete path is provided, search $PATH.
12465        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12466$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12467        # Extract the first word of "$tool_basename", so it can be a program name with args.
12468set dummy $tool_basename; ac_word=$2
12469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12470$as_echo_n "checking for $ac_word... " >&6; }
12471if ${ac_cv_path_CYGPATH+:} false; then :
12472  $as_echo_n "(cached) " >&6
12473else
12474  case $CYGPATH in
12475  [\\/]* | ?:[\\/]*)
12476  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12477  ;;
12478  *)
12479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12480for as_dir in $PATH
12481do
12482  IFS=$as_save_IFS
12483  test -z "$as_dir" && as_dir=.
12484    for ac_exec_ext in '' $ac_executable_extensions; do
12485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12486    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12488    break 2
12489  fi
12490done
12491  done
12492IFS=$as_save_IFS
12493
12494  ;;
12495esac
12496fi
12497CYGPATH=$ac_cv_path_CYGPATH
12498if test -n "$CYGPATH"; then
12499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12500$as_echo "$CYGPATH" >&6; }
12501else
12502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12503$as_echo "no" >&6; }
12504fi
12505
12506
12507        if test "x$CYGPATH" = x; then
12508          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12509        fi
12510      else
12511        # Otherwise we believe it is a complete path. Use it as it is.
12512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12513$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12515$as_echo_n "checking for CYGPATH... " >&6; }
12516        if test ! -x "$tool_specified"; then
12517          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12518$as_echo "not found" >&6; }
12519          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12520        fi
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12522$as_echo "$tool_specified" >&6; }
12523      fi
12524    fi
12525  fi
12526
12527
12528
12529
12530  # Publish this variable in the help.
12531
12532
12533  if test "x$READLINK" = x; then
12534    # The variable is not set by user, try to locate tool using the code snippet
12535    for ac_prog in greadlink readlink
12536do
12537  # Extract the first word of "$ac_prog", so it can be a program name with args.
12538set dummy $ac_prog; ac_word=$2
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12540$as_echo_n "checking for $ac_word... " >&6; }
12541if ${ac_cv_path_READLINK+:} false; then :
12542  $as_echo_n "(cached) " >&6
12543else
12544  case $READLINK in
12545  [\\/]* | ?:[\\/]*)
12546  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12547  ;;
12548  *)
12549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12550for as_dir in $PATH
12551do
12552  IFS=$as_save_IFS
12553  test -z "$as_dir" && as_dir=.
12554    for ac_exec_ext in '' $ac_executable_extensions; do
12555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12556    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12558    break 2
12559  fi
12560done
12561  done
12562IFS=$as_save_IFS
12563
12564  ;;
12565esac
12566fi
12567READLINK=$ac_cv_path_READLINK
12568if test -n "$READLINK"; then
12569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12570$as_echo "$READLINK" >&6; }
12571else
12572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12573$as_echo "no" >&6; }
12574fi
12575
12576
12577  test -n "$READLINK" && break
12578done
12579
12580  else
12581    # The variable is set, but is it from the command line or the environment?
12582
12583    # Try to remove the string !READLINK! from our list.
12584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12586      # If it failed, the variable was not from the command line. Ignore it,
12587      # but warn the user (except for BASH, which is always set by the calling BASH).
12588      if test "xREADLINK" != xBASH; then
12589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12590$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12591      fi
12592      # Try to locate tool using the code snippet
12593      for ac_prog in greadlink readlink
12594do
12595  # Extract the first word of "$ac_prog", so it can be a program name with args.
12596set dummy $ac_prog; ac_word=$2
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12598$as_echo_n "checking for $ac_word... " >&6; }
12599if ${ac_cv_path_READLINK+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  case $READLINK in
12603  [\\/]* | ?:[\\/]*)
12604  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12605  ;;
12606  *)
12607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622  ;;
12623esac
12624fi
12625READLINK=$ac_cv_path_READLINK
12626if test -n "$READLINK"; then
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12628$as_echo "$READLINK" >&6; }
12629else
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632fi
12633
12634
12635  test -n "$READLINK" && break
12636done
12637
12638    else
12639      # If it succeeded, then it was overridden by the user. We will use it
12640      # for the tool.
12641
12642      # First remove it from the list of overridden variables, so we can test
12643      # for unknown variables in the end.
12644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12645
12646      # Check if the provided tool contains a complete path.
12647      tool_specified="$READLINK"
12648      tool_basename="${tool_specified##*/}"
12649      if test "x$tool_basename" = "x$tool_specified"; then
12650        # A command without a complete path is provided, search $PATH.
12651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12652$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12653        # Extract the first word of "$tool_basename", so it can be a program name with args.
12654set dummy $tool_basename; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_READLINK+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $READLINK in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683READLINK=$ac_cv_path_READLINK
12684if test -n "$READLINK"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12686$as_echo "$READLINK" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693        if test "x$READLINK" = x; then
12694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12695        fi
12696      else
12697        # Otherwise we believe it is a complete path. Use it as it is.
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12699$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12701$as_echo_n "checking for READLINK... " >&6; }
12702        if test ! -x "$tool_specified"; then
12703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12704$as_echo "not found" >&6; }
12705          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12706        fi
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12708$as_echo "$tool_specified" >&6; }
12709      fi
12710    fi
12711  fi
12712
12713
12714
12715
12716  # Publish this variable in the help.
12717
12718
12719  if test "x$DF" = x; then
12720    # The variable is not set by user, try to locate tool using the code snippet
12721    for ac_prog in df
12722do
12723  # Extract the first word of "$ac_prog", so it can be a program name with args.
12724set dummy $ac_prog; ac_word=$2
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12726$as_echo_n "checking for $ac_word... " >&6; }
12727if ${ac_cv_path_DF+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  case $DF in
12731  [\\/]* | ?:[\\/]*)
12732  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12733  ;;
12734  *)
12735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750  ;;
12751esac
12752fi
12753DF=$ac_cv_path_DF
12754if test -n "$DF"; then
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12756$as_echo "$DF" >&6; }
12757else
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760fi
12761
12762
12763  test -n "$DF" && break
12764done
12765
12766  else
12767    # The variable is set, but is it from the command line or the environment?
12768
12769    # Try to remove the string !DF! from our list.
12770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12772      # If it failed, the variable was not from the command line. Ignore it,
12773      # but warn the user (except for BASH, which is always set by the calling BASH).
12774      if test "xDF" != xBASH; then
12775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12776$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12777      fi
12778      # Try to locate tool using the code snippet
12779      for ac_prog in df
12780do
12781  # Extract the first word of "$ac_prog", so it can be a program name with args.
12782set dummy $ac_prog; ac_word=$2
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12784$as_echo_n "checking for $ac_word... " >&6; }
12785if ${ac_cv_path_DF+:} false; then :
12786  $as_echo_n "(cached) " >&6
12787else
12788  case $DF in
12789  [\\/]* | ?:[\\/]*)
12790  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12791  ;;
12792  *)
12793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12794for as_dir in $PATH
12795do
12796  IFS=$as_save_IFS
12797  test -z "$as_dir" && as_dir=.
12798    for ac_exec_ext in '' $ac_executable_extensions; do
12799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12800    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12802    break 2
12803  fi
12804done
12805  done
12806IFS=$as_save_IFS
12807
12808  ;;
12809esac
12810fi
12811DF=$ac_cv_path_DF
12812if test -n "$DF"; then
12813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12814$as_echo "$DF" >&6; }
12815else
12816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12817$as_echo "no" >&6; }
12818fi
12819
12820
12821  test -n "$DF" && break
12822done
12823
12824    else
12825      # If it succeeded, then it was overridden by the user. We will use it
12826      # for the tool.
12827
12828      # First remove it from the list of overridden variables, so we can test
12829      # for unknown variables in the end.
12830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12831
12832      # Check if the provided tool contains a complete path.
12833      tool_specified="$DF"
12834      tool_basename="${tool_specified##*/}"
12835      if test "x$tool_basename" = "x$tool_specified"; then
12836        # A command without a complete path is provided, search $PATH.
12837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12838$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12839        # Extract the first word of "$tool_basename", so it can be a program name with args.
12840set dummy $tool_basename; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_DF+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $DF in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869DF=$ac_cv_path_DF
12870if test -n "$DF"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12872$as_echo "$DF" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879        if test "x$DF" = x; then
12880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881        fi
12882      else
12883        # Otherwise we believe it is a complete path. Use it as it is.
12884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12885$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12887$as_echo_n "checking for DF... " >&6; }
12888        if test ! -x "$tool_specified"; then
12889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890$as_echo "not found" >&6; }
12891          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12892        fi
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894$as_echo "$tool_specified" >&6; }
12895      fi
12896    fi
12897  fi
12898
12899
12900
12901
12902  # Publish this variable in the help.
12903
12904
12905  if test "x$SETFILE" = x; then
12906    # The variable is not set by user, try to locate tool using the code snippet
12907    for ac_prog in SetFile
12908do
12909  # Extract the first word of "$ac_prog", so it can be a program name with args.
12910set dummy $ac_prog; ac_word=$2
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12912$as_echo_n "checking for $ac_word... " >&6; }
12913if ${ac_cv_path_SETFILE+:} false; then :
12914  $as_echo_n "(cached) " >&6
12915else
12916  case $SETFILE in
12917  [\\/]* | ?:[\\/]*)
12918  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12919  ;;
12920  *)
12921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12922for as_dir in $PATH
12923do
12924  IFS=$as_save_IFS
12925  test -z "$as_dir" && as_dir=.
12926    for ac_exec_ext in '' $ac_executable_extensions; do
12927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12928    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12930    break 2
12931  fi
12932done
12933  done
12934IFS=$as_save_IFS
12935
12936  ;;
12937esac
12938fi
12939SETFILE=$ac_cv_path_SETFILE
12940if test -n "$SETFILE"; then
12941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
12942$as_echo "$SETFILE" >&6; }
12943else
12944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945$as_echo "no" >&6; }
12946fi
12947
12948
12949  test -n "$SETFILE" && break
12950done
12951
12952  else
12953    # The variable is set, but is it from the command line or the environment?
12954
12955    # Try to remove the string !SETFILE! from our list.
12956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
12957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12958      # If it failed, the variable was not from the command line. Ignore it,
12959      # but warn the user (except for BASH, which is always set by the calling BASH).
12960      if test "xSETFILE" != xBASH; then
12961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
12962$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
12963      fi
12964      # Try to locate tool using the code snippet
12965      for ac_prog in SetFile
12966do
12967  # Extract the first word of "$ac_prog", so it can be a program name with args.
12968set dummy $ac_prog; ac_word=$2
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12970$as_echo_n "checking for $ac_word... " >&6; }
12971if ${ac_cv_path_SETFILE+:} false; then :
12972  $as_echo_n "(cached) " >&6
12973else
12974  case $SETFILE in
12975  [\\/]* | ?:[\\/]*)
12976  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12977  ;;
12978  *)
12979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH
12981do
12982  IFS=$as_save_IFS
12983  test -z "$as_dir" && as_dir=.
12984    for ac_exec_ext in '' $ac_executable_extensions; do
12985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12986    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12988    break 2
12989  fi
12990done
12991  done
12992IFS=$as_save_IFS
12993
12994  ;;
12995esac
12996fi
12997SETFILE=$ac_cv_path_SETFILE
12998if test -n "$SETFILE"; then
12999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13000$as_echo "$SETFILE" >&6; }
13001else
13002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13003$as_echo "no" >&6; }
13004fi
13005
13006
13007  test -n "$SETFILE" && break
13008done
13009
13010    else
13011      # If it succeeded, then it was overridden by the user. We will use it
13012      # for the tool.
13013
13014      # First remove it from the list of overridden variables, so we can test
13015      # for unknown variables in the end.
13016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13017
13018      # Check if the provided tool contains a complete path.
13019      tool_specified="$SETFILE"
13020      tool_basename="${tool_specified##*/}"
13021      if test "x$tool_basename" = "x$tool_specified"; then
13022        # A command without a complete path is provided, search $PATH.
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13024$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13025        # Extract the first word of "$tool_basename", so it can be a program name with args.
13026set dummy $tool_basename; ac_word=$2
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13028$as_echo_n "checking for $ac_word... " >&6; }
13029if ${ac_cv_path_SETFILE+:} false; then :
13030  $as_echo_n "(cached) " >&6
13031else
13032  case $SETFILE in
13033  [\\/]* | ?:[\\/]*)
13034  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13035  ;;
13036  *)
13037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13038for as_dir in $PATH
13039do
13040  IFS=$as_save_IFS
13041  test -z "$as_dir" && as_dir=.
13042    for ac_exec_ext in '' $ac_executable_extensions; do
13043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13044    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13046    break 2
13047  fi
13048done
13049  done
13050IFS=$as_save_IFS
13051
13052  ;;
13053esac
13054fi
13055SETFILE=$ac_cv_path_SETFILE
13056if test -n "$SETFILE"; then
13057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13058$as_echo "$SETFILE" >&6; }
13059else
13060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13061$as_echo "no" >&6; }
13062fi
13063
13064
13065        if test "x$SETFILE" = x; then
13066          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13067        fi
13068      else
13069        # Otherwise we believe it is a complete path. Use it as it is.
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13071$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13073$as_echo_n "checking for SETFILE... " >&6; }
13074        if test ! -x "$tool_specified"; then
13075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13076$as_echo "not found" >&6; }
13077          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13078        fi
13079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13080$as_echo "$tool_specified" >&6; }
13081      fi
13082    fi
13083  fi
13084
13085
13086
13087
13088# Now we can determine OpenJDK build and target platforms. This is required to
13089# have early on.
13090# Make sure we can run config.sub.
13091$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13092  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13093
13094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13095$as_echo_n "checking build system type... " >&6; }
13096if ${ac_cv_build+:} false; then :
13097  $as_echo_n "(cached) " >&6
13098else
13099  ac_build_alias=$build_alias
13100test "x$ac_build_alias" = x &&
13101  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13102test "x$ac_build_alias" = x &&
13103  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13104ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13105  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13106
13107fi
13108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13109$as_echo "$ac_cv_build" >&6; }
13110case $ac_cv_build in
13111*-*-*) ;;
13112*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13113esac
13114build=$ac_cv_build
13115ac_save_IFS=$IFS; IFS='-'
13116set x $ac_cv_build
13117shift
13118build_cpu=$1
13119build_vendor=$2
13120shift; shift
13121# Remember, the first character of IFS is used to create $*,
13122# except with old shells:
13123build_os=$*
13124IFS=$ac_save_IFS
13125case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13126
13127
13128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13129$as_echo_n "checking host system type... " >&6; }
13130if ${ac_cv_host+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  if test "x$host_alias" = x; then
13134  ac_cv_host=$ac_cv_build
13135else
13136  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13137    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13138fi
13139
13140fi
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13142$as_echo "$ac_cv_host" >&6; }
13143case $ac_cv_host in
13144*-*-*) ;;
13145*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13146esac
13147host=$ac_cv_host
13148ac_save_IFS=$IFS; IFS='-'
13149set x $ac_cv_host
13150shift
13151host_cpu=$1
13152host_vendor=$2
13153shift; shift
13154# Remember, the first character of IFS is used to create $*,
13155# except with old shells:
13156host_os=$*
13157IFS=$ac_save_IFS
13158case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13159
13160
13161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13162$as_echo_n "checking target system type... " >&6; }
13163if ${ac_cv_target+:} false; then :
13164  $as_echo_n "(cached) " >&6
13165else
13166  if test "x$target_alias" = x; then
13167  ac_cv_target=$ac_cv_host
13168else
13169  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13170    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13171fi
13172
13173fi
13174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13175$as_echo "$ac_cv_target" >&6; }
13176case $ac_cv_target in
13177*-*-*) ;;
13178*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13179esac
13180target=$ac_cv_target
13181ac_save_IFS=$IFS; IFS='-'
13182set x $ac_cv_target
13183shift
13184target_cpu=$1
13185target_vendor=$2
13186shift; shift
13187# Remember, the first character of IFS is used to create $*,
13188# except with old shells:
13189target_os=$*
13190IFS=$ac_save_IFS
13191case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13192
13193
13194# The aliases save the names the user supplied, while $host etc.
13195# will get canonicalized.
13196test -n "$target_alias" &&
13197  test "$program_prefix$program_suffix$program_transform_name" = \
13198    NONENONEs,x,x, &&
13199  program_prefix=${target_alias}-
13200
13201  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13202  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13203  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13204  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13205  # to use the configure naming style.
13206
13207
13208
13209
13210
13211  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13212  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13213  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13214  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13215  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13216  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13217
13218
13219
13220  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13221
13222  case "$build_os" in
13223    *linux*)
13224      VAR_OS=linux
13225      VAR_OS_API=posix
13226      VAR_OS_ENV=linux
13227      ;;
13228    *solaris*)
13229      VAR_OS=solaris
13230      VAR_OS_API=posix
13231      VAR_OS_ENV=solaris
13232      ;;
13233    *darwin*)
13234      VAR_OS=macosx
13235      VAR_OS_API=posix
13236      VAR_OS_ENV=macosx
13237      ;;
13238    *bsd*)
13239      VAR_OS=bsd
13240      VAR_OS_API=posix
13241      VAR_OS_ENV=bsd
13242      ;;
13243    *cygwin*)
13244      VAR_OS=windows
13245      VAR_OS_API=winapi
13246      VAR_OS_ENV=windows.cygwin
13247      ;;
13248    *mingw*)
13249      VAR_OS=windows
13250      VAR_OS_API=winapi
13251      VAR_OS_ENV=windows.msys
13252      ;;
13253    *aix*)
13254      VAR_OS=aix
13255      VAR_OS_API=posix
13256      VAR_OS_ENV=aix
13257      ;;
13258    *)
13259      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13260      ;;
13261  esac
13262
13263
13264  # First argument is the cpu name from the trip/quad
13265  case "$build_cpu" in
13266    x86_64)
13267      VAR_CPU=x86_64
13268      VAR_CPU_ARCH=x86
13269      VAR_CPU_BITS=64
13270      VAR_CPU_ENDIAN=little
13271      ;;
13272    i?86)
13273      VAR_CPU=x86
13274      VAR_CPU_ARCH=x86
13275      VAR_CPU_BITS=32
13276      VAR_CPU_ENDIAN=little
13277      ;;
13278    arm*)
13279      VAR_CPU=arm
13280      VAR_CPU_ARCH=arm
13281      VAR_CPU_BITS=32
13282      VAR_CPU_ENDIAN=little
13283      ;;
13284    powerpc)
13285      VAR_CPU=ppc
13286      VAR_CPU_ARCH=ppc
13287      VAR_CPU_BITS=32
13288      VAR_CPU_ENDIAN=big
13289      ;;
13290    powerpc64)
13291      VAR_CPU=ppc64
13292      VAR_CPU_ARCH=ppc
13293      VAR_CPU_BITS=64
13294      VAR_CPU_ENDIAN=big
13295      ;;
13296    s390)
13297      VAR_CPU=s390
13298      VAR_CPU_ARCH=s390
13299      VAR_CPU_BITS=32
13300      VAR_CPU_ENDIAN=big
13301      ;;
13302    s390x)
13303      VAR_CPU=s390x
13304      VAR_CPU_ARCH=s390
13305      VAR_CPU_BITS=64
13306      VAR_CPU_ENDIAN=big
13307      ;;
13308    sparc)
13309      VAR_CPU=sparc
13310      VAR_CPU_ARCH=sparc
13311      VAR_CPU_BITS=32
13312      VAR_CPU_ENDIAN=big
13313      ;;
13314    sparcv9)
13315      VAR_CPU=sparcv9
13316      VAR_CPU_ARCH=sparc
13317      VAR_CPU_BITS=64
13318      VAR_CPU_ENDIAN=big
13319      ;;
13320    *)
13321      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13322      ;;
13323  esac
13324
13325  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13326  OPENJDK_BUILD_OS="$VAR_OS"
13327  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13328  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13329  OPENJDK_BUILD_CPU="$VAR_CPU"
13330  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13331  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13332  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13333
13334
13335
13336
13337
13338
13339
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13341$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13343$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13344
13345  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13346
13347  case "$host_os" in
13348    *linux*)
13349      VAR_OS=linux
13350      VAR_OS_API=posix
13351      VAR_OS_ENV=linux
13352      ;;
13353    *solaris*)
13354      VAR_OS=solaris
13355      VAR_OS_API=posix
13356      VAR_OS_ENV=solaris
13357      ;;
13358    *darwin*)
13359      VAR_OS=macosx
13360      VAR_OS_API=posix
13361      VAR_OS_ENV=macosx
13362      ;;
13363    *bsd*)
13364      VAR_OS=bsd
13365      VAR_OS_API=posix
13366      VAR_OS_ENV=bsd
13367      ;;
13368    *cygwin*)
13369      VAR_OS=windows
13370      VAR_OS_API=winapi
13371      VAR_OS_ENV=windows.cygwin
13372      ;;
13373    *mingw*)
13374      VAR_OS=windows
13375      VAR_OS_API=winapi
13376      VAR_OS_ENV=windows.msys
13377      ;;
13378    *aix*)
13379      VAR_OS=aix
13380      VAR_OS_API=posix
13381      VAR_OS_ENV=aix
13382      ;;
13383    *)
13384      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13385      ;;
13386  esac
13387
13388
13389  # First argument is the cpu name from the trip/quad
13390  case "$host_cpu" in
13391    x86_64)
13392      VAR_CPU=x86_64
13393      VAR_CPU_ARCH=x86
13394      VAR_CPU_BITS=64
13395      VAR_CPU_ENDIAN=little
13396      ;;
13397    i?86)
13398      VAR_CPU=x86
13399      VAR_CPU_ARCH=x86
13400      VAR_CPU_BITS=32
13401      VAR_CPU_ENDIAN=little
13402      ;;
13403    arm*)
13404      VAR_CPU=arm
13405      VAR_CPU_ARCH=arm
13406      VAR_CPU_BITS=32
13407      VAR_CPU_ENDIAN=little
13408      ;;
13409    powerpc)
13410      VAR_CPU=ppc
13411      VAR_CPU_ARCH=ppc
13412      VAR_CPU_BITS=32
13413      VAR_CPU_ENDIAN=big
13414      ;;
13415    powerpc64)
13416      VAR_CPU=ppc64
13417      VAR_CPU_ARCH=ppc
13418      VAR_CPU_BITS=64
13419      VAR_CPU_ENDIAN=big
13420      ;;
13421    s390)
13422      VAR_CPU=s390
13423      VAR_CPU_ARCH=s390
13424      VAR_CPU_BITS=32
13425      VAR_CPU_ENDIAN=big
13426      ;;
13427    s390x)
13428      VAR_CPU=s390x
13429      VAR_CPU_ARCH=s390
13430      VAR_CPU_BITS=64
13431      VAR_CPU_ENDIAN=big
13432      ;;
13433    sparc)
13434      VAR_CPU=sparc
13435      VAR_CPU_ARCH=sparc
13436      VAR_CPU_BITS=32
13437      VAR_CPU_ENDIAN=big
13438      ;;
13439    sparcv9)
13440      VAR_CPU=sparcv9
13441      VAR_CPU_ARCH=sparc
13442      VAR_CPU_BITS=64
13443      VAR_CPU_ENDIAN=big
13444      ;;
13445    *)
13446      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13447      ;;
13448  esac
13449
13450  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13451  OPENJDK_TARGET_OS="$VAR_OS"
13452  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13453  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13454  OPENJDK_TARGET_CPU="$VAR_CPU"
13455  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13456  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13457  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13458
13459
13460
13461
13462
13463
13464
13465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13466$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13468$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13469
13470
13471
13472# Check whether --with-target-bits was given.
13473if test "${with_target_bits+set}" = set; then :
13474  withval=$with_target_bits;
13475fi
13476
13477
13478  # We have three types of compiles:
13479  # native  == normal compilation, target system == build system
13480  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13481  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13482  #
13483  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13484    # We're doing a proper cross-compilation
13485    COMPILE_TYPE="cross"
13486  else
13487    COMPILE_TYPE="native"
13488  fi
13489
13490  if test "x$with_target_bits" != x; then
13491    if test "x$COMPILE_TYPE" = "xcross"; then
13492      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13493    fi
13494
13495    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13496      # A reduced build is requested
13497      COMPILE_TYPE="reduced"
13498      OPENJDK_TARGET_CPU_BITS=32
13499      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13500        OPENJDK_TARGET_CPU=x86
13501      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13502        OPENJDK_TARGET_CPU=sparc
13503      else
13504        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13505      fi
13506    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13507      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
13508    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13509      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13510$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13511    else
13512      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13513    fi
13514  fi
13515
13516
13517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13518$as_echo_n "checking compilation type... " >&6; }
13519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13520$as_echo "$COMPILE_TYPE" >&6; }
13521
13522
13523  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13524    REQUIRED_OS_NAME=SunOS
13525    REQUIRED_OS_VERSION=5.10
13526  fi
13527  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13528    REQUIRED_OS_NAME=Linux
13529    REQUIRED_OS_VERSION=2.6
13530  fi
13531  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13532    REQUIRED_OS_NAME=Windows
13533    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13534      REQUIRED_OS_VERSION=5.2
13535    else
13536      REQUIRED_OS_VERSION=5.1
13537    fi
13538  fi
13539  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13540    REQUIRED_OS_NAME=Darwin
13541    REQUIRED_OS_VERSION=11.2
13542  fi
13543
13544
13545
13546
13547
13548  # Also store the legacy naming of the cpu.
13549  # Ie i586 and amd64 instead of x86 and x86_64
13550  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13551  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13552    OPENJDK_TARGET_CPU_LEGACY="i586"
13553  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13554    # On all platforms except MacOSX replace x86_64 with amd64.
13555    OPENJDK_TARGET_CPU_LEGACY="amd64"
13556  fi
13557
13558
13559  # And the second legacy naming of the cpu.
13560  # Ie i386 and amd64 instead of x86 and x86_64.
13561  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13562  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13563    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13564  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13565    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13566  fi
13567
13568
13569  # This is the name of the cpu (but using i386 and amd64 instead of
13570  # x86 and x86_64, respectively), preceeded by a /, to be used when
13571  # locating libraries. On macosx, it's empty, though.
13572  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13573  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13574    OPENJDK_TARGET_CPU_LIBDIR=""
13575  fi
13576
13577
13578  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13579  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13580  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13581  OPENJDK_TARGET_CPU_ISADIR=""
13582  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13583    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13584      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13585    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13586      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13587    fi
13588  fi
13589
13590
13591  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13592  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13593  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13594    # On linux only, we replace x86 with i386.
13595    OPENJDK_TARGET_CPU_OSARCH="i386"
13596  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13597    # On all platforms except macosx, we replace x86_64 with amd64.
13598    OPENJDK_TARGET_CPU_OSARCH="amd64"
13599  fi
13600
13601
13602  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13603  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13604    OPENJDK_TARGET_CPU_JLI="i386"
13605  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13606    # On all platforms except macosx, we replace x86_64 with amd64.
13607    OPENJDK_TARGET_CPU_JLI="amd64"
13608  fi
13609  # Now setup the -D flags for building libjli.
13610  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13611  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13612    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13613      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13614    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13615      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13616    fi
13617  fi
13618
13619
13620  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13621  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13622    OPENJDK_TARGET_OS_API_DIR="solaris"
13623  fi
13624  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13625    OPENJDK_TARGET_OS_API_DIR="windows"
13626  fi
13627
13628
13629  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13630      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13631  else
13632      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13633  fi
13634
13635
13636  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13637    A_LP64="LP64:="
13638    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13639    # unpack200.exe
13640    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13641      ADD_LP64="-D_LP64=1"
13642    fi
13643  fi
13644  LP64=$A_LP64
13645
13646
13647  if test "x$COMPILE_TYPE" = "xcross"; then
13648    # FIXME: ... or should this include reduced builds..?
13649    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13650  else
13651    DEFINE_CROSS_COMPILE_ARCH=""
13652  fi
13653
13654
13655  # ZERO_ARCHDEF is used to enable architecture-specific code
13656  case "${OPENJDK_TARGET_CPU}" in
13657    ppc*)    ZERO_ARCHDEF=PPC   ;;
13658    s390*)   ZERO_ARCHDEF=S390  ;;
13659    sparc*)  ZERO_ARCHDEF=SPARC ;;
13660    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13661    x86)     ZERO_ARCHDEF=IA32  ;;
13662    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13663  esac
13664
13665
13666
13667
13668# Continue setting up basic stuff. Most remaining code require fundamental tools.
13669
13670  # Locate the directory of this script.
13671  SCRIPT="$0"
13672  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13673
13674  # Where is the source? It is located two levels above the configure script.
13675  CURDIR="$PWD"
13676  cd "$AUTOCONF_DIR/../.."
13677  SRC_ROOT="`$THEPWDCMD -L`"
13678
13679  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13680    PATH_SEP=";"
13681
13682  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13683  if test $SRC_ROOT_LENGTH -gt 100; then
13684    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13685  fi
13686
13687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13689$as_echo_n "checking cygwin release... " >&6; }
13690    CYGWIN_VERSION=`$UNAME -r`
13691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13692$as_echo "$CYGWIN_VERSION" >&6; }
13693    WINDOWS_ENV_VENDOR='cygwin'
13694    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13695
13696    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13697    if test "x$CYGWIN_VERSION_OK" = x; then
13698      { $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
13699$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;}
13700      as_fn_error $? "Cannot continue" "$LINENO" 5
13701    fi
13702    if test "x$CYGPATH" = x; then
13703      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13704    fi
13705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13706$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13707    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13708    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13709    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13710    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13712$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13713    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13714    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13715    if test "x$test_cygdrive_prefix" = x; then
13716      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13717    fi
13718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13720$as_echo_n "checking msys release... " >&6; }
13721    MSYS_VERSION=`$UNAME -r`
13722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13723$as_echo "$MSYS_VERSION" >&6; }
13724
13725    WINDOWS_ENV_VENDOR='msys'
13726    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13727
13728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13729$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13730    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13731    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13732
13733  windows_path="$MSYS_ROOT_PATH"
13734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13735    unix_path=`$CYGPATH -u "$windows_path"`
13736    MSYS_ROOT_PATH="$unix_path"
13737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13739    MSYS_ROOT_PATH="$unix_path"
13740  fi
13741
13742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13743$as_echo "$MSYS_ROOT_PATH" >&6; }
13744    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13745  else
13746    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13747  fi
13748
13749  # Test if windows or unix (cygwin/msys) find is first in path.
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13751$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13752  FIND_BINARY_OUTPUT=`find --version 2>&1`
13753  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13755$as_echo "unix style" >&6; }
13756  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13758$as_echo "Windows" >&6; }
13759    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13760$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13761    { $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
13762$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13763    as_fn_error $? "Cannot continue" "$LINENO" 5
13764  else
13765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13766$as_echo "unknown" >&6; }
13767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13768$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13769  fi
13770
13771  else
13772    PATH_SEP=":"
13773  fi
13774
13775
13776
13777  cd "$CURDIR"
13778
13779
13780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13781
13782  # Input might be given as Windows format, start by converting to
13783  # unix format.
13784  path="$SRC_ROOT"
13785  new_path=`$CYGPATH -u "$path"`
13786
13787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13790  # "foo.exe" is OK but "foo" is an error.
13791  #
13792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13793  # It is also a way to make sure we got the proper file name for the real test later on.
13794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13795  if test "x$test_shortpath" = x; then
13796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13797$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13798    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13799  fi
13800
13801  # Call helper function which possibly converts this using DOS-style short mode.
13802  # If so, the updated path is stored in $new_path.
13803
13804  input_path="$new_path"
13805  # Check if we need to convert this using DOS-style short mode. If the path
13806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13807  # take no chances and rewrite it.
13808  # Note: m4 eats our [], so we need to use [ and ] instead.
13809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13810  if test "x$has_forbidden_chars" != x; then
13811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13815      # Going to short mode and back again did indeed matter. Since short mode is
13816      # case insensitive, let's make it lowercase to improve readability.
13817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13818      # Now convert it back to Unix-stile (cygpath)
13819      input_path=`$CYGPATH -u "$shortmode_path"`
13820      new_path="$input_path"
13821    fi
13822  fi
13823
13824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13825  if test "x$test_cygdrive_prefix" = x; then
13826    # As a simple fix, exclude /usr/bin since it's not a real path.
13827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13829      # a path prefixed by /cygdrive for fixpath to work.
13830      new_path="$CYGWIN_ROOT_PATH$input_path"
13831    fi
13832  fi
13833
13834
13835  if test "x$path" != "x$new_path"; then
13836    SRC_ROOT="$new_path"
13837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13838$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13839  fi
13840
13841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13842
13843  path="$SRC_ROOT"
13844  has_colon=`$ECHO $path | $GREP ^.:`
13845  new_path="$path"
13846  if test "x$has_colon" = x; then
13847    # Not in mixed or Windows style, start by that.
13848    new_path=`cmd //c echo $path`
13849  fi
13850
13851
13852  input_path="$new_path"
13853  # Check if we need to convert this using DOS-style short mode. If the path
13854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13855  # take no chances and rewrite it.
13856  # Note: m4 eats our [], so we need to use [ and ] instead.
13857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13858  if test "x$has_forbidden_chars" != x; then
13859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13861  fi
13862
13863
13864  windows_path="$new_path"
13865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13866    unix_path=`$CYGPATH -u "$windows_path"`
13867    new_path="$unix_path"
13868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13870    new_path="$unix_path"
13871  fi
13872
13873  if test "x$path" != "x$new_path"; then
13874    SRC_ROOT="$new_path"
13875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13876$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13877  fi
13878
13879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13881
13882  else
13883    # We're on a posix platform. Hooray! :)
13884    path="$SRC_ROOT"
13885    has_space=`$ECHO "$path" | $GREP " "`
13886    if test "x$has_space" != x; then
13887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13888$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13890    fi
13891
13892    # Use eval to expand a potential ~
13893    eval path="$path"
13894    if test ! -f "$path" && test ! -d "$path"; then
13895      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
13896    fi
13897
13898    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
13899  fi
13900
13901
13902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13903
13904  # Input might be given as Windows format, start by converting to
13905  # unix format.
13906  path="$CURDIR"
13907  new_path=`$CYGPATH -u "$path"`
13908
13909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13912  # "foo.exe" is OK but "foo" is an error.
13913  #
13914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13915  # It is also a way to make sure we got the proper file name for the real test later on.
13916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13917  if test "x$test_shortpath" = x; then
13918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13919$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13920    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13921  fi
13922
13923  # Call helper function which possibly converts this using DOS-style short mode.
13924  # If so, the updated path is stored in $new_path.
13925
13926  input_path="$new_path"
13927  # Check if we need to convert this using DOS-style short mode. If the path
13928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13929  # take no chances and rewrite it.
13930  # Note: m4 eats our [], so we need to use [ and ] instead.
13931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13932  if test "x$has_forbidden_chars" != x; then
13933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13937      # Going to short mode and back again did indeed matter. Since short mode is
13938      # case insensitive, let's make it lowercase to improve readability.
13939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13940      # Now convert it back to Unix-stile (cygpath)
13941      input_path=`$CYGPATH -u "$shortmode_path"`
13942      new_path="$input_path"
13943    fi
13944  fi
13945
13946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13947  if test "x$test_cygdrive_prefix" = x; then
13948    # As a simple fix, exclude /usr/bin since it's not a real path.
13949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13951      # a path prefixed by /cygdrive for fixpath to work.
13952      new_path="$CYGWIN_ROOT_PATH$input_path"
13953    fi
13954  fi
13955
13956
13957  if test "x$path" != "x$new_path"; then
13958    CURDIR="$new_path"
13959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
13960$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
13961  fi
13962
13963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13964
13965  path="$CURDIR"
13966  has_colon=`$ECHO $path | $GREP ^.:`
13967  new_path="$path"
13968  if test "x$has_colon" = x; then
13969    # Not in mixed or Windows style, start by that.
13970    new_path=`cmd //c echo $path`
13971  fi
13972
13973
13974  input_path="$new_path"
13975  # Check if we need to convert this using DOS-style short mode. If the path
13976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13977  # take no chances and rewrite it.
13978  # Note: m4 eats our [], so we need to use [ and ] instead.
13979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13980  if test "x$has_forbidden_chars" != x; then
13981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13983  fi
13984
13985
13986  windows_path="$new_path"
13987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13988    unix_path=`$CYGPATH -u "$windows_path"`
13989    new_path="$unix_path"
13990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13992    new_path="$unix_path"
13993  fi
13994
13995  if test "x$path" != "x$new_path"; then
13996    CURDIR="$new_path"
13997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
13998$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
13999  fi
14000
14001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14003
14004  else
14005    # We're on a posix platform. Hooray! :)
14006    path="$CURDIR"
14007    has_space=`$ECHO "$path" | $GREP " "`
14008    if test "x$has_space" != x; then
14009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14010$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14011      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14012    fi
14013
14014    # Use eval to expand a potential ~
14015    eval path="$path"
14016    if test ! -f "$path" && test ! -d "$path"; then
14017      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14018    fi
14019
14020    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14021  fi
14022
14023
14024  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14025    # Add extra search paths on solaris for utilities like ar and as etc...
14026    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14027  fi
14028
14029  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14030  # is not correct.
14031
14032# Check whether --with-sys-root was given.
14033if test "${with_sys_root+set}" = set; then :
14034  withval=$with_sys_root;
14035fi
14036
14037
14038  if test "x$with_sys_root" != x; then
14039    SYS_ROOT=$with_sys_root
14040  else
14041    SYS_ROOT=/
14042  fi
14043
14044
14045
14046# Check whether --with-tools-dir was given.
14047if test "${with_tools_dir+set}" = set; then :
14048  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14049
14050fi
14051
14052
14053
14054# Check whether --with-devkit was given.
14055if test "${with_devkit+set}" = set; then :
14056  withval=$with_devkit;
14057        if test "x$with_sys_root" != x; then
14058          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14059        fi
14060
14061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14062
14063  # Input might be given as Windows format, start by converting to
14064  # unix format.
14065  path="$with_devkit"
14066  new_path=`$CYGPATH -u "$path"`
14067
14068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14071  # "foo.exe" is OK but "foo" is an error.
14072  #
14073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14074  # It is also a way to make sure we got the proper file name for the real test later on.
14075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14076  if test "x$test_shortpath" = x; then
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14078$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14079    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14080  fi
14081
14082  # Call helper function which possibly converts this using DOS-style short mode.
14083  # If so, the updated path is stored in $new_path.
14084
14085  input_path="$new_path"
14086  # Check if we need to convert this using DOS-style short mode. If the path
14087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14088  # take no chances and rewrite it.
14089  # Note: m4 eats our [], so we need to use [ and ] instead.
14090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14091  if test "x$has_forbidden_chars" != x; then
14092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14096      # Going to short mode and back again did indeed matter. Since short mode is
14097      # case insensitive, let's make it lowercase to improve readability.
14098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14099      # Now convert it back to Unix-stile (cygpath)
14100      input_path=`$CYGPATH -u "$shortmode_path"`
14101      new_path="$input_path"
14102    fi
14103  fi
14104
14105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14106  if test "x$test_cygdrive_prefix" = x; then
14107    # As a simple fix, exclude /usr/bin since it's not a real path.
14108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14110      # a path prefixed by /cygdrive for fixpath to work.
14111      new_path="$CYGWIN_ROOT_PATH$input_path"
14112    fi
14113  fi
14114
14115
14116  if test "x$path" != "x$new_path"; then
14117    with_devkit="$new_path"
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14119$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14120  fi
14121
14122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14123
14124  path="$with_devkit"
14125  has_colon=`$ECHO $path | $GREP ^.:`
14126  new_path="$path"
14127  if test "x$has_colon" = x; then
14128    # Not in mixed or Windows style, start by that.
14129    new_path=`cmd //c echo $path`
14130  fi
14131
14132
14133  input_path="$new_path"
14134  # Check if we need to convert this using DOS-style short mode. If the path
14135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14136  # take no chances and rewrite it.
14137  # Note: m4 eats our [], so we need to use [ and ] instead.
14138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14139  if test "x$has_forbidden_chars" != x; then
14140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142  fi
14143
14144
14145  windows_path="$new_path"
14146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14147    unix_path=`$CYGPATH -u "$windows_path"`
14148    new_path="$unix_path"
14149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14151    new_path="$unix_path"
14152  fi
14153
14154  if test "x$path" != "x$new_path"; then
14155    with_devkit="$new_path"
14156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14157$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14158  fi
14159
14160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14162
14163  else
14164    # We're on a posix platform. Hooray! :)
14165    path="$with_devkit"
14166    has_space=`$ECHO "$path" | $GREP " "`
14167    if test "x$has_space" != x; then
14168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14169$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14170      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14171    fi
14172
14173    # Use eval to expand a potential ~
14174    eval path="$path"
14175    if test ! -f "$path" && test ! -d "$path"; then
14176      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14177    fi
14178
14179    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14180  fi
14181
14182
14183  if test "x$TOOLS_DIR" = x; then
14184    TOOLS_DIR="$with_devkit/bin"
14185  else
14186    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14187  fi
14188
14189        if test -d "$with_devkit/$host_alias/libc"; then
14190          SYS_ROOT=$with_devkit/$host_alias/libc
14191        elif test -d "$with_devkit/$host/sys-root"; then
14192          SYS_ROOT=$with_devkit/$host/sys-root
14193        fi
14194
14195fi
14196
14197
14198
14199  # Setup default logging of stdout and stderr to build.log in the output root.
14200  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14201  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14202  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14203
14204
14205
14206
14207
14208# Check if it's a pure open build or if custom sources are to be used.
14209
14210  # Check whether --enable-openjdk-only was given.
14211if test "${enable_openjdk_only+set}" = set; then :
14212  enableval=$enable_openjdk_only;
14213else
14214  enable_openjdk_only="no"
14215fi
14216
14217
14218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14219$as_echo_n "checking for presence of closed sources... " >&6; }
14220  if test -d "$SRC_ROOT/jdk/src/closed"; then
14221    CLOSED_SOURCE_PRESENT=yes
14222  else
14223    CLOSED_SOURCE_PRESENT=no
14224  fi
14225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14226$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14227
14228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14229$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14230  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14232$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14233
14234  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14235    OPENJDK=true
14236    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14237      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14238$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14239    fi
14240  else
14241    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14242      OPENJDK=true
14243    else
14244      OPENJDK=false
14245    fi
14246  fi
14247
14248  if test "x$OPENJDK" = "xtrue"; then
14249    SET_OPENJDK="OPENJDK=true"
14250  fi
14251
14252
14253
14254
14255# These are needed to be able to create a configuration name (and thus the output directory)
14256
14257  ###############################################################################
14258  #
14259  # Check which variant of the JDK that we want to build.
14260  # Currently we have:
14261  #    normal:   standard edition
14262  # but the custom make system may add other variants
14263  #
14264  # Effectively the JDK variant gives a name to a specific set of
14265  # modules to compile into the JDK. In the future, these modules
14266  # might even be Jigsaw modules.
14267  #
14268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14269$as_echo_n "checking which variant of the JDK to build... " >&6; }
14270
14271# Check whether --with-jdk-variant was given.
14272if test "${with_jdk_variant+set}" = set; then :
14273  withval=$with_jdk_variant;
14274fi
14275
14276
14277  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14278    JDK_VARIANT="normal"
14279  else
14280    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14281  fi
14282
14283
14284
14285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14286$as_echo "$JDK_VARIANT" >&6; }
14287
14288
14289###############################################################################
14290#
14291# Check which interpreter of the JVM we want to build.
14292# Currently we have:
14293#    template: Template interpreter (the default)
14294#    cpp     : C++ interpreter
14295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14296$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14297
14298# Check whether --with-jvm-interpreter was given.
14299if test "${with_jvm_interpreter+set}" = set; then :
14300  withval=$with_jvm_interpreter;
14301fi
14302
14303
14304if test "x$with_jvm_interpreter" = x; then
14305     with_jvm_interpreter="template"
14306fi
14307
14308JVM_INTERPRETER="$with_jvm_interpreter"
14309
14310if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14311   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14312fi
14313
14314
14315
14316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14317$as_echo "$with_jvm_interpreter" >&6; }
14318
14319
14320
14321  ###############################################################################
14322  #
14323  # Check which variants of the JVM that we want to build.
14324  # Currently we have:
14325  #    server: normal interpreter and a tiered C1/C2 compiler
14326  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14327  #    minimal1: reduced form of client with optional VM services and features stripped out
14328  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14329  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14330  #    zero: no machine code interpreter, no compiler
14331  #    zeroshark: zero interpreter and shark/llvm compiler backend
14332#    core: interpreter only, no compiler (only works on some platforms)
14333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14334$as_echo_n "checking which variants of the JVM to build... " >&6; }
14335
14336# Check whether --with-jvm-variants was given.
14337if test "${with_jvm_variants+set}" = set; then :
14338  withval=$with_jvm_variants;
14339fi
14340
14341
14342  if test "x$with_jvm_variants" = x; then
14343    with_jvm_variants="server"
14344  fi
14345
14346  JVM_VARIANTS=",$with_jvm_variants,"
14347  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,//'`
14348
14349  if test "x$TEST_VARIANTS" != "x,"; then
14350     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14351  fi
14352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14353$as_echo "$with_jvm_variants" >&6; }
14354
14355  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14356  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14357  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14358  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14359  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14360  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14361  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14362
14363  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14364    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14365      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14366    fi
14367  fi
14368  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14369    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14370      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14371    fi
14372  fi
14373  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14374    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14375      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14376    fi
14377  fi
14378
14379  # Replace the commas with AND for use in the build directory name.
14380  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14381  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/'`
14382  if test "x$COUNT_VARIANTS" != "x,1"; then
14383    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14384  else
14385    BUILDING_MULTIPLE_JVM_VARIANTS=no
14386  fi
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397  INCLUDE_SA=true
14398  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14399    INCLUDE_SA=false
14400  fi
14401  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14402    INCLUDE_SA=false
14403  fi
14404  if test "x$VAR_CPU" = xppc64 ; then
14405    INCLUDE_SA=false
14406  fi
14407
14408
14409  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14410    MACOSX_UNIVERSAL="true"
14411  fi
14412
14413
14414
14415
14416  ###############################################################################
14417  #
14418  # Set the debug level
14419  #    release: no debug information, all optimizations, no asserts.
14420  #    fastdebug: debug information (-g), all optimizations, all asserts
14421  #    slowdebug: debug information (-g), no optimizations, all asserts
14422  #
14423  DEBUG_LEVEL="release"
14424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14425$as_echo_n "checking which debug level to use... " >&6; }
14426  # Check whether --enable-debug was given.
14427if test "${enable_debug+set}" = set; then :
14428  enableval=$enable_debug;
14429        ENABLE_DEBUG="${enableval}"
14430        DEBUG_LEVEL="fastdebug"
14431
14432else
14433  ENABLE_DEBUG="no"
14434fi
14435
14436
14437
14438# Check whether --with-debug-level was given.
14439if test "${with_debug_level+set}" = set; then :
14440  withval=$with_debug_level;
14441        DEBUG_LEVEL="${withval}"
14442        if test "x$ENABLE_DEBUG" = xyes; then
14443          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14444        fi
14445
14446fi
14447
14448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14449$as_echo "$DEBUG_LEVEL" >&6; }
14450
14451  if test "x$DEBUG_LEVEL" != xrelease && \
14452      test "x$DEBUG_LEVEL" != xfastdebug && \
14453      test "x$DEBUG_LEVEL" != xslowdebug; then
14454    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14455  fi
14456
14457
14458  ###############################################################################
14459  #
14460  # Setup legacy vars/targets and new vars to deal with different debug levels.
14461  #
14462
14463  case $DEBUG_LEVEL in
14464    release )
14465      VARIANT="OPT"
14466      FASTDEBUG="false"
14467      DEBUG_CLASSFILES="false"
14468      BUILD_VARIANT_RELEASE=""
14469      HOTSPOT_DEBUG_LEVEL="product"
14470      HOTSPOT_EXPORT="product"
14471      ;;
14472    fastdebug )
14473      VARIANT="DBG"
14474      FASTDEBUG="true"
14475      DEBUG_CLASSFILES="true"
14476      BUILD_VARIANT_RELEASE="-fastdebug"
14477      HOTSPOT_DEBUG_LEVEL="fastdebug"
14478      HOTSPOT_EXPORT="fastdebug"
14479      ;;
14480    slowdebug )
14481      VARIANT="DBG"
14482      FASTDEBUG="false"
14483      DEBUG_CLASSFILES="true"
14484      BUILD_VARIANT_RELEASE="-debug"
14485      HOTSPOT_DEBUG_LEVEL="jvmg"
14486      HOTSPOT_EXPORT="debug"
14487      ;;
14488  esac
14489
14490  #####
14491  # Generate the legacy makefile targets for hotspot.
14492  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14493  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14494  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14495  # But until then ...
14496  HOTSPOT_TARGET=""
14497
14498  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14499    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14500  fi
14501
14502  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14503    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14504  fi
14505
14506  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14507    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14508  fi
14509
14510  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14511    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14512  fi
14513
14514  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14515    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14516  fi
14517
14518  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14519    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14520  fi
14521
14522  if test "x$JVM_VARIANT_CORE" = xtrue; then
14523    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14524  fi
14525
14526  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14527
14528  # On Macosx universal binaries are produced, but they only contain
14529  # 64 bit intel. This invalidates control of which jvms are built
14530  # from configure, but only server is valid anyway. Fix this
14531  # when hotspot makefiles are rewritten.
14532  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14533    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14534  fi
14535
14536  #####
14537
14538
14539
14540
14541
14542
14543
14544
14545# With basic setup done, call the custom early hook.
14546
14547
14548# To properly create a configuration name, we need to have the OpenJDK target
14549# and options (variants and debug level) parsed.
14550
14551
14552
14553# Check whether --with-conf-name was given.
14554if test "${with_conf_name+set}" = set; then :
14555  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14556fi
14557
14558
14559  # Test from where we are running configure, in or outside of src root.
14560  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14561      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14562      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14563    # We are running configure from the src root.
14564    # Create a default ./build/target-variant-debuglevel output root.
14565    if test "x${CONF_NAME}" = x; then
14566      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14567    fi
14568    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14569    $MKDIR -p "$OUTPUT_ROOT"
14570    if test ! -d "$OUTPUT_ROOT"; then
14571      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14572    fi
14573  else
14574    # We are running configure from outside of the src dir.
14575    # Then use the current directory as output dir!
14576    # If configuration is situated in normal build directory, just use the build
14577    # directory name as configuration name, otherwise use the complete path.
14578    if test "x${CONF_NAME}" = x; then
14579      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14580    fi
14581    OUTPUT_ROOT="$CURDIR"
14582
14583    # WARNING: This might be a bad thing to do. You need to be sure you want to
14584    # have a configuration in this directory. Do some sanity checks!
14585
14586    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14587      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14588      # other files
14589      files_present=`$LS $OUTPUT_ROOT`
14590      # Configure has already touched config.log and confdefs.h in the current dir when this check
14591      # is performed.
14592      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14593      | $TR -d '\n'`
14594      if test "x$filtered_files" != x; then
14595        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14596$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14597        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14598$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14599        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14600$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14601        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14602$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14604$as_echo "$as_me: seriously mess up just about everything." >&6;}
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14606$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14608$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14609        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14610      fi
14611    fi
14612  fi
14613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14614$as_echo_n "checking what configuration name to use... " >&6; }
14615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14616$as_echo "$CONF_NAME" >&6; }
14617
14618
14619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14620
14621  # Input might be given as Windows format, start by converting to
14622  # unix format.
14623  path="$OUTPUT_ROOT"
14624  new_path=`$CYGPATH -u "$path"`
14625
14626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14629  # "foo.exe" is OK but "foo" is an error.
14630  #
14631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14632  # It is also a way to make sure we got the proper file name for the real test later on.
14633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14634  if test "x$test_shortpath" = x; then
14635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14636$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14637    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14638  fi
14639
14640  # Call helper function which possibly converts this using DOS-style short mode.
14641  # If so, the updated path is stored in $new_path.
14642
14643  input_path="$new_path"
14644  # Check if we need to convert this using DOS-style short mode. If the path
14645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14646  # take no chances and rewrite it.
14647  # Note: m4 eats our [], so we need to use [ and ] instead.
14648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14649  if test "x$has_forbidden_chars" != x; then
14650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14654      # Going to short mode and back again did indeed matter. Since short mode is
14655      # case insensitive, let's make it lowercase to improve readability.
14656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14657      # Now convert it back to Unix-stile (cygpath)
14658      input_path=`$CYGPATH -u "$shortmode_path"`
14659      new_path="$input_path"
14660    fi
14661  fi
14662
14663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14664  if test "x$test_cygdrive_prefix" = x; then
14665    # As a simple fix, exclude /usr/bin since it's not a real path.
14666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14668      # a path prefixed by /cygdrive for fixpath to work.
14669      new_path="$CYGWIN_ROOT_PATH$input_path"
14670    fi
14671  fi
14672
14673
14674  if test "x$path" != "x$new_path"; then
14675    OUTPUT_ROOT="$new_path"
14676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14677$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14678  fi
14679
14680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14681
14682  path="$OUTPUT_ROOT"
14683  has_colon=`$ECHO $path | $GREP ^.:`
14684  new_path="$path"
14685  if test "x$has_colon" = x; then
14686    # Not in mixed or Windows style, start by that.
14687    new_path=`cmd //c echo $path`
14688  fi
14689
14690
14691  input_path="$new_path"
14692  # Check if we need to convert this using DOS-style short mode. If the path
14693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14694  # take no chances and rewrite it.
14695  # Note: m4 eats our [], so we need to use [ and ] instead.
14696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14697  if test "x$has_forbidden_chars" != x; then
14698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14700  fi
14701
14702
14703  windows_path="$new_path"
14704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14705    unix_path=`$CYGPATH -u "$windows_path"`
14706    new_path="$unix_path"
14707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14709    new_path="$unix_path"
14710  fi
14711
14712  if test "x$path" != "x$new_path"; then
14713    OUTPUT_ROOT="$new_path"
14714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14715$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14716  fi
14717
14718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14720
14721  else
14722    # We're on a posix platform. Hooray! :)
14723    path="$OUTPUT_ROOT"
14724    has_space=`$ECHO "$path" | $GREP " "`
14725    if test "x$has_space" != x; then
14726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14727$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14728      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14729    fi
14730
14731    # Use eval to expand a potential ~
14732    eval path="$path"
14733    if test ! -f "$path" && test ! -d "$path"; then
14734      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14735    fi
14736
14737    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14738  fi
14739
14740
14741  SPEC=$OUTPUT_ROOT/spec.gmk
14742
14743  CONF_NAME=$CONF_NAME
14744
14745  OUTPUT_ROOT=$OUTPUT_ROOT
14746
14747
14748  # Most of the probed defines are put into config.h
14749  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14750
14751  # The spec.gmk file contains all variables for the make system.
14752  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14753
14754  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14755  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14756
14757  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14758  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14759
14760  # The compare.sh is used to compare the build output to other builds.
14761  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14762
14763  # Spec.sh is currently used by compare-objects.sh
14764  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14765
14766  # The generated Makefile knows where the spec.gmk is and where the source is.
14767  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14768  # which will look for generated configurations
14769  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14770
14771
14772  # Save the arguments given to us
14773  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
14774
14775
14776# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14777
14778  for ac_prog in apt-get yum port pkgutil pkgadd
14779do
14780  # Extract the first word of "$ac_prog", so it can be a program name with args.
14781set dummy $ac_prog; ac_word=$2
14782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14783$as_echo_n "checking for $ac_word... " >&6; }
14784if ${ac_cv_prog_PKGHANDLER+:} false; then :
14785  $as_echo_n "(cached) " >&6
14786else
14787  if test -n "$PKGHANDLER"; then
14788  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14789else
14790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14791for as_dir in $PATH
14792do
14793  IFS=$as_save_IFS
14794  test -z "$as_dir" && as_dir=.
14795    for ac_exec_ext in '' $ac_executable_extensions; do
14796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14797    ac_cv_prog_PKGHANDLER="$ac_prog"
14798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14799    break 2
14800  fi
14801done
14802  done
14803IFS=$as_save_IFS
14804
14805fi
14806fi
14807PKGHANDLER=$ac_cv_prog_PKGHANDLER
14808if test -n "$PKGHANDLER"; then
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14810$as_echo "$PKGHANDLER" >&6; }
14811else
14812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14813$as_echo "no" >&6; }
14814fi
14815
14816
14817  test -n "$PKGHANDLER" && break
14818done
14819
14820
14821
14822# Setup tools that requires more complex handling, or that is not needed by the configure script.
14823
14824
14825  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14826  if test "x$MAKE" != x; then
14827    # User has supplied a make, test it.
14828    if test ! -f "$MAKE"; then
14829      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14830    fi
14831
14832  MAKE_CANDIDATE=""$MAKE""
14833  DESCRIPTION="user supplied MAKE=$MAKE"
14834  if test "x$MAKE_CANDIDATE" != x; then
14835    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14836$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14837    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14838    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14839    if test "x$IS_GNU_MAKE" = x; then
14840      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14841$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14842    else
14843      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14844      if test "x$IS_MODERN_MAKE" = x; then
14845        { $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
14846$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;}
14847      else
14848        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14849          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14850            MAKE_EXPECTED_ENV='cygwin'
14851          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14852            MAKE_EXPECTED_ENV='msys'
14853          else
14854            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14855          fi
14856          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14857          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14858        else
14859          # Not relevant for non-Windows
14860          IS_MAKE_CORRECT_ENV=true
14861        fi
14862        if test "x$IS_MAKE_CORRECT_ENV" = x; then
14863          { $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
14864$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;}
14865        else
14866          FOUND_MAKE=$MAKE_CANDIDATE
14867
14868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14869
14870  # First separate the path from the arguments. This will split at the first
14871  # space.
14872  complete="$FOUND_MAKE"
14873  path="${complete%% *}"
14874  tmp="$complete EOL"
14875  arguments="${tmp#* }"
14876
14877  # Input might be given as Windows format, start by converting to
14878  # unix format.
14879  new_path=`$CYGPATH -u "$path"`
14880
14881  # Now try to locate executable using which
14882  new_path=`$WHICH "$new_path" 2> /dev/null`
14883  # bat and cmd files are not always considered executable in cygwin causing which
14884  # to not find them
14885  if test "x$new_path" = x \
14886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14888    new_path=`$CYGPATH -u "$path"`
14889  fi
14890  if test "x$new_path" = x; then
14891    # Oops. Which didn't find the executable.
14892    # The splitting of arguments from the executable at a space might have been incorrect,
14893    # since paths with space are more likely in Windows. Give it another try with the whole
14894    # argument.
14895    path="$complete"
14896    arguments="EOL"
14897    new_path=`$CYGPATH -u "$path"`
14898    new_path=`$WHICH "$new_path" 2> /dev/null`
14899    # bat and cmd files are not always considered executable in cygwin causing which
14900    # to not find them
14901    if test "x$new_path" = x \
14902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14904      new_path=`$CYGPATH -u "$path"`
14905    fi
14906    if test "x$new_path" = x; then
14907      # It's still not found. Now this is an unrecoverable error.
14908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14909$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14910      has_space=`$ECHO "$complete" | $GREP " "`
14911      if test "x$has_space" != x; then
14912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14914      fi
14915      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14916    fi
14917  fi
14918
14919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14922  # "foo.exe" is OK but "foo" is an error.
14923  #
14924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
14925  # It is also a way to make sure we got the proper file name for the real test later on.
14926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14927  if test "x$test_shortpath" = x; then
14928    # Short path failed, file does not exist as specified.
14929    # Try adding .exe or .cmd
14930    if test -f "${new_path}.exe"; then
14931      input_to_shortpath="${new_path}.exe"
14932    elif test -f "${new_path}.cmd"; then
14933      input_to_shortpath="${new_path}.cmd"
14934    else
14935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
14936$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
14937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
14938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
14939      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14940    fi
14941  else
14942    input_to_shortpath="$new_path"
14943  fi
14944
14945  # Call helper function which possibly converts this using DOS-style short mode.
14946  # If so, the updated path is stored in $new_path.
14947  new_path="$input_to_shortpath"
14948
14949  input_path="$input_to_shortpath"
14950  # Check if we need to convert this using DOS-style short mode. If the path
14951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14952  # take no chances and rewrite it.
14953  # Note: m4 eats our [], so we need to use [ and ] instead.
14954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14955  if test "x$has_forbidden_chars" != x; then
14956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14960      # Going to short mode and back again did indeed matter. Since short mode is
14961      # case insensitive, let's make it lowercase to improve readability.
14962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14963      # Now convert it back to Unix-stile (cygpath)
14964      input_path=`$CYGPATH -u "$shortmode_path"`
14965      new_path="$input_path"
14966    fi
14967  fi
14968
14969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14970  if test "x$test_cygdrive_prefix" = x; then
14971    # As a simple fix, exclude /usr/bin since it's not a real path.
14972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
14973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14974      # a path prefixed by /cygdrive for fixpath to work.
14975      new_path="$CYGWIN_ROOT_PATH$input_path"
14976    fi
14977  fi
14978
14979  # remove trailing .exe if any
14980  new_path="${new_path/%.exe/}"
14981
14982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14983
14984  # First separate the path from the arguments. This will split at the first
14985  # space.
14986  complete="$FOUND_MAKE"
14987  path="${complete%% *}"
14988  tmp="$complete EOL"
14989  arguments="${tmp#* }"
14990
14991  # Input might be given as Windows format, start by converting to
14992  # unix format.
14993  new_path="$path"
14994
14995  windows_path="$new_path"
14996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14997    unix_path=`$CYGPATH -u "$windows_path"`
14998    new_path="$unix_path"
14999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15001    new_path="$unix_path"
15002  fi
15003
15004
15005  # Now try to locate executable using which
15006  new_path=`$WHICH "$new_path" 2> /dev/null`
15007
15008  if test "x$new_path" = x; then
15009    # Oops. Which didn't find the executable.
15010    # The splitting of arguments from the executable at a space might have been incorrect,
15011    # since paths with space are more likely in Windows. Give it another try with the whole
15012    # argument.
15013    path="$complete"
15014    arguments="EOL"
15015    new_path="$path"
15016
15017  windows_path="$new_path"
15018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15019    unix_path=`$CYGPATH -u "$windows_path"`
15020    new_path="$unix_path"
15021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15023    new_path="$unix_path"
15024  fi
15025
15026
15027    new_path=`$WHICH "$new_path" 2> /dev/null`
15028
15029    if test "x$new_path" = x; then
15030      # It's still not found. Now this is an unrecoverable error.
15031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15033      has_space=`$ECHO "$complete" | $GREP " "`
15034      if test "x$has_space" != x; then
15035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15037      fi
15038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15039    fi
15040  fi
15041
15042  # Now new_path has a complete unix path to the binary
15043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15044    # Keep paths in /bin as-is, but remove trailing .exe if any
15045    new_path="${new_path/%.exe/}"
15046    # Do not save /bin paths to all_fixpath_prefixes!
15047  else
15048    # Not in mixed or Windows style, start by that.
15049    new_path=`cmd //c echo $new_path`
15050
15051  input_path="$new_path"
15052  # Check if we need to convert this using DOS-style short mode. If the path
15053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15054  # take no chances and rewrite it.
15055  # Note: m4 eats our [], so we need to use [ and ] instead.
15056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15057  if test "x$has_forbidden_chars" != x; then
15058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15060  fi
15061
15062    # Output is in $new_path
15063
15064  windows_path="$new_path"
15065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15066    unix_path=`$CYGPATH -u "$windows_path"`
15067    new_path="$unix_path"
15068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15070    new_path="$unix_path"
15071  fi
15072
15073    # remove trailing .exe if any
15074    new_path="${new_path/%.exe/}"
15075
15076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15078  fi
15079
15080  else
15081    # We're on a posix platform. Hooray! :)
15082    # First separate the path from the arguments. This will split at the first
15083    # space.
15084    complete="$FOUND_MAKE"
15085    path="${complete%% *}"
15086    tmp="$complete EOL"
15087    arguments="${tmp#* }"
15088
15089    # Cannot rely on the command "which" here since it doesn't always work.
15090    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15091    if test -z "$is_absolute_path"; then
15092      # Path to executable is not absolute. Find it.
15093      IFS_save="$IFS"
15094      IFS=:
15095      for p in $PATH; do
15096        if test -f "$p/$path" && test -x "$p/$path"; then
15097          new_path="$p/$path"
15098          break
15099        fi
15100      done
15101      IFS="$IFS_save"
15102    else
15103      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15104$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15105      new_path="$path"
15106    fi
15107
15108    if test "x$new_path" = x; then
15109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15110$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15111      has_space=`$ECHO "$complete" | $GREP " "`
15112      if test "x$has_space" != x; then
15113        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15114$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15115      fi
15116      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15117    fi
15118  fi
15119
15120  # Now join together the path and the arguments once again
15121  if test "x$arguments" != xEOL; then
15122    new_complete="$new_path ${arguments% *}"
15123  else
15124    new_complete="$new_path"
15125  fi
15126
15127  if test "x$complete" != "x$new_complete"; then
15128    FOUND_MAKE="$new_complete"
15129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15130$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15131  fi
15132
15133        fi
15134      fi
15135    fi
15136  fi
15137
15138    if test "x$FOUND_MAKE" = x; then
15139      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15140    fi
15141  else
15142    # Try our hardest to locate a correct version of GNU make
15143    for ac_prog in gmake
15144do
15145  # Extract the first word of "$ac_prog", so it can be a program name with args.
15146set dummy $ac_prog; ac_word=$2
15147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15148$as_echo_n "checking for $ac_word... " >&6; }
15149if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15150  $as_echo_n "(cached) " >&6
15151else
15152  case $CHECK_GMAKE in
15153  [\\/]* | ?:[\\/]*)
15154  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15155  ;;
15156  *)
15157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15158for as_dir in $PATH
15159do
15160  IFS=$as_save_IFS
15161  test -z "$as_dir" && as_dir=.
15162    for ac_exec_ext in '' $ac_executable_extensions; do
15163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15164    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15166    break 2
15167  fi
15168done
15169  done
15170IFS=$as_save_IFS
15171
15172  ;;
15173esac
15174fi
15175CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15176if test -n "$CHECK_GMAKE"; then
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15178$as_echo "$CHECK_GMAKE" >&6; }
15179else
15180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181$as_echo "no" >&6; }
15182fi
15183
15184
15185  test -n "$CHECK_GMAKE" && break
15186done
15187
15188
15189  MAKE_CANDIDATE=""$CHECK_GMAKE""
15190  DESCRIPTION="gmake in PATH"
15191  if test "x$MAKE_CANDIDATE" != x; then
15192    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15193$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15194    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15195    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15196    if test "x$IS_GNU_MAKE" = x; then
15197      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15198$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15199    else
15200      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15201      if test "x$IS_MODERN_MAKE" = x; then
15202        { $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
15203$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;}
15204      else
15205        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15206          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15207            MAKE_EXPECTED_ENV='cygwin'
15208          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15209            MAKE_EXPECTED_ENV='msys'
15210          else
15211            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15212          fi
15213          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15214          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15215        else
15216          # Not relevant for non-Windows
15217          IS_MAKE_CORRECT_ENV=true
15218        fi
15219        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15220          { $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
15221$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;}
15222        else
15223          FOUND_MAKE=$MAKE_CANDIDATE
15224
15225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15226
15227  # First separate the path from the arguments. This will split at the first
15228  # space.
15229  complete="$FOUND_MAKE"
15230  path="${complete%% *}"
15231  tmp="$complete EOL"
15232  arguments="${tmp#* }"
15233
15234  # Input might be given as Windows format, start by converting to
15235  # unix format.
15236  new_path=`$CYGPATH -u "$path"`
15237
15238  # Now try to locate executable using which
15239  new_path=`$WHICH "$new_path" 2> /dev/null`
15240  # bat and cmd files are not always considered executable in cygwin causing which
15241  # to not find them
15242  if test "x$new_path" = x \
15243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15245    new_path=`$CYGPATH -u "$path"`
15246  fi
15247  if test "x$new_path" = x; then
15248    # Oops. Which didn't find the executable.
15249    # The splitting of arguments from the executable at a space might have been incorrect,
15250    # since paths with space are more likely in Windows. Give it another try with the whole
15251    # argument.
15252    path="$complete"
15253    arguments="EOL"
15254    new_path=`$CYGPATH -u "$path"`
15255    new_path=`$WHICH "$new_path" 2> /dev/null`
15256    # bat and cmd files are not always considered executable in cygwin causing which
15257    # to not find them
15258    if test "x$new_path" = x \
15259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15261      new_path=`$CYGPATH -u "$path"`
15262    fi
15263    if test "x$new_path" = x; then
15264      # It's still not found. Now this is an unrecoverable error.
15265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15267      has_space=`$ECHO "$complete" | $GREP " "`
15268      if test "x$has_space" != x; then
15269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15271      fi
15272      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15273    fi
15274  fi
15275
15276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15279  # "foo.exe" is OK but "foo" is an error.
15280  #
15281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15282  # It is also a way to make sure we got the proper file name for the real test later on.
15283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15284  if test "x$test_shortpath" = x; then
15285    # Short path failed, file does not exist as specified.
15286    # Try adding .exe or .cmd
15287    if test -f "${new_path}.exe"; then
15288      input_to_shortpath="${new_path}.exe"
15289    elif test -f "${new_path}.cmd"; then
15290      input_to_shortpath="${new_path}.cmd"
15291    else
15292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15296      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15297    fi
15298  else
15299    input_to_shortpath="$new_path"
15300  fi
15301
15302  # Call helper function which possibly converts this using DOS-style short mode.
15303  # If so, the updated path is stored in $new_path.
15304  new_path="$input_to_shortpath"
15305
15306  input_path="$input_to_shortpath"
15307  # Check if we need to convert this using DOS-style short mode. If the path
15308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15309  # take no chances and rewrite it.
15310  # Note: m4 eats our [], so we need to use [ and ] instead.
15311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15312  if test "x$has_forbidden_chars" != x; then
15313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15317      # Going to short mode and back again did indeed matter. Since short mode is
15318      # case insensitive, let's make it lowercase to improve readability.
15319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15320      # Now convert it back to Unix-stile (cygpath)
15321      input_path=`$CYGPATH -u "$shortmode_path"`
15322      new_path="$input_path"
15323    fi
15324  fi
15325
15326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15327  if test "x$test_cygdrive_prefix" = x; then
15328    # As a simple fix, exclude /usr/bin since it's not a real path.
15329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15331      # a path prefixed by /cygdrive for fixpath to work.
15332      new_path="$CYGWIN_ROOT_PATH$input_path"
15333    fi
15334  fi
15335
15336  # remove trailing .exe if any
15337  new_path="${new_path/%.exe/}"
15338
15339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15340
15341  # First separate the path from the arguments. This will split at the first
15342  # space.
15343  complete="$FOUND_MAKE"
15344  path="${complete%% *}"
15345  tmp="$complete EOL"
15346  arguments="${tmp#* }"
15347
15348  # Input might be given as Windows format, start by converting to
15349  # unix format.
15350  new_path="$path"
15351
15352  windows_path="$new_path"
15353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15354    unix_path=`$CYGPATH -u "$windows_path"`
15355    new_path="$unix_path"
15356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15358    new_path="$unix_path"
15359  fi
15360
15361
15362  # Now try to locate executable using which
15363  new_path=`$WHICH "$new_path" 2> /dev/null`
15364
15365  if test "x$new_path" = x; then
15366    # Oops. Which didn't find the executable.
15367    # The splitting of arguments from the executable at a space might have been incorrect,
15368    # since paths with space are more likely in Windows. Give it another try with the whole
15369    # argument.
15370    path="$complete"
15371    arguments="EOL"
15372    new_path="$path"
15373
15374  windows_path="$new_path"
15375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15376    unix_path=`$CYGPATH -u "$windows_path"`
15377    new_path="$unix_path"
15378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15380    new_path="$unix_path"
15381  fi
15382
15383
15384    new_path=`$WHICH "$new_path" 2> /dev/null`
15385
15386    if test "x$new_path" = x; then
15387      # It's still not found. Now this is an unrecoverable error.
15388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15390      has_space=`$ECHO "$complete" | $GREP " "`
15391      if test "x$has_space" != x; then
15392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15394      fi
15395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15396    fi
15397  fi
15398
15399  # Now new_path has a complete unix path to the binary
15400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15401    # Keep paths in /bin as-is, but remove trailing .exe if any
15402    new_path="${new_path/%.exe/}"
15403    # Do not save /bin paths to all_fixpath_prefixes!
15404  else
15405    # Not in mixed or Windows style, start by that.
15406    new_path=`cmd //c echo $new_path`
15407
15408  input_path="$new_path"
15409  # Check if we need to convert this using DOS-style short mode. If the path
15410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15411  # take no chances and rewrite it.
15412  # Note: m4 eats our [], so we need to use [ and ] instead.
15413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15414  if test "x$has_forbidden_chars" != x; then
15415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15417  fi
15418
15419    # Output is in $new_path
15420
15421  windows_path="$new_path"
15422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15423    unix_path=`$CYGPATH -u "$windows_path"`
15424    new_path="$unix_path"
15425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15427    new_path="$unix_path"
15428  fi
15429
15430    # remove trailing .exe if any
15431    new_path="${new_path/%.exe/}"
15432
15433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15435  fi
15436
15437  else
15438    # We're on a posix platform. Hooray! :)
15439    # First separate the path from the arguments. This will split at the first
15440    # space.
15441    complete="$FOUND_MAKE"
15442    path="${complete%% *}"
15443    tmp="$complete EOL"
15444    arguments="${tmp#* }"
15445
15446    # Cannot rely on the command "which" here since it doesn't always work.
15447    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15448    if test -z "$is_absolute_path"; then
15449      # Path to executable is not absolute. Find it.
15450      IFS_save="$IFS"
15451      IFS=:
15452      for p in $PATH; do
15453        if test -f "$p/$path" && test -x "$p/$path"; then
15454          new_path="$p/$path"
15455          break
15456        fi
15457      done
15458      IFS="$IFS_save"
15459    else
15460      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15461$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15462      new_path="$path"
15463    fi
15464
15465    if test "x$new_path" = x; then
15466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15468      has_space=`$ECHO "$complete" | $GREP " "`
15469      if test "x$has_space" != x; then
15470        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15472      fi
15473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15474    fi
15475  fi
15476
15477  # Now join together the path and the arguments once again
15478  if test "x$arguments" != xEOL; then
15479    new_complete="$new_path ${arguments% *}"
15480  else
15481    new_complete="$new_path"
15482  fi
15483
15484  if test "x$complete" != "x$new_complete"; then
15485    FOUND_MAKE="$new_complete"
15486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15487$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15488  fi
15489
15490        fi
15491      fi
15492    fi
15493  fi
15494
15495
15496    if test "x$FOUND_MAKE" = x; then
15497      for ac_prog in make
15498do
15499  # Extract the first word of "$ac_prog", so it can be a program name with args.
15500set dummy $ac_prog; ac_word=$2
15501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15502$as_echo_n "checking for $ac_word... " >&6; }
15503if ${ac_cv_path_CHECK_MAKE+:} false; then :
15504  $as_echo_n "(cached) " >&6
15505else
15506  case $CHECK_MAKE in
15507  [\\/]* | ?:[\\/]*)
15508  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15509  ;;
15510  *)
15511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512for as_dir in $PATH
15513do
15514  IFS=$as_save_IFS
15515  test -z "$as_dir" && as_dir=.
15516    for ac_exec_ext in '' $ac_executable_extensions; do
15517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15518    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15520    break 2
15521  fi
15522done
15523  done
15524IFS=$as_save_IFS
15525
15526  ;;
15527esac
15528fi
15529CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15530if test -n "$CHECK_MAKE"; then
15531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15532$as_echo "$CHECK_MAKE" >&6; }
15533else
15534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535$as_echo "no" >&6; }
15536fi
15537
15538
15539  test -n "$CHECK_MAKE" && break
15540done
15541
15542
15543  MAKE_CANDIDATE=""$CHECK_MAKE""
15544  DESCRIPTION="make in PATH"
15545  if test "x$MAKE_CANDIDATE" != x; then
15546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15550    if test "x$IS_GNU_MAKE" = x; then
15551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15553    else
15554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15555      if test "x$IS_MODERN_MAKE" = x; then
15556        { $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
15557$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;}
15558      else
15559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15561            MAKE_EXPECTED_ENV='cygwin'
15562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15563            MAKE_EXPECTED_ENV='msys'
15564          else
15565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15566          fi
15567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15569        else
15570          # Not relevant for non-Windows
15571          IS_MAKE_CORRECT_ENV=true
15572        fi
15573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15574          { $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
15575$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;}
15576        else
15577          FOUND_MAKE=$MAKE_CANDIDATE
15578
15579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15580
15581  # First separate the path from the arguments. This will split at the first
15582  # space.
15583  complete="$FOUND_MAKE"
15584  path="${complete%% *}"
15585  tmp="$complete EOL"
15586  arguments="${tmp#* }"
15587
15588  # Input might be given as Windows format, start by converting to
15589  # unix format.
15590  new_path=`$CYGPATH -u "$path"`
15591
15592  # Now try to locate executable using which
15593  new_path=`$WHICH "$new_path" 2> /dev/null`
15594  # bat and cmd files are not always considered executable in cygwin causing which
15595  # to not find them
15596  if test "x$new_path" = x \
15597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15599    new_path=`$CYGPATH -u "$path"`
15600  fi
15601  if test "x$new_path" = x; then
15602    # Oops. Which didn't find the executable.
15603    # The splitting of arguments from the executable at a space might have been incorrect,
15604    # since paths with space are more likely in Windows. Give it another try with the whole
15605    # argument.
15606    path="$complete"
15607    arguments="EOL"
15608    new_path=`$CYGPATH -u "$path"`
15609    new_path=`$WHICH "$new_path" 2> /dev/null`
15610    # bat and cmd files are not always considered executable in cygwin causing which
15611    # to not find them
15612    if test "x$new_path" = x \
15613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15615      new_path=`$CYGPATH -u "$path"`
15616    fi
15617    if test "x$new_path" = x; then
15618      # It's still not found. Now this is an unrecoverable error.
15619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15621      has_space=`$ECHO "$complete" | $GREP " "`
15622      if test "x$has_space" != x; then
15623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15625      fi
15626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15627    fi
15628  fi
15629
15630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15633  # "foo.exe" is OK but "foo" is an error.
15634  #
15635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15636  # It is also a way to make sure we got the proper file name for the real test later on.
15637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15638  if test "x$test_shortpath" = x; then
15639    # Short path failed, file does not exist as specified.
15640    # Try adding .exe or .cmd
15641    if test -f "${new_path}.exe"; then
15642      input_to_shortpath="${new_path}.exe"
15643    elif test -f "${new_path}.cmd"; then
15644      input_to_shortpath="${new_path}.cmd"
15645    else
15646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15651    fi
15652  else
15653    input_to_shortpath="$new_path"
15654  fi
15655
15656  # Call helper function which possibly converts this using DOS-style short mode.
15657  # If so, the updated path is stored in $new_path.
15658  new_path="$input_to_shortpath"
15659
15660  input_path="$input_to_shortpath"
15661  # Check if we need to convert this using DOS-style short mode. If the path
15662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15663  # take no chances and rewrite it.
15664  # Note: m4 eats our [], so we need to use [ and ] instead.
15665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15666  if test "x$has_forbidden_chars" != x; then
15667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15671      # Going to short mode and back again did indeed matter. Since short mode is
15672      # case insensitive, let's make it lowercase to improve readability.
15673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15674      # Now convert it back to Unix-stile (cygpath)
15675      input_path=`$CYGPATH -u "$shortmode_path"`
15676      new_path="$input_path"
15677    fi
15678  fi
15679
15680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15681  if test "x$test_cygdrive_prefix" = x; then
15682    # As a simple fix, exclude /usr/bin since it's not a real path.
15683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15685      # a path prefixed by /cygdrive for fixpath to work.
15686      new_path="$CYGWIN_ROOT_PATH$input_path"
15687    fi
15688  fi
15689
15690  # remove trailing .exe if any
15691  new_path="${new_path/%.exe/}"
15692
15693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15694
15695  # First separate the path from the arguments. This will split at the first
15696  # space.
15697  complete="$FOUND_MAKE"
15698  path="${complete%% *}"
15699  tmp="$complete EOL"
15700  arguments="${tmp#* }"
15701
15702  # Input might be given as Windows format, start by converting to
15703  # unix format.
15704  new_path="$path"
15705
15706  windows_path="$new_path"
15707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15708    unix_path=`$CYGPATH -u "$windows_path"`
15709    new_path="$unix_path"
15710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15712    new_path="$unix_path"
15713  fi
15714
15715
15716  # Now try to locate executable using which
15717  new_path=`$WHICH "$new_path" 2> /dev/null`
15718
15719  if test "x$new_path" = x; then
15720    # Oops. Which didn't find the executable.
15721    # The splitting of arguments from the executable at a space might have been incorrect,
15722    # since paths with space are more likely in Windows. Give it another try with the whole
15723    # argument.
15724    path="$complete"
15725    arguments="EOL"
15726    new_path="$path"
15727
15728  windows_path="$new_path"
15729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15730    unix_path=`$CYGPATH -u "$windows_path"`
15731    new_path="$unix_path"
15732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15734    new_path="$unix_path"
15735  fi
15736
15737
15738    new_path=`$WHICH "$new_path" 2> /dev/null`
15739
15740    if test "x$new_path" = x; then
15741      # It's still not found. Now this is an unrecoverable error.
15742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15744      has_space=`$ECHO "$complete" | $GREP " "`
15745      if test "x$has_space" != x; then
15746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15748      fi
15749      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15750    fi
15751  fi
15752
15753  # Now new_path has a complete unix path to the binary
15754  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15755    # Keep paths in /bin as-is, but remove trailing .exe if any
15756    new_path="${new_path/%.exe/}"
15757    # Do not save /bin paths to all_fixpath_prefixes!
15758  else
15759    # Not in mixed or Windows style, start by that.
15760    new_path=`cmd //c echo $new_path`
15761
15762  input_path="$new_path"
15763  # Check if we need to convert this using DOS-style short mode. If the path
15764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15765  # take no chances and rewrite it.
15766  # Note: m4 eats our [], so we need to use [ and ] instead.
15767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15768  if test "x$has_forbidden_chars" != x; then
15769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15771  fi
15772
15773    # Output is in $new_path
15774
15775  windows_path="$new_path"
15776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15777    unix_path=`$CYGPATH -u "$windows_path"`
15778    new_path="$unix_path"
15779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15781    new_path="$unix_path"
15782  fi
15783
15784    # remove trailing .exe if any
15785    new_path="${new_path/%.exe/}"
15786
15787    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15788    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15789  fi
15790
15791  else
15792    # We're on a posix platform. Hooray! :)
15793    # First separate the path from the arguments. This will split at the first
15794    # space.
15795    complete="$FOUND_MAKE"
15796    path="${complete%% *}"
15797    tmp="$complete EOL"
15798    arguments="${tmp#* }"
15799
15800    # Cannot rely on the command "which" here since it doesn't always work.
15801    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15802    if test -z "$is_absolute_path"; then
15803      # Path to executable is not absolute. Find it.
15804      IFS_save="$IFS"
15805      IFS=:
15806      for p in $PATH; do
15807        if test -f "$p/$path" && test -x "$p/$path"; then
15808          new_path="$p/$path"
15809          break
15810        fi
15811      done
15812      IFS="$IFS_save"
15813    else
15814      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15815$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15816      new_path="$path"
15817    fi
15818
15819    if test "x$new_path" = x; then
15820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15822      has_space=`$ECHO "$complete" | $GREP " "`
15823      if test "x$has_space" != x; then
15824        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15826      fi
15827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15828    fi
15829  fi
15830
15831  # Now join together the path and the arguments once again
15832  if test "x$arguments" != xEOL; then
15833    new_complete="$new_path ${arguments% *}"
15834  else
15835    new_complete="$new_path"
15836  fi
15837
15838  if test "x$complete" != "x$new_complete"; then
15839    FOUND_MAKE="$new_complete"
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15841$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15842  fi
15843
15844        fi
15845      fi
15846    fi
15847  fi
15848
15849    fi
15850
15851    if test "x$FOUND_MAKE" = x; then
15852      if test "x$TOOLS_DIR" != x; then
15853        # We have a tools-dir, check that as well before giving up.
15854        OLD_PATH=$PATH
15855        PATH=$TOOLS_DIR:$PATH
15856        for ac_prog in gmake
15857do
15858  # Extract the first word of "$ac_prog", so it can be a program name with args.
15859set dummy $ac_prog; ac_word=$2
15860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15861$as_echo_n "checking for $ac_word... " >&6; }
15862if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15863  $as_echo_n "(cached) " >&6
15864else
15865  case $CHECK_TOOLSDIR_GMAKE in
15866  [\\/]* | ?:[\\/]*)
15867  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15868  ;;
15869  *)
15870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15871for as_dir in $PATH
15872do
15873  IFS=$as_save_IFS
15874  test -z "$as_dir" && as_dir=.
15875    for ac_exec_ext in '' $ac_executable_extensions; do
15876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15877    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15879    break 2
15880  fi
15881done
15882  done
15883IFS=$as_save_IFS
15884
15885  ;;
15886esac
15887fi
15888CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15889if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15891$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15892else
15893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15894$as_echo "no" >&6; }
15895fi
15896
15897
15898  test -n "$CHECK_TOOLSDIR_GMAKE" && break
15899done
15900
15901
15902  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15903  DESCRIPTION="gmake in tools-dir"
15904  if test "x$MAKE_CANDIDATE" != x; then
15905    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15906$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15907    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15908    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15909    if test "x$IS_GNU_MAKE" = x; then
15910      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15911$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15912    else
15913      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15914      if test "x$IS_MODERN_MAKE" = x; then
15915        { $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
15916$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;}
15917      else
15918        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15919          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15920            MAKE_EXPECTED_ENV='cygwin'
15921          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15922            MAKE_EXPECTED_ENV='msys'
15923          else
15924            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15925          fi
15926          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15927          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15928        else
15929          # Not relevant for non-Windows
15930          IS_MAKE_CORRECT_ENV=true
15931        fi
15932        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15933          { $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
15934$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;}
15935        else
15936          FOUND_MAKE=$MAKE_CANDIDATE
15937
15938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15939
15940  # First separate the path from the arguments. This will split at the first
15941  # space.
15942  complete="$FOUND_MAKE"
15943  path="${complete%% *}"
15944  tmp="$complete EOL"
15945  arguments="${tmp#* }"
15946
15947  # Input might be given as Windows format, start by converting to
15948  # unix format.
15949  new_path=`$CYGPATH -u "$path"`
15950
15951  # Now try to locate executable using which
15952  new_path=`$WHICH "$new_path" 2> /dev/null`
15953  # bat and cmd files are not always considered executable in cygwin causing which
15954  # to not find them
15955  if test "x$new_path" = x \
15956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15958    new_path=`$CYGPATH -u "$path"`
15959  fi
15960  if test "x$new_path" = x; then
15961    # Oops. Which didn't find the executable.
15962    # The splitting of arguments from the executable at a space might have been incorrect,
15963    # since paths with space are more likely in Windows. Give it another try with the whole
15964    # argument.
15965    path="$complete"
15966    arguments="EOL"
15967    new_path=`$CYGPATH -u "$path"`
15968    new_path=`$WHICH "$new_path" 2> /dev/null`
15969    # bat and cmd files are not always considered executable in cygwin causing which
15970    # to not find them
15971    if test "x$new_path" = x \
15972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15974      new_path=`$CYGPATH -u "$path"`
15975    fi
15976    if test "x$new_path" = x; then
15977      # It's still not found. Now this is an unrecoverable error.
15978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15980      has_space=`$ECHO "$complete" | $GREP " "`
15981      if test "x$has_space" != x; then
15982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15984      fi
15985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15986    fi
15987  fi
15988
15989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15992  # "foo.exe" is OK but "foo" is an error.
15993  #
15994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15995  # It is also a way to make sure we got the proper file name for the real test later on.
15996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15997  if test "x$test_shortpath" = x; then
15998    # Short path failed, file does not exist as specified.
15999    # Try adding .exe or .cmd
16000    if test -f "${new_path}.exe"; then
16001      input_to_shortpath="${new_path}.exe"
16002    elif test -f "${new_path}.cmd"; then
16003      input_to_shortpath="${new_path}.cmd"
16004    else
16005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16010    fi
16011  else
16012    input_to_shortpath="$new_path"
16013  fi
16014
16015  # Call helper function which possibly converts this using DOS-style short mode.
16016  # If so, the updated path is stored in $new_path.
16017  new_path="$input_to_shortpath"
16018
16019  input_path="$input_to_shortpath"
16020  # Check if we need to convert this using DOS-style short mode. If the path
16021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16022  # take no chances and rewrite it.
16023  # Note: m4 eats our [], so we need to use [ and ] instead.
16024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16025  if test "x$has_forbidden_chars" != x; then
16026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16030      # Going to short mode and back again did indeed matter. Since short mode is
16031      # case insensitive, let's make it lowercase to improve readability.
16032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16033      # Now convert it back to Unix-stile (cygpath)
16034      input_path=`$CYGPATH -u "$shortmode_path"`
16035      new_path="$input_path"
16036    fi
16037  fi
16038
16039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16040  if test "x$test_cygdrive_prefix" = x; then
16041    # As a simple fix, exclude /usr/bin since it's not a real path.
16042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16044      # a path prefixed by /cygdrive for fixpath to work.
16045      new_path="$CYGWIN_ROOT_PATH$input_path"
16046    fi
16047  fi
16048
16049  # remove trailing .exe if any
16050  new_path="${new_path/%.exe/}"
16051
16052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16053
16054  # First separate the path from the arguments. This will split at the first
16055  # space.
16056  complete="$FOUND_MAKE"
16057  path="${complete%% *}"
16058  tmp="$complete EOL"
16059  arguments="${tmp#* }"
16060
16061  # Input might be given as Windows format, start by converting to
16062  # unix format.
16063  new_path="$path"
16064
16065  windows_path="$new_path"
16066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16067    unix_path=`$CYGPATH -u "$windows_path"`
16068    new_path="$unix_path"
16069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16071    new_path="$unix_path"
16072  fi
16073
16074
16075  # Now try to locate executable using which
16076  new_path=`$WHICH "$new_path" 2> /dev/null`
16077
16078  if test "x$new_path" = x; then
16079    # Oops. Which didn't find the executable.
16080    # The splitting of arguments from the executable at a space might have been incorrect,
16081    # since paths with space are more likely in Windows. Give it another try with the whole
16082    # argument.
16083    path="$complete"
16084    arguments="EOL"
16085    new_path="$path"
16086
16087  windows_path="$new_path"
16088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16089    unix_path=`$CYGPATH -u "$windows_path"`
16090    new_path="$unix_path"
16091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16093    new_path="$unix_path"
16094  fi
16095
16096
16097    new_path=`$WHICH "$new_path" 2> /dev/null`
16098
16099    if test "x$new_path" = x; then
16100      # It's still not found. Now this is an unrecoverable error.
16101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16103      has_space=`$ECHO "$complete" | $GREP " "`
16104      if test "x$has_space" != x; then
16105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16107      fi
16108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16109    fi
16110  fi
16111
16112  # Now new_path has a complete unix path to the binary
16113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16114    # Keep paths in /bin as-is, but remove trailing .exe if any
16115    new_path="${new_path/%.exe/}"
16116    # Do not save /bin paths to all_fixpath_prefixes!
16117  else
16118    # Not in mixed or Windows style, start by that.
16119    new_path=`cmd //c echo $new_path`
16120
16121  input_path="$new_path"
16122  # Check if we need to convert this using DOS-style short mode. If the path
16123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16124  # take no chances and rewrite it.
16125  # Note: m4 eats our [], so we need to use [ and ] instead.
16126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16127  if test "x$has_forbidden_chars" != x; then
16128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16130  fi
16131
16132    # Output is in $new_path
16133
16134  windows_path="$new_path"
16135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16136    unix_path=`$CYGPATH -u "$windows_path"`
16137    new_path="$unix_path"
16138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16140    new_path="$unix_path"
16141  fi
16142
16143    # remove trailing .exe if any
16144    new_path="${new_path/%.exe/}"
16145
16146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16148  fi
16149
16150  else
16151    # We're on a posix platform. Hooray! :)
16152    # First separate the path from the arguments. This will split at the first
16153    # space.
16154    complete="$FOUND_MAKE"
16155    path="${complete%% *}"
16156    tmp="$complete EOL"
16157    arguments="${tmp#* }"
16158
16159    # Cannot rely on the command "which" here since it doesn't always work.
16160    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16161    if test -z "$is_absolute_path"; then
16162      # Path to executable is not absolute. Find it.
16163      IFS_save="$IFS"
16164      IFS=:
16165      for p in $PATH; do
16166        if test -f "$p/$path" && test -x "$p/$path"; then
16167          new_path="$p/$path"
16168          break
16169        fi
16170      done
16171      IFS="$IFS_save"
16172    else
16173      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16174$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16175      new_path="$path"
16176    fi
16177
16178    if test "x$new_path" = x; then
16179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16181      has_space=`$ECHO "$complete" | $GREP " "`
16182      if test "x$has_space" != x; then
16183        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16185      fi
16186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16187    fi
16188  fi
16189
16190  # Now join together the path and the arguments once again
16191  if test "x$arguments" != xEOL; then
16192    new_complete="$new_path ${arguments% *}"
16193  else
16194    new_complete="$new_path"
16195  fi
16196
16197  if test "x$complete" != "x$new_complete"; then
16198    FOUND_MAKE="$new_complete"
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16200$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16201  fi
16202
16203        fi
16204      fi
16205    fi
16206  fi
16207
16208        if test "x$FOUND_MAKE" = x; then
16209          for ac_prog in make
16210do
16211  # Extract the first word of "$ac_prog", so it can be a program name with args.
16212set dummy $ac_prog; ac_word=$2
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16214$as_echo_n "checking for $ac_word... " >&6; }
16215if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16216  $as_echo_n "(cached) " >&6
16217else
16218  case $CHECK_TOOLSDIR_MAKE in
16219  [\\/]* | ?:[\\/]*)
16220  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16221  ;;
16222  *)
16223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16224for as_dir in $PATH
16225do
16226  IFS=$as_save_IFS
16227  test -z "$as_dir" && as_dir=.
16228    for ac_exec_ext in '' $ac_executable_extensions; do
16229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16230    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16232    break 2
16233  fi
16234done
16235  done
16236IFS=$as_save_IFS
16237
16238  ;;
16239esac
16240fi
16241CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16242if test -n "$CHECK_TOOLSDIR_MAKE"; then
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16244$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16245else
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16247$as_echo "no" >&6; }
16248fi
16249
16250
16251  test -n "$CHECK_TOOLSDIR_MAKE" && break
16252done
16253
16254
16255  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16256  DESCRIPTION="make in tools-dir"
16257  if test "x$MAKE_CANDIDATE" != x; then
16258    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16259$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16260    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16261    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16262    if test "x$IS_GNU_MAKE" = x; then
16263      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16264$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16265    else
16266      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16267      if test "x$IS_MODERN_MAKE" = x; then
16268        { $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
16269$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;}
16270      else
16271        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16272          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16273            MAKE_EXPECTED_ENV='cygwin'
16274          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16275            MAKE_EXPECTED_ENV='msys'
16276          else
16277            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16278          fi
16279          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16280          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16281        else
16282          # Not relevant for non-Windows
16283          IS_MAKE_CORRECT_ENV=true
16284        fi
16285        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16286          { $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
16287$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;}
16288        else
16289          FOUND_MAKE=$MAKE_CANDIDATE
16290
16291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16292
16293  # First separate the path from the arguments. This will split at the first
16294  # space.
16295  complete="$FOUND_MAKE"
16296  path="${complete%% *}"
16297  tmp="$complete EOL"
16298  arguments="${tmp#* }"
16299
16300  # Input might be given as Windows format, start by converting to
16301  # unix format.
16302  new_path=`$CYGPATH -u "$path"`
16303
16304  # Now try to locate executable using which
16305  new_path=`$WHICH "$new_path" 2> /dev/null`
16306  # bat and cmd files are not always considered executable in cygwin causing which
16307  # to not find them
16308  if test "x$new_path" = x \
16309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16311    new_path=`$CYGPATH -u "$path"`
16312  fi
16313  if test "x$new_path" = x; then
16314    # Oops. Which didn't find the executable.
16315    # The splitting of arguments from the executable at a space might have been incorrect,
16316    # since paths with space are more likely in Windows. Give it another try with the whole
16317    # argument.
16318    path="$complete"
16319    arguments="EOL"
16320    new_path=`$CYGPATH -u "$path"`
16321    new_path=`$WHICH "$new_path" 2> /dev/null`
16322    # bat and cmd files are not always considered executable in cygwin causing which
16323    # to not find them
16324    if test "x$new_path" = x \
16325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16327      new_path=`$CYGPATH -u "$path"`
16328    fi
16329    if test "x$new_path" = x; then
16330      # It's still not found. Now this is an unrecoverable error.
16331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16332$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16333      has_space=`$ECHO "$complete" | $GREP " "`
16334      if test "x$has_space" != x; then
16335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16337      fi
16338      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16339    fi
16340  fi
16341
16342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16345  # "foo.exe" is OK but "foo" is an error.
16346  #
16347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16348  # It is also a way to make sure we got the proper file name for the real test later on.
16349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16350  if test "x$test_shortpath" = x; then
16351    # Short path failed, file does not exist as specified.
16352    # Try adding .exe or .cmd
16353    if test -f "${new_path}.exe"; then
16354      input_to_shortpath="${new_path}.exe"
16355    elif test -f "${new_path}.cmd"; then
16356      input_to_shortpath="${new_path}.cmd"
16357    else
16358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16363    fi
16364  else
16365    input_to_shortpath="$new_path"
16366  fi
16367
16368  # Call helper function which possibly converts this using DOS-style short mode.
16369  # If so, the updated path is stored in $new_path.
16370  new_path="$input_to_shortpath"
16371
16372  input_path="$input_to_shortpath"
16373  # Check if we need to convert this using DOS-style short mode. If the path
16374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16375  # take no chances and rewrite it.
16376  # Note: m4 eats our [], so we need to use [ and ] instead.
16377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16378  if test "x$has_forbidden_chars" != x; then
16379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16383      # Going to short mode and back again did indeed matter. Since short mode is
16384      # case insensitive, let's make it lowercase to improve readability.
16385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16386      # Now convert it back to Unix-stile (cygpath)
16387      input_path=`$CYGPATH -u "$shortmode_path"`
16388      new_path="$input_path"
16389    fi
16390  fi
16391
16392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16393  if test "x$test_cygdrive_prefix" = x; then
16394    # As a simple fix, exclude /usr/bin since it's not a real path.
16395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16397      # a path prefixed by /cygdrive for fixpath to work.
16398      new_path="$CYGWIN_ROOT_PATH$input_path"
16399    fi
16400  fi
16401
16402  # remove trailing .exe if any
16403  new_path="${new_path/%.exe/}"
16404
16405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16406
16407  # First separate the path from the arguments. This will split at the first
16408  # space.
16409  complete="$FOUND_MAKE"
16410  path="${complete%% *}"
16411  tmp="$complete EOL"
16412  arguments="${tmp#* }"
16413
16414  # Input might be given as Windows format, start by converting to
16415  # unix format.
16416  new_path="$path"
16417
16418  windows_path="$new_path"
16419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16420    unix_path=`$CYGPATH -u "$windows_path"`
16421    new_path="$unix_path"
16422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16424    new_path="$unix_path"
16425  fi
16426
16427
16428  # Now try to locate executable using which
16429  new_path=`$WHICH "$new_path" 2> /dev/null`
16430
16431  if test "x$new_path" = x; then
16432    # Oops. Which didn't find the executable.
16433    # The splitting of arguments from the executable at a space might have been incorrect,
16434    # since paths with space are more likely in Windows. Give it another try with the whole
16435    # argument.
16436    path="$complete"
16437    arguments="EOL"
16438    new_path="$path"
16439
16440  windows_path="$new_path"
16441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442    unix_path=`$CYGPATH -u "$windows_path"`
16443    new_path="$unix_path"
16444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16446    new_path="$unix_path"
16447  fi
16448
16449
16450    new_path=`$WHICH "$new_path" 2> /dev/null`
16451
16452    if test "x$new_path" = x; then
16453      # It's still not found. Now this is an unrecoverable error.
16454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16456      has_space=`$ECHO "$complete" | $GREP " "`
16457      if test "x$has_space" != x; then
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16460      fi
16461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16462    fi
16463  fi
16464
16465  # Now new_path has a complete unix path to the binary
16466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16467    # Keep paths in /bin as-is, but remove trailing .exe if any
16468    new_path="${new_path/%.exe/}"
16469    # Do not save /bin paths to all_fixpath_prefixes!
16470  else
16471    # Not in mixed or Windows style, start by that.
16472    new_path=`cmd //c echo $new_path`
16473
16474  input_path="$new_path"
16475  # Check if we need to convert this using DOS-style short mode. If the path
16476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16477  # take no chances and rewrite it.
16478  # Note: m4 eats our [], so we need to use [ and ] instead.
16479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16480  if test "x$has_forbidden_chars" != x; then
16481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16483  fi
16484
16485    # Output is in $new_path
16486
16487  windows_path="$new_path"
16488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16489    unix_path=`$CYGPATH -u "$windows_path"`
16490    new_path="$unix_path"
16491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16493    new_path="$unix_path"
16494  fi
16495
16496    # remove trailing .exe if any
16497    new_path="${new_path/%.exe/}"
16498
16499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16501  fi
16502
16503  else
16504    # We're on a posix platform. Hooray! :)
16505    # First separate the path from the arguments. This will split at the first
16506    # space.
16507    complete="$FOUND_MAKE"
16508    path="${complete%% *}"
16509    tmp="$complete EOL"
16510    arguments="${tmp#* }"
16511
16512    # Cannot rely on the command "which" here since it doesn't always work.
16513    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16514    if test -z "$is_absolute_path"; then
16515      # Path to executable is not absolute. Find it.
16516      IFS_save="$IFS"
16517      IFS=:
16518      for p in $PATH; do
16519        if test -f "$p/$path" && test -x "$p/$path"; then
16520          new_path="$p/$path"
16521          break
16522        fi
16523      done
16524      IFS="$IFS_save"
16525    else
16526      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16527$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16528      new_path="$path"
16529    fi
16530
16531    if test "x$new_path" = x; then
16532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16534      has_space=`$ECHO "$complete" | $GREP " "`
16535      if test "x$has_space" != x; then
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16538      fi
16539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16540    fi
16541  fi
16542
16543  # Now join together the path and the arguments once again
16544  if test "x$arguments" != xEOL; then
16545    new_complete="$new_path ${arguments% *}"
16546  else
16547    new_complete="$new_path"
16548  fi
16549
16550  if test "x$complete" != "x$new_complete"; then
16551    FOUND_MAKE="$new_complete"
16552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16553$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16554  fi
16555
16556        fi
16557      fi
16558    fi
16559  fi
16560
16561        fi
16562        PATH=$OLD_PATH
16563      fi
16564    fi
16565
16566    if test "x$FOUND_MAKE" = x; then
16567      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
16568    fi
16569  fi
16570
16571  MAKE=$FOUND_MAKE
16572
16573  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16574$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16575
16576
16577
16578  # Test if find supports -delete
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16580$as_echo_n "checking if find supports -delete... " >&6; }
16581  FIND_DELETE="-delete"
16582
16583  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16584
16585  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16586
16587  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16588  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16589    # No, it does not.
16590    rm $DELETEDIR/TestIfFindSupportsDelete
16591    FIND_DELETE="-exec rm \{\} \+"
16592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16593$as_echo "no" >&6; }
16594  else
16595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16596$as_echo "yes" >&6; }
16597  fi
16598  rmdir $DELETEDIR
16599
16600
16601
16602  # These tools might not be installed by default,
16603  # need hint on how to install them.
16604
16605
16606
16607  # Publish this variable in the help.
16608
16609
16610  if test "x$UNZIP" = x; then
16611    # The variable is not set by user, try to locate tool using the code snippet
16612    for ac_prog in unzip
16613do
16614  # Extract the first word of "$ac_prog", so it can be a program name with args.
16615set dummy $ac_prog; ac_word=$2
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16617$as_echo_n "checking for $ac_word... " >&6; }
16618if ${ac_cv_path_UNZIP+:} false; then :
16619  $as_echo_n "(cached) " >&6
16620else
16621  case $UNZIP in
16622  [\\/]* | ?:[\\/]*)
16623  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16624  ;;
16625  *)
16626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16627for as_dir in $PATH
16628do
16629  IFS=$as_save_IFS
16630  test -z "$as_dir" && as_dir=.
16631    for ac_exec_ext in '' $ac_executable_extensions; do
16632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16633    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16635    break 2
16636  fi
16637done
16638  done
16639IFS=$as_save_IFS
16640
16641  ;;
16642esac
16643fi
16644UNZIP=$ac_cv_path_UNZIP
16645if test -n "$UNZIP"; then
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16647$as_echo "$UNZIP" >&6; }
16648else
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16650$as_echo "no" >&6; }
16651fi
16652
16653
16654  test -n "$UNZIP" && break
16655done
16656
16657  else
16658    # The variable is set, but is it from the command line or the environment?
16659
16660    # Try to remove the string !UNZIP! from our list.
16661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16663      # If it failed, the variable was not from the command line. Ignore it,
16664      # but warn the user (except for BASH, which is always set by the calling BASH).
16665      if test "xUNZIP" != xBASH; then
16666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16667$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16668      fi
16669      # Try to locate tool using the code snippet
16670      for ac_prog in unzip
16671do
16672  # Extract the first word of "$ac_prog", so it can be a program name with args.
16673set dummy $ac_prog; ac_word=$2
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16675$as_echo_n "checking for $ac_word... " >&6; }
16676if ${ac_cv_path_UNZIP+:} false; then :
16677  $as_echo_n "(cached) " >&6
16678else
16679  case $UNZIP in
16680  [\\/]* | ?:[\\/]*)
16681  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16682  ;;
16683  *)
16684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16685for as_dir in $PATH
16686do
16687  IFS=$as_save_IFS
16688  test -z "$as_dir" && as_dir=.
16689    for ac_exec_ext in '' $ac_executable_extensions; do
16690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16691    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16693    break 2
16694  fi
16695done
16696  done
16697IFS=$as_save_IFS
16698
16699  ;;
16700esac
16701fi
16702UNZIP=$ac_cv_path_UNZIP
16703if test -n "$UNZIP"; then
16704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16705$as_echo "$UNZIP" >&6; }
16706else
16707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16708$as_echo "no" >&6; }
16709fi
16710
16711
16712  test -n "$UNZIP" && break
16713done
16714
16715    else
16716      # If it succeeded, then it was overridden by the user. We will use it
16717      # for the tool.
16718
16719      # First remove it from the list of overridden variables, so we can test
16720      # for unknown variables in the end.
16721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16722
16723      # Check if the provided tool contains a complete path.
16724      tool_specified="$UNZIP"
16725      tool_basename="${tool_specified##*/}"
16726      if test "x$tool_basename" = "x$tool_specified"; then
16727        # A command without a complete path is provided, search $PATH.
16728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16729$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16730        # Extract the first word of "$tool_basename", so it can be a program name with args.
16731set dummy $tool_basename; ac_word=$2
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16733$as_echo_n "checking for $ac_word... " >&6; }
16734if ${ac_cv_path_UNZIP+:} false; then :
16735  $as_echo_n "(cached) " >&6
16736else
16737  case $UNZIP in
16738  [\\/]* | ?:[\\/]*)
16739  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16740  ;;
16741  *)
16742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16743for as_dir in $PATH
16744do
16745  IFS=$as_save_IFS
16746  test -z "$as_dir" && as_dir=.
16747    for ac_exec_ext in '' $ac_executable_extensions; do
16748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16749    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16751    break 2
16752  fi
16753done
16754  done
16755IFS=$as_save_IFS
16756
16757  ;;
16758esac
16759fi
16760UNZIP=$ac_cv_path_UNZIP
16761if test -n "$UNZIP"; then
16762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16763$as_echo "$UNZIP" >&6; }
16764else
16765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16766$as_echo "no" >&6; }
16767fi
16768
16769
16770        if test "x$UNZIP" = x; then
16771          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16772        fi
16773      else
16774        # Otherwise we believe it is a complete path. Use it as it is.
16775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16776$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16778$as_echo_n "checking for UNZIP... " >&6; }
16779        if test ! -x "$tool_specified"; then
16780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16781$as_echo "not found" >&6; }
16782          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16783        fi
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16785$as_echo "$tool_specified" >&6; }
16786      fi
16787    fi
16788  fi
16789
16790
16791
16792  if test "x$UNZIP" = x; then
16793    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16794  fi
16795
16796
16797
16798
16799
16800  # Publish this variable in the help.
16801
16802
16803  if test "x$ZIP" = x; then
16804    # The variable is not set by user, try to locate tool using the code snippet
16805    for ac_prog in zip
16806do
16807  # Extract the first word of "$ac_prog", so it can be a program name with args.
16808set dummy $ac_prog; ac_word=$2
16809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16810$as_echo_n "checking for $ac_word... " >&6; }
16811if ${ac_cv_path_ZIP+:} false; then :
16812  $as_echo_n "(cached) " >&6
16813else
16814  case $ZIP in
16815  [\\/]* | ?:[\\/]*)
16816  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16817  ;;
16818  *)
16819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16820for as_dir in $PATH
16821do
16822  IFS=$as_save_IFS
16823  test -z "$as_dir" && as_dir=.
16824    for ac_exec_ext in '' $ac_executable_extensions; do
16825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16826    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16828    break 2
16829  fi
16830done
16831  done
16832IFS=$as_save_IFS
16833
16834  ;;
16835esac
16836fi
16837ZIP=$ac_cv_path_ZIP
16838if test -n "$ZIP"; then
16839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16840$as_echo "$ZIP" >&6; }
16841else
16842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16843$as_echo "no" >&6; }
16844fi
16845
16846
16847  test -n "$ZIP" && break
16848done
16849
16850  else
16851    # The variable is set, but is it from the command line or the environment?
16852
16853    # Try to remove the string !ZIP! from our list.
16854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16856      # If it failed, the variable was not from the command line. Ignore it,
16857      # but warn the user (except for BASH, which is always set by the calling BASH).
16858      if test "xZIP" != xBASH; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16860$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16861      fi
16862      # Try to locate tool using the code snippet
16863      for ac_prog in zip
16864do
16865  # Extract the first word of "$ac_prog", so it can be a program name with args.
16866set dummy $ac_prog; ac_word=$2
16867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16868$as_echo_n "checking for $ac_word... " >&6; }
16869if ${ac_cv_path_ZIP+:} false; then :
16870  $as_echo_n "(cached) " >&6
16871else
16872  case $ZIP in
16873  [\\/]* | ?:[\\/]*)
16874  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16875  ;;
16876  *)
16877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16878for as_dir in $PATH
16879do
16880  IFS=$as_save_IFS
16881  test -z "$as_dir" && as_dir=.
16882    for ac_exec_ext in '' $ac_executable_extensions; do
16883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16884    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16886    break 2
16887  fi
16888done
16889  done
16890IFS=$as_save_IFS
16891
16892  ;;
16893esac
16894fi
16895ZIP=$ac_cv_path_ZIP
16896if test -n "$ZIP"; then
16897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16898$as_echo "$ZIP" >&6; }
16899else
16900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16901$as_echo "no" >&6; }
16902fi
16903
16904
16905  test -n "$ZIP" && break
16906done
16907
16908    else
16909      # If it succeeded, then it was overridden by the user. We will use it
16910      # for the tool.
16911
16912      # First remove it from the list of overridden variables, so we can test
16913      # for unknown variables in the end.
16914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16915
16916      # Check if the provided tool contains a complete path.
16917      tool_specified="$ZIP"
16918      tool_basename="${tool_specified##*/}"
16919      if test "x$tool_basename" = "x$tool_specified"; then
16920        # A command without a complete path is provided, search $PATH.
16921        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16922$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16923        # Extract the first word of "$tool_basename", so it can be a program name with args.
16924set dummy $tool_basename; ac_word=$2
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16926$as_echo_n "checking for $ac_word... " >&6; }
16927if ${ac_cv_path_ZIP+:} false; then :
16928  $as_echo_n "(cached) " >&6
16929else
16930  case $ZIP in
16931  [\\/]* | ?:[\\/]*)
16932  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16933  ;;
16934  *)
16935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16936for as_dir in $PATH
16937do
16938  IFS=$as_save_IFS
16939  test -z "$as_dir" && as_dir=.
16940    for ac_exec_ext in '' $ac_executable_extensions; do
16941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16942    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16944    break 2
16945  fi
16946done
16947  done
16948IFS=$as_save_IFS
16949
16950  ;;
16951esac
16952fi
16953ZIP=$ac_cv_path_ZIP
16954if test -n "$ZIP"; then
16955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16956$as_echo "$ZIP" >&6; }
16957else
16958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16959$as_echo "no" >&6; }
16960fi
16961
16962
16963        if test "x$ZIP" = x; then
16964          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16965        fi
16966      else
16967        # Otherwise we believe it is a complete path. Use it as it is.
16968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
16969$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
16971$as_echo_n "checking for ZIP... " >&6; }
16972        if test ! -x "$tool_specified"; then
16973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16974$as_echo "not found" >&6; }
16975          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16976        fi
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16978$as_echo "$tool_specified" >&6; }
16979      fi
16980    fi
16981  fi
16982
16983
16984
16985  if test "x$ZIP" = x; then
16986    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
16987  fi
16988
16989
16990
16991  # Non-required basic tools
16992
16993
16994
16995  # Publish this variable in the help.
16996
16997
16998  if test "x$LDD" = x; then
16999    # The variable is not set by user, try to locate tool using the code snippet
17000    for ac_prog in ldd
17001do
17002  # Extract the first word of "$ac_prog", so it can be a program name with args.
17003set dummy $ac_prog; ac_word=$2
17004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17005$as_echo_n "checking for $ac_word... " >&6; }
17006if ${ac_cv_path_LDD+:} false; then :
17007  $as_echo_n "(cached) " >&6
17008else
17009  case $LDD in
17010  [\\/]* | ?:[\\/]*)
17011  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17012  ;;
17013  *)
17014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17015for as_dir in $PATH
17016do
17017  IFS=$as_save_IFS
17018  test -z "$as_dir" && as_dir=.
17019    for ac_exec_ext in '' $ac_executable_extensions; do
17020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17021    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17023    break 2
17024  fi
17025done
17026  done
17027IFS=$as_save_IFS
17028
17029  ;;
17030esac
17031fi
17032LDD=$ac_cv_path_LDD
17033if test -n "$LDD"; then
17034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17035$as_echo "$LDD" >&6; }
17036else
17037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17038$as_echo "no" >&6; }
17039fi
17040
17041
17042  test -n "$LDD" && break
17043done
17044
17045  else
17046    # The variable is set, but is it from the command line or the environment?
17047
17048    # Try to remove the string !LDD! from our list.
17049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17051      # If it failed, the variable was not from the command line. Ignore it,
17052      # but warn the user (except for BASH, which is always set by the calling BASH).
17053      if test "xLDD" != xBASH; then
17054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17055$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17056      fi
17057      # Try to locate tool using the code snippet
17058      for ac_prog in ldd
17059do
17060  # Extract the first word of "$ac_prog", so it can be a program name with args.
17061set dummy $ac_prog; ac_word=$2
17062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17063$as_echo_n "checking for $ac_word... " >&6; }
17064if ${ac_cv_path_LDD+:} false; then :
17065  $as_echo_n "(cached) " >&6
17066else
17067  case $LDD in
17068  [\\/]* | ?:[\\/]*)
17069  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17070  ;;
17071  *)
17072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17073for as_dir in $PATH
17074do
17075  IFS=$as_save_IFS
17076  test -z "$as_dir" && as_dir=.
17077    for ac_exec_ext in '' $ac_executable_extensions; do
17078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17079    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17081    break 2
17082  fi
17083done
17084  done
17085IFS=$as_save_IFS
17086
17087  ;;
17088esac
17089fi
17090LDD=$ac_cv_path_LDD
17091if test -n "$LDD"; then
17092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17093$as_echo "$LDD" >&6; }
17094else
17095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17096$as_echo "no" >&6; }
17097fi
17098
17099
17100  test -n "$LDD" && break
17101done
17102
17103    else
17104      # If it succeeded, then it was overridden by the user. We will use it
17105      # for the tool.
17106
17107      # First remove it from the list of overridden variables, so we can test
17108      # for unknown variables in the end.
17109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17110
17111      # Check if the provided tool contains a complete path.
17112      tool_specified="$LDD"
17113      tool_basename="${tool_specified##*/}"
17114      if test "x$tool_basename" = "x$tool_specified"; then
17115        # A command without a complete path is provided, search $PATH.
17116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17117$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17118        # Extract the first word of "$tool_basename", so it can be a program name with args.
17119set dummy $tool_basename; ac_word=$2
17120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17121$as_echo_n "checking for $ac_word... " >&6; }
17122if ${ac_cv_path_LDD+:} false; then :
17123  $as_echo_n "(cached) " >&6
17124else
17125  case $LDD in
17126  [\\/]* | ?:[\\/]*)
17127  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17128  ;;
17129  *)
17130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17131for as_dir in $PATH
17132do
17133  IFS=$as_save_IFS
17134  test -z "$as_dir" && as_dir=.
17135    for ac_exec_ext in '' $ac_executable_extensions; do
17136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17137    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17139    break 2
17140  fi
17141done
17142  done
17143IFS=$as_save_IFS
17144
17145  ;;
17146esac
17147fi
17148LDD=$ac_cv_path_LDD
17149if test -n "$LDD"; then
17150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17151$as_echo "$LDD" >&6; }
17152else
17153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17154$as_echo "no" >&6; }
17155fi
17156
17157
17158        if test "x$LDD" = x; then
17159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17160        fi
17161      else
17162        # Otherwise we believe it is a complete path. Use it as it is.
17163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17164$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17166$as_echo_n "checking for LDD... " >&6; }
17167        if test ! -x "$tool_specified"; then
17168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17169$as_echo "not found" >&6; }
17170          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17171        fi
17172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17173$as_echo "$tool_specified" >&6; }
17174      fi
17175    fi
17176  fi
17177
17178
17179  if test "x$LDD" = "x"; then
17180    # List shared lib dependencies is used for
17181    # debug output and checking for forbidden dependencies.
17182    # We can build without it.
17183    LDD="true"
17184  fi
17185
17186
17187  # Publish this variable in the help.
17188
17189
17190  if test "x$OTOOL" = x; then
17191    # The variable is not set by user, try to locate tool using the code snippet
17192    for ac_prog in otool
17193do
17194  # Extract the first word of "$ac_prog", so it can be a program name with args.
17195set dummy $ac_prog; ac_word=$2
17196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17197$as_echo_n "checking for $ac_word... " >&6; }
17198if ${ac_cv_path_OTOOL+:} false; then :
17199  $as_echo_n "(cached) " >&6
17200else
17201  case $OTOOL in
17202  [\\/]* | ?:[\\/]*)
17203  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17204  ;;
17205  *)
17206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17207for as_dir in $PATH
17208do
17209  IFS=$as_save_IFS
17210  test -z "$as_dir" && as_dir=.
17211    for ac_exec_ext in '' $ac_executable_extensions; do
17212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17213    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17215    break 2
17216  fi
17217done
17218  done
17219IFS=$as_save_IFS
17220
17221  ;;
17222esac
17223fi
17224OTOOL=$ac_cv_path_OTOOL
17225if test -n "$OTOOL"; then
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17227$as_echo "$OTOOL" >&6; }
17228else
17229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17230$as_echo "no" >&6; }
17231fi
17232
17233
17234  test -n "$OTOOL" && break
17235done
17236
17237  else
17238    # The variable is set, but is it from the command line or the environment?
17239
17240    # Try to remove the string !OTOOL! from our list.
17241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17243      # If it failed, the variable was not from the command line. Ignore it,
17244      # but warn the user (except for BASH, which is always set by the calling BASH).
17245      if test "xOTOOL" != xBASH; then
17246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17247$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17248      fi
17249      # Try to locate tool using the code snippet
17250      for ac_prog in otool
17251do
17252  # Extract the first word of "$ac_prog", so it can be a program name with args.
17253set dummy $ac_prog; ac_word=$2
17254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17255$as_echo_n "checking for $ac_word... " >&6; }
17256if ${ac_cv_path_OTOOL+:} false; then :
17257  $as_echo_n "(cached) " >&6
17258else
17259  case $OTOOL in
17260  [\\/]* | ?:[\\/]*)
17261  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17262  ;;
17263  *)
17264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17265for as_dir in $PATH
17266do
17267  IFS=$as_save_IFS
17268  test -z "$as_dir" && as_dir=.
17269    for ac_exec_ext in '' $ac_executable_extensions; do
17270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17271    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17273    break 2
17274  fi
17275done
17276  done
17277IFS=$as_save_IFS
17278
17279  ;;
17280esac
17281fi
17282OTOOL=$ac_cv_path_OTOOL
17283if test -n "$OTOOL"; then
17284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17285$as_echo "$OTOOL" >&6; }
17286else
17287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17288$as_echo "no" >&6; }
17289fi
17290
17291
17292  test -n "$OTOOL" && break
17293done
17294
17295    else
17296      # If it succeeded, then it was overridden by the user. We will use it
17297      # for the tool.
17298
17299      # First remove it from the list of overridden variables, so we can test
17300      # for unknown variables in the end.
17301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17302
17303      # Check if the provided tool contains a complete path.
17304      tool_specified="$OTOOL"
17305      tool_basename="${tool_specified##*/}"
17306      if test "x$tool_basename" = "x$tool_specified"; then
17307        # A command without a complete path is provided, search $PATH.
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17309$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17310        # Extract the first word of "$tool_basename", so it can be a program name with args.
17311set dummy $tool_basename; ac_word=$2
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17313$as_echo_n "checking for $ac_word... " >&6; }
17314if ${ac_cv_path_OTOOL+:} false; then :
17315  $as_echo_n "(cached) " >&6
17316else
17317  case $OTOOL in
17318  [\\/]* | ?:[\\/]*)
17319  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17320  ;;
17321  *)
17322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17323for as_dir in $PATH
17324do
17325  IFS=$as_save_IFS
17326  test -z "$as_dir" && as_dir=.
17327    for ac_exec_ext in '' $ac_executable_extensions; do
17328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17329    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17331    break 2
17332  fi
17333done
17334  done
17335IFS=$as_save_IFS
17336
17337  ;;
17338esac
17339fi
17340OTOOL=$ac_cv_path_OTOOL
17341if test -n "$OTOOL"; then
17342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17343$as_echo "$OTOOL" >&6; }
17344else
17345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17346$as_echo "no" >&6; }
17347fi
17348
17349
17350        if test "x$OTOOL" = x; then
17351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17352        fi
17353      else
17354        # Otherwise we believe it is a complete path. Use it as it is.
17355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17356$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17358$as_echo_n "checking for OTOOL... " >&6; }
17359        if test ! -x "$tool_specified"; then
17360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17361$as_echo "not found" >&6; }
17362          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17363        fi
17364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17365$as_echo "$tool_specified" >&6; }
17366      fi
17367    fi
17368  fi
17369
17370
17371  if test "x$OTOOL" = "x"; then
17372    OTOOL="true"
17373  fi
17374
17375
17376  # Publish this variable in the help.
17377
17378
17379  if test "x$READELF" = x; then
17380    # The variable is not set by user, try to locate tool using the code snippet
17381    for ac_prog in greadelf readelf
17382do
17383  # Extract the first word of "$ac_prog", so it can be a program name with args.
17384set dummy $ac_prog; ac_word=$2
17385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17386$as_echo_n "checking for $ac_word... " >&6; }
17387if ${ac_cv_path_READELF+:} false; then :
17388  $as_echo_n "(cached) " >&6
17389else
17390  case $READELF in
17391  [\\/]* | ?:[\\/]*)
17392  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17393  ;;
17394  *)
17395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17396for as_dir in $PATH
17397do
17398  IFS=$as_save_IFS
17399  test -z "$as_dir" && as_dir=.
17400    for ac_exec_ext in '' $ac_executable_extensions; do
17401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17402    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17404    break 2
17405  fi
17406done
17407  done
17408IFS=$as_save_IFS
17409
17410  ;;
17411esac
17412fi
17413READELF=$ac_cv_path_READELF
17414if test -n "$READELF"; then
17415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17416$as_echo "$READELF" >&6; }
17417else
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17419$as_echo "no" >&6; }
17420fi
17421
17422
17423  test -n "$READELF" && break
17424done
17425
17426  else
17427    # The variable is set, but is it from the command line or the environment?
17428
17429    # Try to remove the string !READELF! from our list.
17430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17432      # If it failed, the variable was not from the command line. Ignore it,
17433      # but warn the user (except for BASH, which is always set by the calling BASH).
17434      if test "xREADELF" != xBASH; then
17435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17436$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17437      fi
17438      # Try to locate tool using the code snippet
17439      for ac_prog in greadelf readelf
17440do
17441  # Extract the first word of "$ac_prog", so it can be a program name with args.
17442set dummy $ac_prog; ac_word=$2
17443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17444$as_echo_n "checking for $ac_word... " >&6; }
17445if ${ac_cv_path_READELF+:} false; then :
17446  $as_echo_n "(cached) " >&6
17447else
17448  case $READELF in
17449  [\\/]* | ?:[\\/]*)
17450  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17451  ;;
17452  *)
17453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17454for as_dir in $PATH
17455do
17456  IFS=$as_save_IFS
17457  test -z "$as_dir" && as_dir=.
17458    for ac_exec_ext in '' $ac_executable_extensions; do
17459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17460    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17462    break 2
17463  fi
17464done
17465  done
17466IFS=$as_save_IFS
17467
17468  ;;
17469esac
17470fi
17471READELF=$ac_cv_path_READELF
17472if test -n "$READELF"; then
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17474$as_echo "$READELF" >&6; }
17475else
17476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477$as_echo "no" >&6; }
17478fi
17479
17480
17481  test -n "$READELF" && break
17482done
17483
17484    else
17485      # If it succeeded, then it was overridden by the user. We will use it
17486      # for the tool.
17487
17488      # First remove it from the list of overridden variables, so we can test
17489      # for unknown variables in the end.
17490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17491
17492      # Check if the provided tool contains a complete path.
17493      tool_specified="$READELF"
17494      tool_basename="${tool_specified##*/}"
17495      if test "x$tool_basename" = "x$tool_specified"; then
17496        # A command without a complete path is provided, search $PATH.
17497        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17498$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17499        # Extract the first word of "$tool_basename", so it can be a program name with args.
17500set dummy $tool_basename; ac_word=$2
17501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17502$as_echo_n "checking for $ac_word... " >&6; }
17503if ${ac_cv_path_READELF+:} false; then :
17504  $as_echo_n "(cached) " >&6
17505else
17506  case $READELF in
17507  [\\/]* | ?:[\\/]*)
17508  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17509  ;;
17510  *)
17511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17512for as_dir in $PATH
17513do
17514  IFS=$as_save_IFS
17515  test -z "$as_dir" && as_dir=.
17516    for ac_exec_ext in '' $ac_executable_extensions; do
17517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17518    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17520    break 2
17521  fi
17522done
17523  done
17524IFS=$as_save_IFS
17525
17526  ;;
17527esac
17528fi
17529READELF=$ac_cv_path_READELF
17530if test -n "$READELF"; then
17531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17532$as_echo "$READELF" >&6; }
17533else
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17535$as_echo "no" >&6; }
17536fi
17537
17538
17539        if test "x$READELF" = x; then
17540          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17541        fi
17542      else
17543        # Otherwise we believe it is a complete path. Use it as it is.
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17545$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17547$as_echo_n "checking for READELF... " >&6; }
17548        if test ! -x "$tool_specified"; then
17549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17550$as_echo "not found" >&6; }
17551          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17552        fi
17553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17554$as_echo "$tool_specified" >&6; }
17555      fi
17556    fi
17557  fi
17558
17559
17560
17561
17562  # Publish this variable in the help.
17563
17564
17565  if test "x$HG" = x; then
17566    # The variable is not set by user, try to locate tool using the code snippet
17567    for ac_prog in hg
17568do
17569  # Extract the first word of "$ac_prog", so it can be a program name with args.
17570set dummy $ac_prog; ac_word=$2
17571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17572$as_echo_n "checking for $ac_word... " >&6; }
17573if ${ac_cv_path_HG+:} false; then :
17574  $as_echo_n "(cached) " >&6
17575else
17576  case $HG in
17577  [\\/]* | ?:[\\/]*)
17578  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17579  ;;
17580  *)
17581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17582for as_dir in $PATH
17583do
17584  IFS=$as_save_IFS
17585  test -z "$as_dir" && as_dir=.
17586    for ac_exec_ext in '' $ac_executable_extensions; do
17587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17588    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17590    break 2
17591  fi
17592done
17593  done
17594IFS=$as_save_IFS
17595
17596  ;;
17597esac
17598fi
17599HG=$ac_cv_path_HG
17600if test -n "$HG"; then
17601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17602$as_echo "$HG" >&6; }
17603else
17604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17605$as_echo "no" >&6; }
17606fi
17607
17608
17609  test -n "$HG" && break
17610done
17611
17612  else
17613    # The variable is set, but is it from the command line or the environment?
17614
17615    # Try to remove the string !HG! from our list.
17616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17618      # If it failed, the variable was not from the command line. Ignore it,
17619      # but warn the user (except for BASH, which is always set by the calling BASH).
17620      if test "xHG" != xBASH; then
17621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17622$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17623      fi
17624      # Try to locate tool using the code snippet
17625      for ac_prog in hg
17626do
17627  # Extract the first word of "$ac_prog", so it can be a program name with args.
17628set dummy $ac_prog; ac_word=$2
17629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17630$as_echo_n "checking for $ac_word... " >&6; }
17631if ${ac_cv_path_HG+:} false; then :
17632  $as_echo_n "(cached) " >&6
17633else
17634  case $HG in
17635  [\\/]* | ?:[\\/]*)
17636  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17637  ;;
17638  *)
17639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17640for as_dir in $PATH
17641do
17642  IFS=$as_save_IFS
17643  test -z "$as_dir" && as_dir=.
17644    for ac_exec_ext in '' $ac_executable_extensions; do
17645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17646    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17648    break 2
17649  fi
17650done
17651  done
17652IFS=$as_save_IFS
17653
17654  ;;
17655esac
17656fi
17657HG=$ac_cv_path_HG
17658if test -n "$HG"; then
17659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17660$as_echo "$HG" >&6; }
17661else
17662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17663$as_echo "no" >&6; }
17664fi
17665
17666
17667  test -n "$HG" && break
17668done
17669
17670    else
17671      # If it succeeded, then it was overridden by the user. We will use it
17672      # for the tool.
17673
17674      # First remove it from the list of overridden variables, so we can test
17675      # for unknown variables in the end.
17676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17677
17678      # Check if the provided tool contains a complete path.
17679      tool_specified="$HG"
17680      tool_basename="${tool_specified##*/}"
17681      if test "x$tool_basename" = "x$tool_specified"; then
17682        # A command without a complete path is provided, search $PATH.
17683        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17684$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17685        # Extract the first word of "$tool_basename", so it can be a program name with args.
17686set dummy $tool_basename; ac_word=$2
17687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17688$as_echo_n "checking for $ac_word... " >&6; }
17689if ${ac_cv_path_HG+:} false; then :
17690  $as_echo_n "(cached) " >&6
17691else
17692  case $HG in
17693  [\\/]* | ?:[\\/]*)
17694  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17695  ;;
17696  *)
17697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17698for as_dir in $PATH
17699do
17700  IFS=$as_save_IFS
17701  test -z "$as_dir" && as_dir=.
17702    for ac_exec_ext in '' $ac_executable_extensions; do
17703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17704    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17706    break 2
17707  fi
17708done
17709  done
17710IFS=$as_save_IFS
17711
17712  ;;
17713esac
17714fi
17715HG=$ac_cv_path_HG
17716if test -n "$HG"; then
17717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17718$as_echo "$HG" >&6; }
17719else
17720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17721$as_echo "no" >&6; }
17722fi
17723
17724
17725        if test "x$HG" = x; then
17726          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17727        fi
17728      else
17729        # Otherwise we believe it is a complete path. Use it as it is.
17730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17731$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17733$as_echo_n "checking for HG... " >&6; }
17734        if test ! -x "$tool_specified"; then
17735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17736$as_echo "not found" >&6; }
17737          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17738        fi
17739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17740$as_echo "$tool_specified" >&6; }
17741      fi
17742    fi
17743  fi
17744
17745
17746
17747
17748  # Publish this variable in the help.
17749
17750
17751  if test "x$STAT" = x; then
17752    # The variable is not set by user, try to locate tool using the code snippet
17753    for ac_prog in stat
17754do
17755  # Extract the first word of "$ac_prog", so it can be a program name with args.
17756set dummy $ac_prog; ac_word=$2
17757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17758$as_echo_n "checking for $ac_word... " >&6; }
17759if ${ac_cv_path_STAT+:} false; then :
17760  $as_echo_n "(cached) " >&6
17761else
17762  case $STAT in
17763  [\\/]* | ?:[\\/]*)
17764  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17765  ;;
17766  *)
17767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782  ;;
17783esac
17784fi
17785STAT=$ac_cv_path_STAT
17786if test -n "$STAT"; then
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17788$as_echo "$STAT" >&6; }
17789else
17790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17791$as_echo "no" >&6; }
17792fi
17793
17794
17795  test -n "$STAT" && break
17796done
17797
17798  else
17799    # The variable is set, but is it from the command line or the environment?
17800
17801    # Try to remove the string !STAT! from our list.
17802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17804      # If it failed, the variable was not from the command line. Ignore it,
17805      # but warn the user (except for BASH, which is always set by the calling BASH).
17806      if test "xSTAT" != xBASH; then
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17808$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17809      fi
17810      # Try to locate tool using the code snippet
17811      for ac_prog in stat
17812do
17813  # Extract the first word of "$ac_prog", so it can be a program name with args.
17814set dummy $ac_prog; ac_word=$2
17815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17816$as_echo_n "checking for $ac_word... " >&6; }
17817if ${ac_cv_path_STAT+:} false; then :
17818  $as_echo_n "(cached) " >&6
17819else
17820  case $STAT in
17821  [\\/]* | ?:[\\/]*)
17822  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17823  ;;
17824  *)
17825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17826for as_dir in $PATH
17827do
17828  IFS=$as_save_IFS
17829  test -z "$as_dir" && as_dir=.
17830    for ac_exec_ext in '' $ac_executable_extensions; do
17831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17832    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17834    break 2
17835  fi
17836done
17837  done
17838IFS=$as_save_IFS
17839
17840  ;;
17841esac
17842fi
17843STAT=$ac_cv_path_STAT
17844if test -n "$STAT"; then
17845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17846$as_echo "$STAT" >&6; }
17847else
17848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17849$as_echo "no" >&6; }
17850fi
17851
17852
17853  test -n "$STAT" && break
17854done
17855
17856    else
17857      # If it succeeded, then it was overridden by the user. We will use it
17858      # for the tool.
17859
17860      # First remove it from the list of overridden variables, so we can test
17861      # for unknown variables in the end.
17862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17863
17864      # Check if the provided tool contains a complete path.
17865      tool_specified="$STAT"
17866      tool_basename="${tool_specified##*/}"
17867      if test "x$tool_basename" = "x$tool_specified"; then
17868        # A command without a complete path is provided, search $PATH.
17869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17870$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17871        # Extract the first word of "$tool_basename", so it can be a program name with args.
17872set dummy $tool_basename; ac_word=$2
17873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17874$as_echo_n "checking for $ac_word... " >&6; }
17875if ${ac_cv_path_STAT+:} false; then :
17876  $as_echo_n "(cached) " >&6
17877else
17878  case $STAT in
17879  [\\/]* | ?:[\\/]*)
17880  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17881  ;;
17882  *)
17883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17884for as_dir in $PATH
17885do
17886  IFS=$as_save_IFS
17887  test -z "$as_dir" && as_dir=.
17888    for ac_exec_ext in '' $ac_executable_extensions; do
17889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17890    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17892    break 2
17893  fi
17894done
17895  done
17896IFS=$as_save_IFS
17897
17898  ;;
17899esac
17900fi
17901STAT=$ac_cv_path_STAT
17902if test -n "$STAT"; then
17903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17904$as_echo "$STAT" >&6; }
17905else
17906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17907$as_echo "no" >&6; }
17908fi
17909
17910
17911        if test "x$STAT" = x; then
17912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17913        fi
17914      else
17915        # Otherwise we believe it is a complete path. Use it as it is.
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17917$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17919$as_echo_n "checking for STAT... " >&6; }
17920        if test ! -x "$tool_specified"; then
17921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17922$as_echo "not found" >&6; }
17923          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
17924        fi
17925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17926$as_echo "$tool_specified" >&6; }
17927      fi
17928    fi
17929  fi
17930
17931
17932
17933
17934  # Publish this variable in the help.
17935
17936
17937  if test "x$TIME" = x; then
17938    # The variable is not set by user, try to locate tool using the code snippet
17939    for ac_prog in time
17940do
17941  # Extract the first word of "$ac_prog", so it can be a program name with args.
17942set dummy $ac_prog; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_path_TIME+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  case $TIME in
17949  [\\/]* | ?:[\\/]*)
17950  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
17951  ;;
17952  *)
17953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17954for as_dir in $PATH
17955do
17956  IFS=$as_save_IFS
17957  test -z "$as_dir" && as_dir=.
17958    for ac_exec_ext in '' $ac_executable_extensions; do
17959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17960    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
17961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17962    break 2
17963  fi
17964done
17965  done
17966IFS=$as_save_IFS
17967
17968  ;;
17969esac
17970fi
17971TIME=$ac_cv_path_TIME
17972if test -n "$TIME"; then
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
17974$as_echo "$TIME" >&6; }
17975else
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977$as_echo "no" >&6; }
17978fi
17979
17980
17981  test -n "$TIME" && break
17982done
17983
17984  else
17985    # The variable is set, but is it from the command line or the environment?
17986
17987    # Try to remove the string !TIME! from our list.
17988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
17989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17990      # If it failed, the variable was not from the command line. Ignore it,
17991      # but warn the user (except for BASH, which is always set by the calling BASH).
17992      if test "xTIME" != xBASH; then
17993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
17994$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
17995      fi
17996      # Try to locate tool using the code snippet
17997      for ac_prog in time
17998do
17999  # Extract the first word of "$ac_prog", so it can be a program name with args.
18000set dummy $ac_prog; ac_word=$2
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18002$as_echo_n "checking for $ac_word... " >&6; }
18003if ${ac_cv_path_TIME+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  case $TIME in
18007  [\\/]* | ?:[\\/]*)
18008  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18009  ;;
18010  *)
18011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18012for as_dir in $PATH
18013do
18014  IFS=$as_save_IFS
18015  test -z "$as_dir" && as_dir=.
18016    for ac_exec_ext in '' $ac_executable_extensions; do
18017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18018    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18020    break 2
18021  fi
18022done
18023  done
18024IFS=$as_save_IFS
18025
18026  ;;
18027esac
18028fi
18029TIME=$ac_cv_path_TIME
18030if test -n "$TIME"; then
18031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18032$as_echo "$TIME" >&6; }
18033else
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18035$as_echo "no" >&6; }
18036fi
18037
18038
18039  test -n "$TIME" && break
18040done
18041
18042    else
18043      # If it succeeded, then it was overridden by the user. We will use it
18044      # for the tool.
18045
18046      # First remove it from the list of overridden variables, so we can test
18047      # for unknown variables in the end.
18048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18049
18050      # Check if the provided tool contains a complete path.
18051      tool_specified="$TIME"
18052      tool_basename="${tool_specified##*/}"
18053      if test "x$tool_basename" = "x$tool_specified"; then
18054        # A command without a complete path is provided, search $PATH.
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18056$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18057        # Extract the first word of "$tool_basename", so it can be a program name with args.
18058set dummy $tool_basename; ac_word=$2
18059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18060$as_echo_n "checking for $ac_word... " >&6; }
18061if ${ac_cv_path_TIME+:} false; then :
18062  $as_echo_n "(cached) " >&6
18063else
18064  case $TIME in
18065  [\\/]* | ?:[\\/]*)
18066  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18067  ;;
18068  *)
18069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18070for as_dir in $PATH
18071do
18072  IFS=$as_save_IFS
18073  test -z "$as_dir" && as_dir=.
18074    for ac_exec_ext in '' $ac_executable_extensions; do
18075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18076    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18078    break 2
18079  fi
18080done
18081  done
18082IFS=$as_save_IFS
18083
18084  ;;
18085esac
18086fi
18087TIME=$ac_cv_path_TIME
18088if test -n "$TIME"; then
18089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18090$as_echo "$TIME" >&6; }
18091else
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18093$as_echo "no" >&6; }
18094fi
18095
18096
18097        if test "x$TIME" = x; then
18098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18099        fi
18100      else
18101        # Otherwise we believe it is a complete path. Use it as it is.
18102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18103$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18105$as_echo_n "checking for TIME... " >&6; }
18106        if test ! -x "$tool_specified"; then
18107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18108$as_echo "not found" >&6; }
18109          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18110        fi
18111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18112$as_echo "$tool_specified" >&6; }
18113      fi
18114    fi
18115  fi
18116
18117
18118  # Check if it's GNU time
18119  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18120  if test "x$IS_GNU_TIME" != x; then
18121    IS_GNU_TIME=yes
18122  else
18123    IS_GNU_TIME=no
18124  fi
18125
18126
18127  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18128
18129
18130
18131  # Publish this variable in the help.
18132
18133
18134  if test "x$COMM" = x; then
18135    # The variable is not set by user, try to locate tool using the code snippet
18136    for ac_prog in comm
18137do
18138  # Extract the first word of "$ac_prog", so it can be a program name with args.
18139set dummy $ac_prog; ac_word=$2
18140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141$as_echo_n "checking for $ac_word... " >&6; }
18142if ${ac_cv_path_COMM+:} false; then :
18143  $as_echo_n "(cached) " >&6
18144else
18145  case $COMM in
18146  [\\/]* | ?:[\\/]*)
18147  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18148  ;;
18149  *)
18150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151for as_dir in $PATH
18152do
18153  IFS=$as_save_IFS
18154  test -z "$as_dir" && as_dir=.
18155    for ac_exec_ext in '' $ac_executable_extensions; do
18156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159    break 2
18160  fi
18161done
18162  done
18163IFS=$as_save_IFS
18164
18165  ;;
18166esac
18167fi
18168COMM=$ac_cv_path_COMM
18169if test -n "$COMM"; then
18170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18171$as_echo "$COMM" >&6; }
18172else
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174$as_echo "no" >&6; }
18175fi
18176
18177
18178  test -n "$COMM" && break
18179done
18180
18181  else
18182    # The variable is set, but is it from the command line or the environment?
18183
18184    # Try to remove the string !COMM! from our list.
18185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18187      # If it failed, the variable was not from the command line. Ignore it,
18188      # but warn the user (except for BASH, which is always set by the calling BASH).
18189      if test "xCOMM" != xBASH; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18191$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18192      fi
18193      # Try to locate tool using the code snippet
18194      for ac_prog in comm
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_COMM+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $COMM in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226COMM=$ac_cv_path_COMM
18227if test -n "$COMM"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18229$as_echo "$COMM" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$COMM" && break
18237done
18238
18239    else
18240      # If it succeeded, then it was overridden by the user. We will use it
18241      # for the tool.
18242
18243      # First remove it from the list of overridden variables, so we can test
18244      # for unknown variables in the end.
18245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18246
18247      # Check if the provided tool contains a complete path.
18248      tool_specified="$COMM"
18249      tool_basename="${tool_specified##*/}"
18250      if test "x$tool_basename" = "x$tool_specified"; then
18251        # A command without a complete path is provided, search $PATH.
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18253$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18254        # Extract the first word of "$tool_basename", so it can be a program name with args.
18255set dummy $tool_basename; ac_word=$2
18256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257$as_echo_n "checking for $ac_word... " >&6; }
18258if ${ac_cv_path_COMM+:} false; then :
18259  $as_echo_n "(cached) " >&6
18260else
18261  case $COMM in
18262  [\\/]* | ?:[\\/]*)
18263  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18264  ;;
18265  *)
18266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267for as_dir in $PATH
18268do
18269  IFS=$as_save_IFS
18270  test -z "$as_dir" && as_dir=.
18271    for ac_exec_ext in '' $ac_executable_extensions; do
18272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275    break 2
18276  fi
18277done
18278  done
18279IFS=$as_save_IFS
18280
18281  ;;
18282esac
18283fi
18284COMM=$ac_cv_path_COMM
18285if test -n "$COMM"; then
18286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18287$as_echo "$COMM" >&6; }
18288else
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290$as_echo "no" >&6; }
18291fi
18292
18293
18294        if test "x$COMM" = x; then
18295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18296        fi
18297      else
18298        # Otherwise we believe it is a complete path. Use it as it is.
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18300$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18302$as_echo_n "checking for COMM... " >&6; }
18303        if test ! -x "$tool_specified"; then
18304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18305$as_echo "not found" >&6; }
18306          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18307        fi
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18309$as_echo "$tool_specified" >&6; }
18310      fi
18311    fi
18312  fi
18313
18314
18315
18316  if test "x$COMM" = x; then
18317    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18318  fi
18319
18320
18321  fi
18322
18323  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18324
18325
18326
18327  # Publish this variable in the help.
18328
18329
18330  if test "x$DSYMUTIL" = x; then
18331    # The variable is not set by user, try to locate tool using the code snippet
18332    for ac_prog in dsymutil
18333do
18334  # Extract the first word of "$ac_prog", so it can be a program name with args.
18335set dummy $ac_prog; ac_word=$2
18336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18337$as_echo_n "checking for $ac_word... " >&6; }
18338if ${ac_cv_path_DSYMUTIL+:} false; then :
18339  $as_echo_n "(cached) " >&6
18340else
18341  case $DSYMUTIL in
18342  [\\/]* | ?:[\\/]*)
18343  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18344  ;;
18345  *)
18346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18347for as_dir in $PATH
18348do
18349  IFS=$as_save_IFS
18350  test -z "$as_dir" && as_dir=.
18351    for ac_exec_ext in '' $ac_executable_extensions; do
18352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18353    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18355    break 2
18356  fi
18357done
18358  done
18359IFS=$as_save_IFS
18360
18361  ;;
18362esac
18363fi
18364DSYMUTIL=$ac_cv_path_DSYMUTIL
18365if test -n "$DSYMUTIL"; then
18366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18367$as_echo "$DSYMUTIL" >&6; }
18368else
18369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18370$as_echo "no" >&6; }
18371fi
18372
18373
18374  test -n "$DSYMUTIL" && break
18375done
18376
18377  else
18378    # The variable is set, but is it from the command line or the environment?
18379
18380    # Try to remove the string !DSYMUTIL! from our list.
18381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18383      # If it failed, the variable was not from the command line. Ignore it,
18384      # but warn the user (except for BASH, which is always set by the calling BASH).
18385      if test "xDSYMUTIL" != xBASH; then
18386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18387$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18388      fi
18389      # Try to locate tool using the code snippet
18390      for ac_prog in dsymutil
18391do
18392  # Extract the first word of "$ac_prog", so it can be a program name with args.
18393set dummy $ac_prog; ac_word=$2
18394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18395$as_echo_n "checking for $ac_word... " >&6; }
18396if ${ac_cv_path_DSYMUTIL+:} false; then :
18397  $as_echo_n "(cached) " >&6
18398else
18399  case $DSYMUTIL in
18400  [\\/]* | ?:[\\/]*)
18401  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18402  ;;
18403  *)
18404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18405for as_dir in $PATH
18406do
18407  IFS=$as_save_IFS
18408  test -z "$as_dir" && as_dir=.
18409    for ac_exec_ext in '' $ac_executable_extensions; do
18410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18411    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18413    break 2
18414  fi
18415done
18416  done
18417IFS=$as_save_IFS
18418
18419  ;;
18420esac
18421fi
18422DSYMUTIL=$ac_cv_path_DSYMUTIL
18423if test -n "$DSYMUTIL"; then
18424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18425$as_echo "$DSYMUTIL" >&6; }
18426else
18427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18428$as_echo "no" >&6; }
18429fi
18430
18431
18432  test -n "$DSYMUTIL" && break
18433done
18434
18435    else
18436      # If it succeeded, then it was overridden by the user. We will use it
18437      # for the tool.
18438
18439      # First remove it from the list of overridden variables, so we can test
18440      # for unknown variables in the end.
18441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18442
18443      # Check if the provided tool contains a complete path.
18444      tool_specified="$DSYMUTIL"
18445      tool_basename="${tool_specified##*/}"
18446      if test "x$tool_basename" = "x$tool_specified"; then
18447        # A command without a complete path is provided, search $PATH.
18448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18449$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18450        # Extract the first word of "$tool_basename", so it can be a program name with args.
18451set dummy $tool_basename; ac_word=$2
18452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18453$as_echo_n "checking for $ac_word... " >&6; }
18454if ${ac_cv_path_DSYMUTIL+:} false; then :
18455  $as_echo_n "(cached) " >&6
18456else
18457  case $DSYMUTIL in
18458  [\\/]* | ?:[\\/]*)
18459  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18460  ;;
18461  *)
18462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18463for as_dir in $PATH
18464do
18465  IFS=$as_save_IFS
18466  test -z "$as_dir" && as_dir=.
18467    for ac_exec_ext in '' $ac_executable_extensions; do
18468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18469    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18471    break 2
18472  fi
18473done
18474  done
18475IFS=$as_save_IFS
18476
18477  ;;
18478esac
18479fi
18480DSYMUTIL=$ac_cv_path_DSYMUTIL
18481if test -n "$DSYMUTIL"; then
18482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18483$as_echo "$DSYMUTIL" >&6; }
18484else
18485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18486$as_echo "no" >&6; }
18487fi
18488
18489
18490        if test "x$DSYMUTIL" = x; then
18491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18492        fi
18493      else
18494        # Otherwise we believe it is a complete path. Use it as it is.
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18496$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18498$as_echo_n "checking for DSYMUTIL... " >&6; }
18499        if test ! -x "$tool_specified"; then
18500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18501$as_echo "not found" >&6; }
18502          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18503        fi
18504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18505$as_echo "$tool_specified" >&6; }
18506      fi
18507    fi
18508  fi
18509
18510
18511
18512  if test "x$DSYMUTIL" = x; then
18513    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18514  fi
18515
18516
18517
18518
18519
18520  # Publish this variable in the help.
18521
18522
18523  if test "x$XATTR" = x; then
18524    # The variable is not set by user, try to locate tool using the code snippet
18525    for ac_prog in xattr
18526do
18527  # Extract the first word of "$ac_prog", so it can be a program name with args.
18528set dummy $ac_prog; ac_word=$2
18529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18530$as_echo_n "checking for $ac_word... " >&6; }
18531if ${ac_cv_path_XATTR+:} false; then :
18532  $as_echo_n "(cached) " >&6
18533else
18534  case $XATTR in
18535  [\\/]* | ?:[\\/]*)
18536  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18537  ;;
18538  *)
18539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18540for as_dir in $PATH
18541do
18542  IFS=$as_save_IFS
18543  test -z "$as_dir" && as_dir=.
18544    for ac_exec_ext in '' $ac_executable_extensions; do
18545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18546    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18548    break 2
18549  fi
18550done
18551  done
18552IFS=$as_save_IFS
18553
18554  ;;
18555esac
18556fi
18557XATTR=$ac_cv_path_XATTR
18558if test -n "$XATTR"; then
18559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18560$as_echo "$XATTR" >&6; }
18561else
18562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18563$as_echo "no" >&6; }
18564fi
18565
18566
18567  test -n "$XATTR" && break
18568done
18569
18570  else
18571    # The variable is set, but is it from the command line or the environment?
18572
18573    # Try to remove the string !XATTR! from our list.
18574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18576      # If it failed, the variable was not from the command line. Ignore it,
18577      # but warn the user (except for BASH, which is always set by the calling BASH).
18578      if test "xXATTR" != xBASH; then
18579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18580$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18581      fi
18582      # Try to locate tool using the code snippet
18583      for ac_prog in xattr
18584do
18585  # Extract the first word of "$ac_prog", so it can be a program name with args.
18586set dummy $ac_prog; ac_word=$2
18587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588$as_echo_n "checking for $ac_word... " >&6; }
18589if ${ac_cv_path_XATTR+:} false; then :
18590  $as_echo_n "(cached) " >&6
18591else
18592  case $XATTR in
18593  [\\/]* | ?:[\\/]*)
18594  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18595  ;;
18596  *)
18597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598for as_dir in $PATH
18599do
18600  IFS=$as_save_IFS
18601  test -z "$as_dir" && as_dir=.
18602    for ac_exec_ext in '' $ac_executable_extensions; do
18603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606    break 2
18607  fi
18608done
18609  done
18610IFS=$as_save_IFS
18611
18612  ;;
18613esac
18614fi
18615XATTR=$ac_cv_path_XATTR
18616if test -n "$XATTR"; then
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18618$as_echo "$XATTR" >&6; }
18619else
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621$as_echo "no" >&6; }
18622fi
18623
18624
18625  test -n "$XATTR" && break
18626done
18627
18628    else
18629      # If it succeeded, then it was overridden by the user. We will use it
18630      # for the tool.
18631
18632      # First remove it from the list of overridden variables, so we can test
18633      # for unknown variables in the end.
18634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18635
18636      # Check if the provided tool contains a complete path.
18637      tool_specified="$XATTR"
18638      tool_basename="${tool_specified##*/}"
18639      if test "x$tool_basename" = "x$tool_specified"; then
18640        # A command without a complete path is provided, search $PATH.
18641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18642$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18643        # Extract the first word of "$tool_basename", so it can be a program name with args.
18644set dummy $tool_basename; ac_word=$2
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646$as_echo_n "checking for $ac_word... " >&6; }
18647if ${ac_cv_path_XATTR+:} false; then :
18648  $as_echo_n "(cached) " >&6
18649else
18650  case $XATTR in
18651  [\\/]* | ?:[\\/]*)
18652  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18653  ;;
18654  *)
18655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18656for as_dir in $PATH
18657do
18658  IFS=$as_save_IFS
18659  test -z "$as_dir" && as_dir=.
18660    for ac_exec_ext in '' $ac_executable_extensions; do
18661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18662    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18664    break 2
18665  fi
18666done
18667  done
18668IFS=$as_save_IFS
18669
18670  ;;
18671esac
18672fi
18673XATTR=$ac_cv_path_XATTR
18674if test -n "$XATTR"; then
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18676$as_echo "$XATTR" >&6; }
18677else
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18679$as_echo "no" >&6; }
18680fi
18681
18682
18683        if test "x$XATTR" = x; then
18684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18685        fi
18686      else
18687        # Otherwise we believe it is a complete path. Use it as it is.
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18689$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18691$as_echo_n "checking for XATTR... " >&6; }
18692        if test ! -x "$tool_specified"; then
18693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18694$as_echo "not found" >&6; }
18695          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18696        fi
18697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18698$as_echo "$tool_specified" >&6; }
18699      fi
18700    fi
18701  fi
18702
18703
18704
18705  if test "x$XATTR" = x; then
18706    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18707  fi
18708
18709
18710
18711
18712  # Publish this variable in the help.
18713
18714
18715  if test "x$CODESIGN" = x; then
18716    # The variable is not set by user, try to locate tool using the code snippet
18717    for ac_prog in codesign
18718do
18719  # Extract the first word of "$ac_prog", so it can be a program name with args.
18720set dummy $ac_prog; ac_word=$2
18721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18722$as_echo_n "checking for $ac_word... " >&6; }
18723if ${ac_cv_path_CODESIGN+:} false; then :
18724  $as_echo_n "(cached) " >&6
18725else
18726  case $CODESIGN in
18727  [\\/]* | ?:[\\/]*)
18728  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18729  ;;
18730  *)
18731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18732for as_dir in $PATH
18733do
18734  IFS=$as_save_IFS
18735  test -z "$as_dir" && as_dir=.
18736    for ac_exec_ext in '' $ac_executable_extensions; do
18737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18738    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18740    break 2
18741  fi
18742done
18743  done
18744IFS=$as_save_IFS
18745
18746  ;;
18747esac
18748fi
18749CODESIGN=$ac_cv_path_CODESIGN
18750if test -n "$CODESIGN"; then
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18752$as_echo "$CODESIGN" >&6; }
18753else
18754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18755$as_echo "no" >&6; }
18756fi
18757
18758
18759  test -n "$CODESIGN" && break
18760done
18761
18762  else
18763    # The variable is set, but is it from the command line or the environment?
18764
18765    # Try to remove the string !CODESIGN! from our list.
18766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18768      # If it failed, the variable was not from the command line. Ignore it,
18769      # but warn the user (except for BASH, which is always set by the calling BASH).
18770      if test "xCODESIGN" != xBASH; then
18771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18772$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18773      fi
18774      # Try to locate tool using the code snippet
18775      for ac_prog in codesign
18776do
18777  # Extract the first word of "$ac_prog", so it can be a program name with args.
18778set dummy $ac_prog; ac_word=$2
18779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18780$as_echo_n "checking for $ac_word... " >&6; }
18781if ${ac_cv_path_CODESIGN+:} false; then :
18782  $as_echo_n "(cached) " >&6
18783else
18784  case $CODESIGN in
18785  [\\/]* | ?:[\\/]*)
18786  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18787  ;;
18788  *)
18789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18790for as_dir in $PATH
18791do
18792  IFS=$as_save_IFS
18793  test -z "$as_dir" && as_dir=.
18794    for ac_exec_ext in '' $ac_executable_extensions; do
18795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18796    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18798    break 2
18799  fi
18800done
18801  done
18802IFS=$as_save_IFS
18803
18804  ;;
18805esac
18806fi
18807CODESIGN=$ac_cv_path_CODESIGN
18808if test -n "$CODESIGN"; then
18809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18810$as_echo "$CODESIGN" >&6; }
18811else
18812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18813$as_echo "no" >&6; }
18814fi
18815
18816
18817  test -n "$CODESIGN" && break
18818done
18819
18820    else
18821      # If it succeeded, then it was overridden by the user. We will use it
18822      # for the tool.
18823
18824      # First remove it from the list of overridden variables, so we can test
18825      # for unknown variables in the end.
18826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18827
18828      # Check if the provided tool contains a complete path.
18829      tool_specified="$CODESIGN"
18830      tool_basename="${tool_specified##*/}"
18831      if test "x$tool_basename" = "x$tool_specified"; then
18832        # A command without a complete path is provided, search $PATH.
18833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18834$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18835        # Extract the first word of "$tool_basename", so it can be a program name with args.
18836set dummy $tool_basename; ac_word=$2
18837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18838$as_echo_n "checking for $ac_word... " >&6; }
18839if ${ac_cv_path_CODESIGN+:} false; then :
18840  $as_echo_n "(cached) " >&6
18841else
18842  case $CODESIGN in
18843  [\\/]* | ?:[\\/]*)
18844  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18845  ;;
18846  *)
18847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18848for as_dir in $PATH
18849do
18850  IFS=$as_save_IFS
18851  test -z "$as_dir" && as_dir=.
18852    for ac_exec_ext in '' $ac_executable_extensions; do
18853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18854    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18856    break 2
18857  fi
18858done
18859  done
18860IFS=$as_save_IFS
18861
18862  ;;
18863esac
18864fi
18865CODESIGN=$ac_cv_path_CODESIGN
18866if test -n "$CODESIGN"; then
18867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18868$as_echo "$CODESIGN" >&6; }
18869else
18870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18871$as_echo "no" >&6; }
18872fi
18873
18874
18875        if test "x$CODESIGN" = x; then
18876          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18877        fi
18878      else
18879        # Otherwise we believe it is a complete path. Use it as it is.
18880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18881$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18883$as_echo_n "checking for CODESIGN... " >&6; }
18884        if test ! -x "$tool_specified"; then
18885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18886$as_echo "not found" >&6; }
18887          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18888        fi
18889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18890$as_echo "$tool_specified" >&6; }
18891      fi
18892    fi
18893  fi
18894
18895
18896    if test "x$CODESIGN" != "x"; then
18897      # Verify that the openjdk_codesign certificate is present
18898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18899$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18900      rm -f codesign-testfile
18901      touch codesign-testfile
18902      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18903      rm -f codesign-testfile
18904      if test "x$CODESIGN" = x; then
18905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18906$as_echo "no" >&6; }
18907      else
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18909$as_echo "yes" >&6; }
18910      fi
18911    fi
18912  fi
18913
18914
18915# Check if pkg-config is available.
18916
18917
18918if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18919	if test -n "$ac_tool_prefix"; then
18920  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18921set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18923$as_echo_n "checking for $ac_word... " >&6; }
18924if ${ac_cv_path_PKG_CONFIG+:} false; then :
18925  $as_echo_n "(cached) " >&6
18926else
18927  case $PKG_CONFIG in
18928  [\\/]* | ?:[\\/]*)
18929  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18930  ;;
18931  *)
18932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18933for as_dir in $PATH
18934do
18935  IFS=$as_save_IFS
18936  test -z "$as_dir" && as_dir=.
18937    for ac_exec_ext in '' $ac_executable_extensions; do
18938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18939    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18941    break 2
18942  fi
18943done
18944  done
18945IFS=$as_save_IFS
18946
18947  ;;
18948esac
18949fi
18950PKG_CONFIG=$ac_cv_path_PKG_CONFIG
18951if test -n "$PKG_CONFIG"; then
18952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
18953$as_echo "$PKG_CONFIG" >&6; }
18954else
18955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18956$as_echo "no" >&6; }
18957fi
18958
18959
18960fi
18961if test -z "$ac_cv_path_PKG_CONFIG"; then
18962  ac_pt_PKG_CONFIG=$PKG_CONFIG
18963  # Extract the first word of "pkg-config", so it can be a program name with args.
18964set dummy pkg-config; ac_word=$2
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18966$as_echo_n "checking for $ac_word... " >&6; }
18967if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
18968  $as_echo_n "(cached) " >&6
18969else
18970  case $ac_pt_PKG_CONFIG in
18971  [\\/]* | ?:[\\/]*)
18972  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
18973  ;;
18974  *)
18975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18976for as_dir in $PATH
18977do
18978  IFS=$as_save_IFS
18979  test -z "$as_dir" && as_dir=.
18980    for ac_exec_ext in '' $ac_executable_extensions; do
18981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18982    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18984    break 2
18985  fi
18986done
18987  done
18988IFS=$as_save_IFS
18989
18990  ;;
18991esac
18992fi
18993ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
18994if test -n "$ac_pt_PKG_CONFIG"; then
18995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
18996$as_echo "$ac_pt_PKG_CONFIG" >&6; }
18997else
18998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18999$as_echo "no" >&6; }
19000fi
19001
19002  if test "x$ac_pt_PKG_CONFIG" = x; then
19003    PKG_CONFIG=""
19004  else
19005    case $cross_compiling:$ac_tool_warned in
19006yes:)
19007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19009ac_tool_warned=yes ;;
19010esac
19011    PKG_CONFIG=$ac_pt_PKG_CONFIG
19012  fi
19013else
19014  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19015fi
19016
19017fi
19018if test -n "$PKG_CONFIG"; then
19019	_pkg_min_version=0.9.0
19020	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19021$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19022	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19023		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19024$as_echo "yes" >&6; }
19025	else
19026		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19027$as_echo "no" >&6; }
19028		PKG_CONFIG=""
19029	fi
19030
19031fi
19032
19033# After basic tools have been setup, we can check build os specific details.
19034
19035  ###############################################################################
19036
19037  # Note that this is the build platform OS version!
19038
19039  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19040  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19041  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19042  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19043
19044
19045
19046
19047
19048# Setup builddeps, for automatic downloading of tools we need.
19049# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19050# boot-jdk setup, but we need to have basic tools setup first.
19051
19052
19053# Check whether --with-builddeps-conf was given.
19054if test "${with_builddeps_conf+set}" = set; then :
19055  withval=$with_builddeps_conf;
19056fi
19057
19058
19059
19060# Check whether --with-builddeps-server was given.
19061if test "${with_builddeps_server+set}" = set; then :
19062  withval=$with_builddeps_server;
19063fi
19064
19065
19066
19067# Check whether --with-builddeps-dir was given.
19068if test "${with_builddeps_dir+set}" = set; then :
19069  withval=$with_builddeps_dir;
19070else
19071  with_builddeps_dir=/localhome/builddeps
19072fi
19073
19074
19075
19076# Check whether --with-builddeps-group was given.
19077if test "${with_builddeps_group+set}" = set; then :
19078  withval=$with_builddeps_group;
19079fi
19080
19081
19082
19083
19084  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19085    if test "x$with_builddeps_conf" != x; then
19086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19087$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19088      builddepsfile=$with_builddeps_conf
19089      if test -s $builddepsfile; then
19090        . $builddepsfile
19091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19092$as_echo "loaded!" >&6; }
19093      else
19094        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19095      fi
19096    else
19097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19098$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19099      builddepsfile=`mktemp`
19100      touch $builddepsfile
19101      # Put all found confs into a single file.
19102      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19103      # Source the file to acquire the variables
19104      if test -s $builddepsfile; then
19105        . $builddepsfile
19106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19107$as_echo "found at least one!" >&6; }
19108      else
19109        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19110      fi
19111    fi
19112    # Create build and target names that use _ instead of "-" and ".".
19113    # This is necessary to use them in variable names.
19114    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19115    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19116    # Extract rewrite information for build and target
19117    eval rewritten_build=\${REWRITE_${build_var}}
19118    if test "x$rewritten_build" = x; then
19119      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19120      echo Build stays the same $rewritten_build
19121    else
19122      echo Rewriting build for builddeps into $rewritten_build
19123    fi
19124    eval rewritten_target=\${REWRITE_${target_var}}
19125    if test "x$rewritten_target" = x; then
19126      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19127      echo Target stays the same $rewritten_target
19128    else
19129      echo Rewriting target for builddeps into $rewritten_target
19130    fi
19131    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19132    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19133  fi
19134  for ac_prog in 7z unzip
19135do
19136  # Extract the first word of "$ac_prog", so it can be a program name with args.
19137set dummy $ac_prog; ac_word=$2
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19139$as_echo_n "checking for $ac_word... " >&6; }
19140if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19141  $as_echo_n "(cached) " >&6
19142else
19143  if test -n "$BDEPS_UNZIP"; then
19144  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19145else
19146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19147for as_dir in $PATH
19148do
19149  IFS=$as_save_IFS
19150  test -z "$as_dir" && as_dir=.
19151    for ac_exec_ext in '' $ac_executable_extensions; do
19152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19153    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19155    break 2
19156  fi
19157done
19158  done
19159IFS=$as_save_IFS
19160
19161fi
19162fi
19163BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19164if test -n "$BDEPS_UNZIP"; then
19165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19166$as_echo "$BDEPS_UNZIP" >&6; }
19167else
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19169$as_echo "no" >&6; }
19170fi
19171
19172
19173  test -n "$BDEPS_UNZIP" && break
19174done
19175
19176  if test "x$BDEPS_UNZIP" = x7z; then
19177    BDEPS_UNZIP="7z x"
19178  fi
19179
19180  for ac_prog in wget lftp ftp
19181do
19182  # Extract the first word of "$ac_prog", so it can be a program name with args.
19183set dummy $ac_prog; ac_word=$2
19184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19185$as_echo_n "checking for $ac_word... " >&6; }
19186if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19187  $as_echo_n "(cached) " >&6
19188else
19189  if test -n "$BDEPS_FTP"; then
19190  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19191else
19192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19193for as_dir in $PATH
19194do
19195  IFS=$as_save_IFS
19196  test -z "$as_dir" && as_dir=.
19197    for ac_exec_ext in '' $ac_executable_extensions; do
19198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19199    ac_cv_prog_BDEPS_FTP="$ac_prog"
19200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19201    break 2
19202  fi
19203done
19204  done
19205IFS=$as_save_IFS
19206
19207fi
19208fi
19209BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19210if test -n "$BDEPS_FTP"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19212$as_echo "$BDEPS_FTP" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$BDEPS_FTP" && break
19220done
19221
19222
19223
19224###############################################################################
19225#
19226# Determine OpenJDK variants, options and version numbers.
19227#
19228###############################################################################
19229
19230# We need build & target for this.
19231
19232
19233  ###############################################################################
19234  #
19235  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19236  # We always build headless support.
19237  #
19238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19239$as_echo_n "checking headful support... " >&6; }
19240  # Check whether --enable-headful was given.
19241if test "${enable_headful+set}" = set; then :
19242  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19243else
19244  SUPPORT_HEADFUL=yes
19245fi
19246
19247
19248  SUPPORT_HEADLESS=yes
19249  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19250
19251  if test "x$SUPPORT_HEADFUL" = xyes; then
19252    # We are building both headful and headless.
19253    headful_msg="include support for both headful and headless"
19254  fi
19255
19256  if test "x$SUPPORT_HEADFUL" = xno; then
19257    # Thus we are building headless only.
19258    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19259    headful_msg="headless only"
19260  fi
19261
19262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19263$as_echo "$headful_msg" >&6; }
19264
19265
19266
19267
19268
19269  # Control wether Hotspot runs Queens test after build.
19270  # Check whether --enable-hotspot-test-in-build was given.
19271if test "${enable_hotspot_test_in_build+set}" = set; then :
19272  enableval=$enable_hotspot_test_in_build;
19273else
19274  enable_hotspot_test_in_build=no
19275fi
19276
19277  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19278    TEST_IN_BUILD=true
19279  else
19280    TEST_IN_BUILD=false
19281  fi
19282
19283
19284  ###############################################################################
19285  #
19286  # Choose cacerts source file
19287  #
19288
19289# Check whether --with-cacerts-file was given.
19290if test "${with_cacerts_file+set}" = set; then :
19291  withval=$with_cacerts_file;
19292fi
19293
19294  if test "x$with_cacerts_file" != x; then
19295    CACERTS_FILE=$with_cacerts_file
19296  else
19297    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19298  fi
19299
19300
19301  ###############################################################################
19302  #
19303  # Enable or disable unlimited crypto
19304  #
19305  # Check whether --enable-unlimited-crypto was given.
19306if test "${enable_unlimited_crypto+set}" = set; then :
19307  enableval=$enable_unlimited_crypto;
19308else
19309  enable_unlimited_crypto=no
19310fi
19311
19312  if test "x$enable_unlimited_crypto" = "xyes"; then
19313    UNLIMITED_CRYPTO=true
19314  else
19315    UNLIMITED_CRYPTO=false
19316  fi
19317
19318
19319  ###############################################################################
19320  #
19321  # Enable or disable the elliptic curve crypto implementation
19322  #
19323
19324
19325  ###############################################################################
19326  #
19327  # Compress jars
19328  #
19329  COMPRESS_JARS=false
19330
19331
19332
19333
19334  # Source the version numbers
19335  . $AUTOCONF_DIR/version-numbers
19336
19337  # Get the settings from parameters
19338
19339# Check whether --with-milestone was given.
19340if test "${with_milestone+set}" = set; then :
19341  withval=$with_milestone;
19342fi
19343
19344  if test "x$with_milestone" = xyes; then
19345    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19346  elif test "x$with_milestone" != x; then
19347    MILESTONE="$with_milestone"
19348  fi
19349  if test "x$MILESTONE" = x; then
19350    MILESTONE=internal
19351  fi
19352
19353
19354# Check whether --with-update-version was given.
19355if test "${with_update_version+set}" = set; then :
19356  withval=$with_update_version;
19357fi
19358
19359  if test "x$with_update_version" = xyes; then
19360    as_fn_error $? "Update version must have a value" "$LINENO" 5
19361  elif test "x$with_update_version" != x; then
19362    JDK_UPDATE_VERSION="$with_update_version"
19363    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19364    # to a bug in expr (which reduces it to just X). To work around this, we
19365    # always add a 0 to one digit update versions.
19366    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19367      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19368    fi
19369  fi
19370
19371
19372# Check whether --with-user-release-suffix was given.
19373if test "${with_user_release_suffix+set}" = set; then :
19374  withval=$with_user_release_suffix;
19375fi
19376
19377  if test "x$with_user_release_suffix" = xyes; then
19378    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19379  elif test "x$with_user_release_suffix" != x; then
19380    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19381  fi
19382
19383
19384# Check whether --with-build-number was given.
19385if test "${with_build_number+set}" = set; then :
19386  withval=$with_build_number;
19387fi
19388
19389  if test "x$with_build_number" = xyes; then
19390    as_fn_error $? "Build number must have a value" "$LINENO" 5
19391  elif test "x$with_build_number" != x; then
19392    JDK_BUILD_NUMBER="$with_build_number"
19393  fi
19394  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19395  if test "x$JDK_BUILD_NUMBER" = x; then
19396    JDK_BUILD_NUMBER=b00
19397    if test "x$USER_RELEASE_SUFFIX" = x; then
19398      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19399      # Avoid [:alnum:] since it depends on the locale.
19400      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19401      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19402    fi
19403  fi
19404
19405  # Now set the JDK version, milestone, build number etc.
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421  COPYRIGHT_YEAR=`date +'%Y'`
19422
19423
19424  if test "x$JDK_UPDATE_VERSION" != x; then
19425    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19426  else
19427    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19428  fi
19429
19430
19431  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19432
19433
19434
19435###############################################################################
19436#
19437# Setup BootJDK, used to bootstrap the build.
19438#
19439###############################################################################
19440
19441
19442  BOOT_JDK_FOUND=no
19443
19444# Check whether --with-boot-jdk was given.
19445if test "${with_boot_jdk+set}" = set; then :
19446  withval=$with_boot_jdk;
19447fi
19448
19449
19450  # We look for the Boot JDK through various means, going from more certain to
19451  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19452  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19453  # must check if this is indeed valid; otherwise we'll continue looking.
19454
19455  # Test: Is bootjdk explicitely set by command line arguments?
19456
19457  if test "x$BOOT_JDK_FOUND" = xno; then
19458    # Now execute the test
19459
19460  if test "x$with_boot_jdk" != x; then
19461    BOOT_JDK=$with_boot_jdk
19462    BOOT_JDK_FOUND=maybe
19463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19464$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19465  fi
19466
19467
19468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19470      # Do we have a bin/java?
19471      if test ! -x "$BOOT_JDK/bin/java"; then
19472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19474        BOOT_JDK_FOUND=no
19475      else
19476        # Do we have a bin/javac?
19477        if test ! -x "$BOOT_JDK/bin/javac"; then
19478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19482          BOOT_JDK_FOUND=no
19483        else
19484          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19485          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19486            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19488            BOOT_JDK_FOUND=no
19489          else
19490            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19492
19493            # Extra M4 quote needed to protect [] in grep expression.
19494            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19495            if test "x$FOUND_VERSION_78" = x; then
19496              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19498              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19499$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19500              BOOT_JDK_FOUND=no
19501            else
19502              # We're done! :-)
19503              BOOT_JDK_FOUND=yes
19504
19505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506
19507  # Input might be given as Windows format, start by converting to
19508  # unix format.
19509  path="$BOOT_JDK"
19510  new_path=`$CYGPATH -u "$path"`
19511
19512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19515  # "foo.exe" is OK but "foo" is an error.
19516  #
19517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19518  # It is also a way to make sure we got the proper file name for the real test later on.
19519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19520  if test "x$test_shortpath" = x; then
19521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19523    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19524  fi
19525
19526  # Call helper function which possibly converts this using DOS-style short mode.
19527  # If so, the updated path is stored in $new_path.
19528
19529  input_path="$new_path"
19530  # Check if we need to convert this using DOS-style short mode. If the path
19531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19532  # take no chances and rewrite it.
19533  # Note: m4 eats our [], so we need to use [ and ] instead.
19534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19535  if test "x$has_forbidden_chars" != x; then
19536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19540      # Going to short mode and back again did indeed matter. Since short mode is
19541      # case insensitive, let's make it lowercase to improve readability.
19542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19543      # Now convert it back to Unix-stile (cygpath)
19544      input_path=`$CYGPATH -u "$shortmode_path"`
19545      new_path="$input_path"
19546    fi
19547  fi
19548
19549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19550  if test "x$test_cygdrive_prefix" = x; then
19551    # As a simple fix, exclude /usr/bin since it's not a real path.
19552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19554      # a path prefixed by /cygdrive for fixpath to work.
19555      new_path="$CYGWIN_ROOT_PATH$input_path"
19556    fi
19557  fi
19558
19559
19560  if test "x$path" != "x$new_path"; then
19561    BOOT_JDK="$new_path"
19562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19564  fi
19565
19566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19567
19568  path="$BOOT_JDK"
19569  has_colon=`$ECHO $path | $GREP ^.:`
19570  new_path="$path"
19571  if test "x$has_colon" = x; then
19572    # Not in mixed or Windows style, start by that.
19573    new_path=`cmd //c echo $path`
19574  fi
19575
19576
19577  input_path="$new_path"
19578  # Check if we need to convert this using DOS-style short mode. If the path
19579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19580  # take no chances and rewrite it.
19581  # Note: m4 eats our [], so we need to use [ and ] instead.
19582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19583  if test "x$has_forbidden_chars" != x; then
19584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19586  fi
19587
19588
19589  windows_path="$new_path"
19590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19591    unix_path=`$CYGPATH -u "$windows_path"`
19592    new_path="$unix_path"
19593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19595    new_path="$unix_path"
19596  fi
19597
19598  if test "x$path" != "x$new_path"; then
19599    BOOT_JDK="$new_path"
19600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19602  fi
19603
19604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19606
19607  else
19608    # We're on a posix platform. Hooray! :)
19609    path="$BOOT_JDK"
19610    has_space=`$ECHO "$path" | $GREP " "`
19611    if test "x$has_space" != x; then
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19614      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19615    fi
19616
19617    # Use eval to expand a potential ~
19618    eval path="$path"
19619    if test ! -f "$path" && test ! -d "$path"; then
19620      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19621    fi
19622
19623    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19624  fi
19625
19626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19627$as_echo_n "checking for Boot JDK... " >&6; }
19628              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19629$as_echo "$BOOT_JDK" >&6; }
19630              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19631$as_echo_n "checking Boot JDK version... " >&6; }
19632              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19633              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19634$as_echo "$BOOT_JDK_VERSION" >&6; }
19635            fi # end check jdk version
19636          fi # end check rt.jar
19637        fi # end check javac
19638      fi # end check java
19639    fi # end check boot jdk found
19640  fi
19641
19642  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19643    # Having specified an argument which is incorrect will produce an instant failure;
19644    # we should not go on looking
19645    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19646  fi
19647
19648  # Test: Is bootjdk available from builddeps?
19649
19650  if test "x$BOOT_JDK_FOUND" = xno; then
19651    # Now execute the test
19652
19653
19654
19655  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19656    # Source the builddeps file again, to make sure it uses the latest variables!
19657    . $builddepsfile
19658    # Look for a target and build machine specific resource!
19659    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19660    if test "x$resource" = x; then
19661      # Ok, lets instead look for a target specific resource
19662      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19663    fi
19664    if test "x$resource" = x; then
19665      # Ok, lets instead look for a build specific resource
19666      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19667    fi
19668    if test "x$resource" = x; then
19669      # Ok, lets instead look for a generic resource
19670      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19671      resource=${builddep_bootjdk}
19672    fi
19673    if test "x$resource" != x; then
19674      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19675$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19676      # If the resource in the builddeps.conf file is an existing directory,
19677      # for example /java/linux/cups
19678      if test -d ${resource}; then
19679        depdir=${resource}
19680      else
19681
19682  # bootjdk is for example mymodule
19683  # $resource is for example libs/general/libmymod_1_2_3.zip
19684  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19685  # $with_builddeps_dir is for example /localhome/builddeps
19686  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19687  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19688  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19689  filename=`basename $resource`
19690  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19691  filebase=${filename%%.*}
19692  extension=${filename#*.}
19693  installdir=$with_builddeps_dir/$filebase
19694  if test ! -f $installdir/$filename.unpacked; then
19695    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19696$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19697    if test ! -d $installdir; then
19698      mkdir -p $installdir
19699    fi
19700    if test ! -d $installdir; then
19701      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19702    fi
19703    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19704    touch $tmpfile
19705    if test ! -f $tmpfile; then
19706      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19707    fi
19708
19709  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19710  # $tmpfile is the local file name for the downloaded file.
19711  VALID_TOOL=no
19712  if test "x$BDEPS_FTP" = xwget; then
19713    VALID_TOOL=yes
19714    wget -O $tmpfile $with_builddeps_server/$resource
19715  fi
19716  if test "x$BDEPS_FTP" = xlftp; then
19717    VALID_TOOL=yes
19718    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19719  fi
19720  if test "x$BDEPS_FTP" = xftp; then
19721    VALID_TOOL=yes
19722    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19723    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19724    FTPUSERPWD=${FTPSERVER%%@*}
19725    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19726      FTPUSER=${userpwd%%:*}
19727      FTPPWD=${userpwd#*@}
19728      FTPSERVER=${FTPSERVER#*@}
19729    else
19730      FTPUSER=ftp
19731      FTPPWD=ftp
19732    fi
19733    # the "pass" command does not work on some
19734    # ftp clients (read ftp.exe) but if it works,
19735    # passive mode is better!
19736    ( \
19737        echo "user $FTPUSER $FTPPWD"        ; \
19738        echo "pass"                         ; \
19739        echo "bin"                          ; \
19740        echo "get $FTPPATH $tmpfile"              ; \
19741    ) | ftp -in $FTPSERVER
19742  fi
19743  if test "x$VALID_TOOL" != xyes; then
19744    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19745  fi
19746
19747    mv $tmpfile $installdir/$filename
19748    if test ! -s $installdir/$filename; then
19749      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19750    fi
19751    case "$extension" in
19752      zip)  echo "Unzipping $installdir/$filename..."
19753        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19754        ;;
19755      tar.gz) echo "Untaring $installdir/$filename..."
19756        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19757        ;;
19758      tgz) echo "Untaring $installdir/$filename..."
19759        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19760        ;;
19761      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19762        ;;
19763    esac
19764  fi
19765  if test -f $installdir/$filename.unpacked; then
19766    depdir=$installdir
19767  fi
19768
19769      fi
19770      # Source the builddeps file again, because in the previous command, the depdir
19771      # was updated to point at the current build dependency install directory.
19772      . $builddepsfile
19773      # Now extract variables from the builddeps.conf files.
19774      theroot=${builddep_bootjdk_ROOT}
19775      thecflags=${builddep_bootjdk_CFLAGS}
19776      thelibs=${builddep_bootjdk_LIBS}
19777      if test "x$depdir" = x; then
19778        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19779      fi
19780      BOOT_JDK=$depdir
19781      if test "x$theroot" != x; then
19782        BOOT_JDK="$theroot"
19783      fi
19784      if test "x$thecflags" != x; then
19785        BOOT_JDK_CFLAGS="$thecflags"
19786      fi
19787      if test "x$thelibs" != x; then
19788        BOOT_JDK_LIBS="$thelibs"
19789      fi
19790      BOOT_JDK_FOUND=maybe
19791      else BOOT_JDK_FOUND=no
19792
19793    fi
19794    else BOOT_JDK_FOUND=no
19795
19796  fi
19797
19798
19799
19800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19802      # Do we have a bin/java?
19803      if test ! -x "$BOOT_JDK/bin/java"; then
19804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19806        BOOT_JDK_FOUND=no
19807      else
19808        # Do we have a bin/javac?
19809        if test ! -x "$BOOT_JDK/bin/javac"; then
19810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19814          BOOT_JDK_FOUND=no
19815        else
19816          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19817          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19820            BOOT_JDK_FOUND=no
19821          else
19822            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19824
19825            # Extra M4 quote needed to protect [] in grep expression.
19826            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19827            if test "x$FOUND_VERSION_78" = x; then
19828              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19830              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19831$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19832              BOOT_JDK_FOUND=no
19833            else
19834              # We're done! :-)
19835              BOOT_JDK_FOUND=yes
19836
19837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19838
19839  # Input might be given as Windows format, start by converting to
19840  # unix format.
19841  path="$BOOT_JDK"
19842  new_path=`$CYGPATH -u "$path"`
19843
19844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19847  # "foo.exe" is OK but "foo" is an error.
19848  #
19849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19850  # It is also a way to make sure we got the proper file name for the real test later on.
19851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19852  if test "x$test_shortpath" = x; then
19853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19856  fi
19857
19858  # Call helper function which possibly converts this using DOS-style short mode.
19859  # If so, the updated path is stored in $new_path.
19860
19861  input_path="$new_path"
19862  # Check if we need to convert this using DOS-style short mode. If the path
19863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19864  # take no chances and rewrite it.
19865  # Note: m4 eats our [], so we need to use [ and ] instead.
19866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19867  if test "x$has_forbidden_chars" != x; then
19868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19872      # Going to short mode and back again did indeed matter. Since short mode is
19873      # case insensitive, let's make it lowercase to improve readability.
19874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19875      # Now convert it back to Unix-stile (cygpath)
19876      input_path=`$CYGPATH -u "$shortmode_path"`
19877      new_path="$input_path"
19878    fi
19879  fi
19880
19881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19882  if test "x$test_cygdrive_prefix" = x; then
19883    # As a simple fix, exclude /usr/bin since it's not a real path.
19884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19886      # a path prefixed by /cygdrive for fixpath to work.
19887      new_path="$CYGWIN_ROOT_PATH$input_path"
19888    fi
19889  fi
19890
19891
19892  if test "x$path" != "x$new_path"; then
19893    BOOT_JDK="$new_path"
19894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19896  fi
19897
19898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19899
19900  path="$BOOT_JDK"
19901  has_colon=`$ECHO $path | $GREP ^.:`
19902  new_path="$path"
19903  if test "x$has_colon" = x; then
19904    # Not in mixed or Windows style, start by that.
19905    new_path=`cmd //c echo $path`
19906  fi
19907
19908
19909  input_path="$new_path"
19910  # Check if we need to convert this using DOS-style short mode. If the path
19911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19912  # take no chances and rewrite it.
19913  # Note: m4 eats our [], so we need to use [ and ] instead.
19914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19915  if test "x$has_forbidden_chars" != x; then
19916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19918  fi
19919
19920
19921  windows_path="$new_path"
19922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19923    unix_path=`$CYGPATH -u "$windows_path"`
19924    new_path="$unix_path"
19925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19927    new_path="$unix_path"
19928  fi
19929
19930  if test "x$path" != "x$new_path"; then
19931    BOOT_JDK="$new_path"
19932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19934  fi
19935
19936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19938
19939  else
19940    # We're on a posix platform. Hooray! :)
19941    path="$BOOT_JDK"
19942    has_space=`$ECHO "$path" | $GREP " "`
19943    if test "x$has_space" != x; then
19944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19946      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19947    fi
19948
19949    # Use eval to expand a potential ~
19950    eval path="$path"
19951    if test ! -f "$path" && test ! -d "$path"; then
19952      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19953    fi
19954
19955    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19956  fi
19957
19958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19959$as_echo_n "checking for Boot JDK... " >&6; }
19960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19961$as_echo "$BOOT_JDK" >&6; }
19962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19963$as_echo_n "checking Boot JDK version... " >&6; }
19964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19966$as_echo "$BOOT_JDK_VERSION" >&6; }
19967            fi # end check jdk version
19968          fi # end check rt.jar
19969        fi # end check javac
19970      fi # end check java
19971    fi # end check boot jdk found
19972  fi
19973
19974
19975  # Test: Is $JAVA_HOME set?
19976
19977  if test "x$BOOT_JDK_FOUND" = xno; then
19978    # Now execute the test
19979
19980  if test "x$JAVA_HOME" != x; then
19981    JAVA_HOME_PROCESSED="$JAVA_HOME"
19982
19983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19984
19985  # Input might be given as Windows format, start by converting to
19986  # unix format.
19987  path="$JAVA_HOME_PROCESSED"
19988  new_path=`$CYGPATH -u "$path"`
19989
19990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19993  # "foo.exe" is OK but "foo" is an error.
19994  #
19995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19996  # It is also a way to make sure we got the proper file name for the real test later on.
19997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19998  if test "x$test_shortpath" = x; then
19999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20000$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20001    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20002  fi
20003
20004  # Call helper function which possibly converts this using DOS-style short mode.
20005  # If so, the updated path is stored in $new_path.
20006
20007  input_path="$new_path"
20008  # Check if we need to convert this using DOS-style short mode. If the path
20009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20010  # take no chances and rewrite it.
20011  # Note: m4 eats our [], so we need to use [ and ] instead.
20012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20013  if test "x$has_forbidden_chars" != x; then
20014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20018      # Going to short mode and back again did indeed matter. Since short mode is
20019      # case insensitive, let's make it lowercase to improve readability.
20020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20021      # Now convert it back to Unix-stile (cygpath)
20022      input_path=`$CYGPATH -u "$shortmode_path"`
20023      new_path="$input_path"
20024    fi
20025  fi
20026
20027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20028  if test "x$test_cygdrive_prefix" = x; then
20029    # As a simple fix, exclude /usr/bin since it's not a real path.
20030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20032      # a path prefixed by /cygdrive for fixpath to work.
20033      new_path="$CYGWIN_ROOT_PATH$input_path"
20034    fi
20035  fi
20036
20037
20038  if test "x$path" != "x$new_path"; then
20039    JAVA_HOME_PROCESSED="$new_path"
20040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20041$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20042  fi
20043
20044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20045
20046  path="$JAVA_HOME_PROCESSED"
20047  has_colon=`$ECHO $path | $GREP ^.:`
20048  new_path="$path"
20049  if test "x$has_colon" = x; then
20050    # Not in mixed or Windows style, start by that.
20051    new_path=`cmd //c echo $path`
20052  fi
20053
20054
20055  input_path="$new_path"
20056  # Check if we need to convert this using DOS-style short mode. If the path
20057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20058  # take no chances and rewrite it.
20059  # Note: m4 eats our [], so we need to use [ and ] instead.
20060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20061  if test "x$has_forbidden_chars" != x; then
20062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20064  fi
20065
20066
20067  windows_path="$new_path"
20068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20069    unix_path=`$CYGPATH -u "$windows_path"`
20070    new_path="$unix_path"
20071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20073    new_path="$unix_path"
20074  fi
20075
20076  if test "x$path" != "x$new_path"; then
20077    JAVA_HOME_PROCESSED="$new_path"
20078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20079$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20080  fi
20081
20082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20084
20085  else
20086    # We're on a posix platform. Hooray! :)
20087    path="$JAVA_HOME_PROCESSED"
20088    has_space=`$ECHO "$path" | $GREP " "`
20089    if test "x$has_space" != x; then
20090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20091$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20093    fi
20094
20095    # Use eval to expand a potential ~
20096    eval path="$path"
20097    if test ! -f "$path" && test ! -d "$path"; then
20098      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20099    fi
20100
20101    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20102  fi
20103
20104    if test ! -d "$JAVA_HOME_PROCESSED"; then
20105      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20106$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20107    else
20108      # Aha, the user has set a JAVA_HOME
20109      # let us use that as the Boot JDK.
20110      BOOT_JDK="$JAVA_HOME_PROCESSED"
20111      BOOT_JDK_FOUND=maybe
20112      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20113$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20114    fi
20115  fi
20116
20117
20118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20120      # Do we have a bin/java?
20121      if test ! -x "$BOOT_JDK/bin/java"; then
20122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20124        BOOT_JDK_FOUND=no
20125      else
20126        # Do we have a bin/javac?
20127        if test ! -x "$BOOT_JDK/bin/javac"; then
20128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20132          BOOT_JDK_FOUND=no
20133        else
20134          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20135          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20138            BOOT_JDK_FOUND=no
20139          else
20140            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20142
20143            # Extra M4 quote needed to protect [] in grep expression.
20144            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20145            if test "x$FOUND_VERSION_78" = x; then
20146              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20148              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20149$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20150              BOOT_JDK_FOUND=no
20151            else
20152              # We're done! :-)
20153              BOOT_JDK_FOUND=yes
20154
20155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20156
20157  # Input might be given as Windows format, start by converting to
20158  # unix format.
20159  path="$BOOT_JDK"
20160  new_path=`$CYGPATH -u "$path"`
20161
20162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20165  # "foo.exe" is OK but "foo" is an error.
20166  #
20167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20168  # It is also a way to make sure we got the proper file name for the real test later on.
20169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20170  if test "x$test_shortpath" = x; then
20171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20174  fi
20175
20176  # Call helper function which possibly converts this using DOS-style short mode.
20177  # If so, the updated path is stored in $new_path.
20178
20179  input_path="$new_path"
20180  # Check if we need to convert this using DOS-style short mode. If the path
20181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20182  # take no chances and rewrite it.
20183  # Note: m4 eats our [], so we need to use [ and ] instead.
20184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20185  if test "x$has_forbidden_chars" != x; then
20186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20190      # Going to short mode and back again did indeed matter. Since short mode is
20191      # case insensitive, let's make it lowercase to improve readability.
20192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20193      # Now convert it back to Unix-stile (cygpath)
20194      input_path=`$CYGPATH -u "$shortmode_path"`
20195      new_path="$input_path"
20196    fi
20197  fi
20198
20199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20200  if test "x$test_cygdrive_prefix" = x; then
20201    # As a simple fix, exclude /usr/bin since it's not a real path.
20202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20204      # a path prefixed by /cygdrive for fixpath to work.
20205      new_path="$CYGWIN_ROOT_PATH$input_path"
20206    fi
20207  fi
20208
20209
20210  if test "x$path" != "x$new_path"; then
20211    BOOT_JDK="$new_path"
20212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20214  fi
20215
20216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20217
20218  path="$BOOT_JDK"
20219  has_colon=`$ECHO $path | $GREP ^.:`
20220  new_path="$path"
20221  if test "x$has_colon" = x; then
20222    # Not in mixed or Windows style, start by that.
20223    new_path=`cmd //c echo $path`
20224  fi
20225
20226
20227  input_path="$new_path"
20228  # Check if we need to convert this using DOS-style short mode. If the path
20229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20230  # take no chances and rewrite it.
20231  # Note: m4 eats our [], so we need to use [ and ] instead.
20232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20233  if test "x$has_forbidden_chars" != x; then
20234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20236  fi
20237
20238
20239  windows_path="$new_path"
20240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20241    unix_path=`$CYGPATH -u "$windows_path"`
20242    new_path="$unix_path"
20243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20245    new_path="$unix_path"
20246  fi
20247
20248  if test "x$path" != "x$new_path"; then
20249    BOOT_JDK="$new_path"
20250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20252  fi
20253
20254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20256
20257  else
20258    # We're on a posix platform. Hooray! :)
20259    path="$BOOT_JDK"
20260    has_space=`$ECHO "$path" | $GREP " "`
20261    if test "x$has_space" != x; then
20262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20264      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20265    fi
20266
20267    # Use eval to expand a potential ~
20268    eval path="$path"
20269    if test ! -f "$path" && test ! -d "$path"; then
20270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20271    fi
20272
20273    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20274  fi
20275
20276              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20277$as_echo_n "checking for Boot JDK... " >&6; }
20278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20279$as_echo "$BOOT_JDK" >&6; }
20280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20281$as_echo_n "checking Boot JDK version... " >&6; }
20282              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20284$as_echo "$BOOT_JDK_VERSION" >&6; }
20285            fi # end check jdk version
20286          fi # end check rt.jar
20287        fi # end check javac
20288      fi # end check java
20289    fi # end check boot jdk found
20290  fi
20291
20292
20293  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20294
20295  if test "x$BOOT_JDK_FOUND" = xno; then
20296    # Now execute the test
20297
20298  if test -x /usr/libexec/java_home; then
20299    BOOT_JDK=`/usr/libexec/java_home`
20300    BOOT_JDK_FOUND=maybe
20301    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20302$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20303  fi
20304
20305
20306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20308      # Do we have a bin/java?
20309      if test ! -x "$BOOT_JDK/bin/java"; then
20310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20312        BOOT_JDK_FOUND=no
20313      else
20314        # Do we have a bin/javac?
20315        if test ! -x "$BOOT_JDK/bin/javac"; then
20316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20320          BOOT_JDK_FOUND=no
20321        else
20322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20326            BOOT_JDK_FOUND=no
20327          else
20328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20330
20331            # Extra M4 quote needed to protect [] in grep expression.
20332            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20333            if test "x$FOUND_VERSION_78" = x; then
20334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20337$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20338              BOOT_JDK_FOUND=no
20339            else
20340              # We're done! :-)
20341              BOOT_JDK_FOUND=yes
20342
20343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20344
20345  # Input might be given as Windows format, start by converting to
20346  # unix format.
20347  path="$BOOT_JDK"
20348  new_path=`$CYGPATH -u "$path"`
20349
20350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20353  # "foo.exe" is OK but "foo" is an error.
20354  #
20355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20356  # It is also a way to make sure we got the proper file name for the real test later on.
20357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20358  if test "x$test_shortpath" = x; then
20359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20362  fi
20363
20364  # Call helper function which possibly converts this using DOS-style short mode.
20365  # If so, the updated path is stored in $new_path.
20366
20367  input_path="$new_path"
20368  # Check if we need to convert this using DOS-style short mode. If the path
20369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20370  # take no chances and rewrite it.
20371  # Note: m4 eats our [], so we need to use [ and ] instead.
20372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20373  if test "x$has_forbidden_chars" != x; then
20374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20378      # Going to short mode and back again did indeed matter. Since short mode is
20379      # case insensitive, let's make it lowercase to improve readability.
20380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20381      # Now convert it back to Unix-stile (cygpath)
20382      input_path=`$CYGPATH -u "$shortmode_path"`
20383      new_path="$input_path"
20384    fi
20385  fi
20386
20387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20388  if test "x$test_cygdrive_prefix" = x; then
20389    # As a simple fix, exclude /usr/bin since it's not a real path.
20390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20392      # a path prefixed by /cygdrive for fixpath to work.
20393      new_path="$CYGWIN_ROOT_PATH$input_path"
20394    fi
20395  fi
20396
20397
20398  if test "x$path" != "x$new_path"; then
20399    BOOT_JDK="$new_path"
20400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20402  fi
20403
20404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20405
20406  path="$BOOT_JDK"
20407  has_colon=`$ECHO $path | $GREP ^.:`
20408  new_path="$path"
20409  if test "x$has_colon" = x; then
20410    # Not in mixed or Windows style, start by that.
20411    new_path=`cmd //c echo $path`
20412  fi
20413
20414
20415  input_path="$new_path"
20416  # Check if we need to convert this using DOS-style short mode. If the path
20417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20418  # take no chances and rewrite it.
20419  # Note: m4 eats our [], so we need to use [ and ] instead.
20420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20421  if test "x$has_forbidden_chars" != x; then
20422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20424  fi
20425
20426
20427  windows_path="$new_path"
20428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20429    unix_path=`$CYGPATH -u "$windows_path"`
20430    new_path="$unix_path"
20431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20433    new_path="$unix_path"
20434  fi
20435
20436  if test "x$path" != "x$new_path"; then
20437    BOOT_JDK="$new_path"
20438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20440  fi
20441
20442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20444
20445  else
20446    # We're on a posix platform. Hooray! :)
20447    path="$BOOT_JDK"
20448    has_space=`$ECHO "$path" | $GREP " "`
20449    if test "x$has_space" != x; then
20450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20452      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20453    fi
20454
20455    # Use eval to expand a potential ~
20456    eval path="$path"
20457    if test ! -f "$path" && test ! -d "$path"; then
20458      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20459    fi
20460
20461    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20462  fi
20463
20464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20465$as_echo_n "checking for Boot JDK... " >&6; }
20466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20467$as_echo "$BOOT_JDK" >&6; }
20468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20469$as_echo_n "checking Boot JDK version... " >&6; }
20470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20472$as_echo "$BOOT_JDK_VERSION" >&6; }
20473            fi # end check jdk version
20474          fi # end check rt.jar
20475        fi # end check javac
20476      fi # end check java
20477    fi # end check boot jdk found
20478  fi
20479
20480
20481  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
20482
20483  if test "x$BOOT_JDK_FOUND" = xno; then
20484    # Now execute the test
20485
20486  # Extract the first word of "javac", so it can be a program name with args.
20487set dummy javac; ac_word=$2
20488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20489$as_echo_n "checking for $ac_word... " >&6; }
20490if ${ac_cv_path_JAVAC_CHECK+:} false; then :
20491  $as_echo_n "(cached) " >&6
20492else
20493  case $JAVAC_CHECK in
20494  [\\/]* | ?:[\\/]*)
20495  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
20496  ;;
20497  *)
20498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20499for as_dir in $PATH
20500do
20501  IFS=$as_save_IFS
20502  test -z "$as_dir" && as_dir=.
20503    for ac_exec_ext in '' $ac_executable_extensions; do
20504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20505    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
20506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20507    break 2
20508  fi
20509done
20510  done
20511IFS=$as_save_IFS
20512
20513  ;;
20514esac
20515fi
20516JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
20517if test -n "$JAVAC_CHECK"; then
20518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
20519$as_echo "$JAVAC_CHECK" >&6; }
20520else
20521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20522$as_echo "no" >&6; }
20523fi
20524
20525
20526  # Extract the first word of "java", so it can be a program name with args.
20527set dummy java; ac_word=$2
20528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20529$as_echo_n "checking for $ac_word... " >&6; }
20530if ${ac_cv_path_JAVA_CHECK+:} false; then :
20531  $as_echo_n "(cached) " >&6
20532else
20533  case $JAVA_CHECK in
20534  [\\/]* | ?:[\\/]*)
20535  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
20536  ;;
20537  *)
20538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20539for as_dir in $PATH
20540do
20541  IFS=$as_save_IFS
20542  test -z "$as_dir" && as_dir=.
20543    for ac_exec_ext in '' $ac_executable_extensions; do
20544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20545    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
20546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20547    break 2
20548  fi
20549done
20550  done
20551IFS=$as_save_IFS
20552
20553  ;;
20554esac
20555fi
20556JAVA_CHECK=$ac_cv_path_JAVA_CHECK
20557if test -n "$JAVA_CHECK"; then
20558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
20559$as_echo "$JAVA_CHECK" >&6; }
20560else
20561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20562$as_echo "no" >&6; }
20563fi
20564
20565
20566  BINARY="$JAVAC_CHECK"
20567  if test "x$JAVAC_CHECK" = x; then
20568    BINARY="$JAVA_CHECK"
20569  fi
20570  if test "x$BINARY" != x; then
20571    # So there is a java(c) binary, it might be part of a JDK.
20572    # Lets find the JDK/JRE directory by following symbolic links.
20573    # Linux/GNU systems often have links from /usr/bin/java to
20574    # /etc/alternatives/java to the real JDK binary.
20575
20576  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20577    # Follow a chain of symbolic links. Use readlink
20578    # where it exists, else fall back to horribly
20579    # complicated shell code.
20580    if test "x$READLINK_TESTED" != yes; then
20581      # On MacOSX there is a readlink tool with a different
20582      # purpose than the GNU readlink tool. Check the found readlink.
20583      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20584      if test "x$ISGNU" = x; then
20585        # A readlink that we do not know how to use.
20586        # Are there other non-GNU readlinks out there?
20587        READLINK_TESTED=yes
20588        READLINK=
20589      fi
20590    fi
20591
20592    if test "x$READLINK" != x; then
20593      BINARY=`$READLINK -f $BINARY`
20594    else
20595      # Save the current directory for restoring afterwards
20596      STARTDIR=$PWD
20597      COUNTER=0
20598      sym_link_dir=`$DIRNAME $BINARY`
20599      sym_link_file=`$BASENAME $BINARY`
20600      cd $sym_link_dir
20601      # Use -P flag to resolve symlinks in directories.
20602      cd `$THEPWDCMD -P`
20603      sym_link_dir=`$THEPWDCMD -P`
20604      # Resolve file symlinks
20605      while test $COUNTER -lt 20; do
20606        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20607        if test "x$ISLINK" == x; then
20608          # This is not a symbolic link! We are done!
20609          break
20610        fi
20611        # Again resolve directory symlinks since the target of the just found
20612        # link could be in a different directory
20613        cd `$DIRNAME $ISLINK`
20614        sym_link_dir=`$THEPWDCMD -P`
20615        sym_link_file=`$BASENAME $ISLINK`
20616        let COUNTER=COUNTER+1
20617      done
20618      cd $STARTDIR
20619      BINARY=$sym_link_dir/$sym_link_file
20620    fi
20621  fi
20622
20623    BOOT_JDK=`dirname "$BINARY"`
20624    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
20625    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
20626      # Looks like we found ourselves an JDK
20627      BOOT_JDK_FOUND=maybe
20628      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
20629$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
20630    fi
20631  fi
20632
20633
20634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20636      # Do we have a bin/java?
20637      if test ! -x "$BOOT_JDK/bin/java"; then
20638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20640        BOOT_JDK_FOUND=no
20641      else
20642        # Do we have a bin/javac?
20643        if test ! -x "$BOOT_JDK/bin/javac"; then
20644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20648          BOOT_JDK_FOUND=no
20649        else
20650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20654            BOOT_JDK_FOUND=no
20655          else
20656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20658
20659            # Extra M4 quote needed to protect [] in grep expression.
20660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20661            if test "x$FOUND_VERSION_78" = x; then
20662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20666              BOOT_JDK_FOUND=no
20667            else
20668              # We're done! :-)
20669              BOOT_JDK_FOUND=yes
20670
20671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20672
20673  # Input might be given as Windows format, start by converting to
20674  # unix format.
20675  path="$BOOT_JDK"
20676  new_path=`$CYGPATH -u "$path"`
20677
20678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20681  # "foo.exe" is OK but "foo" is an error.
20682  #
20683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20684  # It is also a way to make sure we got the proper file name for the real test later on.
20685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20686  if test "x$test_shortpath" = x; then
20687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20690  fi
20691
20692  # Call helper function which possibly converts this using DOS-style short mode.
20693  # If so, the updated path is stored in $new_path.
20694
20695  input_path="$new_path"
20696  # Check if we need to convert this using DOS-style short mode. If the path
20697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20698  # take no chances and rewrite it.
20699  # Note: m4 eats our [], so we need to use [ and ] instead.
20700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20701  if test "x$has_forbidden_chars" != x; then
20702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20706      # Going to short mode and back again did indeed matter. Since short mode is
20707      # case insensitive, let's make it lowercase to improve readability.
20708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20709      # Now convert it back to Unix-stile (cygpath)
20710      input_path=`$CYGPATH -u "$shortmode_path"`
20711      new_path="$input_path"
20712    fi
20713  fi
20714
20715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20716  if test "x$test_cygdrive_prefix" = x; then
20717    # As a simple fix, exclude /usr/bin since it's not a real path.
20718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20720      # a path prefixed by /cygdrive for fixpath to work.
20721      new_path="$CYGWIN_ROOT_PATH$input_path"
20722    fi
20723  fi
20724
20725
20726  if test "x$path" != "x$new_path"; then
20727    BOOT_JDK="$new_path"
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20730  fi
20731
20732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20733
20734  path="$BOOT_JDK"
20735  has_colon=`$ECHO $path | $GREP ^.:`
20736  new_path="$path"
20737  if test "x$has_colon" = x; then
20738    # Not in mixed or Windows style, start by that.
20739    new_path=`cmd //c echo $path`
20740  fi
20741
20742
20743  input_path="$new_path"
20744  # Check if we need to convert this using DOS-style short mode. If the path
20745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20746  # take no chances and rewrite it.
20747  # Note: m4 eats our [], so we need to use [ and ] instead.
20748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20749  if test "x$has_forbidden_chars" != x; then
20750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20752  fi
20753
20754
20755  windows_path="$new_path"
20756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757    unix_path=`$CYGPATH -u "$windows_path"`
20758    new_path="$unix_path"
20759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20761    new_path="$unix_path"
20762  fi
20763
20764  if test "x$path" != "x$new_path"; then
20765    BOOT_JDK="$new_path"
20766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20768  fi
20769
20770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20772
20773  else
20774    # We're on a posix platform. Hooray! :)
20775    path="$BOOT_JDK"
20776    has_space=`$ECHO "$path" | $GREP " "`
20777    if test "x$has_space" != x; then
20778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20781    fi
20782
20783    # Use eval to expand a potential ~
20784    eval path="$path"
20785    if test ! -f "$path" && test ! -d "$path"; then
20786      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20787    fi
20788
20789    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20790  fi
20791
20792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20793$as_echo_n "checking for Boot JDK... " >&6; }
20794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20795$as_echo "$BOOT_JDK" >&6; }
20796              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20797$as_echo_n "checking Boot JDK version... " >&6; }
20798              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20800$as_echo "$BOOT_JDK_VERSION" >&6; }
20801            fi # end check jdk version
20802          fi # end check rt.jar
20803        fi # end check javac
20804      fi # end check java
20805    fi # end check boot jdk found
20806  fi
20807
20808
20809  # Test: Is there a JDK installed in default, well-known locations?
20810
20811  if test "x$BOOT_JDK_FOUND" = xno; then
20812    # Now execute the test
20813
20814  if test "x$OPENJDK_TARGET_OS" = xwindows; then
20815
20816  if test "x$BOOT_JDK_FOUND" = xno; then
20817    # Now execute the test
20818
20819  if test "x$ProgramW6432" != x; then
20820    VIRTUAL_DIR="$ProgramW6432/Java"
20821
20822  windows_path="$VIRTUAL_DIR"
20823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20824    unix_path=`$CYGPATH -u "$windows_path"`
20825    VIRTUAL_DIR="$unix_path"
20826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20828    VIRTUAL_DIR="$unix_path"
20829  fi
20830
20831
20832  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
20833  BOOT_JDK_SUFFIX=""
20834  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
20835  if test "x$ALL_JDKS_FOUND" != x; then
20836    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
20837
20838  if test "x$BOOT_JDK_FOUND" = xno; then
20839    # Now execute the test
20840
20841        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
20842        if test -d "$BOOT_JDK"; then
20843          BOOT_JDK_FOUND=maybe
20844          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
20845$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
20846        fi
20847
20848
20849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20851      # Do we have a bin/java?
20852      if test ! -x "$BOOT_JDK/bin/java"; then
20853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20855        BOOT_JDK_FOUND=no
20856      else
20857        # Do we have a bin/javac?
20858        if test ! -x "$BOOT_JDK/bin/javac"; then
20859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20863          BOOT_JDK_FOUND=no
20864        else
20865          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20866          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20867            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20869            BOOT_JDK_FOUND=no
20870          else
20871            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20873
20874            # Extra M4 quote needed to protect [] in grep expression.
20875            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20876            if test "x$FOUND_VERSION_78" = x; then
20877              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20879              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20880$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20881              BOOT_JDK_FOUND=no
20882            else
20883              # We're done! :-)
20884              BOOT_JDK_FOUND=yes
20885
20886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20887
20888  # Input might be given as Windows format, start by converting to
20889  # unix format.
20890  path="$BOOT_JDK"
20891  new_path=`$CYGPATH -u "$path"`
20892
20893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20896  # "foo.exe" is OK but "foo" is an error.
20897  #
20898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20899  # It is also a way to make sure we got the proper file name for the real test later on.
20900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20901  if test "x$test_shortpath" = x; then
20902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20904    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20905  fi
20906
20907  # Call helper function which possibly converts this using DOS-style short mode.
20908  # If so, the updated path is stored in $new_path.
20909
20910  input_path="$new_path"
20911  # Check if we need to convert this using DOS-style short mode. If the path
20912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20913  # take no chances and rewrite it.
20914  # Note: m4 eats our [], so we need to use [ and ] instead.
20915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20916  if test "x$has_forbidden_chars" != x; then
20917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20921      # Going to short mode and back again did indeed matter. Since short mode is
20922      # case insensitive, let's make it lowercase to improve readability.
20923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20924      # Now convert it back to Unix-stile (cygpath)
20925      input_path=`$CYGPATH -u "$shortmode_path"`
20926      new_path="$input_path"
20927    fi
20928  fi
20929
20930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20931  if test "x$test_cygdrive_prefix" = x; then
20932    # As a simple fix, exclude /usr/bin since it's not a real path.
20933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20935      # a path prefixed by /cygdrive for fixpath to work.
20936      new_path="$CYGWIN_ROOT_PATH$input_path"
20937    fi
20938  fi
20939
20940
20941  if test "x$path" != "x$new_path"; then
20942    BOOT_JDK="$new_path"
20943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20945  fi
20946
20947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20948
20949  path="$BOOT_JDK"
20950  has_colon=`$ECHO $path | $GREP ^.:`
20951  new_path="$path"
20952  if test "x$has_colon" = x; then
20953    # Not in mixed or Windows style, start by that.
20954    new_path=`cmd //c echo $path`
20955  fi
20956
20957
20958  input_path="$new_path"
20959  # Check if we need to convert this using DOS-style short mode. If the path
20960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20961  # take no chances and rewrite it.
20962  # Note: m4 eats our [], so we need to use [ and ] instead.
20963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20964  if test "x$has_forbidden_chars" != x; then
20965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20967  fi
20968
20969
20970  windows_path="$new_path"
20971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20972    unix_path=`$CYGPATH -u "$windows_path"`
20973    new_path="$unix_path"
20974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20976    new_path="$unix_path"
20977  fi
20978
20979  if test "x$path" != "x$new_path"; then
20980    BOOT_JDK="$new_path"
20981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20983  fi
20984
20985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20987
20988  else
20989    # We're on a posix platform. Hooray! :)
20990    path="$BOOT_JDK"
20991    has_space=`$ECHO "$path" | $GREP " "`
20992    if test "x$has_space" != x; then
20993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20995      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20996    fi
20997
20998    # Use eval to expand a potential ~
20999    eval path="$path"
21000    if test ! -f "$path" && test ! -d "$path"; then
21001      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21002    fi
21003
21004    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21005  fi
21006
21007              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21008$as_echo_n "checking for Boot JDK... " >&6; }
21009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21010$as_echo "$BOOT_JDK" >&6; }
21011              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21012$as_echo_n "checking Boot JDK version... " >&6; }
21013              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21014              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21015$as_echo "$BOOT_JDK_VERSION" >&6; }
21016            fi # end check jdk version
21017          fi # end check rt.jar
21018        fi # end check javac
21019      fi # end check java
21020    fi # end check boot jdk found
21021  fi
21022
21023    done
21024  fi
21025
21026  fi
21027
21028
21029    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21030    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21031      # Do we have a bin/java?
21032      if test ! -x "$BOOT_JDK/bin/java"; then
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21035        BOOT_JDK_FOUND=no
21036      else
21037        # Do we have a bin/javac?
21038        if test ! -x "$BOOT_JDK/bin/javac"; then
21039          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21041          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21042$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21043          BOOT_JDK_FOUND=no
21044        else
21045          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21046          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21047            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21049            BOOT_JDK_FOUND=no
21050          else
21051            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21052            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21053
21054            # Extra M4 quote needed to protect [] in grep expression.
21055            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21056            if test "x$FOUND_VERSION_78" = x; then
21057              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21059              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21060$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21061              BOOT_JDK_FOUND=no
21062            else
21063              # We're done! :-)
21064              BOOT_JDK_FOUND=yes
21065
21066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21067
21068  # Input might be given as Windows format, start by converting to
21069  # unix format.
21070  path="$BOOT_JDK"
21071  new_path=`$CYGPATH -u "$path"`
21072
21073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21076  # "foo.exe" is OK but "foo" is an error.
21077  #
21078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21079  # It is also a way to make sure we got the proper file name for the real test later on.
21080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21081  if test "x$test_shortpath" = x; then
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21084    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21085  fi
21086
21087  # Call helper function which possibly converts this using DOS-style short mode.
21088  # If so, the updated path is stored in $new_path.
21089
21090  input_path="$new_path"
21091  # Check if we need to convert this using DOS-style short mode. If the path
21092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21093  # take no chances and rewrite it.
21094  # Note: m4 eats our [], so we need to use [ and ] instead.
21095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21096  if test "x$has_forbidden_chars" != x; then
21097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21101      # Going to short mode and back again did indeed matter. Since short mode is
21102      # case insensitive, let's make it lowercase to improve readability.
21103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21104      # Now convert it back to Unix-stile (cygpath)
21105      input_path=`$CYGPATH -u "$shortmode_path"`
21106      new_path="$input_path"
21107    fi
21108  fi
21109
21110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21111  if test "x$test_cygdrive_prefix" = x; then
21112    # As a simple fix, exclude /usr/bin since it's not a real path.
21113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21115      # a path prefixed by /cygdrive for fixpath to work.
21116      new_path="$CYGWIN_ROOT_PATH$input_path"
21117    fi
21118  fi
21119
21120
21121  if test "x$path" != "x$new_path"; then
21122    BOOT_JDK="$new_path"
21123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21125  fi
21126
21127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21128
21129  path="$BOOT_JDK"
21130  has_colon=`$ECHO $path | $GREP ^.:`
21131  new_path="$path"
21132  if test "x$has_colon" = x; then
21133    # Not in mixed or Windows style, start by that.
21134    new_path=`cmd //c echo $path`
21135  fi
21136
21137
21138  input_path="$new_path"
21139  # Check if we need to convert this using DOS-style short mode. If the path
21140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21141  # take no chances and rewrite it.
21142  # Note: m4 eats our [], so we need to use [ and ] instead.
21143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21144  if test "x$has_forbidden_chars" != x; then
21145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21147  fi
21148
21149
21150  windows_path="$new_path"
21151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152    unix_path=`$CYGPATH -u "$windows_path"`
21153    new_path="$unix_path"
21154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21156    new_path="$unix_path"
21157  fi
21158
21159  if test "x$path" != "x$new_path"; then
21160    BOOT_JDK="$new_path"
21161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21163  fi
21164
21165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21167
21168  else
21169    # We're on a posix platform. Hooray! :)
21170    path="$BOOT_JDK"
21171    has_space=`$ECHO "$path" | $GREP " "`
21172    if test "x$has_space" != x; then
21173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21176    fi
21177
21178    # Use eval to expand a potential ~
21179    eval path="$path"
21180    if test ! -f "$path" && test ! -d "$path"; then
21181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21182    fi
21183
21184    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21185  fi
21186
21187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21188$as_echo_n "checking for Boot JDK... " >&6; }
21189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21190$as_echo "$BOOT_JDK" >&6; }
21191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21192$as_echo_n "checking Boot JDK version... " >&6; }
21193              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21195$as_echo "$BOOT_JDK_VERSION" >&6; }
21196            fi # end check jdk version
21197          fi # end check rt.jar
21198        fi # end check javac
21199      fi # end check java
21200    fi # end check boot jdk found
21201  fi
21202
21203
21204  if test "x$BOOT_JDK_FOUND" = xno; then
21205    # Now execute the test
21206
21207  if test "x$PROGRAMW6432" != x; then
21208    VIRTUAL_DIR="$PROGRAMW6432/Java"
21209
21210  windows_path="$VIRTUAL_DIR"
21211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21212    unix_path=`$CYGPATH -u "$windows_path"`
21213    VIRTUAL_DIR="$unix_path"
21214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21216    VIRTUAL_DIR="$unix_path"
21217  fi
21218
21219
21220  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21221  BOOT_JDK_SUFFIX=""
21222  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21223  if test "x$ALL_JDKS_FOUND" != x; then
21224    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21225
21226  if test "x$BOOT_JDK_FOUND" = xno; then
21227    # Now execute the test
21228
21229        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21230        if test -d "$BOOT_JDK"; then
21231          BOOT_JDK_FOUND=maybe
21232          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21233$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21234        fi
21235
21236
21237    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21238    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21239      # Do we have a bin/java?
21240      if test ! -x "$BOOT_JDK/bin/java"; then
21241        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21243        BOOT_JDK_FOUND=no
21244      else
21245        # Do we have a bin/javac?
21246        if test ! -x "$BOOT_JDK/bin/javac"; then
21247          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21249          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21250$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21251          BOOT_JDK_FOUND=no
21252        else
21253          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21254          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21255            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21257            BOOT_JDK_FOUND=no
21258          else
21259            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21261
21262            # Extra M4 quote needed to protect [] in grep expression.
21263            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21264            if test "x$FOUND_VERSION_78" = x; then
21265              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21267              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21268$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21269              BOOT_JDK_FOUND=no
21270            else
21271              # We're done! :-)
21272              BOOT_JDK_FOUND=yes
21273
21274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21275
21276  # Input might be given as Windows format, start by converting to
21277  # unix format.
21278  path="$BOOT_JDK"
21279  new_path=`$CYGPATH -u "$path"`
21280
21281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21284  # "foo.exe" is OK but "foo" is an error.
21285  #
21286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21287  # It is also a way to make sure we got the proper file name for the real test later on.
21288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21289  if test "x$test_shortpath" = x; then
21290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21292    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21293  fi
21294
21295  # Call helper function which possibly converts this using DOS-style short mode.
21296  # If so, the updated path is stored in $new_path.
21297
21298  input_path="$new_path"
21299  # Check if we need to convert this using DOS-style short mode. If the path
21300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21301  # take no chances and rewrite it.
21302  # Note: m4 eats our [], so we need to use [ and ] instead.
21303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21304  if test "x$has_forbidden_chars" != x; then
21305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21309      # Going to short mode and back again did indeed matter. Since short mode is
21310      # case insensitive, let's make it lowercase to improve readability.
21311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21312      # Now convert it back to Unix-stile (cygpath)
21313      input_path=`$CYGPATH -u "$shortmode_path"`
21314      new_path="$input_path"
21315    fi
21316  fi
21317
21318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21319  if test "x$test_cygdrive_prefix" = x; then
21320    # As a simple fix, exclude /usr/bin since it's not a real path.
21321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21323      # a path prefixed by /cygdrive for fixpath to work.
21324      new_path="$CYGWIN_ROOT_PATH$input_path"
21325    fi
21326  fi
21327
21328
21329  if test "x$path" != "x$new_path"; then
21330    BOOT_JDK="$new_path"
21331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21333  fi
21334
21335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21336
21337  path="$BOOT_JDK"
21338  has_colon=`$ECHO $path | $GREP ^.:`
21339  new_path="$path"
21340  if test "x$has_colon" = x; then
21341    # Not in mixed or Windows style, start by that.
21342    new_path=`cmd //c echo $path`
21343  fi
21344
21345
21346  input_path="$new_path"
21347  # Check if we need to convert this using DOS-style short mode. If the path
21348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21349  # take no chances and rewrite it.
21350  # Note: m4 eats our [], so we need to use [ and ] instead.
21351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21352  if test "x$has_forbidden_chars" != x; then
21353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21355  fi
21356
21357
21358  windows_path="$new_path"
21359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21360    unix_path=`$CYGPATH -u "$windows_path"`
21361    new_path="$unix_path"
21362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21364    new_path="$unix_path"
21365  fi
21366
21367  if test "x$path" != "x$new_path"; then
21368    BOOT_JDK="$new_path"
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21371  fi
21372
21373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21375
21376  else
21377    # We're on a posix platform. Hooray! :)
21378    path="$BOOT_JDK"
21379    has_space=`$ECHO "$path" | $GREP " "`
21380    if test "x$has_space" != x; then
21381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21383      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21384    fi
21385
21386    # Use eval to expand a potential ~
21387    eval path="$path"
21388    if test ! -f "$path" && test ! -d "$path"; then
21389      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21390    fi
21391
21392    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21393  fi
21394
21395              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21396$as_echo_n "checking for Boot JDK... " >&6; }
21397              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21398$as_echo "$BOOT_JDK" >&6; }
21399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21400$as_echo_n "checking Boot JDK version... " >&6; }
21401              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21402              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21403$as_echo "$BOOT_JDK_VERSION" >&6; }
21404            fi # end check jdk version
21405          fi # end check rt.jar
21406        fi # end check javac
21407      fi # end check java
21408    fi # end check boot jdk found
21409  fi
21410
21411    done
21412  fi
21413
21414  fi
21415
21416
21417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21419      # Do we have a bin/java?
21420      if test ! -x "$BOOT_JDK/bin/java"; then
21421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21423        BOOT_JDK_FOUND=no
21424      else
21425        # Do we have a bin/javac?
21426        if test ! -x "$BOOT_JDK/bin/javac"; then
21427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21431          BOOT_JDK_FOUND=no
21432        else
21433          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21434          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21437            BOOT_JDK_FOUND=no
21438          else
21439            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21440            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21441
21442            # Extra M4 quote needed to protect [] in grep expression.
21443            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21444            if test "x$FOUND_VERSION_78" = x; then
21445              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21447              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21448$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21449              BOOT_JDK_FOUND=no
21450            else
21451              # We're done! :-)
21452              BOOT_JDK_FOUND=yes
21453
21454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21455
21456  # Input might be given as Windows format, start by converting to
21457  # unix format.
21458  path="$BOOT_JDK"
21459  new_path=`$CYGPATH -u "$path"`
21460
21461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21464  # "foo.exe" is OK but "foo" is an error.
21465  #
21466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21467  # It is also a way to make sure we got the proper file name for the real test later on.
21468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21469  if test "x$test_shortpath" = x; then
21470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21472    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21473  fi
21474
21475  # Call helper function which possibly converts this using DOS-style short mode.
21476  # If so, the updated path is stored in $new_path.
21477
21478  input_path="$new_path"
21479  # Check if we need to convert this using DOS-style short mode. If the path
21480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21481  # take no chances and rewrite it.
21482  # Note: m4 eats our [], so we need to use [ and ] instead.
21483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21484  if test "x$has_forbidden_chars" != x; then
21485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21489      # Going to short mode and back again did indeed matter. Since short mode is
21490      # case insensitive, let's make it lowercase to improve readability.
21491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21492      # Now convert it back to Unix-stile (cygpath)
21493      input_path=`$CYGPATH -u "$shortmode_path"`
21494      new_path="$input_path"
21495    fi
21496  fi
21497
21498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21499  if test "x$test_cygdrive_prefix" = x; then
21500    # As a simple fix, exclude /usr/bin since it's not a real path.
21501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21503      # a path prefixed by /cygdrive for fixpath to work.
21504      new_path="$CYGWIN_ROOT_PATH$input_path"
21505    fi
21506  fi
21507
21508
21509  if test "x$path" != "x$new_path"; then
21510    BOOT_JDK="$new_path"
21511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21513  fi
21514
21515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21516
21517  path="$BOOT_JDK"
21518  has_colon=`$ECHO $path | $GREP ^.:`
21519  new_path="$path"
21520  if test "x$has_colon" = x; then
21521    # Not in mixed or Windows style, start by that.
21522    new_path=`cmd //c echo $path`
21523  fi
21524
21525
21526  input_path="$new_path"
21527  # Check if we need to convert this using DOS-style short mode. If the path
21528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21529  # take no chances and rewrite it.
21530  # Note: m4 eats our [], so we need to use [ and ] instead.
21531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21532  if test "x$has_forbidden_chars" != x; then
21533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21535  fi
21536
21537
21538  windows_path="$new_path"
21539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21540    unix_path=`$CYGPATH -u "$windows_path"`
21541    new_path="$unix_path"
21542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21544    new_path="$unix_path"
21545  fi
21546
21547  if test "x$path" != "x$new_path"; then
21548    BOOT_JDK="$new_path"
21549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21551  fi
21552
21553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21555
21556  else
21557    # We're on a posix platform. Hooray! :)
21558    path="$BOOT_JDK"
21559    has_space=`$ECHO "$path" | $GREP " "`
21560    if test "x$has_space" != x; then
21561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21563      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21564    fi
21565
21566    # Use eval to expand a potential ~
21567    eval path="$path"
21568    if test ! -f "$path" && test ! -d "$path"; then
21569      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21570    fi
21571
21572    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21573  fi
21574
21575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21576$as_echo_n "checking for Boot JDK... " >&6; }
21577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21578$as_echo "$BOOT_JDK" >&6; }
21579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21580$as_echo_n "checking Boot JDK version... " >&6; }
21581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21583$as_echo "$BOOT_JDK_VERSION" >&6; }
21584            fi # end check jdk version
21585          fi # end check rt.jar
21586        fi # end check javac
21587      fi # end check java
21588    fi # end check boot jdk found
21589  fi
21590
21591
21592  if test "x$BOOT_JDK_FOUND" = xno; then
21593    # Now execute the test
21594
21595  if test "x$PROGRAMFILES" != x; then
21596    VIRTUAL_DIR="$PROGRAMFILES/Java"
21597
21598  windows_path="$VIRTUAL_DIR"
21599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21600    unix_path=`$CYGPATH -u "$windows_path"`
21601    VIRTUAL_DIR="$unix_path"
21602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21604    VIRTUAL_DIR="$unix_path"
21605  fi
21606
21607
21608  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21609  BOOT_JDK_SUFFIX=""
21610  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21611  if test "x$ALL_JDKS_FOUND" != x; then
21612    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21613
21614  if test "x$BOOT_JDK_FOUND" = xno; then
21615    # Now execute the test
21616
21617        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21618        if test -d "$BOOT_JDK"; then
21619          BOOT_JDK_FOUND=maybe
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21621$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21622        fi
21623
21624
21625    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21626    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21627      # Do we have a bin/java?
21628      if test ! -x "$BOOT_JDK/bin/java"; then
21629        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21631        BOOT_JDK_FOUND=no
21632      else
21633        # Do we have a bin/javac?
21634        if test ! -x "$BOOT_JDK/bin/javac"; then
21635          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21637          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21638$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21639          BOOT_JDK_FOUND=no
21640        else
21641          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21642          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21643            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21645            BOOT_JDK_FOUND=no
21646          else
21647            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21648            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21649
21650            # Extra M4 quote needed to protect [] in grep expression.
21651            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21652            if test "x$FOUND_VERSION_78" = x; then
21653              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21655              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21656$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21657              BOOT_JDK_FOUND=no
21658            else
21659              # We're done! :-)
21660              BOOT_JDK_FOUND=yes
21661
21662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21663
21664  # Input might be given as Windows format, start by converting to
21665  # unix format.
21666  path="$BOOT_JDK"
21667  new_path=`$CYGPATH -u "$path"`
21668
21669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21672  # "foo.exe" is OK but "foo" is an error.
21673  #
21674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21675  # It is also a way to make sure we got the proper file name for the real test later on.
21676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21677  if test "x$test_shortpath" = x; then
21678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21681  fi
21682
21683  # Call helper function which possibly converts this using DOS-style short mode.
21684  # If so, the updated path is stored in $new_path.
21685
21686  input_path="$new_path"
21687  # Check if we need to convert this using DOS-style short mode. If the path
21688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21689  # take no chances and rewrite it.
21690  # Note: m4 eats our [], so we need to use [ and ] instead.
21691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21692  if test "x$has_forbidden_chars" != x; then
21693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21697      # Going to short mode and back again did indeed matter. Since short mode is
21698      # case insensitive, let's make it lowercase to improve readability.
21699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21700      # Now convert it back to Unix-stile (cygpath)
21701      input_path=`$CYGPATH -u "$shortmode_path"`
21702      new_path="$input_path"
21703    fi
21704  fi
21705
21706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21707  if test "x$test_cygdrive_prefix" = x; then
21708    # As a simple fix, exclude /usr/bin since it's not a real path.
21709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21711      # a path prefixed by /cygdrive for fixpath to work.
21712      new_path="$CYGWIN_ROOT_PATH$input_path"
21713    fi
21714  fi
21715
21716
21717  if test "x$path" != "x$new_path"; then
21718    BOOT_JDK="$new_path"
21719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21721  fi
21722
21723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21724
21725  path="$BOOT_JDK"
21726  has_colon=`$ECHO $path | $GREP ^.:`
21727  new_path="$path"
21728  if test "x$has_colon" = x; then
21729    # Not in mixed or Windows style, start by that.
21730    new_path=`cmd //c echo $path`
21731  fi
21732
21733
21734  input_path="$new_path"
21735  # Check if we need to convert this using DOS-style short mode. If the path
21736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21737  # take no chances and rewrite it.
21738  # Note: m4 eats our [], so we need to use [ and ] instead.
21739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21740  if test "x$has_forbidden_chars" != x; then
21741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21743  fi
21744
21745
21746  windows_path="$new_path"
21747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21748    unix_path=`$CYGPATH -u "$windows_path"`
21749    new_path="$unix_path"
21750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21752    new_path="$unix_path"
21753  fi
21754
21755  if test "x$path" != "x$new_path"; then
21756    BOOT_JDK="$new_path"
21757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21759  fi
21760
21761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21763
21764  else
21765    # We're on a posix platform. Hooray! :)
21766    path="$BOOT_JDK"
21767    has_space=`$ECHO "$path" | $GREP " "`
21768    if test "x$has_space" != x; then
21769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21772    fi
21773
21774    # Use eval to expand a potential ~
21775    eval path="$path"
21776    if test ! -f "$path" && test ! -d "$path"; then
21777      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21778    fi
21779
21780    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21781  fi
21782
21783              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21784$as_echo_n "checking for Boot JDK... " >&6; }
21785              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21786$as_echo "$BOOT_JDK" >&6; }
21787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21788$as_echo_n "checking Boot JDK version... " >&6; }
21789              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21791$as_echo "$BOOT_JDK_VERSION" >&6; }
21792            fi # end check jdk version
21793          fi # end check rt.jar
21794        fi # end check javac
21795      fi # end check java
21796    fi # end check boot jdk found
21797  fi
21798
21799    done
21800  fi
21801
21802  fi
21803
21804
21805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21807      # Do we have a bin/java?
21808      if test ! -x "$BOOT_JDK/bin/java"; then
21809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21811        BOOT_JDK_FOUND=no
21812      else
21813        # Do we have a bin/javac?
21814        if test ! -x "$BOOT_JDK/bin/javac"; then
21815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21819          BOOT_JDK_FOUND=no
21820        else
21821          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21822          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21825            BOOT_JDK_FOUND=no
21826          else
21827            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21828            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21829
21830            # Extra M4 quote needed to protect [] in grep expression.
21831            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21832            if test "x$FOUND_VERSION_78" = x; then
21833              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21835              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21836$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21837              BOOT_JDK_FOUND=no
21838            else
21839              # We're done! :-)
21840              BOOT_JDK_FOUND=yes
21841
21842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21843
21844  # Input might be given as Windows format, start by converting to
21845  # unix format.
21846  path="$BOOT_JDK"
21847  new_path=`$CYGPATH -u "$path"`
21848
21849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21852  # "foo.exe" is OK but "foo" is an error.
21853  #
21854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21855  # It is also a way to make sure we got the proper file name for the real test later on.
21856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21857  if test "x$test_shortpath" = x; then
21858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21861  fi
21862
21863  # Call helper function which possibly converts this using DOS-style short mode.
21864  # If so, the updated path is stored in $new_path.
21865
21866  input_path="$new_path"
21867  # Check if we need to convert this using DOS-style short mode. If the path
21868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21869  # take no chances and rewrite it.
21870  # Note: m4 eats our [], so we need to use [ and ] instead.
21871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21872  if test "x$has_forbidden_chars" != x; then
21873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21877      # Going to short mode and back again did indeed matter. Since short mode is
21878      # case insensitive, let's make it lowercase to improve readability.
21879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21880      # Now convert it back to Unix-stile (cygpath)
21881      input_path=`$CYGPATH -u "$shortmode_path"`
21882      new_path="$input_path"
21883    fi
21884  fi
21885
21886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21887  if test "x$test_cygdrive_prefix" = x; then
21888    # As a simple fix, exclude /usr/bin since it's not a real path.
21889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21891      # a path prefixed by /cygdrive for fixpath to work.
21892      new_path="$CYGWIN_ROOT_PATH$input_path"
21893    fi
21894  fi
21895
21896
21897  if test "x$path" != "x$new_path"; then
21898    BOOT_JDK="$new_path"
21899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21901  fi
21902
21903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21904
21905  path="$BOOT_JDK"
21906  has_colon=`$ECHO $path | $GREP ^.:`
21907  new_path="$path"
21908  if test "x$has_colon" = x; then
21909    # Not in mixed or Windows style, start by that.
21910    new_path=`cmd //c echo $path`
21911  fi
21912
21913
21914  input_path="$new_path"
21915  # Check if we need to convert this using DOS-style short mode. If the path
21916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21917  # take no chances and rewrite it.
21918  # Note: m4 eats our [], so we need to use [ and ] instead.
21919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21920  if test "x$has_forbidden_chars" != x; then
21921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21923  fi
21924
21925
21926  windows_path="$new_path"
21927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21928    unix_path=`$CYGPATH -u "$windows_path"`
21929    new_path="$unix_path"
21930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21932    new_path="$unix_path"
21933  fi
21934
21935  if test "x$path" != "x$new_path"; then
21936    BOOT_JDK="$new_path"
21937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21939  fi
21940
21941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21943
21944  else
21945    # We're on a posix platform. Hooray! :)
21946    path="$BOOT_JDK"
21947    has_space=`$ECHO "$path" | $GREP " "`
21948    if test "x$has_space" != x; then
21949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21952    fi
21953
21954    # Use eval to expand a potential ~
21955    eval path="$path"
21956    if test ! -f "$path" && test ! -d "$path"; then
21957      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21958    fi
21959
21960    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21961  fi
21962
21963              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21964$as_echo_n "checking for Boot JDK... " >&6; }
21965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21966$as_echo "$BOOT_JDK" >&6; }
21967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21968$as_echo_n "checking Boot JDK version... " >&6; }
21969              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21971$as_echo "$BOOT_JDK_VERSION" >&6; }
21972            fi # end check jdk version
21973          fi # end check rt.jar
21974        fi # end check javac
21975      fi # end check java
21976    fi # end check boot jdk found
21977  fi
21978
21979
21980  if test "x$BOOT_JDK_FOUND" = xno; then
21981    # Now execute the test
21982
21983  if test "x$ProgramFiles" != x; then
21984    VIRTUAL_DIR="$ProgramFiles/Java"
21985
21986  windows_path="$VIRTUAL_DIR"
21987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21988    unix_path=`$CYGPATH -u "$windows_path"`
21989    VIRTUAL_DIR="$unix_path"
21990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21992    VIRTUAL_DIR="$unix_path"
21993  fi
21994
21995
21996  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21997  BOOT_JDK_SUFFIX=""
21998  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21999  if test "x$ALL_JDKS_FOUND" != x; then
22000    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22001
22002  if test "x$BOOT_JDK_FOUND" = xno; then
22003    # Now execute the test
22004
22005        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22006        if test -d "$BOOT_JDK"; then
22007          BOOT_JDK_FOUND=maybe
22008          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22009$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22010        fi
22011
22012
22013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22015      # Do we have a bin/java?
22016      if test ! -x "$BOOT_JDK/bin/java"; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22019        BOOT_JDK_FOUND=no
22020      else
22021        # Do we have a bin/javac?
22022        if test ! -x "$BOOT_JDK/bin/javac"; then
22023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22027          BOOT_JDK_FOUND=no
22028        else
22029          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22030          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22033            BOOT_JDK_FOUND=no
22034          else
22035            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22037
22038            # Extra M4 quote needed to protect [] in grep expression.
22039            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22040            if test "x$FOUND_VERSION_78" = x; then
22041              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22043              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22044$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22045              BOOT_JDK_FOUND=no
22046            else
22047              # We're done! :-)
22048              BOOT_JDK_FOUND=yes
22049
22050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22051
22052  # Input might be given as Windows format, start by converting to
22053  # unix format.
22054  path="$BOOT_JDK"
22055  new_path=`$CYGPATH -u "$path"`
22056
22057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22060  # "foo.exe" is OK but "foo" is an error.
22061  #
22062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22063  # It is also a way to make sure we got the proper file name for the real test later on.
22064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22065  if test "x$test_shortpath" = x; then
22066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22069  fi
22070
22071  # Call helper function which possibly converts this using DOS-style short mode.
22072  # If so, the updated path is stored in $new_path.
22073
22074  input_path="$new_path"
22075  # Check if we need to convert this using DOS-style short mode. If the path
22076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22077  # take no chances and rewrite it.
22078  # Note: m4 eats our [], so we need to use [ and ] instead.
22079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22080  if test "x$has_forbidden_chars" != x; then
22081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22085      # Going to short mode and back again did indeed matter. Since short mode is
22086      # case insensitive, let's make it lowercase to improve readability.
22087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22088      # Now convert it back to Unix-stile (cygpath)
22089      input_path=`$CYGPATH -u "$shortmode_path"`
22090      new_path="$input_path"
22091    fi
22092  fi
22093
22094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22095  if test "x$test_cygdrive_prefix" = x; then
22096    # As a simple fix, exclude /usr/bin since it's not a real path.
22097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22099      # a path prefixed by /cygdrive for fixpath to work.
22100      new_path="$CYGWIN_ROOT_PATH$input_path"
22101    fi
22102  fi
22103
22104
22105  if test "x$path" != "x$new_path"; then
22106    BOOT_JDK="$new_path"
22107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22109  fi
22110
22111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22112
22113  path="$BOOT_JDK"
22114  has_colon=`$ECHO $path | $GREP ^.:`
22115  new_path="$path"
22116  if test "x$has_colon" = x; then
22117    # Not in mixed or Windows style, start by that.
22118    new_path=`cmd //c echo $path`
22119  fi
22120
22121
22122  input_path="$new_path"
22123  # Check if we need to convert this using DOS-style short mode. If the path
22124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22125  # take no chances and rewrite it.
22126  # Note: m4 eats our [], so we need to use [ and ] instead.
22127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22128  if test "x$has_forbidden_chars" != x; then
22129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22131  fi
22132
22133
22134  windows_path="$new_path"
22135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22136    unix_path=`$CYGPATH -u "$windows_path"`
22137    new_path="$unix_path"
22138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22140    new_path="$unix_path"
22141  fi
22142
22143  if test "x$path" != "x$new_path"; then
22144    BOOT_JDK="$new_path"
22145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22147  fi
22148
22149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22151
22152  else
22153    # We're on a posix platform. Hooray! :)
22154    path="$BOOT_JDK"
22155    has_space=`$ECHO "$path" | $GREP " "`
22156    if test "x$has_space" != x; then
22157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22160    fi
22161
22162    # Use eval to expand a potential ~
22163    eval path="$path"
22164    if test ! -f "$path" && test ! -d "$path"; then
22165      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22166    fi
22167
22168    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22169  fi
22170
22171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22172$as_echo_n "checking for Boot JDK... " >&6; }
22173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22174$as_echo "$BOOT_JDK" >&6; }
22175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22176$as_echo_n "checking Boot JDK version... " >&6; }
22177              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22179$as_echo "$BOOT_JDK_VERSION" >&6; }
22180            fi # end check jdk version
22181          fi # end check rt.jar
22182        fi # end check javac
22183      fi # end check java
22184    fi # end check boot jdk found
22185  fi
22186
22187    done
22188  fi
22189
22190  fi
22191
22192
22193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22195      # Do we have a bin/java?
22196      if test ! -x "$BOOT_JDK/bin/java"; then
22197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22199        BOOT_JDK_FOUND=no
22200      else
22201        # Do we have a bin/javac?
22202        if test ! -x "$BOOT_JDK/bin/javac"; then
22203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22207          BOOT_JDK_FOUND=no
22208        else
22209          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22210          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22213            BOOT_JDK_FOUND=no
22214          else
22215            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22217
22218            # Extra M4 quote needed to protect [] in grep expression.
22219            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22220            if test "x$FOUND_VERSION_78" = x; then
22221              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22223              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22224$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22225              BOOT_JDK_FOUND=no
22226            else
22227              # We're done! :-)
22228              BOOT_JDK_FOUND=yes
22229
22230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22231
22232  # Input might be given as Windows format, start by converting to
22233  # unix format.
22234  path="$BOOT_JDK"
22235  new_path=`$CYGPATH -u "$path"`
22236
22237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22240  # "foo.exe" is OK but "foo" is an error.
22241  #
22242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22243  # It is also a way to make sure we got the proper file name for the real test later on.
22244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22245  if test "x$test_shortpath" = x; then
22246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22249  fi
22250
22251  # Call helper function which possibly converts this using DOS-style short mode.
22252  # If so, the updated path is stored in $new_path.
22253
22254  input_path="$new_path"
22255  # Check if we need to convert this using DOS-style short mode. If the path
22256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22257  # take no chances and rewrite it.
22258  # Note: m4 eats our [], so we need to use [ and ] instead.
22259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22260  if test "x$has_forbidden_chars" != x; then
22261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22265      # Going to short mode and back again did indeed matter. Since short mode is
22266      # case insensitive, let's make it lowercase to improve readability.
22267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22268      # Now convert it back to Unix-stile (cygpath)
22269      input_path=`$CYGPATH -u "$shortmode_path"`
22270      new_path="$input_path"
22271    fi
22272  fi
22273
22274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22275  if test "x$test_cygdrive_prefix" = x; then
22276    # As a simple fix, exclude /usr/bin since it's not a real path.
22277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22279      # a path prefixed by /cygdrive for fixpath to work.
22280      new_path="$CYGWIN_ROOT_PATH$input_path"
22281    fi
22282  fi
22283
22284
22285  if test "x$path" != "x$new_path"; then
22286    BOOT_JDK="$new_path"
22287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22289  fi
22290
22291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22292
22293  path="$BOOT_JDK"
22294  has_colon=`$ECHO $path | $GREP ^.:`
22295  new_path="$path"
22296  if test "x$has_colon" = x; then
22297    # Not in mixed or Windows style, start by that.
22298    new_path=`cmd //c echo $path`
22299  fi
22300
22301
22302  input_path="$new_path"
22303  # Check if we need to convert this using DOS-style short mode. If the path
22304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22305  # take no chances and rewrite it.
22306  # Note: m4 eats our [], so we need to use [ and ] instead.
22307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22308  if test "x$has_forbidden_chars" != x; then
22309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22311  fi
22312
22313
22314  windows_path="$new_path"
22315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22316    unix_path=`$CYGPATH -u "$windows_path"`
22317    new_path="$unix_path"
22318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22320    new_path="$unix_path"
22321  fi
22322
22323  if test "x$path" != "x$new_path"; then
22324    BOOT_JDK="$new_path"
22325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22327  fi
22328
22329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22331
22332  else
22333    # We're on a posix platform. Hooray! :)
22334    path="$BOOT_JDK"
22335    has_space=`$ECHO "$path" | $GREP " "`
22336    if test "x$has_space" != x; then
22337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22340    fi
22341
22342    # Use eval to expand a potential ~
22343    eval path="$path"
22344    if test ! -f "$path" && test ! -d "$path"; then
22345      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22346    fi
22347
22348    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22349  fi
22350
22351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22352$as_echo_n "checking for Boot JDK... " >&6; }
22353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22354$as_echo "$BOOT_JDK" >&6; }
22355              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22356$as_echo_n "checking Boot JDK version... " >&6; }
22357              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22358              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22359$as_echo "$BOOT_JDK_VERSION" >&6; }
22360            fi # end check jdk version
22361          fi # end check rt.jar
22362        fi # end check javac
22363      fi # end check java
22364    fi # end check boot jdk found
22365  fi
22366
22367
22368  if test "x$BOOT_JDK_FOUND" = xno; then
22369    # Now execute the test
22370
22371  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22372  BOOT_JDK_SUFFIX=""
22373  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22374  if test "x$ALL_JDKS_FOUND" != x; then
22375    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22376
22377  if test "x$BOOT_JDK_FOUND" = xno; then
22378    # Now execute the test
22379
22380        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22381        if test -d "$BOOT_JDK"; then
22382          BOOT_JDK_FOUND=maybe
22383          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22384$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22385        fi
22386
22387
22388    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22389    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22390      # Do we have a bin/java?
22391      if test ! -x "$BOOT_JDK/bin/java"; then
22392        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22394        BOOT_JDK_FOUND=no
22395      else
22396        # Do we have a bin/javac?
22397        if test ! -x "$BOOT_JDK/bin/javac"; then
22398          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22400          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22401$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22402          BOOT_JDK_FOUND=no
22403        else
22404          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22405          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22406            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22408            BOOT_JDK_FOUND=no
22409          else
22410            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22411            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22412
22413            # Extra M4 quote needed to protect [] in grep expression.
22414            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22415            if test "x$FOUND_VERSION_78" = x; then
22416              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22418              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22419$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22420              BOOT_JDK_FOUND=no
22421            else
22422              # We're done! :-)
22423              BOOT_JDK_FOUND=yes
22424
22425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22426
22427  # Input might be given as Windows format, start by converting to
22428  # unix format.
22429  path="$BOOT_JDK"
22430  new_path=`$CYGPATH -u "$path"`
22431
22432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22435  # "foo.exe" is OK but "foo" is an error.
22436  #
22437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22438  # It is also a way to make sure we got the proper file name for the real test later on.
22439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22440  if test "x$test_shortpath" = x; then
22441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22443    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22444  fi
22445
22446  # Call helper function which possibly converts this using DOS-style short mode.
22447  # If so, the updated path is stored in $new_path.
22448
22449  input_path="$new_path"
22450  # Check if we need to convert this using DOS-style short mode. If the path
22451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22452  # take no chances and rewrite it.
22453  # Note: m4 eats our [], so we need to use [ and ] instead.
22454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22455  if test "x$has_forbidden_chars" != x; then
22456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22460      # Going to short mode and back again did indeed matter. Since short mode is
22461      # case insensitive, let's make it lowercase to improve readability.
22462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22463      # Now convert it back to Unix-stile (cygpath)
22464      input_path=`$CYGPATH -u "$shortmode_path"`
22465      new_path="$input_path"
22466    fi
22467  fi
22468
22469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22470  if test "x$test_cygdrive_prefix" = x; then
22471    # As a simple fix, exclude /usr/bin since it's not a real path.
22472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22474      # a path prefixed by /cygdrive for fixpath to work.
22475      new_path="$CYGWIN_ROOT_PATH$input_path"
22476    fi
22477  fi
22478
22479
22480  if test "x$path" != "x$new_path"; then
22481    BOOT_JDK="$new_path"
22482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22484  fi
22485
22486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22487
22488  path="$BOOT_JDK"
22489  has_colon=`$ECHO $path | $GREP ^.:`
22490  new_path="$path"
22491  if test "x$has_colon" = x; then
22492    # Not in mixed or Windows style, start by that.
22493    new_path=`cmd //c echo $path`
22494  fi
22495
22496
22497  input_path="$new_path"
22498  # Check if we need to convert this using DOS-style short mode. If the path
22499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22500  # take no chances and rewrite it.
22501  # Note: m4 eats our [], so we need to use [ and ] instead.
22502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22503  if test "x$has_forbidden_chars" != x; then
22504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22506  fi
22507
22508
22509  windows_path="$new_path"
22510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22511    unix_path=`$CYGPATH -u "$windows_path"`
22512    new_path="$unix_path"
22513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22515    new_path="$unix_path"
22516  fi
22517
22518  if test "x$path" != "x$new_path"; then
22519    BOOT_JDK="$new_path"
22520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22522  fi
22523
22524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22526
22527  else
22528    # We're on a posix platform. Hooray! :)
22529    path="$BOOT_JDK"
22530    has_space=`$ECHO "$path" | $GREP " "`
22531    if test "x$has_space" != x; then
22532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22535    fi
22536
22537    # Use eval to expand a potential ~
22538    eval path="$path"
22539    if test ! -f "$path" && test ! -d "$path"; then
22540      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22541    fi
22542
22543    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22544  fi
22545
22546              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22547$as_echo_n "checking for Boot JDK... " >&6; }
22548              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22549$as_echo "$BOOT_JDK" >&6; }
22550              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22551$as_echo_n "checking Boot JDK version... " >&6; }
22552              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22554$as_echo "$BOOT_JDK_VERSION" >&6; }
22555            fi # end check jdk version
22556          fi # end check rt.jar
22557        fi # end check javac
22558      fi # end check java
22559    fi # end check boot jdk found
22560  fi
22561
22562    done
22563  fi
22564
22565
22566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22568      # Do we have a bin/java?
22569      if test ! -x "$BOOT_JDK/bin/java"; then
22570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22572        BOOT_JDK_FOUND=no
22573      else
22574        # Do we have a bin/javac?
22575        if test ! -x "$BOOT_JDK/bin/javac"; then
22576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22580          BOOT_JDK_FOUND=no
22581        else
22582          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22583          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22586            BOOT_JDK_FOUND=no
22587          else
22588            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22589            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22590
22591            # Extra M4 quote needed to protect [] in grep expression.
22592            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22593            if test "x$FOUND_VERSION_78" = x; then
22594              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22596              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22597$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22598              BOOT_JDK_FOUND=no
22599            else
22600              # We're done! :-)
22601              BOOT_JDK_FOUND=yes
22602
22603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604
22605  # Input might be given as Windows format, start by converting to
22606  # unix format.
22607  path="$BOOT_JDK"
22608  new_path=`$CYGPATH -u "$path"`
22609
22610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22613  # "foo.exe" is OK but "foo" is an error.
22614  #
22615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22616  # It is also a way to make sure we got the proper file name for the real test later on.
22617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22618  if test "x$test_shortpath" = x; then
22619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22622  fi
22623
22624  # Call helper function which possibly converts this using DOS-style short mode.
22625  # If so, the updated path is stored in $new_path.
22626
22627  input_path="$new_path"
22628  # Check if we need to convert this using DOS-style short mode. If the path
22629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22630  # take no chances and rewrite it.
22631  # Note: m4 eats our [], so we need to use [ and ] instead.
22632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22633  if test "x$has_forbidden_chars" != x; then
22634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22638      # Going to short mode and back again did indeed matter. Since short mode is
22639      # case insensitive, let's make it lowercase to improve readability.
22640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22641      # Now convert it back to Unix-stile (cygpath)
22642      input_path=`$CYGPATH -u "$shortmode_path"`
22643      new_path="$input_path"
22644    fi
22645  fi
22646
22647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22648  if test "x$test_cygdrive_prefix" = x; then
22649    # As a simple fix, exclude /usr/bin since it's not a real path.
22650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22652      # a path prefixed by /cygdrive for fixpath to work.
22653      new_path="$CYGWIN_ROOT_PATH$input_path"
22654    fi
22655  fi
22656
22657
22658  if test "x$path" != "x$new_path"; then
22659    BOOT_JDK="$new_path"
22660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22662  fi
22663
22664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22665
22666  path="$BOOT_JDK"
22667  has_colon=`$ECHO $path | $GREP ^.:`
22668  new_path="$path"
22669  if test "x$has_colon" = x; then
22670    # Not in mixed or Windows style, start by that.
22671    new_path=`cmd //c echo $path`
22672  fi
22673
22674
22675  input_path="$new_path"
22676  # Check if we need to convert this using DOS-style short mode. If the path
22677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22678  # take no chances and rewrite it.
22679  # Note: m4 eats our [], so we need to use [ and ] instead.
22680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22681  if test "x$has_forbidden_chars" != x; then
22682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22684  fi
22685
22686
22687  windows_path="$new_path"
22688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22689    unix_path=`$CYGPATH -u "$windows_path"`
22690    new_path="$unix_path"
22691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22693    new_path="$unix_path"
22694  fi
22695
22696  if test "x$path" != "x$new_path"; then
22697    BOOT_JDK="$new_path"
22698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22700  fi
22701
22702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22704
22705  else
22706    # We're on a posix platform. Hooray! :)
22707    path="$BOOT_JDK"
22708    has_space=`$ECHO "$path" | $GREP " "`
22709    if test "x$has_space" != x; then
22710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22713    fi
22714
22715    # Use eval to expand a potential ~
22716    eval path="$path"
22717    if test ! -f "$path" && test ! -d "$path"; then
22718      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22719    fi
22720
22721    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22722  fi
22723
22724              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22725$as_echo_n "checking for Boot JDK... " >&6; }
22726              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22727$as_echo "$BOOT_JDK" >&6; }
22728              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22729$as_echo_n "checking Boot JDK version... " >&6; }
22730              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22732$as_echo "$BOOT_JDK_VERSION" >&6; }
22733            fi # end check jdk version
22734          fi # end check rt.jar
22735        fi # end check javac
22736      fi # end check java
22737    fi # end check boot jdk found
22738  fi
22739
22740  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
22741
22742  if test "x$BOOT_JDK_FOUND" = xno; then
22743    # Now execute the test
22744
22745  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
22746  BOOT_JDK_SUFFIX="/Contents/Home"
22747  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22748  if test "x$ALL_JDKS_FOUND" != x; then
22749    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22750
22751  if test "x$BOOT_JDK_FOUND" = xno; then
22752    # Now execute the test
22753
22754        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22755        if test -d "$BOOT_JDK"; then
22756          BOOT_JDK_FOUND=maybe
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22758$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22759        fi
22760
22761
22762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22764      # Do we have a bin/java?
22765      if test ! -x "$BOOT_JDK/bin/java"; then
22766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22768        BOOT_JDK_FOUND=no
22769      else
22770        # Do we have a bin/javac?
22771        if test ! -x "$BOOT_JDK/bin/javac"; then
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22776          BOOT_JDK_FOUND=no
22777        else
22778          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22779          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22782            BOOT_JDK_FOUND=no
22783          else
22784            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22786
22787            # Extra M4 quote needed to protect [] in grep expression.
22788            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22789            if test "x$FOUND_VERSION_78" = x; then
22790              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22792              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22793$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22794              BOOT_JDK_FOUND=no
22795            else
22796              # We're done! :-)
22797              BOOT_JDK_FOUND=yes
22798
22799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22800
22801  # Input might be given as Windows format, start by converting to
22802  # unix format.
22803  path="$BOOT_JDK"
22804  new_path=`$CYGPATH -u "$path"`
22805
22806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22809  # "foo.exe" is OK but "foo" is an error.
22810  #
22811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22812  # It is also a way to make sure we got the proper file name for the real test later on.
22813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22814  if test "x$test_shortpath" = x; then
22815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22818  fi
22819
22820  # Call helper function which possibly converts this using DOS-style short mode.
22821  # If so, the updated path is stored in $new_path.
22822
22823  input_path="$new_path"
22824  # Check if we need to convert this using DOS-style short mode. If the path
22825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22826  # take no chances and rewrite it.
22827  # Note: m4 eats our [], so we need to use [ and ] instead.
22828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22829  if test "x$has_forbidden_chars" != x; then
22830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22834      # Going to short mode and back again did indeed matter. Since short mode is
22835      # case insensitive, let's make it lowercase to improve readability.
22836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22837      # Now convert it back to Unix-stile (cygpath)
22838      input_path=`$CYGPATH -u "$shortmode_path"`
22839      new_path="$input_path"
22840    fi
22841  fi
22842
22843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22844  if test "x$test_cygdrive_prefix" = x; then
22845    # As a simple fix, exclude /usr/bin since it's not a real path.
22846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22848      # a path prefixed by /cygdrive for fixpath to work.
22849      new_path="$CYGWIN_ROOT_PATH$input_path"
22850    fi
22851  fi
22852
22853
22854  if test "x$path" != "x$new_path"; then
22855    BOOT_JDK="$new_path"
22856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22858  fi
22859
22860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22861
22862  path="$BOOT_JDK"
22863  has_colon=`$ECHO $path | $GREP ^.:`
22864  new_path="$path"
22865  if test "x$has_colon" = x; then
22866    # Not in mixed or Windows style, start by that.
22867    new_path=`cmd //c echo $path`
22868  fi
22869
22870
22871  input_path="$new_path"
22872  # Check if we need to convert this using DOS-style short mode. If the path
22873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22874  # take no chances and rewrite it.
22875  # Note: m4 eats our [], so we need to use [ and ] instead.
22876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22877  if test "x$has_forbidden_chars" != x; then
22878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22880  fi
22881
22882
22883  windows_path="$new_path"
22884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22885    unix_path=`$CYGPATH -u "$windows_path"`
22886    new_path="$unix_path"
22887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22889    new_path="$unix_path"
22890  fi
22891
22892  if test "x$path" != "x$new_path"; then
22893    BOOT_JDK="$new_path"
22894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22896  fi
22897
22898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22900
22901  else
22902    # We're on a posix platform. Hooray! :)
22903    path="$BOOT_JDK"
22904    has_space=`$ECHO "$path" | $GREP " "`
22905    if test "x$has_space" != x; then
22906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22909    fi
22910
22911    # Use eval to expand a potential ~
22912    eval path="$path"
22913    if test ! -f "$path" && test ! -d "$path"; then
22914      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22915    fi
22916
22917    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22918  fi
22919
22920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22921$as_echo_n "checking for Boot JDK... " >&6; }
22922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22923$as_echo "$BOOT_JDK" >&6; }
22924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22925$as_echo_n "checking Boot JDK version... " >&6; }
22926              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22928$as_echo "$BOOT_JDK_VERSION" >&6; }
22929            fi # end check jdk version
22930          fi # end check rt.jar
22931        fi # end check javac
22932      fi # end check java
22933    fi # end check boot jdk found
22934  fi
22935
22936    done
22937  fi
22938
22939
22940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22942      # Do we have a bin/java?
22943      if test ! -x "$BOOT_JDK/bin/java"; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22946        BOOT_JDK_FOUND=no
22947      else
22948        # Do we have a bin/javac?
22949        if test ! -x "$BOOT_JDK/bin/javac"; then
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22954          BOOT_JDK_FOUND=no
22955        else
22956          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22957          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22960            BOOT_JDK_FOUND=no
22961          else
22962            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22964
22965            # Extra M4 quote needed to protect [] in grep expression.
22966            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22967            if test "x$FOUND_VERSION_78" = x; then
22968              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22970              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22971$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22972              BOOT_JDK_FOUND=no
22973            else
22974              # We're done! :-)
22975              BOOT_JDK_FOUND=yes
22976
22977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22978
22979  # Input might be given as Windows format, start by converting to
22980  # unix format.
22981  path="$BOOT_JDK"
22982  new_path=`$CYGPATH -u "$path"`
22983
22984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22987  # "foo.exe" is OK but "foo" is an error.
22988  #
22989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22990  # It is also a way to make sure we got the proper file name for the real test later on.
22991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22992  if test "x$test_shortpath" = x; then
22993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22996  fi
22997
22998  # Call helper function which possibly converts this using DOS-style short mode.
22999  # If so, the updated path is stored in $new_path.
23000
23001  input_path="$new_path"
23002  # Check if we need to convert this using DOS-style short mode. If the path
23003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23004  # take no chances and rewrite it.
23005  # Note: m4 eats our [], so we need to use [ and ] instead.
23006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23007  if test "x$has_forbidden_chars" != x; then
23008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23012      # Going to short mode and back again did indeed matter. Since short mode is
23013      # case insensitive, let's make it lowercase to improve readability.
23014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23015      # Now convert it back to Unix-stile (cygpath)
23016      input_path=`$CYGPATH -u "$shortmode_path"`
23017      new_path="$input_path"
23018    fi
23019  fi
23020
23021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23022  if test "x$test_cygdrive_prefix" = x; then
23023    # As a simple fix, exclude /usr/bin since it's not a real path.
23024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23026      # a path prefixed by /cygdrive for fixpath to work.
23027      new_path="$CYGWIN_ROOT_PATH$input_path"
23028    fi
23029  fi
23030
23031
23032  if test "x$path" != "x$new_path"; then
23033    BOOT_JDK="$new_path"
23034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23036  fi
23037
23038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23039
23040  path="$BOOT_JDK"
23041  has_colon=`$ECHO $path | $GREP ^.:`
23042  new_path="$path"
23043  if test "x$has_colon" = x; then
23044    # Not in mixed or Windows style, start by that.
23045    new_path=`cmd //c echo $path`
23046  fi
23047
23048
23049  input_path="$new_path"
23050  # Check if we need to convert this using DOS-style short mode. If the path
23051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23052  # take no chances and rewrite it.
23053  # Note: m4 eats our [], so we need to use [ and ] instead.
23054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23055  if test "x$has_forbidden_chars" != x; then
23056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23058  fi
23059
23060
23061  windows_path="$new_path"
23062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23063    unix_path=`$CYGPATH -u "$windows_path"`
23064    new_path="$unix_path"
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23067    new_path="$unix_path"
23068  fi
23069
23070  if test "x$path" != "x$new_path"; then
23071    BOOT_JDK="$new_path"
23072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23074  fi
23075
23076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23078
23079  else
23080    # We're on a posix platform. Hooray! :)
23081    path="$BOOT_JDK"
23082    has_space=`$ECHO "$path" | $GREP " "`
23083    if test "x$has_space" != x; then
23084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23086      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23087    fi
23088
23089    # Use eval to expand a potential ~
23090    eval path="$path"
23091    if test ! -f "$path" && test ! -d "$path"; then
23092      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23093    fi
23094
23095    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23096  fi
23097
23098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23099$as_echo_n "checking for Boot JDK... " >&6; }
23100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23101$as_echo "$BOOT_JDK" >&6; }
23102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23103$as_echo_n "checking Boot JDK version... " >&6; }
23104              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23106$as_echo "$BOOT_JDK_VERSION" >&6; }
23107            fi # end check jdk version
23108          fi # end check rt.jar
23109        fi # end check javac
23110      fi # end check java
23111    fi # end check boot jdk found
23112  fi
23113
23114
23115  if test "x$BOOT_JDK_FOUND" = xno; then
23116    # Now execute the test
23117
23118  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23119  BOOT_JDK_SUFFIX="/Contents/Home"
23120  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23121  if test "x$ALL_JDKS_FOUND" != x; then
23122    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23123
23124  if test "x$BOOT_JDK_FOUND" = xno; then
23125    # Now execute the test
23126
23127        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23128        if test -d "$BOOT_JDK"; then
23129          BOOT_JDK_FOUND=maybe
23130          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23131$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23132        fi
23133
23134
23135    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23136    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23137      # Do we have a bin/java?
23138      if test ! -x "$BOOT_JDK/bin/java"; then
23139        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23141        BOOT_JDK_FOUND=no
23142      else
23143        # Do we have a bin/javac?
23144        if test ! -x "$BOOT_JDK/bin/javac"; then
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23147          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23148$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23149          BOOT_JDK_FOUND=no
23150        else
23151          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23152          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23153            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23155            BOOT_JDK_FOUND=no
23156          else
23157            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23159
23160            # Extra M4 quote needed to protect [] in grep expression.
23161            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23162            if test "x$FOUND_VERSION_78" = x; then
23163              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23165              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23166$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23167              BOOT_JDK_FOUND=no
23168            else
23169              # We're done! :-)
23170              BOOT_JDK_FOUND=yes
23171
23172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23173
23174  # Input might be given as Windows format, start by converting to
23175  # unix format.
23176  path="$BOOT_JDK"
23177  new_path=`$CYGPATH -u "$path"`
23178
23179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23182  # "foo.exe" is OK but "foo" is an error.
23183  #
23184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23185  # It is also a way to make sure we got the proper file name for the real test later on.
23186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23187  if test "x$test_shortpath" = x; then
23188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23190    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23191  fi
23192
23193  # Call helper function which possibly converts this using DOS-style short mode.
23194  # If so, the updated path is stored in $new_path.
23195
23196  input_path="$new_path"
23197  # Check if we need to convert this using DOS-style short mode. If the path
23198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23199  # take no chances and rewrite it.
23200  # Note: m4 eats our [], so we need to use [ and ] instead.
23201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23202  if test "x$has_forbidden_chars" != x; then
23203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23207      # Going to short mode and back again did indeed matter. Since short mode is
23208      # case insensitive, let's make it lowercase to improve readability.
23209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23210      # Now convert it back to Unix-stile (cygpath)
23211      input_path=`$CYGPATH -u "$shortmode_path"`
23212      new_path="$input_path"
23213    fi
23214  fi
23215
23216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23217  if test "x$test_cygdrive_prefix" = x; then
23218    # As a simple fix, exclude /usr/bin since it's not a real path.
23219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23221      # a path prefixed by /cygdrive for fixpath to work.
23222      new_path="$CYGWIN_ROOT_PATH$input_path"
23223    fi
23224  fi
23225
23226
23227  if test "x$path" != "x$new_path"; then
23228    BOOT_JDK="$new_path"
23229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23231  fi
23232
23233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23234
23235  path="$BOOT_JDK"
23236  has_colon=`$ECHO $path | $GREP ^.:`
23237  new_path="$path"
23238  if test "x$has_colon" = x; then
23239    # Not in mixed or Windows style, start by that.
23240    new_path=`cmd //c echo $path`
23241  fi
23242
23243
23244  input_path="$new_path"
23245  # Check if we need to convert this using DOS-style short mode. If the path
23246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23247  # take no chances and rewrite it.
23248  # Note: m4 eats our [], so we need to use [ and ] instead.
23249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23250  if test "x$has_forbidden_chars" != x; then
23251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23253  fi
23254
23255
23256  windows_path="$new_path"
23257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23258    unix_path=`$CYGPATH -u "$windows_path"`
23259    new_path="$unix_path"
23260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23262    new_path="$unix_path"
23263  fi
23264
23265  if test "x$path" != "x$new_path"; then
23266    BOOT_JDK="$new_path"
23267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23269  fi
23270
23271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23273
23274  else
23275    # We're on a posix platform. Hooray! :)
23276    path="$BOOT_JDK"
23277    has_space=`$ECHO "$path" | $GREP " "`
23278    if test "x$has_space" != x; then
23279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23281      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23282    fi
23283
23284    # Use eval to expand a potential ~
23285    eval path="$path"
23286    if test ! -f "$path" && test ! -d "$path"; then
23287      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23288    fi
23289
23290    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23291  fi
23292
23293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23294$as_echo_n "checking for Boot JDK... " >&6; }
23295              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23296$as_echo "$BOOT_JDK" >&6; }
23297              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23298$as_echo_n "checking Boot JDK version... " >&6; }
23299              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23300              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23301$as_echo "$BOOT_JDK_VERSION" >&6; }
23302            fi # end check jdk version
23303          fi # end check rt.jar
23304        fi # end check javac
23305      fi # end check java
23306    fi # end check boot jdk found
23307  fi
23308
23309    done
23310  fi
23311
23312
23313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23315      # Do we have a bin/java?
23316      if test ! -x "$BOOT_JDK/bin/java"; then
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23319        BOOT_JDK_FOUND=no
23320      else
23321        # Do we have a bin/javac?
23322        if test ! -x "$BOOT_JDK/bin/javac"; then
23323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23327          BOOT_JDK_FOUND=no
23328        else
23329          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23330          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23333            BOOT_JDK_FOUND=no
23334          else
23335            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23337
23338            # Extra M4 quote needed to protect [] in grep expression.
23339            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23340            if test "x$FOUND_VERSION_78" = x; then
23341              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23343              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23344$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23345              BOOT_JDK_FOUND=no
23346            else
23347              # We're done! :-)
23348              BOOT_JDK_FOUND=yes
23349
23350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23351
23352  # Input might be given as Windows format, start by converting to
23353  # unix format.
23354  path="$BOOT_JDK"
23355  new_path=`$CYGPATH -u "$path"`
23356
23357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23360  # "foo.exe" is OK but "foo" is an error.
23361  #
23362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23363  # It is also a way to make sure we got the proper file name for the real test later on.
23364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23365  if test "x$test_shortpath" = x; then
23366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23368    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23369  fi
23370
23371  # Call helper function which possibly converts this using DOS-style short mode.
23372  # If so, the updated path is stored in $new_path.
23373
23374  input_path="$new_path"
23375  # Check if we need to convert this using DOS-style short mode. If the path
23376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23377  # take no chances and rewrite it.
23378  # Note: m4 eats our [], so we need to use [ and ] instead.
23379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23380  if test "x$has_forbidden_chars" != x; then
23381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23385      # Going to short mode and back again did indeed matter. Since short mode is
23386      # case insensitive, let's make it lowercase to improve readability.
23387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23388      # Now convert it back to Unix-stile (cygpath)
23389      input_path=`$CYGPATH -u "$shortmode_path"`
23390      new_path="$input_path"
23391    fi
23392  fi
23393
23394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23395  if test "x$test_cygdrive_prefix" = x; then
23396    # As a simple fix, exclude /usr/bin since it's not a real path.
23397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23399      # a path prefixed by /cygdrive for fixpath to work.
23400      new_path="$CYGWIN_ROOT_PATH$input_path"
23401    fi
23402  fi
23403
23404
23405  if test "x$path" != "x$new_path"; then
23406    BOOT_JDK="$new_path"
23407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23409  fi
23410
23411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23412
23413  path="$BOOT_JDK"
23414  has_colon=`$ECHO $path | $GREP ^.:`
23415  new_path="$path"
23416  if test "x$has_colon" = x; then
23417    # Not in mixed or Windows style, start by that.
23418    new_path=`cmd //c echo $path`
23419  fi
23420
23421
23422  input_path="$new_path"
23423  # Check if we need to convert this using DOS-style short mode. If the path
23424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23425  # take no chances and rewrite it.
23426  # Note: m4 eats our [], so we need to use [ and ] instead.
23427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23428  if test "x$has_forbidden_chars" != x; then
23429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23431  fi
23432
23433
23434  windows_path="$new_path"
23435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23436    unix_path=`$CYGPATH -u "$windows_path"`
23437    new_path="$unix_path"
23438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23440    new_path="$unix_path"
23441  fi
23442
23443  if test "x$path" != "x$new_path"; then
23444    BOOT_JDK="$new_path"
23445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23447  fi
23448
23449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23451
23452  else
23453    # We're on a posix platform. Hooray! :)
23454    path="$BOOT_JDK"
23455    has_space=`$ECHO "$path" | $GREP " "`
23456    if test "x$has_space" != x; then
23457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23460    fi
23461
23462    # Use eval to expand a potential ~
23463    eval path="$path"
23464    if test ! -f "$path" && test ! -d "$path"; then
23465      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23466    fi
23467
23468    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23469  fi
23470
23471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23472$as_echo_n "checking for Boot JDK... " >&6; }
23473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23474$as_echo "$BOOT_JDK" >&6; }
23475              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23476$as_echo_n "checking Boot JDK version... " >&6; }
23477              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23478              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23479$as_echo "$BOOT_JDK_VERSION" >&6; }
23480            fi # end check jdk version
23481          fi # end check rt.jar
23482        fi # end check javac
23483      fi # end check java
23484    fi # end check boot jdk found
23485  fi
23486
23487  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
23488
23489  if test "x$BOOT_JDK_FOUND" = xno; then
23490    # Now execute the test
23491
23492  BOOT_JDK_PREFIX="/usr/lib/jvm"
23493  BOOT_JDK_SUFFIX=""
23494  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23495  if test "x$ALL_JDKS_FOUND" != x; then
23496    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23497
23498  if test "x$BOOT_JDK_FOUND" = xno; then
23499    # Now execute the test
23500
23501        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23502        if test -d "$BOOT_JDK"; then
23503          BOOT_JDK_FOUND=maybe
23504          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23505$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23506        fi
23507
23508
23509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23511      # Do we have a bin/java?
23512      if test ! -x "$BOOT_JDK/bin/java"; then
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23515        BOOT_JDK_FOUND=no
23516      else
23517        # Do we have a bin/javac?
23518        if test ! -x "$BOOT_JDK/bin/javac"; then
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23523          BOOT_JDK_FOUND=no
23524        else
23525          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23526          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23529            BOOT_JDK_FOUND=no
23530          else
23531            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23533
23534            # Extra M4 quote needed to protect [] in grep expression.
23535            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23536            if test "x$FOUND_VERSION_78" = x; then
23537              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23539              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23540$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23541              BOOT_JDK_FOUND=no
23542            else
23543              # We're done! :-)
23544              BOOT_JDK_FOUND=yes
23545
23546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23547
23548  # Input might be given as Windows format, start by converting to
23549  # unix format.
23550  path="$BOOT_JDK"
23551  new_path=`$CYGPATH -u "$path"`
23552
23553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23556  # "foo.exe" is OK but "foo" is an error.
23557  #
23558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23559  # It is also a way to make sure we got the proper file name for the real test later on.
23560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23561  if test "x$test_shortpath" = x; then
23562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23564    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23565  fi
23566
23567  # Call helper function which possibly converts this using DOS-style short mode.
23568  # If so, the updated path is stored in $new_path.
23569
23570  input_path="$new_path"
23571  # Check if we need to convert this using DOS-style short mode. If the path
23572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23573  # take no chances and rewrite it.
23574  # Note: m4 eats our [], so we need to use [ and ] instead.
23575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23576  if test "x$has_forbidden_chars" != x; then
23577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23581      # Going to short mode and back again did indeed matter. Since short mode is
23582      # case insensitive, let's make it lowercase to improve readability.
23583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23584      # Now convert it back to Unix-stile (cygpath)
23585      input_path=`$CYGPATH -u "$shortmode_path"`
23586      new_path="$input_path"
23587    fi
23588  fi
23589
23590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23591  if test "x$test_cygdrive_prefix" = x; then
23592    # As a simple fix, exclude /usr/bin since it's not a real path.
23593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23595      # a path prefixed by /cygdrive for fixpath to work.
23596      new_path="$CYGWIN_ROOT_PATH$input_path"
23597    fi
23598  fi
23599
23600
23601  if test "x$path" != "x$new_path"; then
23602    BOOT_JDK="$new_path"
23603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23605  fi
23606
23607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23608
23609  path="$BOOT_JDK"
23610  has_colon=`$ECHO $path | $GREP ^.:`
23611  new_path="$path"
23612  if test "x$has_colon" = x; then
23613    # Not in mixed or Windows style, start by that.
23614    new_path=`cmd //c echo $path`
23615  fi
23616
23617
23618  input_path="$new_path"
23619  # Check if we need to convert this using DOS-style short mode. If the path
23620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23621  # take no chances and rewrite it.
23622  # Note: m4 eats our [], so we need to use [ and ] instead.
23623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23624  if test "x$has_forbidden_chars" != x; then
23625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23627  fi
23628
23629
23630  windows_path="$new_path"
23631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23632    unix_path=`$CYGPATH -u "$windows_path"`
23633    new_path="$unix_path"
23634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23636    new_path="$unix_path"
23637  fi
23638
23639  if test "x$path" != "x$new_path"; then
23640    BOOT_JDK="$new_path"
23641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23643  fi
23644
23645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23647
23648  else
23649    # We're on a posix platform. Hooray! :)
23650    path="$BOOT_JDK"
23651    has_space=`$ECHO "$path" | $GREP " "`
23652    if test "x$has_space" != x; then
23653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23655      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23656    fi
23657
23658    # Use eval to expand a potential ~
23659    eval path="$path"
23660    if test ! -f "$path" && test ! -d "$path"; then
23661      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23662    fi
23663
23664    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23665  fi
23666
23667              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23668$as_echo_n "checking for Boot JDK... " >&6; }
23669              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23670$as_echo "$BOOT_JDK" >&6; }
23671              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23672$as_echo_n "checking Boot JDK version... " >&6; }
23673              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23674              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23675$as_echo "$BOOT_JDK_VERSION" >&6; }
23676            fi # end check jdk version
23677          fi # end check rt.jar
23678        fi # end check javac
23679      fi # end check java
23680    fi # end check boot jdk found
23681  fi
23682
23683    done
23684  fi
23685
23686
23687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23689      # Do we have a bin/java?
23690      if test ! -x "$BOOT_JDK/bin/java"; then
23691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23693        BOOT_JDK_FOUND=no
23694      else
23695        # Do we have a bin/javac?
23696        if test ! -x "$BOOT_JDK/bin/javac"; then
23697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23701          BOOT_JDK_FOUND=no
23702        else
23703          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23704          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23705            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23707            BOOT_JDK_FOUND=no
23708          else
23709            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23710            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23711
23712            # Extra M4 quote needed to protect [] in grep expression.
23713            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23714            if test "x$FOUND_VERSION_78" = x; then
23715              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23717              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23718$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23719              BOOT_JDK_FOUND=no
23720            else
23721              # We're done! :-)
23722              BOOT_JDK_FOUND=yes
23723
23724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23725
23726  # Input might be given as Windows format, start by converting to
23727  # unix format.
23728  path="$BOOT_JDK"
23729  new_path=`$CYGPATH -u "$path"`
23730
23731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23734  # "foo.exe" is OK but "foo" is an error.
23735  #
23736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23737  # It is also a way to make sure we got the proper file name for the real test later on.
23738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23739  if test "x$test_shortpath" = x; then
23740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23741$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23742    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23743  fi
23744
23745  # Call helper function which possibly converts this using DOS-style short mode.
23746  # If so, the updated path is stored in $new_path.
23747
23748  input_path="$new_path"
23749  # Check if we need to convert this using DOS-style short mode. If the path
23750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23751  # take no chances and rewrite it.
23752  # Note: m4 eats our [], so we need to use [ and ] instead.
23753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23754  if test "x$has_forbidden_chars" != x; then
23755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23759      # Going to short mode and back again did indeed matter. Since short mode is
23760      # case insensitive, let's make it lowercase to improve readability.
23761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23762      # Now convert it back to Unix-stile (cygpath)
23763      input_path=`$CYGPATH -u "$shortmode_path"`
23764      new_path="$input_path"
23765    fi
23766  fi
23767
23768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23769  if test "x$test_cygdrive_prefix" = x; then
23770    # As a simple fix, exclude /usr/bin since it's not a real path.
23771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23773      # a path prefixed by /cygdrive for fixpath to work.
23774      new_path="$CYGWIN_ROOT_PATH$input_path"
23775    fi
23776  fi
23777
23778
23779  if test "x$path" != "x$new_path"; then
23780    BOOT_JDK="$new_path"
23781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23783  fi
23784
23785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23786
23787  path="$BOOT_JDK"
23788  has_colon=`$ECHO $path | $GREP ^.:`
23789  new_path="$path"
23790  if test "x$has_colon" = x; then
23791    # Not in mixed or Windows style, start by that.
23792    new_path=`cmd //c echo $path`
23793  fi
23794
23795
23796  input_path="$new_path"
23797  # Check if we need to convert this using DOS-style short mode. If the path
23798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23799  # take no chances and rewrite it.
23800  # Note: m4 eats our [], so we need to use [ and ] instead.
23801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23802  if test "x$has_forbidden_chars" != x; then
23803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23805  fi
23806
23807
23808  windows_path="$new_path"
23809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23810    unix_path=`$CYGPATH -u "$windows_path"`
23811    new_path="$unix_path"
23812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23814    new_path="$unix_path"
23815  fi
23816
23817  if test "x$path" != "x$new_path"; then
23818    BOOT_JDK="$new_path"
23819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23821  fi
23822
23823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23825
23826  else
23827    # We're on a posix platform. Hooray! :)
23828    path="$BOOT_JDK"
23829    has_space=`$ECHO "$path" | $GREP " "`
23830    if test "x$has_space" != x; then
23831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23832$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23833      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23834    fi
23835
23836    # Use eval to expand a potential ~
23837    eval path="$path"
23838    if test ! -f "$path" && test ! -d "$path"; then
23839      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23840    fi
23841
23842    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23843  fi
23844
23845              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23846$as_echo_n "checking for Boot JDK... " >&6; }
23847              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23848$as_echo "$BOOT_JDK" >&6; }
23849              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23850$as_echo_n "checking Boot JDK version... " >&6; }
23851              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23852              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23853$as_echo "$BOOT_JDK_VERSION" >&6; }
23854            fi # end check jdk version
23855          fi # end check rt.jar
23856        fi # end check javac
23857      fi # end check java
23858    fi # end check boot jdk found
23859  fi
23860
23861  fi
23862
23863
23864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23866      # Do we have a bin/java?
23867      if test ! -x "$BOOT_JDK/bin/java"; then
23868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23870        BOOT_JDK_FOUND=no
23871      else
23872        # Do we have a bin/javac?
23873        if test ! -x "$BOOT_JDK/bin/javac"; then
23874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23878          BOOT_JDK_FOUND=no
23879        else
23880          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23881          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23882            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23884            BOOT_JDK_FOUND=no
23885          else
23886            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23888
23889            # Extra M4 quote needed to protect [] in grep expression.
23890            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23891            if test "x$FOUND_VERSION_78" = x; then
23892              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23894              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23895$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23896              BOOT_JDK_FOUND=no
23897            else
23898              # We're done! :-)
23899              BOOT_JDK_FOUND=yes
23900
23901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23902
23903  # Input might be given as Windows format, start by converting to
23904  # unix format.
23905  path="$BOOT_JDK"
23906  new_path=`$CYGPATH -u "$path"`
23907
23908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23911  # "foo.exe" is OK but "foo" is an error.
23912  #
23913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23914  # It is also a way to make sure we got the proper file name for the real test later on.
23915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23916  if test "x$test_shortpath" = x; then
23917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23920  fi
23921
23922  # Call helper function which possibly converts this using DOS-style short mode.
23923  # If so, the updated path is stored in $new_path.
23924
23925  input_path="$new_path"
23926  # Check if we need to convert this using DOS-style short mode. If the path
23927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23928  # take no chances and rewrite it.
23929  # Note: m4 eats our [], so we need to use [ and ] instead.
23930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23931  if test "x$has_forbidden_chars" != x; then
23932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23936      # Going to short mode and back again did indeed matter. Since short mode is
23937      # case insensitive, let's make it lowercase to improve readability.
23938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23939      # Now convert it back to Unix-stile (cygpath)
23940      input_path=`$CYGPATH -u "$shortmode_path"`
23941      new_path="$input_path"
23942    fi
23943  fi
23944
23945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23946  if test "x$test_cygdrive_prefix" = x; then
23947    # As a simple fix, exclude /usr/bin since it's not a real path.
23948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23950      # a path prefixed by /cygdrive for fixpath to work.
23951      new_path="$CYGWIN_ROOT_PATH$input_path"
23952    fi
23953  fi
23954
23955
23956  if test "x$path" != "x$new_path"; then
23957    BOOT_JDK="$new_path"
23958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23960  fi
23961
23962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23963
23964  path="$BOOT_JDK"
23965  has_colon=`$ECHO $path | $GREP ^.:`
23966  new_path="$path"
23967  if test "x$has_colon" = x; then
23968    # Not in mixed or Windows style, start by that.
23969    new_path=`cmd //c echo $path`
23970  fi
23971
23972
23973  input_path="$new_path"
23974  # Check if we need to convert this using DOS-style short mode. If the path
23975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23976  # take no chances and rewrite it.
23977  # Note: m4 eats our [], so we need to use [ and ] instead.
23978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23979  if test "x$has_forbidden_chars" != x; then
23980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23982  fi
23983
23984
23985  windows_path="$new_path"
23986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23987    unix_path=`$CYGPATH -u "$windows_path"`
23988    new_path="$unix_path"
23989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23991    new_path="$unix_path"
23992  fi
23993
23994  if test "x$path" != "x$new_path"; then
23995    BOOT_JDK="$new_path"
23996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23998  fi
23999
24000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24002
24003  else
24004    # We're on a posix platform. Hooray! :)
24005    path="$BOOT_JDK"
24006    has_space=`$ECHO "$path" | $GREP " "`
24007    if test "x$has_space" != x; then
24008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24009$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24010      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24011    fi
24012
24013    # Use eval to expand a potential ~
24014    eval path="$path"
24015    if test ! -f "$path" && test ! -d "$path"; then
24016      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24017    fi
24018
24019    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24020  fi
24021
24022              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24023$as_echo_n "checking for Boot JDK... " >&6; }
24024              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24025$as_echo "$BOOT_JDK" >&6; }
24026              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24027$as_echo_n "checking Boot JDK version... " >&6; }
24028              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24030$as_echo "$BOOT_JDK_VERSION" >&6; }
24031            fi # end check jdk version
24032          fi # end check rt.jar
24033        fi # end check javac
24034      fi # end check java
24035    fi # end check boot jdk found
24036  fi
24037
24038
24039  # If we haven't found anything yet, we've truly lost. Give up.
24040  if test "x$BOOT_JDK_FOUND" = xno; then
24041
24042  # Print a helpful message on how to acquire the necessary build dependency.
24043  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24044  MISSING_DEPENDENCY=openjdk
24045
24046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24047    cygwin_help $MISSING_DEPENDENCY
24048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24049    msys_help $MISSING_DEPENDENCY
24050  else
24051    PKGHANDLER_COMMAND=
24052
24053    case $PKGHANDLER in
24054      apt-get)
24055        apt_help     $MISSING_DEPENDENCY ;;
24056      yum)
24057        yum_help     $MISSING_DEPENDENCY ;;
24058      port)
24059        port_help    $MISSING_DEPENDENCY ;;
24060      pkgutil)
24061        pkgutil_help $MISSING_DEPENDENCY ;;
24062      pkgadd)
24063        pkgadd_help  $MISSING_DEPENDENCY ;;
24064    esac
24065
24066    if test "x$PKGHANDLER_COMMAND" != x; then
24067      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24068    fi
24069  fi
24070
24071    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24072$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24073    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24074$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24075    as_fn_error $? "Cannot continue" "$LINENO" 5
24076  fi
24077
24078  # Setup proper paths for what we found
24079  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24080  if test ! -f "$BOOT_RTJAR"; then
24081    # On MacOSX it is called classes.jar
24082    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24083    if test -f "$BOOT_RTJAR"; then
24084      # Remove the ..
24085      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24086    fi
24087  fi
24088  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24089  BOOT_JDK="$BOOT_JDK"
24090
24091
24092
24093
24094  # Setup tools from the Boot JDK.
24095
24096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24097$as_echo_n "checking for java in Boot JDK... " >&6; }
24098  JAVA=$BOOT_JDK/bin/java
24099  if test ! -x $JAVA; then
24100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24101$as_echo "not found" >&6; }
24102    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24103$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24104    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24105  fi
24106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24107$as_echo "ok" >&6; }
24108
24109
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24111$as_echo_n "checking for javac in Boot JDK... " >&6; }
24112  JAVAC=$BOOT_JDK/bin/javac
24113  if test ! -x $JAVAC; then
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24115$as_echo "not found" >&6; }
24116    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24117$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24118    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24119  fi
24120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24121$as_echo "ok" >&6; }
24122
24123
24124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24125$as_echo_n "checking for javah in Boot JDK... " >&6; }
24126  JAVAH=$BOOT_JDK/bin/javah
24127  if test ! -x $JAVAH; then
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24129$as_echo "not found" >&6; }
24130    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24131$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24132    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24133  fi
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24135$as_echo "ok" >&6; }
24136
24137
24138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24139$as_echo_n "checking for javap in Boot JDK... " >&6; }
24140  JAVAP=$BOOT_JDK/bin/javap
24141  if test ! -x $JAVAP; then
24142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24143$as_echo "not found" >&6; }
24144    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24145$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24146    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24147  fi
24148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24149$as_echo "ok" >&6; }
24150
24151
24152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24153$as_echo_n "checking for jar in Boot JDK... " >&6; }
24154  JAR=$BOOT_JDK/bin/jar
24155  if test ! -x $JAR; then
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24157$as_echo "not found" >&6; }
24158    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24159$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24160    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24161  fi
24162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24163$as_echo "ok" >&6; }
24164
24165
24166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24167$as_echo_n "checking for rmic in Boot JDK... " >&6; }
24168  RMIC=$BOOT_JDK/bin/rmic
24169  if test ! -x $RMIC; then
24170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24171$as_echo "not found" >&6; }
24172    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24173$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24174    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24175  fi
24176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24177$as_echo "ok" >&6; }
24178
24179
24180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24181$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24182  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24183  if test ! -x $NATIVE2ASCII; then
24184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24185$as_echo "not found" >&6; }
24186    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24187$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24188    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24189  fi
24190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24191$as_echo "ok" >&6; }
24192
24193
24194  # Finally, set some other options...
24195
24196  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24197  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24198
24199
24200
24201
24202  ##############################################################################
24203  #
24204  # Specify options for anything that is run with the Boot JDK.
24205  #
24206
24207# Check whether --with-boot-jdk-jvmargs was given.
24208if test "${with_boot_jdk_jvmargs+set}" = set; then :
24209  withval=$with_boot_jdk_jvmargs;
24210fi
24211
24212
24213  if test "x$with_boot_jdk_jvmargs" = x; then
24214    # Not all JVM:s accept the same arguments on the command line.
24215    # OpenJDK specific increase in thread stack for JDK build,
24216    # well more specifically, when running javac.
24217    if test "x$BUILD_NUM_BITS" = x32; then
24218      STACK_SIZE=768
24219    else
24220      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
24221      # since 64-bit pointers are pushed on the stach. Apparently, we need
24222      # to increase the stack space when javacing the JDK....
24223      STACK_SIZE=1536
24224    fi
24225
24226    # Minimum amount of heap memory.
24227
24228  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24229  $ECHO "Command: $JAVA -Xms64M -version" >&5
24230  OUTPUT=`$JAVA -Xms64M -version 2>&1`
24231  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24232  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24233  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24234    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
24235    JVM_ARG_OK=true
24236  else
24237    $ECHO "Arg failed:" >&5
24238    $ECHO "$OUTPUT" >&5
24239    JVM_ARG_OK=false
24240  fi
24241
24242    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
24243      # Why does macosx need more heap? Its the huge JDK batch.
24244
24245  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
24246  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
24247  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
24248  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24249  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24250  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24251    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
24252    JVM_ARG_OK=true
24253  else
24254    $ECHO "Arg failed:" >&5
24255    $ECHO "$OUTPUT" >&5
24256    JVM_ARG_OK=false
24257  fi
24258
24259    else
24260
24261  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
24262  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
24263  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
24264  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24265  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24266  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24267    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
24268    JVM_ARG_OK=true
24269  else
24270    $ECHO "Arg failed:" >&5
24271    $ECHO "$OUTPUT" >&5
24272    JVM_ARG_OK=false
24273  fi
24274
24275    fi
24276    # When is adding -client something that speeds up the JVM?
24277    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
24278
24279  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24280  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24281  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24282  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24283  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24284  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24285    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
24286    JVM_ARG_OK=true
24287  else
24288    $ECHO "Arg failed:" >&5
24289    $ECHO "$OUTPUT" >&5
24290    JVM_ARG_OK=false
24291  fi
24292
24293    # Disable special log output when a debug build is used as Boot JDK...
24294
24295  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24296  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24297  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24298  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24299  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24300  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24301    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24302    JVM_ARG_OK=true
24303  else
24304    $ECHO "Arg failed:" >&5
24305    $ECHO "$OUTPUT" >&5
24306    JVM_ARG_OK=false
24307  fi
24308
24309  fi
24310
24311  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
24312
24313
24314
24315###############################################################################
24316#
24317# Configure the sources to use. We can add or override individual directories.
24318#
24319###############################################################################
24320
24321
24322  # Where are the sources. Any of these can be overridden
24323  # using --with-override-corba and the likes.
24324  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
24325  CORBA_TOPDIR="$SRC_ROOT/corba"
24326  JAXP_TOPDIR="$SRC_ROOT/jaxp"
24327  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
24328  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
24329  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
24330  JDK_TOPDIR="$SRC_ROOT/jdk"
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341  ###############################################################################
24342  #
24343  # Pickup additional source for a component from outside of the source root
24344  # or override source for a component.
24345  #
24346
24347# Check whether --with-add-source-root was given.
24348if test "${with_add_source_root+set}" = set; then :
24349  withval=$with_add_source_root;
24350fi
24351
24352
24353
24354# Check whether --with-override-source-root was given.
24355if test "${with_override_source_root+set}" = set; then :
24356  withval=$with_override_source_root;
24357fi
24358
24359
24360
24361# Check whether --with-adds-and-overrides was given.
24362if test "${with_adds_and_overrides+set}" = set; then :
24363  withval=$with_adds_and_overrides;
24364fi
24365
24366
24367  if test "x$with_adds_and_overrides" != x; then
24368    with_add_source_root="$with_adds_and_overrides/adds"
24369    with_override_source_root="$with_adds_and_overrides/overrides"
24370  fi
24371
24372  if test "x$with_add_source_root" != x; then
24373    if ! test -d $with_add_source_root; then
24374      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
24375    fi
24376    CURDIR="$PWD"
24377    cd "$with_add_source_root"
24378    ADD_SRC_ROOT="`pwd`"
24379    cd "$CURDIR"
24380    # Verify that the addon source root does not have any root makefiles.
24381    # If it does, then it is usually an error, prevent this.
24382    if test -f $with_add_source_root/langtools/make/Makefile; then
24383      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
24384    fi
24385    if test -f $with_add_source_root/corba/make/Makefile; then
24386      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
24387    fi
24388    if test -f $with_add_source_root/jaxp/make/Makefile; then
24389      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
24390    fi
24391    if test -f $with_add_source_root/jaxws/make/Makefile; then
24392      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
24393    fi
24394    if test -f $with_add_source_root/hotspot/make/Makefile; then
24395      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
24396    fi
24397    if test -f $with_add_source_root/nashorn/make/Makefile; then
24398      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
24399    fi
24400    if test -f $with_add_source_root/jdk/make/Makefile; then
24401      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
24402    fi
24403  fi
24404
24405
24406  if test "x$with_override_source_root" != x; then
24407    if ! test -d $with_override_source_root; then
24408      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
24409    fi
24410    CURDIR="$PWD"
24411    cd "$with_override_source_root"
24412    OVERRIDE_SRC_ROOT="`pwd`"
24413    cd "$CURDIR"
24414    if test -f $with_override_source_root/langtools/make/Makefile; then
24415      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
24416    fi
24417    if test -f $with_override_source_root/corba/make/Makefile; then
24418      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
24419    fi
24420    if test -f $with_override_source_root/jaxp/make/Makefile; then
24421      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
24422    fi
24423    if test -f $with_override_source_root/jaxws/make/Makefile; then
24424      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
24425    fi
24426    if test -f $with_override_source_root/hotspot/make/Makefile; then
24427      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
24428    fi
24429    if test -f $with_override_source_root/nashorn/make/Makefile; then
24430      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
24431    fi
24432    if test -f $with_override_source_root/jdk/make/Makefile; then
24433      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
24434    fi
24435  fi
24436
24437
24438  ###############################################################################
24439  #
24440  # Override a repo completely, this is used for example when you have 3 small
24441  # development sandboxes of the langtools sources and want to avoid having 3 full
24442  # OpenJDK sources checked out on disk.
24443  #
24444  # Assuming that the 3 langtools sandboxes are located here:
24445  # /home/fredrik/sandbox1/langtools
24446  # /home/fredrik/sandbox2/langtools
24447  # /home/fredrik/sandbox3/langtools
24448  #
24449  # From the source root you create build subdirs manually:
24450  #     mkdir -p build1 build2 build3
24451  # in each build directory run:
24452  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
24453  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
24454  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
24455  #
24456
24457
24458# Check whether --with-override-langtools was given.
24459if test "${with_override_langtools+set}" = set; then :
24460  withval=$with_override_langtools;
24461fi
24462
24463
24464
24465# Check whether --with-override-corba was given.
24466if test "${with_override_corba+set}" = set; then :
24467  withval=$with_override_corba;
24468fi
24469
24470
24471
24472# Check whether --with-override-jaxp was given.
24473if test "${with_override_jaxp+set}" = set; then :
24474  withval=$with_override_jaxp;
24475fi
24476
24477
24478
24479# Check whether --with-override-jaxws was given.
24480if test "${with_override_jaxws+set}" = set; then :
24481  withval=$with_override_jaxws;
24482fi
24483
24484
24485
24486# Check whether --with-override-hotspot was given.
24487if test "${with_override_hotspot+set}" = set; then :
24488  withval=$with_override_hotspot;
24489fi
24490
24491
24492
24493# Check whether --with-override-nashorn was given.
24494if test "${with_override_nashorn+set}" = set; then :
24495  withval=$with_override_nashorn;
24496fi
24497
24498
24499
24500# Check whether --with-override-jdk was given.
24501if test "${with_override_jdk+set}" = set; then :
24502  withval=$with_override_jdk;
24503fi
24504
24505
24506  if test "x$with_override_langtools" != x; then
24507    CURDIR="$PWD"
24508    cd "$with_override_langtools"
24509    LANGTOOLS_TOPDIR="`pwd`"
24510    cd "$CURDIR"
24511    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
24512      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
24513    fi
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
24515$as_echo_n "checking if langtools should be overridden... " >&6; }
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
24517$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
24518  fi
24519  if test "x$with_override_corba" != x; then
24520    CURDIR="$PWD"
24521    cd "$with_override_corba"
24522    CORBA_TOPDIR="`pwd`"
24523    cd "$CURDIR"
24524    if ! test -f $CORBA_TOPDIR/make/Makefile; then
24525      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
24526    fi
24527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
24528$as_echo_n "checking if corba should be overridden... " >&6; }
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
24530$as_echo "yes with $CORBA_TOPDIR" >&6; }
24531  fi
24532  if test "x$with_override_jaxp" != x; then
24533    CURDIR="$PWD"
24534    cd "$with_override_jaxp"
24535    JAXP_TOPDIR="`pwd`"
24536    cd "$CURDIR"
24537    if ! test -f $JAXP_TOPDIR/make/Makefile; then
24538      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
24539    fi
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
24541$as_echo_n "checking if jaxp should be overridden... " >&6; }
24542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
24543$as_echo "yes with $JAXP_TOPDIR" >&6; }
24544  fi
24545  if test "x$with_override_jaxws" != x; then
24546    CURDIR="$PWD"
24547    cd "$with_override_jaxws"
24548    JAXWS_TOPDIR="`pwd`"
24549    cd "$CURDIR"
24550    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
24551      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
24552    fi
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
24554$as_echo_n "checking if jaxws should be overridden... " >&6; }
24555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
24556$as_echo "yes with $JAXWS_TOPDIR" >&6; }
24557  fi
24558  if test "x$with_override_hotspot" != x; then
24559    CURDIR="$PWD"
24560    cd "$with_override_hotspot"
24561    HOTSPOT_TOPDIR="`pwd`"
24562    cd "$CURDIR"
24563    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
24564      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
24565    fi
24566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
24567$as_echo_n "checking if hotspot should be overridden... " >&6; }
24568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
24569$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
24570  fi
24571  if test "x$with_override_nashorn" != x; then
24572    CURDIR="$PWD"
24573    cd "$with_override_nashorn"
24574    NASHORN_TOPDIR="`pwd`"
24575    cd "$CURDIR"
24576    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
24577      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
24578    fi
24579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
24580$as_echo_n "checking if nashorn should be overridden... " >&6; }
24581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
24582$as_echo "yes with $NASHORN_TOPDIR" >&6; }
24583  fi
24584  if test "x$with_override_jdk" != x; then
24585    CURDIR="$PWD"
24586    cd "$with_override_jdk"
24587    JDK_TOPDIR="`pwd`"
24588    cd "$CURDIR"
24589    if ! test -f $JDK_TOPDIR/make/Makefile; then
24590      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
24591    fi
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
24593$as_echo_n "checking if JDK should be overridden... " >&6; }
24594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
24595$as_echo "yes with $JDK_TOPDIR" >&6; }
24596  fi
24597
24598
24599  BUILD_OUTPUT="$OUTPUT_ROOT"
24600
24601
24602  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
24603  BUILD_HOTSPOT=true
24604
24605
24606
24607# Check whether --with-import-hotspot was given.
24608if test "${with_import_hotspot+set}" = set; then :
24609  withval=$with_import_hotspot;
24610fi
24611
24612  if test "x$with_import_hotspot" != x; then
24613    CURDIR="$PWD"
24614    cd "$with_import_hotspot"
24615    HOTSPOT_DIST="`pwd`"
24616    cd "$CURDIR"
24617    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
24618      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
24619    fi
24620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
24621$as_echo_n "checking if hotspot should be imported... " >&6; }
24622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
24623$as_echo "yes from $HOTSPOT_DIST" >&6; }
24624    BUILD_HOTSPOT=false
24625  fi
24626
24627  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
24628
24629
24630###############################################################################
24631#
24632# Setup the toolchain (compilers etc), i.e. the tools that need to be
24633# cross-compilation aware.
24634#
24635###############################################################################
24636
24637
24638  ###############################################################################
24639  #
24640  # Configure the development tool paths and potential sysroot.
24641  #
24642  ac_ext=cpp
24643ac_cpp='$CXXCPP $CPPFLAGS'
24644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24647
24648
24649  # The option used to specify the target .o,.a or .so file.
24650  # When compiling, how to specify the to be created object file.
24651  CC_OUT_OPTION='-o$(SPACE)'
24652  # When linking, how to specify the to be created executable.
24653  EXE_OUT_OPTION='-o$(SPACE)'
24654  # When linking, how to specify the to be created dynamically linkable library.
24655  LD_OUT_OPTION='-o$(SPACE)'
24656  # When archiving, how to specify the to be create static archive for object files.
24657  AR_OUT_OPTION='rcs$(SPACE)'
24658
24659
24660
24661
24662
24663# Locate the actual tools
24664
24665
24666# Check whether --with-jtreg was given.
24667if test "${with_jtreg+set}" = set; then :
24668  withval=$with_jtreg;
24669else
24670  with_jtreg=no
24671fi
24672
24673
24674  if test "x$with_jtreg" = xno; then
24675    # jtreg disabled
24676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
24677$as_echo_n "checking for jtreg... " >&6; }
24678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24679$as_echo "no" >&6; }
24680  else
24681    if test "x$with_jtreg" != xyes; then
24682      # with path specified.
24683      JT_HOME="$with_jtreg"
24684    fi
24685
24686    if test "x$JT_HOME" != x; then
24687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
24688$as_echo_n "checking for jtreg... " >&6; }
24689
24690      # use JT_HOME enviroment var.
24691
24692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24693
24694  # Input might be given as Windows format, start by converting to
24695  # unix format.
24696  path="$JT_HOME"
24697  new_path=`$CYGPATH -u "$path"`
24698
24699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24702  # "foo.exe" is OK but "foo" is an error.
24703  #
24704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24705  # It is also a way to make sure we got the proper file name for the real test later on.
24706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24707  if test "x$test_shortpath" = x; then
24708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
24709$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
24710    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
24711  fi
24712
24713  # Call helper function which possibly converts this using DOS-style short mode.
24714  # If so, the updated path is stored in $new_path.
24715
24716  input_path="$new_path"
24717  # Check if we need to convert this using DOS-style short mode. If the path
24718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24719  # take no chances and rewrite it.
24720  # Note: m4 eats our [], so we need to use [ and ] instead.
24721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24722  if test "x$has_forbidden_chars" != x; then
24723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24727      # Going to short mode and back again did indeed matter. Since short mode is
24728      # case insensitive, let's make it lowercase to improve readability.
24729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24730      # Now convert it back to Unix-stile (cygpath)
24731      input_path=`$CYGPATH -u "$shortmode_path"`
24732      new_path="$input_path"
24733    fi
24734  fi
24735
24736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24737  if test "x$test_cygdrive_prefix" = x; then
24738    # As a simple fix, exclude /usr/bin since it's not a real path.
24739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24741      # a path prefixed by /cygdrive for fixpath to work.
24742      new_path="$CYGWIN_ROOT_PATH$input_path"
24743    fi
24744  fi
24745
24746
24747  if test "x$path" != "x$new_path"; then
24748    JT_HOME="$new_path"
24749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
24750$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
24751  fi
24752
24753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24754
24755  path="$JT_HOME"
24756  has_colon=`$ECHO $path | $GREP ^.:`
24757  new_path="$path"
24758  if test "x$has_colon" = x; then
24759    # Not in mixed or Windows style, start by that.
24760    new_path=`cmd //c echo $path`
24761  fi
24762
24763
24764  input_path="$new_path"
24765  # Check if we need to convert this using DOS-style short mode. If the path
24766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24767  # take no chances and rewrite it.
24768  # Note: m4 eats our [], so we need to use [ and ] instead.
24769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24770  if test "x$has_forbidden_chars" != x; then
24771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24773  fi
24774
24775
24776  windows_path="$new_path"
24777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24778    unix_path=`$CYGPATH -u "$windows_path"`
24779    new_path="$unix_path"
24780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24782    new_path="$unix_path"
24783  fi
24784
24785  if test "x$path" != "x$new_path"; then
24786    JT_HOME="$new_path"
24787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
24788$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
24789  fi
24790
24791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24793
24794  else
24795    # We're on a posix platform. Hooray! :)
24796    path="$JT_HOME"
24797    has_space=`$ECHO "$path" | $GREP " "`
24798    if test "x$has_space" != x; then
24799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
24800$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
24801      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24802    fi
24803
24804    # Use eval to expand a potential ~
24805    eval path="$path"
24806    if test ! -f "$path" && test ! -d "$path"; then
24807      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
24808    fi
24809
24810    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
24811  fi
24812
24813
24814      # jtreg win32 script works for everybody
24815      JTREGEXE="$JT_HOME/win32/bin/jtreg"
24816
24817      if test ! -f "$JTREGEXE"; then
24818        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
24819      fi
24820
24821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24822$as_echo "$JTREGEXE" >&6; }
24823    else
24824      # try to find jtreg on path
24825
24826
24827
24828  # Publish this variable in the help.
24829
24830
24831  if test "x$JTREGEXE" = x; then
24832    # The variable is not set by user, try to locate tool using the code snippet
24833    for ac_prog in jtreg
24834do
24835  # Extract the first word of "$ac_prog", so it can be a program name with args.
24836set dummy $ac_prog; ac_word=$2
24837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24838$as_echo_n "checking for $ac_word... " >&6; }
24839if ${ac_cv_path_JTREGEXE+:} false; then :
24840  $as_echo_n "(cached) " >&6
24841else
24842  case $JTREGEXE in
24843  [\\/]* | ?:[\\/]*)
24844  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24845  ;;
24846  *)
24847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24848for as_dir in $PATH
24849do
24850  IFS=$as_save_IFS
24851  test -z "$as_dir" && as_dir=.
24852    for ac_exec_ext in '' $ac_executable_extensions; do
24853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24854    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24856    break 2
24857  fi
24858done
24859  done
24860IFS=$as_save_IFS
24861
24862  ;;
24863esac
24864fi
24865JTREGEXE=$ac_cv_path_JTREGEXE
24866if test -n "$JTREGEXE"; then
24867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24868$as_echo "$JTREGEXE" >&6; }
24869else
24870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24871$as_echo "no" >&6; }
24872fi
24873
24874
24875  test -n "$JTREGEXE" && break
24876done
24877
24878  else
24879    # The variable is set, but is it from the command line or the environment?
24880
24881    # Try to remove the string !JTREGEXE! from our list.
24882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
24883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24884      # If it failed, the variable was not from the command line. Ignore it,
24885      # but warn the user (except for BASH, which is always set by the calling BASH).
24886      if test "xJTREGEXE" != xBASH; then
24887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
24888$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
24889      fi
24890      # Try to locate tool using the code snippet
24891      for ac_prog in jtreg
24892do
24893  # Extract the first word of "$ac_prog", so it can be a program name with args.
24894set dummy $ac_prog; ac_word=$2
24895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24896$as_echo_n "checking for $ac_word... " >&6; }
24897if ${ac_cv_path_JTREGEXE+:} false; then :
24898  $as_echo_n "(cached) " >&6
24899else
24900  case $JTREGEXE in
24901  [\\/]* | ?:[\\/]*)
24902  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24903  ;;
24904  *)
24905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24906for as_dir in $PATH
24907do
24908  IFS=$as_save_IFS
24909  test -z "$as_dir" && as_dir=.
24910    for ac_exec_ext in '' $ac_executable_extensions; do
24911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24912    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24914    break 2
24915  fi
24916done
24917  done
24918IFS=$as_save_IFS
24919
24920  ;;
24921esac
24922fi
24923JTREGEXE=$ac_cv_path_JTREGEXE
24924if test -n "$JTREGEXE"; then
24925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24926$as_echo "$JTREGEXE" >&6; }
24927else
24928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24929$as_echo "no" >&6; }
24930fi
24931
24932
24933  test -n "$JTREGEXE" && break
24934done
24935
24936    else
24937      # If it succeeded, then it was overridden by the user. We will use it
24938      # for the tool.
24939
24940      # First remove it from the list of overridden variables, so we can test
24941      # for unknown variables in the end.
24942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24943
24944      # Check if the provided tool contains a complete path.
24945      tool_specified="$JTREGEXE"
24946      tool_basename="${tool_specified##*/}"
24947      if test "x$tool_basename" = "x$tool_specified"; then
24948        # A command without a complete path is provided, search $PATH.
24949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
24950$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
24951        # Extract the first word of "$tool_basename", so it can be a program name with args.
24952set dummy $tool_basename; ac_word=$2
24953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24954$as_echo_n "checking for $ac_word... " >&6; }
24955if ${ac_cv_path_JTREGEXE+:} false; then :
24956  $as_echo_n "(cached) " >&6
24957else
24958  case $JTREGEXE in
24959  [\\/]* | ?:[\\/]*)
24960  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
24961  ;;
24962  *)
24963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24964for as_dir in $PATH
24965do
24966  IFS=$as_save_IFS
24967  test -z "$as_dir" && as_dir=.
24968    for ac_exec_ext in '' $ac_executable_extensions; do
24969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24970    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
24971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24972    break 2
24973  fi
24974done
24975  done
24976IFS=$as_save_IFS
24977
24978  ;;
24979esac
24980fi
24981JTREGEXE=$ac_cv_path_JTREGEXE
24982if test -n "$JTREGEXE"; then
24983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
24984$as_echo "$JTREGEXE" >&6; }
24985else
24986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24987$as_echo "no" >&6; }
24988fi
24989
24990
24991        if test "x$JTREGEXE" = x; then
24992          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24993        fi
24994      else
24995        # Otherwise we believe it is a complete path. Use it as it is.
24996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
24997$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
24999$as_echo_n "checking for JTREGEXE... " >&6; }
25000        if test ! -x "$tool_specified"; then
25001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25002$as_echo "not found" >&6; }
25003          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
25004        fi
25005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25006$as_echo "$tool_specified" >&6; }
25007      fi
25008    fi
25009  fi
25010
25011
25012
25013  if test "x$JTREGEXE" = x; then
25014    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
25015  fi
25016
25017
25018      JT_HOME="`$DIRNAME $JTREGEXE`"
25019    fi
25020  fi
25021
25022
25023
25024
25025
25026  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
25027
25028  # Store path to cygwin link.exe to help excluding it when searching for
25029  # VS linker. This must be done before changing the PATH when looking for VS.
25030  # Extract the first word of "link", so it can be a program name with args.
25031set dummy link; ac_word=$2
25032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25033$as_echo_n "checking for $ac_word... " >&6; }
25034if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25035  $as_echo_n "(cached) " >&6
25036else
25037  case $CYGWIN_LINK in
25038  [\\/]* | ?:[\\/]*)
25039  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25040  ;;
25041  *)
25042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25043for as_dir in $PATH
25044do
25045  IFS=$as_save_IFS
25046  test -z "$as_dir" && as_dir=.
25047    for ac_exec_ext in '' $ac_executable_extensions; do
25048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25049    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25051    break 2
25052  fi
25053done
25054  done
25055IFS=$as_save_IFS
25056
25057  ;;
25058esac
25059fi
25060CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25061if test -n "$CYGWIN_LINK"; then
25062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25063$as_echo "$CYGWIN_LINK" >&6; }
25064else
25065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25066$as_echo "no" >&6; }
25067fi
25068
25069
25070  if test "x$CYGWIN_LINK" != x; then
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25072$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25073    "$CYGWIN_LINK" --version > /dev/null
25074    if test $? -eq 0 ; then
25075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25076$as_echo "yes" >&6; }
25077    else
25078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25079$as_echo "no" >&6; }
25080      # This might be the VS linker. Don't exclude it later on.
25081      CYGWIN_LINK=""
25082    fi
25083  fi
25084
25085  # First-hand choice is to locate and run the vsvars bat file.
25086
25087  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25088    VCVARSFILE="vc/bin/vcvars32.bat"
25089  else
25090    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25091  fi
25092
25093  VS_ENV_CMD=""
25094  VS_ENV_ARGS=""
25095  if test "x$with_toolsdir" != x; then
25096
25097  if test "x$VS_ENV_CMD" = x; then
25098    VS100BASE="$with_toolsdir/../.."
25099    METHOD="--with-tools-dir"
25100
25101  windows_path="$VS100BASE"
25102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25103    unix_path=`$CYGPATH -u "$windows_path"`
25104    VS100BASE="$unix_path"
25105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25107    VS100BASE="$unix_path"
25108  fi
25109
25110    if test -d "$VS100BASE"; then
25111      if test -f "$VS100BASE/$VCVARSFILE"; then
25112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25113$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25114        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25115      else
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25117$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25118        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25119$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25120      fi
25121    fi
25122  fi
25123
25124  fi
25125
25126  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
25127    # Having specified an argument which is incorrect will produce an instant failure;
25128    # we should not go on looking
25129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
25130$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
25131    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
25132$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
25133    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25134  fi
25135
25136  if test "x$VS100COMNTOOLS" != x; then
25137
25138  if test "x$VS_ENV_CMD" = x; then
25139    VS100BASE="$VS100COMNTOOLS/../.."
25140    METHOD="VS100COMNTOOLS variable"
25141
25142  windows_path="$VS100BASE"
25143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25144    unix_path=`$CYGPATH -u "$windows_path"`
25145    VS100BASE="$unix_path"
25146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25148    VS100BASE="$unix_path"
25149  fi
25150
25151    if test -d "$VS100BASE"; then
25152      if test -f "$VS100BASE/$VCVARSFILE"; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25154$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25155        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25156      else
25157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25158$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25160$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25161      fi
25162    fi
25163  fi
25164
25165  fi
25166  if test "x$PROGRAMFILES" != x; then
25167
25168  if test "x$VS_ENV_CMD" = x; then
25169    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
25170    METHOD="well-known name"
25171
25172  windows_path="$VS100BASE"
25173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25174    unix_path=`$CYGPATH -u "$windows_path"`
25175    VS100BASE="$unix_path"
25176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25178    VS100BASE="$unix_path"
25179  fi
25180
25181    if test -d "$VS100BASE"; then
25182      if test -f "$VS100BASE/$VCVARSFILE"; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25184$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25185        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25186      else
25187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25188$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25189        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25190$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25191      fi
25192    fi
25193  fi
25194
25195  fi
25196
25197  if test "x$VS_ENV_CMD" = x; then
25198    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
25199    METHOD="well-known name"
25200
25201  windows_path="$VS100BASE"
25202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203    unix_path=`$CYGPATH -u "$windows_path"`
25204    VS100BASE="$unix_path"
25205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25207    VS100BASE="$unix_path"
25208  fi
25209
25210    if test -d "$VS100BASE"; then
25211      if test -f "$VS100BASE/$VCVARSFILE"; then
25212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25213$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25214        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25215      else
25216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25217$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25218        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25219$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25220      fi
25221    fi
25222  fi
25223
25224
25225  if test "x$VS_ENV_CMD" = x; then
25226    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
25227    METHOD="well-known name"
25228
25229  windows_path="$VS100BASE"
25230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25231    unix_path=`$CYGPATH -u "$windows_path"`
25232    VS100BASE="$unix_path"
25233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25235    VS100BASE="$unix_path"
25236  fi
25237
25238    if test -d "$VS100BASE"; then
25239      if test -f "$VS100BASE/$VCVARSFILE"; then
25240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25241$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25242        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
25243      else
25244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
25245$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
25246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25247$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25248      fi
25249    fi
25250  fi
25251
25252
25253  if test "x$ProgramW6432" != x; then
25254
25255  if test "x$VS_ENV_CMD" = x; then
25256    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
25257    METHOD="well-known name"
25258
25259  windows_path="$WIN_SDK_BASE"
25260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25261    unix_path=`$CYGPATH -u "$windows_path"`
25262    WIN_SDK_BASE="$unix_path"
25263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25265    WIN_SDK_BASE="$unix_path"
25266  fi
25267
25268    if test -d "$WIN_SDK_BASE"; then
25269      # There have been cases of partial or broken SDK installations. A missing
25270      # lib dir is not going to work.
25271      if test ! -d "$WIN_SDK_BASE/../lib"; then
25272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25273$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25275$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25276      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25279        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25280        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25281          VS_ENV_ARGS="/x86"
25282        else
25283          VS_ENV_ARGS="/x64"
25284        fi
25285      else
25286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25287$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25288        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25289$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25290      fi
25291    fi
25292  fi
25293
25294  fi
25295  if test "x$PROGRAMW6432" != x; then
25296
25297  if test "x$VS_ENV_CMD" = x; then
25298    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
25299    METHOD="well-known name"
25300
25301  windows_path="$WIN_SDK_BASE"
25302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25303    unix_path=`$CYGPATH -u "$windows_path"`
25304    WIN_SDK_BASE="$unix_path"
25305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25307    WIN_SDK_BASE="$unix_path"
25308  fi
25309
25310    if test -d "$WIN_SDK_BASE"; then
25311      # There have been cases of partial or broken SDK installations. A missing
25312      # lib dir is not going to work.
25313      if test ! -d "$WIN_SDK_BASE/../lib"; then
25314        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25315$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25317$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25318      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25320$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25321        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25322        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25323          VS_ENV_ARGS="/x86"
25324        else
25325          VS_ENV_ARGS="/x64"
25326        fi
25327      else
25328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25329$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25330        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25331$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25332      fi
25333    fi
25334  fi
25335
25336  fi
25337  if test "x$PROGRAMFILES" != x; then
25338
25339  if test "x$VS_ENV_CMD" = x; then
25340    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
25341    METHOD="well-known name"
25342
25343  windows_path="$WIN_SDK_BASE"
25344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25345    unix_path=`$CYGPATH -u "$windows_path"`
25346    WIN_SDK_BASE="$unix_path"
25347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25349    WIN_SDK_BASE="$unix_path"
25350  fi
25351
25352    if test -d "$WIN_SDK_BASE"; then
25353      # There have been cases of partial or broken SDK installations. A missing
25354      # lib dir is not going to work.
25355      if test ! -d "$WIN_SDK_BASE/../lib"; then
25356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25357$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25358        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25359$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25360      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25363        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25364        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25365          VS_ENV_ARGS="/x86"
25366        else
25367          VS_ENV_ARGS="/x64"
25368        fi
25369      else
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25371$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25373$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25374      fi
25375    fi
25376  fi
25377
25378  fi
25379
25380  if test "x$VS_ENV_CMD" = x; then
25381    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
25382    METHOD="well-known name"
25383
25384  windows_path="$WIN_SDK_BASE"
25385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25386    unix_path=`$CYGPATH -u "$windows_path"`
25387    WIN_SDK_BASE="$unix_path"
25388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25390    WIN_SDK_BASE="$unix_path"
25391  fi
25392
25393    if test -d "$WIN_SDK_BASE"; then
25394      # There have been cases of partial or broken SDK installations. A missing
25395      # lib dir is not going to work.
25396      if test ! -d "$WIN_SDK_BASE/../lib"; then
25397        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25398$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25399        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25400$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25401      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25403$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25404        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25405        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25406          VS_ENV_ARGS="/x86"
25407        else
25408          VS_ENV_ARGS="/x64"
25409        fi
25410      else
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25412$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25413        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25414$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25415      fi
25416    fi
25417  fi
25418
25419
25420  if test "x$VS_ENV_CMD" = x; then
25421    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
25422    METHOD="well-known name"
25423
25424  windows_path="$WIN_SDK_BASE"
25425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426    unix_path=`$CYGPATH -u "$windows_path"`
25427    WIN_SDK_BASE="$unix_path"
25428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25430    WIN_SDK_BASE="$unix_path"
25431  fi
25432
25433    if test -d "$WIN_SDK_BASE"; then
25434      # There have been cases of partial or broken SDK installations. A missing
25435      # lib dir is not going to work.
25436      if test ! -d "$WIN_SDK_BASE/../lib"; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25438$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25440$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25441      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
25442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25443$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25444        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
25445        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25446          VS_ENV_ARGS="/x86"
25447        else
25448          VS_ENV_ARGS="/x64"
25449        fi
25450      else
25451        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25452$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25453        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25454$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25455      fi
25456    fi
25457  fi
25458
25459
25460  if test "x$VS_ENV_CMD" != x; then
25461    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
25462
25463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25464
25465  # First separate the path from the arguments. This will split at the first
25466  # space.
25467  complete="$VS_ENV_CMD"
25468  path="${complete%% *}"
25469  tmp="$complete EOL"
25470  arguments="${tmp#* }"
25471
25472  # Input might be given as Windows format, start by converting to
25473  # unix format.
25474  new_path=`$CYGPATH -u "$path"`
25475
25476  # Now try to locate executable using which
25477  new_path=`$WHICH "$new_path" 2> /dev/null`
25478  # bat and cmd files are not always considered executable in cygwin causing which
25479  # to not find them
25480  if test "x$new_path" = x \
25481      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25482      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25483    new_path=`$CYGPATH -u "$path"`
25484  fi
25485  if test "x$new_path" = x; then
25486    # Oops. Which didn't find the executable.
25487    # The splitting of arguments from the executable at a space might have been incorrect,
25488    # since paths with space are more likely in Windows. Give it another try with the whole
25489    # argument.
25490    path="$complete"
25491    arguments="EOL"
25492    new_path=`$CYGPATH -u "$path"`
25493    new_path=`$WHICH "$new_path" 2> /dev/null`
25494    # bat and cmd files are not always considered executable in cygwin causing which
25495    # to not find them
25496    if test "x$new_path" = x \
25497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25499      new_path=`$CYGPATH -u "$path"`
25500    fi
25501    if test "x$new_path" = x; then
25502      # It's still not found. Now this is an unrecoverable error.
25503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25504$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25505      has_space=`$ECHO "$complete" | $GREP " "`
25506      if test "x$has_space" != x; then
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25509      fi
25510      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25511    fi
25512  fi
25513
25514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25517  # "foo.exe" is OK but "foo" is an error.
25518  #
25519  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25520  # It is also a way to make sure we got the proper file name for the real test later on.
25521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25522  if test "x$test_shortpath" = x; then
25523    # Short path failed, file does not exist as specified.
25524    # Try adding .exe or .cmd
25525    if test -f "${new_path}.exe"; then
25526      input_to_shortpath="${new_path}.exe"
25527    elif test -f "${new_path}.cmd"; then
25528      input_to_shortpath="${new_path}.cmd"
25529    else
25530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
25531$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
25532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25534      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25535    fi
25536  else
25537    input_to_shortpath="$new_path"
25538  fi
25539
25540  # Call helper function which possibly converts this using DOS-style short mode.
25541  # If so, the updated path is stored in $new_path.
25542  new_path="$input_to_shortpath"
25543
25544  input_path="$input_to_shortpath"
25545  # Check if we need to convert this using DOS-style short mode. If the path
25546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25547  # take no chances and rewrite it.
25548  # Note: m4 eats our [], so we need to use [ and ] instead.
25549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25550  if test "x$has_forbidden_chars" != x; then
25551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25555      # Going to short mode and back again did indeed matter. Since short mode is
25556      # case insensitive, let's make it lowercase to improve readability.
25557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25558      # Now convert it back to Unix-stile (cygpath)
25559      input_path=`$CYGPATH -u "$shortmode_path"`
25560      new_path="$input_path"
25561    fi
25562  fi
25563
25564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25565  if test "x$test_cygdrive_prefix" = x; then
25566    # As a simple fix, exclude /usr/bin since it's not a real path.
25567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25569      # a path prefixed by /cygdrive for fixpath to work.
25570      new_path="$CYGWIN_ROOT_PATH$input_path"
25571    fi
25572  fi
25573
25574  # remove trailing .exe if any
25575  new_path="${new_path/%.exe/}"
25576
25577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25578
25579  # First separate the path from the arguments. This will split at the first
25580  # space.
25581  complete="$VS_ENV_CMD"
25582  path="${complete%% *}"
25583  tmp="$complete EOL"
25584  arguments="${tmp#* }"
25585
25586  # Input might be given as Windows format, start by converting to
25587  # unix format.
25588  new_path="$path"
25589
25590  windows_path="$new_path"
25591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25592    unix_path=`$CYGPATH -u "$windows_path"`
25593    new_path="$unix_path"
25594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25596    new_path="$unix_path"
25597  fi
25598
25599
25600  # Now try to locate executable using which
25601  new_path=`$WHICH "$new_path" 2> /dev/null`
25602
25603  if test "x$new_path" = x; then
25604    # Oops. Which didn't find the executable.
25605    # The splitting of arguments from the executable at a space might have been incorrect,
25606    # since paths with space are more likely in Windows. Give it another try with the whole
25607    # argument.
25608    path="$complete"
25609    arguments="EOL"
25610    new_path="$path"
25611
25612  windows_path="$new_path"
25613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25614    unix_path=`$CYGPATH -u "$windows_path"`
25615    new_path="$unix_path"
25616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25618    new_path="$unix_path"
25619  fi
25620
25621
25622    new_path=`$WHICH "$new_path" 2> /dev/null`
25623
25624    if test "x$new_path" = x; then
25625      # It's still not found. Now this is an unrecoverable error.
25626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25627$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25628      has_space=`$ECHO "$complete" | $GREP " "`
25629      if test "x$has_space" != x; then
25630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25632      fi
25633      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25634    fi
25635  fi
25636
25637  # Now new_path has a complete unix path to the binary
25638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25639    # Keep paths in /bin as-is, but remove trailing .exe if any
25640    new_path="${new_path/%.exe/}"
25641    # Do not save /bin paths to all_fixpath_prefixes!
25642  else
25643    # Not in mixed or Windows style, start by that.
25644    new_path=`cmd //c echo $new_path`
25645
25646  input_path="$new_path"
25647  # Check if we need to convert this using DOS-style short mode. If the path
25648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25649  # take no chances and rewrite it.
25650  # Note: m4 eats our [], so we need to use [ and ] instead.
25651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25652  if test "x$has_forbidden_chars" != x; then
25653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25655  fi
25656
25657    # Output is in $new_path
25658
25659  windows_path="$new_path"
25660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25661    unix_path=`$CYGPATH -u "$windows_path"`
25662    new_path="$unix_path"
25663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25665    new_path="$unix_path"
25666  fi
25667
25668    # remove trailing .exe if any
25669    new_path="${new_path/%.exe/}"
25670
25671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25673  fi
25674
25675  else
25676    # We're on a posix platform. Hooray! :)
25677    # First separate the path from the arguments. This will split at the first
25678    # space.
25679    complete="$VS_ENV_CMD"
25680    path="${complete%% *}"
25681    tmp="$complete EOL"
25682    arguments="${tmp#* }"
25683
25684    # Cannot rely on the command "which" here since it doesn't always work.
25685    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25686    if test -z "$is_absolute_path"; then
25687      # Path to executable is not absolute. Find it.
25688      IFS_save="$IFS"
25689      IFS=:
25690      for p in $PATH; do
25691        if test -f "$p/$path" && test -x "$p/$path"; then
25692          new_path="$p/$path"
25693          break
25694        fi
25695      done
25696      IFS="$IFS_save"
25697    else
25698      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
25699$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
25700      new_path="$path"
25701    fi
25702
25703    if test "x$new_path" = x; then
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
25705$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
25706      has_space=`$ECHO "$complete" | $GREP " "`
25707      if test "x$has_space" != x; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25709$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25710      fi
25711      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
25712    fi
25713  fi
25714
25715  # Now join together the path and the arguments once again
25716  if test "x$arguments" != xEOL; then
25717    new_complete="$new_path ${arguments% *}"
25718  else
25719    new_complete="$new_path"
25720  fi
25721
25722  if test "x$complete" != "x$new_complete"; then
25723    VS_ENV_CMD="$new_complete"
25724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
25725$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
25726  fi
25727
25728
25729    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
25730    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
25731$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
25732    cd $OUTPUT_ROOT
25733    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
25734    # to autoconf standards.
25735
25736    #----
25737
25738    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
25739    # but calculate the difference in Cygwin environment before/after running it and then
25740    # apply the diff.
25741
25742    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
25743      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
25744      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
25745      _dosbash=`cygpath -a -w -s \`which bash\`.*`
25746    else
25747      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
25748      _dosbash=`cmd //c echo \`which bash\``
25749    fi
25750
25751    # generate the set of exported vars before/after the vs10 setup
25752    $ECHO "@echo off"                                           >  localdevenvtmp.bat
25753    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
25754    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
25755    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
25756
25757    # Now execute the newly created bat file.
25758    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
25759    cmd /c localdevenvtmp.bat | cat
25760
25761    # apply the diff (less some non-vs10 vars named by "!")
25762    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
25763    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
25764    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
25765
25766    # cleanup
25767    $RM localdevenvtmp*
25768    #----
25769    cd $CURDIR
25770    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
25771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25772$as_echo "no" >&6; }
25773      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
25774$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
25775      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
25776$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
25777      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
25778$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
25779      as_fn_error $? "Cannot continue" "$LINENO" 5
25780    fi
25781
25782    # Now set all paths and other env variables. This will allow the rest of
25783    # the configure script to find and run the compiler in the proper way.
25784    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
25785$as_echo "$as_me: Setting extracted environment variables" >&6;}
25786    . $OUTPUT_ROOT/localdevenv.sh
25787  else
25788    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
25789    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
25790$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
25791  fi
25792
25793  # At this point, we should have corrent variables in the environment, or we can't continue.
25794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
25795$as_echo_n "checking for Visual Studio variables... " >&6; }
25796
25797  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
25798    if test "x$INCLUDE" = x || test "x$LIB" = x; then
25799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
25800$as_echo "present but broken" >&6; }
25801      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
25802    else
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25804$as_echo "ok" >&6; }
25805      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
25806      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
25807      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
25808      # Remove any paths containing # (typically F#) as that messes up make
25809      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
25810      VS_PATH="$PATH"
25811
25812
25813
25814    fi
25815  else
25816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25817$as_echo "not found" >&6; }
25818
25819    if test "x$VS_ENV_CMD" = x; then
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
25821$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
25822      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
25823$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
25824    else
25825      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
25826$as_echo "$as_me: Running the extraction script failed." >&6;}
25827    fi
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
25829$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
25830    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
25831$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
25832    as_fn_error $? "Cannot continue" "$LINENO" 5
25833  fi
25834
25835
25836
25837# Check whether --with-msvcr-dll was given.
25838if test "${with_msvcr_dll+set}" = set; then :
25839  withval=$with_msvcr_dll;
25840fi
25841
25842
25843  if test "x$with_msvcr_dll" != x; then
25844    # If given explicitely by user, do not probe. If not present, fail directly.
25845
25846  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
25847  METHOD="--with-msvcr-dll"
25848  if test -e "$POSSIBLE_MSVCR_DLL"; then
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25850$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25851
25852    # Need to check if the found msvcr is correct architecture
25853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25854$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25855    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25856    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25857      CORRECT_MSVCR_ARCH=386
25858    else
25859      CORRECT_MSVCR_ARCH=x86-64
25860    fi
25861    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25863$as_echo "ok" >&6; }
25864      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25866$as_echo_n "checking for msvcr100.dll... " >&6; }
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25868$as_echo "$MSVCR_DLL" >&6; }
25869    else
25870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25871$as_echo "incorrect, ignoring" >&6; }
25872      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25873$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25874    fi
25875  fi
25876
25877    if test "x$MSVCR_DLL" = x; then
25878      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
25879    fi
25880  fi
25881
25882  if test "x$MSVCR_DLL" = x; then
25883    # Probe: Using well-known location from Visual Studio 10.0
25884    if test "x$VCINSTALLDIR" != x; then
25885      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
25886
25887  windows_path="$CYGWIN_VC_INSTALL_DIR"
25888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889    unix_path=`$CYGPATH -u "$windows_path"`
25890    CYGWIN_VC_INSTALL_DIR="$unix_path"
25891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25893    CYGWIN_VC_INSTALL_DIR="$unix_path"
25894  fi
25895
25896      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
25897        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
25898      else
25899        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
25900      fi
25901
25902  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25903  METHOD="well-known location in VCINSTALLDIR"
25904  if test -e "$POSSIBLE_MSVCR_DLL"; then
25905    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25906$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25907
25908    # Need to check if the found msvcr is correct architecture
25909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25910$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25911    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25912    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25913      CORRECT_MSVCR_ARCH=386
25914    else
25915      CORRECT_MSVCR_ARCH=x86-64
25916    fi
25917    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25919$as_echo "ok" >&6; }
25920      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25922$as_echo_n "checking for msvcr100.dll... " >&6; }
25923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25924$as_echo "$MSVCR_DLL" >&6; }
25925    else
25926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25927$as_echo "incorrect, ignoring" >&6; }
25928      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25929$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25930    fi
25931  fi
25932
25933    fi
25934  fi
25935
25936  if test "x$MSVCR_DLL" = x; then
25937    # Probe: Check in the Boot JDK directory.
25938    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
25939
25940  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25941  METHOD="well-known location in Boot JDK"
25942  if test -e "$POSSIBLE_MSVCR_DLL"; then
25943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25944$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25945
25946    # Need to check if the found msvcr is correct architecture
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25948$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25949    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25950    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25951      CORRECT_MSVCR_ARCH=386
25952    else
25953      CORRECT_MSVCR_ARCH=x86-64
25954    fi
25955    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
25956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25957$as_echo "ok" >&6; }
25958      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25959      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
25960$as_echo_n "checking for msvcr100.dll... " >&6; }
25961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
25962$as_echo "$MSVCR_DLL" >&6; }
25963    else
25964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
25965$as_echo "incorrect, ignoring" >&6; }
25966      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
25967$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
25968    fi
25969  fi
25970
25971  fi
25972
25973  if test "x$MSVCR_DLL" = x; then
25974    # Probe: Look in the Windows system32 directory
25975    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
25976
25977  windows_path="$CYGWIN_SYSTEMROOT"
25978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25979    unix_path=`$CYGPATH -u "$windows_path"`
25980    CYGWIN_SYSTEMROOT="$unix_path"
25981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25983    CYGWIN_SYSTEMROOT="$unix_path"
25984  fi
25985
25986    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
25987
25988  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
25989  METHOD="well-known location in SYSTEMROOT"
25990  if test -e "$POSSIBLE_MSVCR_DLL"; then
25991    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
25992$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
25993
25994    # Need to check if the found msvcr is correct architecture
25995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
25996$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
25997    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
25998    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25999      CORRECT_MSVCR_ARCH=386
26000    else
26001      CORRECT_MSVCR_ARCH=x86-64
26002    fi
26003    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26005$as_echo "ok" >&6; }
26006      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26007      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26008$as_echo_n "checking for msvcr100.dll... " >&6; }
26009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26010$as_echo "$MSVCR_DLL" >&6; }
26011    else
26012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26013$as_echo "incorrect, ignoring" >&6; }
26014      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26015$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26016    fi
26017  fi
26018
26019  fi
26020
26021  if test "x$MSVCR_DLL" = x; then
26022    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
26023    if test "x$VS100COMNTOOLS" != x; then
26024      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
26025
26026  windows_path="$CYGWIN_VS_TOOLS_DIR"
26027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26028    unix_path=`$CYGPATH -u "$windows_path"`
26029    CYGWIN_VS_TOOLS_DIR="$unix_path"
26030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26032    CYGWIN_VS_TOOLS_DIR="$unix_path"
26033  fi
26034
26035      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
26036        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
26037      else
26038        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
26039      fi
26040
26041  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26042  METHOD="search of VS100COMNTOOLS"
26043  if test -e "$POSSIBLE_MSVCR_DLL"; then
26044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
26045$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
26046
26047    # Need to check if the found msvcr is correct architecture
26048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
26049$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
26050    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
26051    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26052      CORRECT_MSVCR_ARCH=386
26053    else
26054      CORRECT_MSVCR_ARCH=x86-64
26055    fi
26056    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26058$as_echo "ok" >&6; }
26059      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26061$as_echo_n "checking for msvcr100.dll... " >&6; }
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26063$as_echo "$MSVCR_DLL" >&6; }
26064    else
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26066$as_echo "incorrect, ignoring" >&6; }
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26068$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26069    fi
26070  fi
26071
26072    fi
26073  fi
26074
26075  if test "x$MSVCR_DLL" = x; then
26076    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
26077    # (This was the original behaviour; kept since it might turn up something)
26078    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
26079      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
26080        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
26081      else
26082        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
26083        if test "x$POSSIBLE_MSVCR_DLL" = x; then
26084          # We're grasping at straws now...
26085          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
26086        fi
26087      fi
26088
26089
26090  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26091  METHOD="search of VCINSTALLDIR"
26092  if test -e "$POSSIBLE_MSVCR_DLL"; then
26093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
26094$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
26095
26096    # Need to check if the found msvcr is correct architecture
26097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
26098$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
26099    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
26100    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26101      CORRECT_MSVCR_ARCH=386
26102    else
26103      CORRECT_MSVCR_ARCH=x86-64
26104    fi
26105    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
26106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26107$as_echo "ok" >&6; }
26108      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
26109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26110$as_echo_n "checking for msvcr100.dll... " >&6; }
26111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
26112$as_echo "$MSVCR_DLL" >&6; }
26113    else
26114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
26115$as_echo "incorrect, ignoring" >&6; }
26116      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
26117$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
26118    fi
26119  fi
26120
26121    fi
26122  fi
26123
26124  if test "x$MSVCR_DLL" = x; then
26125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
26126$as_echo_n "checking for msvcr100.dll... " >&6; }
26127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26128$as_echo "no" >&6; }
26129    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
26130  fi
26131
26132
26133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26134
26135  # Input might be given as Windows format, start by converting to
26136  # unix format.
26137  path="$MSVCR_DLL"
26138  new_path=`$CYGPATH -u "$path"`
26139
26140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26143  # "foo.exe" is OK but "foo" is an error.
26144  #
26145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26146  # It is also a way to make sure we got the proper file name for the real test later on.
26147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26148  if test "x$test_shortpath" = x; then
26149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
26150$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
26151    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
26152  fi
26153
26154  # Call helper function which possibly converts this using DOS-style short mode.
26155  # If so, the updated path is stored in $new_path.
26156
26157  input_path="$new_path"
26158  # Check if we need to convert this using DOS-style short mode. If the path
26159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26160  # take no chances and rewrite it.
26161  # Note: m4 eats our [], so we need to use [ and ] instead.
26162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26163  if test "x$has_forbidden_chars" != x; then
26164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26168      # Going to short mode and back again did indeed matter. Since short mode is
26169      # case insensitive, let's make it lowercase to improve readability.
26170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26171      # Now convert it back to Unix-stile (cygpath)
26172      input_path=`$CYGPATH -u "$shortmode_path"`
26173      new_path="$input_path"
26174    fi
26175  fi
26176
26177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26178  if test "x$test_cygdrive_prefix" = x; then
26179    # As a simple fix, exclude /usr/bin since it's not a real path.
26180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26182      # a path prefixed by /cygdrive for fixpath to work.
26183      new_path="$CYGWIN_ROOT_PATH$input_path"
26184    fi
26185  fi
26186
26187
26188  if test "x$path" != "x$new_path"; then
26189    MSVCR_DLL="$new_path"
26190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
26191$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
26192  fi
26193
26194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26195
26196  path="$MSVCR_DLL"
26197  has_colon=`$ECHO $path | $GREP ^.:`
26198  new_path="$path"
26199  if test "x$has_colon" = x; then
26200    # Not in mixed or Windows style, start by that.
26201    new_path=`cmd //c echo $path`
26202  fi
26203
26204
26205  input_path="$new_path"
26206  # Check if we need to convert this using DOS-style short mode. If the path
26207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26208  # take no chances and rewrite it.
26209  # Note: m4 eats our [], so we need to use [ and ] instead.
26210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26211  if test "x$has_forbidden_chars" != x; then
26212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26214  fi
26215
26216
26217  windows_path="$new_path"
26218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26219    unix_path=`$CYGPATH -u "$windows_path"`
26220    new_path="$unix_path"
26221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26223    new_path="$unix_path"
26224  fi
26225
26226  if test "x$path" != "x$new_path"; then
26227    MSVCR_DLL="$new_path"
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
26229$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
26230  fi
26231
26232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26234
26235  else
26236    # We're on a posix platform. Hooray! :)
26237    path="$MSVCR_DLL"
26238    has_space=`$ECHO "$path" | $GREP " "`
26239    if test "x$has_space" != x; then
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
26241$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
26242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26243    fi
26244
26245    # Use eval to expand a potential ~
26246    eval path="$path"
26247    if test ! -f "$path" && test ! -d "$path"; then
26248      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
26249    fi
26250
26251    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
26252  fi
26253
26254
26255
26256
26257# Check whether --with-dxsdk was given.
26258if test "${with_dxsdk+set}" = set; then :
26259  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
26260$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
26261fi
26262
26263
26264
26265
26266# Check whether --with-dxsdk-lib was given.
26267if test "${with_dxsdk_lib+set}" = set; then :
26268  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
26269$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
26270fi
26271
26272
26273
26274
26275# Check whether --with-dxsdk-include was given.
26276if test "${with_dxsdk_include+set}" = set; then :
26277  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
26278$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
26279fi
26280
26281
26282  fi
26283
26284
26285
26286  # If --build AND --host is set, then the configure script will find any
26287  # cross compilation tools in the PATH. Cross compilation tools
26288  # follows the cross compilation standard where they are prefixed with ${host}.
26289  # For example the binary i686-sun-solaris2.10-gcc
26290  # will cross compile for i686-sun-solaris2.10
26291  # If neither of build and host is not set, then build=host and the
26292  # default compiler found in the path will be used.
26293  # Setting only --host, does not seem to be really supported.
26294  # Please set both --build and --host if you want to cross compile.
26295
26296  if test "x$COMPILE_TYPE" = "xcross"; then
26297    # Now we to find a C/C++ compiler that can build executables for the build
26298    # platform. We can't use the AC_PROG_CC macro, since it can only be used
26299    # once. Also, we need to do this before adding a tools dir to the path,
26300    # otherwise we might pick up cross-compilers which don't use standard naming.
26301    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
26302    # to wait until they are properly discovered.
26303
26304
26305  # Publish this variable in the help.
26306
26307
26308  if test "x$BUILD_CC" = x; then
26309    # The variable is not set by user, try to locate tool using the code snippet
26310    for ac_prog in cl cc gcc
26311do
26312  # Extract the first word of "$ac_prog", so it can be a program name with args.
26313set dummy $ac_prog; ac_word=$2
26314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26315$as_echo_n "checking for $ac_word... " >&6; }
26316if ${ac_cv_path_BUILD_CC+:} false; then :
26317  $as_echo_n "(cached) " >&6
26318else
26319  case $BUILD_CC in
26320  [\\/]* | ?:[\\/]*)
26321  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26322  ;;
26323  *)
26324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26325for as_dir in $PATH
26326do
26327  IFS=$as_save_IFS
26328  test -z "$as_dir" && as_dir=.
26329    for ac_exec_ext in '' $ac_executable_extensions; do
26330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26331    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26333    break 2
26334  fi
26335done
26336  done
26337IFS=$as_save_IFS
26338
26339  ;;
26340esac
26341fi
26342BUILD_CC=$ac_cv_path_BUILD_CC
26343if test -n "$BUILD_CC"; then
26344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26345$as_echo "$BUILD_CC" >&6; }
26346else
26347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26348$as_echo "no" >&6; }
26349fi
26350
26351
26352  test -n "$BUILD_CC" && break
26353done
26354
26355  else
26356    # The variable is set, but is it from the command line or the environment?
26357
26358    # Try to remove the string !BUILD_CC! from our list.
26359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
26360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26361      # If it failed, the variable was not from the command line. Ignore it,
26362      # but warn the user (except for BASH, which is always set by the calling BASH).
26363      if test "xBUILD_CC" != xBASH; then
26364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
26365$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
26366      fi
26367      # Try to locate tool using the code snippet
26368      for ac_prog in cl cc gcc
26369do
26370  # Extract the first word of "$ac_prog", so it can be a program name with args.
26371set dummy $ac_prog; ac_word=$2
26372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26373$as_echo_n "checking for $ac_word... " >&6; }
26374if ${ac_cv_path_BUILD_CC+:} false; then :
26375  $as_echo_n "(cached) " >&6
26376else
26377  case $BUILD_CC in
26378  [\\/]* | ?:[\\/]*)
26379  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26380  ;;
26381  *)
26382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26383for as_dir in $PATH
26384do
26385  IFS=$as_save_IFS
26386  test -z "$as_dir" && as_dir=.
26387    for ac_exec_ext in '' $ac_executable_extensions; do
26388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26389    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26391    break 2
26392  fi
26393done
26394  done
26395IFS=$as_save_IFS
26396
26397  ;;
26398esac
26399fi
26400BUILD_CC=$ac_cv_path_BUILD_CC
26401if test -n "$BUILD_CC"; then
26402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26403$as_echo "$BUILD_CC" >&6; }
26404else
26405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26406$as_echo "no" >&6; }
26407fi
26408
26409
26410  test -n "$BUILD_CC" && break
26411done
26412
26413    else
26414      # If it succeeded, then it was overridden by the user. We will use it
26415      # for the tool.
26416
26417      # First remove it from the list of overridden variables, so we can test
26418      # for unknown variables in the end.
26419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26420
26421      # Check if the provided tool contains a complete path.
26422      tool_specified="$BUILD_CC"
26423      tool_basename="${tool_specified##*/}"
26424      if test "x$tool_basename" = "x$tool_specified"; then
26425        # A command without a complete path is provided, search $PATH.
26426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
26427$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
26428        # Extract the first word of "$tool_basename", so it can be a program name with args.
26429set dummy $tool_basename; ac_word=$2
26430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26431$as_echo_n "checking for $ac_word... " >&6; }
26432if ${ac_cv_path_BUILD_CC+:} false; then :
26433  $as_echo_n "(cached) " >&6
26434else
26435  case $BUILD_CC in
26436  [\\/]* | ?:[\\/]*)
26437  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
26438  ;;
26439  *)
26440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26441for as_dir in $PATH
26442do
26443  IFS=$as_save_IFS
26444  test -z "$as_dir" && as_dir=.
26445    for ac_exec_ext in '' $ac_executable_extensions; do
26446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26447    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
26448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26449    break 2
26450  fi
26451done
26452  done
26453IFS=$as_save_IFS
26454
26455  ;;
26456esac
26457fi
26458BUILD_CC=$ac_cv_path_BUILD_CC
26459if test -n "$BUILD_CC"; then
26460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
26461$as_echo "$BUILD_CC" >&6; }
26462else
26463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26464$as_echo "no" >&6; }
26465fi
26466
26467
26468        if test "x$BUILD_CC" = x; then
26469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26470        fi
26471      else
26472        # Otherwise we believe it is a complete path. Use it as it is.
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
26474$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
26476$as_echo_n "checking for BUILD_CC... " >&6; }
26477        if test ! -x "$tool_specified"; then
26478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26479$as_echo "not found" >&6; }
26480          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
26481        fi
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26483$as_echo "$tool_specified" >&6; }
26484      fi
26485    fi
26486  fi
26487
26488
26489
26490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26491
26492  # First separate the path from the arguments. This will split at the first
26493  # space.
26494  complete="$BUILD_CC"
26495  path="${complete%% *}"
26496  tmp="$complete EOL"
26497  arguments="${tmp#* }"
26498
26499  # Input might be given as Windows format, start by converting to
26500  # unix format.
26501  new_path=`$CYGPATH -u "$path"`
26502
26503  # Now try to locate executable using which
26504  new_path=`$WHICH "$new_path" 2> /dev/null`
26505  # bat and cmd files are not always considered executable in cygwin causing which
26506  # to not find them
26507  if test "x$new_path" = x \
26508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26510    new_path=`$CYGPATH -u "$path"`
26511  fi
26512  if test "x$new_path" = x; then
26513    # Oops. Which didn't find the executable.
26514    # The splitting of arguments from the executable at a space might have been incorrect,
26515    # since paths with space are more likely in Windows. Give it another try with the whole
26516    # argument.
26517    path="$complete"
26518    arguments="EOL"
26519    new_path=`$CYGPATH -u "$path"`
26520    new_path=`$WHICH "$new_path" 2> /dev/null`
26521    # bat and cmd files are not always considered executable in cygwin causing which
26522    # to not find them
26523    if test "x$new_path" = x \
26524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26526      new_path=`$CYGPATH -u "$path"`
26527    fi
26528    if test "x$new_path" = x; then
26529      # It's still not found. Now this is an unrecoverable error.
26530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26531$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26532      has_space=`$ECHO "$complete" | $GREP " "`
26533      if test "x$has_space" != x; then
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26536      fi
26537      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26538    fi
26539  fi
26540
26541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26544  # "foo.exe" is OK but "foo" is an error.
26545  #
26546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26547  # It is also a way to make sure we got the proper file name for the real test later on.
26548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26549  if test "x$test_shortpath" = x; then
26550    # Short path failed, file does not exist as specified.
26551    # Try adding .exe or .cmd
26552    if test -f "${new_path}.exe"; then
26553      input_to_shortpath="${new_path}.exe"
26554    elif test -f "${new_path}.cmd"; then
26555      input_to_shortpath="${new_path}.cmd"
26556    else
26557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
26558$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
26559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26561      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26562    fi
26563  else
26564    input_to_shortpath="$new_path"
26565  fi
26566
26567  # Call helper function which possibly converts this using DOS-style short mode.
26568  # If so, the updated path is stored in $new_path.
26569  new_path="$input_to_shortpath"
26570
26571  input_path="$input_to_shortpath"
26572  # Check if we need to convert this using DOS-style short mode. If the path
26573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26574  # take no chances and rewrite it.
26575  # Note: m4 eats our [], so we need to use [ and ] instead.
26576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26577  if test "x$has_forbidden_chars" != x; then
26578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26582      # Going to short mode and back again did indeed matter. Since short mode is
26583      # case insensitive, let's make it lowercase to improve readability.
26584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26585      # Now convert it back to Unix-stile (cygpath)
26586      input_path=`$CYGPATH -u "$shortmode_path"`
26587      new_path="$input_path"
26588    fi
26589  fi
26590
26591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26592  if test "x$test_cygdrive_prefix" = x; then
26593    # As a simple fix, exclude /usr/bin since it's not a real path.
26594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26596      # a path prefixed by /cygdrive for fixpath to work.
26597      new_path="$CYGWIN_ROOT_PATH$input_path"
26598    fi
26599  fi
26600
26601  # remove trailing .exe if any
26602  new_path="${new_path/%.exe/}"
26603
26604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26605
26606  # First separate the path from the arguments. This will split at the first
26607  # space.
26608  complete="$BUILD_CC"
26609  path="${complete%% *}"
26610  tmp="$complete EOL"
26611  arguments="${tmp#* }"
26612
26613  # Input might be given as Windows format, start by converting to
26614  # unix format.
26615  new_path="$path"
26616
26617  windows_path="$new_path"
26618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619    unix_path=`$CYGPATH -u "$windows_path"`
26620    new_path="$unix_path"
26621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623    new_path="$unix_path"
26624  fi
26625
26626
26627  # Now try to locate executable using which
26628  new_path=`$WHICH "$new_path" 2> /dev/null`
26629
26630  if test "x$new_path" = x; then
26631    # Oops. Which didn't find the executable.
26632    # The splitting of arguments from the executable at a space might have been incorrect,
26633    # since paths with space are more likely in Windows. Give it another try with the whole
26634    # argument.
26635    path="$complete"
26636    arguments="EOL"
26637    new_path="$path"
26638
26639  windows_path="$new_path"
26640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26641    unix_path=`$CYGPATH -u "$windows_path"`
26642    new_path="$unix_path"
26643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26645    new_path="$unix_path"
26646  fi
26647
26648
26649    new_path=`$WHICH "$new_path" 2> /dev/null`
26650
26651    if test "x$new_path" = x; then
26652      # It's still not found. Now this is an unrecoverable error.
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26654$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26655      has_space=`$ECHO "$complete" | $GREP " "`
26656      if test "x$has_space" != x; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26659      fi
26660      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26661    fi
26662  fi
26663
26664  # Now new_path has a complete unix path to the binary
26665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26666    # Keep paths in /bin as-is, but remove trailing .exe if any
26667    new_path="${new_path/%.exe/}"
26668    # Do not save /bin paths to all_fixpath_prefixes!
26669  else
26670    # Not in mixed or Windows style, start by that.
26671    new_path=`cmd //c echo $new_path`
26672
26673  input_path="$new_path"
26674  # Check if we need to convert this using DOS-style short mode. If the path
26675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26676  # take no chances and rewrite it.
26677  # Note: m4 eats our [], so we need to use [ and ] instead.
26678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26679  if test "x$has_forbidden_chars" != x; then
26680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26682  fi
26683
26684    # Output is in $new_path
26685
26686  windows_path="$new_path"
26687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26688    unix_path=`$CYGPATH -u "$windows_path"`
26689    new_path="$unix_path"
26690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26692    new_path="$unix_path"
26693  fi
26694
26695    # remove trailing .exe if any
26696    new_path="${new_path/%.exe/}"
26697
26698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26700  fi
26701
26702  else
26703    # We're on a posix platform. Hooray! :)
26704    # First separate the path from the arguments. This will split at the first
26705    # space.
26706    complete="$BUILD_CC"
26707    path="${complete%% *}"
26708    tmp="$complete EOL"
26709    arguments="${tmp#* }"
26710
26711    # Cannot rely on the command "which" here since it doesn't always work.
26712    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26713    if test -z "$is_absolute_path"; then
26714      # Path to executable is not absolute. Find it.
26715      IFS_save="$IFS"
26716      IFS=:
26717      for p in $PATH; do
26718        if test -f "$p/$path" && test -x "$p/$path"; then
26719          new_path="$p/$path"
26720          break
26721        fi
26722      done
26723      IFS="$IFS_save"
26724    else
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
26726$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
26727      new_path="$path"
26728    fi
26729
26730    if test "x$new_path" = x; then
26731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
26732$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
26733      has_space=`$ECHO "$complete" | $GREP " "`
26734      if test "x$has_space" != x; then
26735        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26737      fi
26738      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
26739    fi
26740  fi
26741
26742  # Now join together the path and the arguments once again
26743  if test "x$arguments" != xEOL; then
26744    new_complete="$new_path ${arguments% *}"
26745  else
26746    new_complete="$new_path"
26747  fi
26748
26749  if test "x$complete" != "x$new_complete"; then
26750    BUILD_CC="$new_complete"
26751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
26752$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
26753  fi
26754
26755
26756
26757  # Publish this variable in the help.
26758
26759
26760  if test "x$BUILD_CXX" = x; then
26761    # The variable is not set by user, try to locate tool using the code snippet
26762    for ac_prog in cl CC g++
26763do
26764  # Extract the first word of "$ac_prog", so it can be a program name with args.
26765set dummy $ac_prog; ac_word=$2
26766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26767$as_echo_n "checking for $ac_word... " >&6; }
26768if ${ac_cv_path_BUILD_CXX+:} false; then :
26769  $as_echo_n "(cached) " >&6
26770else
26771  case $BUILD_CXX in
26772  [\\/]* | ?:[\\/]*)
26773  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26774  ;;
26775  *)
26776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26777for as_dir in $PATH
26778do
26779  IFS=$as_save_IFS
26780  test -z "$as_dir" && as_dir=.
26781    for ac_exec_ext in '' $ac_executable_extensions; do
26782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26783    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26785    break 2
26786  fi
26787done
26788  done
26789IFS=$as_save_IFS
26790
26791  ;;
26792esac
26793fi
26794BUILD_CXX=$ac_cv_path_BUILD_CXX
26795if test -n "$BUILD_CXX"; then
26796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26797$as_echo "$BUILD_CXX" >&6; }
26798else
26799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26800$as_echo "no" >&6; }
26801fi
26802
26803
26804  test -n "$BUILD_CXX" && break
26805done
26806
26807  else
26808    # The variable is set, but is it from the command line or the environment?
26809
26810    # Try to remove the string !BUILD_CXX! from our list.
26811    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
26812    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26813      # If it failed, the variable was not from the command line. Ignore it,
26814      # but warn the user (except for BASH, which is always set by the calling BASH).
26815      if test "xBUILD_CXX" != xBASH; then
26816        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
26817$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
26818      fi
26819      # Try to locate tool using the code snippet
26820      for ac_prog in cl CC g++
26821do
26822  # Extract the first word of "$ac_prog", so it can be a program name with args.
26823set dummy $ac_prog; ac_word=$2
26824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26825$as_echo_n "checking for $ac_word... " >&6; }
26826if ${ac_cv_path_BUILD_CXX+:} false; then :
26827  $as_echo_n "(cached) " >&6
26828else
26829  case $BUILD_CXX in
26830  [\\/]* | ?:[\\/]*)
26831  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26832  ;;
26833  *)
26834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26835for as_dir in $PATH
26836do
26837  IFS=$as_save_IFS
26838  test -z "$as_dir" && as_dir=.
26839    for ac_exec_ext in '' $ac_executable_extensions; do
26840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26841    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26843    break 2
26844  fi
26845done
26846  done
26847IFS=$as_save_IFS
26848
26849  ;;
26850esac
26851fi
26852BUILD_CXX=$ac_cv_path_BUILD_CXX
26853if test -n "$BUILD_CXX"; then
26854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26855$as_echo "$BUILD_CXX" >&6; }
26856else
26857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26858$as_echo "no" >&6; }
26859fi
26860
26861
26862  test -n "$BUILD_CXX" && break
26863done
26864
26865    else
26866      # If it succeeded, then it was overridden by the user. We will use it
26867      # for the tool.
26868
26869      # First remove it from the list of overridden variables, so we can test
26870      # for unknown variables in the end.
26871      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26872
26873      # Check if the provided tool contains a complete path.
26874      tool_specified="$BUILD_CXX"
26875      tool_basename="${tool_specified##*/}"
26876      if test "x$tool_basename" = "x$tool_specified"; then
26877        # A command without a complete path is provided, search $PATH.
26878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
26879$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
26880        # Extract the first word of "$tool_basename", so it can be a program name with args.
26881set dummy $tool_basename; ac_word=$2
26882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26883$as_echo_n "checking for $ac_word... " >&6; }
26884if ${ac_cv_path_BUILD_CXX+:} false; then :
26885  $as_echo_n "(cached) " >&6
26886else
26887  case $BUILD_CXX in
26888  [\\/]* | ?:[\\/]*)
26889  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
26890  ;;
26891  *)
26892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26893for as_dir in $PATH
26894do
26895  IFS=$as_save_IFS
26896  test -z "$as_dir" && as_dir=.
26897    for ac_exec_ext in '' $ac_executable_extensions; do
26898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26899    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
26900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26901    break 2
26902  fi
26903done
26904  done
26905IFS=$as_save_IFS
26906
26907  ;;
26908esac
26909fi
26910BUILD_CXX=$ac_cv_path_BUILD_CXX
26911if test -n "$BUILD_CXX"; then
26912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
26913$as_echo "$BUILD_CXX" >&6; }
26914else
26915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26916$as_echo "no" >&6; }
26917fi
26918
26919
26920        if test "x$BUILD_CXX" = x; then
26921          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26922        fi
26923      else
26924        # Otherwise we believe it is a complete path. Use it as it is.
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
26926$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
26928$as_echo_n "checking for BUILD_CXX... " >&6; }
26929        if test ! -x "$tool_specified"; then
26930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26931$as_echo "not found" >&6; }
26932          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
26933        fi
26934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26935$as_echo "$tool_specified" >&6; }
26936      fi
26937    fi
26938  fi
26939
26940
26941
26942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26943
26944  # First separate the path from the arguments. This will split at the first
26945  # space.
26946  complete="$BUILD_CXX"
26947  path="${complete%% *}"
26948  tmp="$complete EOL"
26949  arguments="${tmp#* }"
26950
26951  # Input might be given as Windows format, start by converting to
26952  # unix format.
26953  new_path=`$CYGPATH -u "$path"`
26954
26955  # Now try to locate executable using which
26956  new_path=`$WHICH "$new_path" 2> /dev/null`
26957  # bat and cmd files are not always considered executable in cygwin causing which
26958  # to not find them
26959  if test "x$new_path" = x \
26960      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26961      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26962    new_path=`$CYGPATH -u "$path"`
26963  fi
26964  if test "x$new_path" = x; then
26965    # Oops. Which didn't find the executable.
26966    # The splitting of arguments from the executable at a space might have been incorrect,
26967    # since paths with space are more likely in Windows. Give it another try with the whole
26968    # argument.
26969    path="$complete"
26970    arguments="EOL"
26971    new_path=`$CYGPATH -u "$path"`
26972    new_path=`$WHICH "$new_path" 2> /dev/null`
26973    # bat and cmd files are not always considered executable in cygwin causing which
26974    # to not find them
26975    if test "x$new_path" = x \
26976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26978      new_path=`$CYGPATH -u "$path"`
26979    fi
26980    if test "x$new_path" = x; then
26981      # It's still not found. Now this is an unrecoverable error.
26982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
26983$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
26984      has_space=`$ECHO "$complete" | $GREP " "`
26985      if test "x$has_space" != x; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26988      fi
26989      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
26990    fi
26991  fi
26992
26993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26996  # "foo.exe" is OK but "foo" is an error.
26997  #
26998  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26999  # It is also a way to make sure we got the proper file name for the real test later on.
27000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27001  if test "x$test_shortpath" = x; then
27002    # Short path failed, file does not exist as specified.
27003    # Try adding .exe or .cmd
27004    if test -f "${new_path}.exe"; then
27005      input_to_shortpath="${new_path}.exe"
27006    elif test -f "${new_path}.cmd"; then
27007      input_to_shortpath="${new_path}.cmd"
27008    else
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
27010$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27013      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27014    fi
27015  else
27016    input_to_shortpath="$new_path"
27017  fi
27018
27019  # Call helper function which possibly converts this using DOS-style short mode.
27020  # If so, the updated path is stored in $new_path.
27021  new_path="$input_to_shortpath"
27022
27023  input_path="$input_to_shortpath"
27024  # Check if we need to convert this using DOS-style short mode. If the path
27025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27026  # take no chances and rewrite it.
27027  # Note: m4 eats our [], so we need to use [ and ] instead.
27028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27029  if test "x$has_forbidden_chars" != x; then
27030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27034      # Going to short mode and back again did indeed matter. Since short mode is
27035      # case insensitive, let's make it lowercase to improve readability.
27036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27037      # Now convert it back to Unix-stile (cygpath)
27038      input_path=`$CYGPATH -u "$shortmode_path"`
27039      new_path="$input_path"
27040    fi
27041  fi
27042
27043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27044  if test "x$test_cygdrive_prefix" = x; then
27045    # As a simple fix, exclude /usr/bin since it's not a real path.
27046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27048      # a path prefixed by /cygdrive for fixpath to work.
27049      new_path="$CYGWIN_ROOT_PATH$input_path"
27050    fi
27051  fi
27052
27053  # remove trailing .exe if any
27054  new_path="${new_path/%.exe/}"
27055
27056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057
27058  # First separate the path from the arguments. This will split at the first
27059  # space.
27060  complete="$BUILD_CXX"
27061  path="${complete%% *}"
27062  tmp="$complete EOL"
27063  arguments="${tmp#* }"
27064
27065  # Input might be given as Windows format, start by converting to
27066  # unix format.
27067  new_path="$path"
27068
27069  windows_path="$new_path"
27070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27071    unix_path=`$CYGPATH -u "$windows_path"`
27072    new_path="$unix_path"
27073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27075    new_path="$unix_path"
27076  fi
27077
27078
27079  # Now try to locate executable using which
27080  new_path=`$WHICH "$new_path" 2> /dev/null`
27081
27082  if test "x$new_path" = x; then
27083    # Oops. Which didn't find the executable.
27084    # The splitting of arguments from the executable at a space might have been incorrect,
27085    # since paths with space are more likely in Windows. Give it another try with the whole
27086    # argument.
27087    path="$complete"
27088    arguments="EOL"
27089    new_path="$path"
27090
27091  windows_path="$new_path"
27092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27093    unix_path=`$CYGPATH -u "$windows_path"`
27094    new_path="$unix_path"
27095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27097    new_path="$unix_path"
27098  fi
27099
27100
27101    new_path=`$WHICH "$new_path" 2> /dev/null`
27102
27103    if test "x$new_path" = x; then
27104      # It's still not found. Now this is an unrecoverable error.
27105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
27106$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
27107      has_space=`$ECHO "$complete" | $GREP " "`
27108      if test "x$has_space" != x; then
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27111      fi
27112      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27113    fi
27114  fi
27115
27116  # Now new_path has a complete unix path to the binary
27117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27118    # Keep paths in /bin as-is, but remove trailing .exe if any
27119    new_path="${new_path/%.exe/}"
27120    # Do not save /bin paths to all_fixpath_prefixes!
27121  else
27122    # Not in mixed or Windows style, start by that.
27123    new_path=`cmd //c echo $new_path`
27124
27125  input_path="$new_path"
27126  # Check if we need to convert this using DOS-style short mode. If the path
27127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27128  # take no chances and rewrite it.
27129  # Note: m4 eats our [], so we need to use [ and ] instead.
27130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27131  if test "x$has_forbidden_chars" != x; then
27132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27134  fi
27135
27136    # Output is in $new_path
27137
27138  windows_path="$new_path"
27139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140    unix_path=`$CYGPATH -u "$windows_path"`
27141    new_path="$unix_path"
27142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27144    new_path="$unix_path"
27145  fi
27146
27147    # remove trailing .exe if any
27148    new_path="${new_path/%.exe/}"
27149
27150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27152  fi
27153
27154  else
27155    # We're on a posix platform. Hooray! :)
27156    # First separate the path from the arguments. This will split at the first
27157    # space.
27158    complete="$BUILD_CXX"
27159    path="${complete%% *}"
27160    tmp="$complete EOL"
27161    arguments="${tmp#* }"
27162
27163    # Cannot rely on the command "which" here since it doesn't always work.
27164    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27165    if test -z "$is_absolute_path"; then
27166      # Path to executable is not absolute. Find it.
27167      IFS_save="$IFS"
27168      IFS=:
27169      for p in $PATH; do
27170        if test -f "$p/$path" && test -x "$p/$path"; then
27171          new_path="$p/$path"
27172          break
27173        fi
27174      done
27175      IFS="$IFS_save"
27176    else
27177      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
27178$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
27179      new_path="$path"
27180    fi
27181
27182    if test "x$new_path" = x; then
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
27184$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
27185      has_space=`$ECHO "$complete" | $GREP " "`
27186      if test "x$has_space" != x; then
27187        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27189      fi
27190      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
27191    fi
27192  fi
27193
27194  # Now join together the path and the arguments once again
27195  if test "x$arguments" != xEOL; then
27196    new_complete="$new_path ${arguments% *}"
27197  else
27198    new_complete="$new_path"
27199  fi
27200
27201  if test "x$complete" != "x$new_complete"; then
27202    BUILD_CXX="$new_complete"
27203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
27204$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
27205  fi
27206
27207
27208
27209  # Publish this variable in the help.
27210
27211
27212  if test "x$BUILD_LD" = x; then
27213    # The variable is not set by user, try to locate tool using the code snippet
27214    for ac_prog in ld
27215do
27216  # Extract the first word of "$ac_prog", so it can be a program name with args.
27217set dummy $ac_prog; ac_word=$2
27218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27219$as_echo_n "checking for $ac_word... " >&6; }
27220if ${ac_cv_path_BUILD_LD+:} false; then :
27221  $as_echo_n "(cached) " >&6
27222else
27223  case $BUILD_LD in
27224  [\\/]* | ?:[\\/]*)
27225  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27226  ;;
27227  *)
27228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27229for as_dir in $PATH
27230do
27231  IFS=$as_save_IFS
27232  test -z "$as_dir" && as_dir=.
27233    for ac_exec_ext in '' $ac_executable_extensions; do
27234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27235    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27237    break 2
27238  fi
27239done
27240  done
27241IFS=$as_save_IFS
27242
27243  ;;
27244esac
27245fi
27246BUILD_LD=$ac_cv_path_BUILD_LD
27247if test -n "$BUILD_LD"; then
27248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27249$as_echo "$BUILD_LD" >&6; }
27250else
27251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27252$as_echo "no" >&6; }
27253fi
27254
27255
27256  test -n "$BUILD_LD" && break
27257done
27258
27259  else
27260    # The variable is set, but is it from the command line or the environment?
27261
27262    # Try to remove the string !BUILD_LD! from our list.
27263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
27264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27265      # If it failed, the variable was not from the command line. Ignore it,
27266      # but warn the user (except for BASH, which is always set by the calling BASH).
27267      if test "xBUILD_LD" != xBASH; then
27268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
27269$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
27270      fi
27271      # Try to locate tool using the code snippet
27272      for ac_prog in ld
27273do
27274  # Extract the first word of "$ac_prog", so it can be a program name with args.
27275set dummy $ac_prog; ac_word=$2
27276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27277$as_echo_n "checking for $ac_word... " >&6; }
27278if ${ac_cv_path_BUILD_LD+:} false; then :
27279  $as_echo_n "(cached) " >&6
27280else
27281  case $BUILD_LD in
27282  [\\/]* | ?:[\\/]*)
27283  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27284  ;;
27285  *)
27286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27287for as_dir in $PATH
27288do
27289  IFS=$as_save_IFS
27290  test -z "$as_dir" && as_dir=.
27291    for ac_exec_ext in '' $ac_executable_extensions; do
27292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27293    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27295    break 2
27296  fi
27297done
27298  done
27299IFS=$as_save_IFS
27300
27301  ;;
27302esac
27303fi
27304BUILD_LD=$ac_cv_path_BUILD_LD
27305if test -n "$BUILD_LD"; then
27306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27307$as_echo "$BUILD_LD" >&6; }
27308else
27309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27310$as_echo "no" >&6; }
27311fi
27312
27313
27314  test -n "$BUILD_LD" && break
27315done
27316
27317    else
27318      # If it succeeded, then it was overridden by the user. We will use it
27319      # for the tool.
27320
27321      # First remove it from the list of overridden variables, so we can test
27322      # for unknown variables in the end.
27323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27324
27325      # Check if the provided tool contains a complete path.
27326      tool_specified="$BUILD_LD"
27327      tool_basename="${tool_specified##*/}"
27328      if test "x$tool_basename" = "x$tool_specified"; then
27329        # A command without a complete path is provided, search $PATH.
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
27331$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
27332        # Extract the first word of "$tool_basename", so it can be a program name with args.
27333set dummy $tool_basename; ac_word=$2
27334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27335$as_echo_n "checking for $ac_word... " >&6; }
27336if ${ac_cv_path_BUILD_LD+:} false; then :
27337  $as_echo_n "(cached) " >&6
27338else
27339  case $BUILD_LD in
27340  [\\/]* | ?:[\\/]*)
27341  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
27342  ;;
27343  *)
27344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27345for as_dir in $PATH
27346do
27347  IFS=$as_save_IFS
27348  test -z "$as_dir" && as_dir=.
27349    for ac_exec_ext in '' $ac_executable_extensions; do
27350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27351    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
27352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27353    break 2
27354  fi
27355done
27356  done
27357IFS=$as_save_IFS
27358
27359  ;;
27360esac
27361fi
27362BUILD_LD=$ac_cv_path_BUILD_LD
27363if test -n "$BUILD_LD"; then
27364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
27365$as_echo "$BUILD_LD" >&6; }
27366else
27367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27368$as_echo "no" >&6; }
27369fi
27370
27371
27372        if test "x$BUILD_LD" = x; then
27373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27374        fi
27375      else
27376        # Otherwise we believe it is a complete path. Use it as it is.
27377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
27378$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
27379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
27380$as_echo_n "checking for BUILD_LD... " >&6; }
27381        if test ! -x "$tool_specified"; then
27382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27383$as_echo "not found" >&6; }
27384          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
27385        fi
27386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27387$as_echo "$tool_specified" >&6; }
27388      fi
27389    fi
27390  fi
27391
27392
27393
27394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27395
27396  # First separate the path from the arguments. This will split at the first
27397  # space.
27398  complete="$BUILD_LD"
27399  path="${complete%% *}"
27400  tmp="$complete EOL"
27401  arguments="${tmp#* }"
27402
27403  # Input might be given as Windows format, start by converting to
27404  # unix format.
27405  new_path=`$CYGPATH -u "$path"`
27406
27407  # Now try to locate executable using which
27408  new_path=`$WHICH "$new_path" 2> /dev/null`
27409  # bat and cmd files are not always considered executable in cygwin causing which
27410  # to not find them
27411  if test "x$new_path" = x \
27412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27414    new_path=`$CYGPATH -u "$path"`
27415  fi
27416  if test "x$new_path" = x; then
27417    # Oops. Which didn't find the executable.
27418    # The splitting of arguments from the executable at a space might have been incorrect,
27419    # since paths with space are more likely in Windows. Give it another try with the whole
27420    # argument.
27421    path="$complete"
27422    arguments="EOL"
27423    new_path=`$CYGPATH -u "$path"`
27424    new_path=`$WHICH "$new_path" 2> /dev/null`
27425    # bat and cmd files are not always considered executable in cygwin causing which
27426    # to not find them
27427    if test "x$new_path" = x \
27428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27430      new_path=`$CYGPATH -u "$path"`
27431    fi
27432    if test "x$new_path" = x; then
27433      # It's still not found. Now this is an unrecoverable error.
27434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27435$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27436      has_space=`$ECHO "$complete" | $GREP " "`
27437      if test "x$has_space" != x; then
27438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27440      fi
27441      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27442    fi
27443  fi
27444
27445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27448  # "foo.exe" is OK but "foo" is an error.
27449  #
27450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27451  # It is also a way to make sure we got the proper file name for the real test later on.
27452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27453  if test "x$test_shortpath" = x; then
27454    # Short path failed, file does not exist as specified.
27455    # Try adding .exe or .cmd
27456    if test -f "${new_path}.exe"; then
27457      input_to_shortpath="${new_path}.exe"
27458    elif test -f "${new_path}.cmd"; then
27459      input_to_shortpath="${new_path}.cmd"
27460    else
27461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
27462$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
27463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27465      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27466    fi
27467  else
27468    input_to_shortpath="$new_path"
27469  fi
27470
27471  # Call helper function which possibly converts this using DOS-style short mode.
27472  # If so, the updated path is stored in $new_path.
27473  new_path="$input_to_shortpath"
27474
27475  input_path="$input_to_shortpath"
27476  # Check if we need to convert this using DOS-style short mode. If the path
27477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27478  # take no chances and rewrite it.
27479  # Note: m4 eats our [], so we need to use [ and ] instead.
27480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27481  if test "x$has_forbidden_chars" != x; then
27482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27486      # Going to short mode and back again did indeed matter. Since short mode is
27487      # case insensitive, let's make it lowercase to improve readability.
27488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27489      # Now convert it back to Unix-stile (cygpath)
27490      input_path=`$CYGPATH -u "$shortmode_path"`
27491      new_path="$input_path"
27492    fi
27493  fi
27494
27495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27496  if test "x$test_cygdrive_prefix" = x; then
27497    # As a simple fix, exclude /usr/bin since it's not a real path.
27498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27500      # a path prefixed by /cygdrive for fixpath to work.
27501      new_path="$CYGWIN_ROOT_PATH$input_path"
27502    fi
27503  fi
27504
27505  # remove trailing .exe if any
27506  new_path="${new_path/%.exe/}"
27507
27508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509
27510  # First separate the path from the arguments. This will split at the first
27511  # space.
27512  complete="$BUILD_LD"
27513  path="${complete%% *}"
27514  tmp="$complete EOL"
27515  arguments="${tmp#* }"
27516
27517  # Input might be given as Windows format, start by converting to
27518  # unix format.
27519  new_path="$path"
27520
27521  windows_path="$new_path"
27522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523    unix_path=`$CYGPATH -u "$windows_path"`
27524    new_path="$unix_path"
27525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27527    new_path="$unix_path"
27528  fi
27529
27530
27531  # Now try to locate executable using which
27532  new_path=`$WHICH "$new_path" 2> /dev/null`
27533
27534  if test "x$new_path" = x; then
27535    # Oops. Which didn't find the executable.
27536    # The splitting of arguments from the executable at a space might have been incorrect,
27537    # since paths with space are more likely in Windows. Give it another try with the whole
27538    # argument.
27539    path="$complete"
27540    arguments="EOL"
27541    new_path="$path"
27542
27543  windows_path="$new_path"
27544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27545    unix_path=`$CYGPATH -u "$windows_path"`
27546    new_path="$unix_path"
27547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27549    new_path="$unix_path"
27550  fi
27551
27552
27553    new_path=`$WHICH "$new_path" 2> /dev/null`
27554
27555    if test "x$new_path" = x; then
27556      # It's still not found. Now this is an unrecoverable error.
27557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27558$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27559      has_space=`$ECHO "$complete" | $GREP " "`
27560      if test "x$has_space" != x; then
27561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27563      fi
27564      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27565    fi
27566  fi
27567
27568  # Now new_path has a complete unix path to the binary
27569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27570    # Keep paths in /bin as-is, but remove trailing .exe if any
27571    new_path="${new_path/%.exe/}"
27572    # Do not save /bin paths to all_fixpath_prefixes!
27573  else
27574    # Not in mixed or Windows style, start by that.
27575    new_path=`cmd //c echo $new_path`
27576
27577  input_path="$new_path"
27578  # Check if we need to convert this using DOS-style short mode. If the path
27579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27580  # take no chances and rewrite it.
27581  # Note: m4 eats our [], so we need to use [ and ] instead.
27582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27583  if test "x$has_forbidden_chars" != x; then
27584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27586  fi
27587
27588    # Output is in $new_path
27589
27590  windows_path="$new_path"
27591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592    unix_path=`$CYGPATH -u "$windows_path"`
27593    new_path="$unix_path"
27594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27596    new_path="$unix_path"
27597  fi
27598
27599    # remove trailing .exe if any
27600    new_path="${new_path/%.exe/}"
27601
27602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27604  fi
27605
27606  else
27607    # We're on a posix platform. Hooray! :)
27608    # First separate the path from the arguments. This will split at the first
27609    # space.
27610    complete="$BUILD_LD"
27611    path="${complete%% *}"
27612    tmp="$complete EOL"
27613    arguments="${tmp#* }"
27614
27615    # Cannot rely on the command "which" here since it doesn't always work.
27616    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27617    if test -z "$is_absolute_path"; then
27618      # Path to executable is not absolute. Find it.
27619      IFS_save="$IFS"
27620      IFS=:
27621      for p in $PATH; do
27622        if test -f "$p/$path" && test -x "$p/$path"; then
27623          new_path="$p/$path"
27624          break
27625        fi
27626      done
27627      IFS="$IFS_save"
27628    else
27629      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
27630$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
27631      new_path="$path"
27632    fi
27633
27634    if test "x$new_path" = x; then
27635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
27636$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
27637      has_space=`$ECHO "$complete" | $GREP " "`
27638      if test "x$has_space" != x; then
27639        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27641      fi
27642      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
27643    fi
27644  fi
27645
27646  # Now join together the path and the arguments once again
27647  if test "x$arguments" != xEOL; then
27648    new_complete="$new_path ${arguments% *}"
27649  else
27650    new_complete="$new_path"
27651  fi
27652
27653  if test "x$complete" != "x$new_complete"; then
27654    BUILD_LD="$new_complete"
27655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
27656$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
27657  fi
27658
27659  fi
27660
27661
27662
27663
27664  # If a devkit is found on the builddeps server, then prepend its path to the
27665  # PATH variable. If there are cross compilers available in the devkit, these
27666  # will be found by AC_PROG_CC et al.
27667  DEVKIT=
27668
27669
27670  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27671    # Source the builddeps file again, to make sure it uses the latest variables!
27672    . $builddepsfile
27673    # Look for a target and build machine specific resource!
27674    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27675    if test "x$resource" = x; then
27676      # Ok, lets instead look for a target specific resource
27677      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27678    fi
27679    if test "x$resource" = x; then
27680      # Ok, lets instead look for a build specific resource
27681      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27682    fi
27683    if test "x$resource" = x; then
27684      # Ok, lets instead look for a generic resource
27685      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27686      resource=${builddep_devkit}
27687    fi
27688    if test "x$resource" != x; then
27689      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27690$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27691      # If the resource in the builddeps.conf file is an existing directory,
27692      # for example /java/linux/cups
27693      if test -d ${resource}; then
27694        depdir=${resource}
27695      else
27696
27697  # devkit is for example mymodule
27698  # $resource is for example libs/general/libmymod_1_2_3.zip
27699  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27700  # $with_builddeps_dir is for example /localhome/builddeps
27701  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27702  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27703  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27704  filename=`basename $resource`
27705  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27706  filebase=${filename%%.*}
27707  extension=${filename#*.}
27708  installdir=$with_builddeps_dir/$filebase
27709  if test ! -f $installdir/$filename.unpacked; then
27710    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27711$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27712    if test ! -d $installdir; then
27713      mkdir -p $installdir
27714    fi
27715    if test ! -d $installdir; then
27716      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27717    fi
27718    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27719    touch $tmpfile
27720    if test ! -f $tmpfile; then
27721      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27722    fi
27723
27724  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27725  # $tmpfile is the local file name for the downloaded file.
27726  VALID_TOOL=no
27727  if test "x$BDEPS_FTP" = xwget; then
27728    VALID_TOOL=yes
27729    wget -O $tmpfile $with_builddeps_server/$resource
27730  fi
27731  if test "x$BDEPS_FTP" = xlftp; then
27732    VALID_TOOL=yes
27733    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27734  fi
27735  if test "x$BDEPS_FTP" = xftp; then
27736    VALID_TOOL=yes
27737    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27738    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27739    FTPUSERPWD=${FTPSERVER%%@*}
27740    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27741      FTPUSER=${userpwd%%:*}
27742      FTPPWD=${userpwd#*@}
27743      FTPSERVER=${FTPSERVER#*@}
27744    else
27745      FTPUSER=ftp
27746      FTPPWD=ftp
27747    fi
27748    # the "pass" command does not work on some
27749    # ftp clients (read ftp.exe) but if it works,
27750    # passive mode is better!
27751    ( \
27752        echo "user $FTPUSER $FTPPWD"        ; \
27753        echo "pass"                         ; \
27754        echo "bin"                          ; \
27755        echo "get $FTPPATH $tmpfile"              ; \
27756    ) | ftp -in $FTPSERVER
27757  fi
27758  if test "x$VALID_TOOL" != xyes; then
27759    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27760  fi
27761
27762    mv $tmpfile $installdir/$filename
27763    if test ! -s $installdir/$filename; then
27764      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27765    fi
27766    case "$extension" in
27767      zip)  echo "Unzipping $installdir/$filename..."
27768        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27769        ;;
27770      tar.gz) echo "Untaring $installdir/$filename..."
27771        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27772        ;;
27773      tgz) echo "Untaring $installdir/$filename..."
27774        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27775        ;;
27776      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27777        ;;
27778    esac
27779  fi
27780  if test -f $installdir/$filename.unpacked; then
27781    depdir=$installdir
27782  fi
27783
27784      fi
27785      # Source the builddeps file again, because in the previous command, the depdir
27786      # was updated to point at the current build dependency install directory.
27787      . $builddepsfile
27788      # Now extract variables from the builddeps.conf files.
27789      theroot=${builddep_devkit_ROOT}
27790      thecflags=${builddep_devkit_CFLAGS}
27791      thelibs=${builddep_devkit_LIBS}
27792      if test "x$depdir" = x; then
27793        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27794      fi
27795      DEVKIT=$depdir
27796      if test "x$theroot" != x; then
27797        DEVKIT="$theroot"
27798      fi
27799      if test "x$thecflags" != x; then
27800        DEVKIT_CFLAGS="$thecflags"
27801      fi
27802      if test "x$thelibs" != x; then
27803        DEVKIT_LIBS="$thelibs"
27804      fi
27805
27806        # Found devkit
27807        PATH="$DEVKIT/bin:$PATH"
27808        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27809        if test "x$x_includes" = "xNONE"; then
27810          x_includes="$SYS_ROOT/usr/include/X11"
27811        fi
27812        if test "x$x_libraries" = "xNONE"; then
27813          x_libraries="$SYS_ROOT/usr/lib"
27814        fi
27815
27816
27817    fi
27818
27819  fi
27820
27821
27822  # Store the CFLAGS etal passed to the configure script.
27823  ORG_CFLAGS="$CFLAGS"
27824  ORG_CXXFLAGS="$CXXFLAGS"
27825  ORG_OBJCFLAGS="$OBJCFLAGS"
27826
27827  # autoconf magic only relies on PATH, so update it if tools dir is specified
27828  OLD_PATH="$PATH"
27829  if test "x$TOOLS_DIR" != x; then
27830    PATH=$TOOLS_DIR:$PATH
27831  fi
27832
27833
27834  ### Locate C compiler (CC)
27835
27836  # On windows, only cl.exe is supported.
27837  # On Solaris, cc is preferred to gcc.
27838  # Elsewhere, gcc is preferred to cc.
27839
27840  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
27841    COMPILER_CHECK_LIST="cl"
27842  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
27843    COMPILER_CHECK_LIST="cc gcc"
27844  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
27845    # Do not probe for cc on AIX.
27846    COMPILER_CHECK_LIST="xlc_r"
27847  else
27848    COMPILER_CHECK_LIST="gcc cc"
27849  fi
27850
27851
27852  COMPILER_NAME=C
27853  SEARCH_LIST="$COMPILER_CHECK_LIST"
27854
27855  if test "x$CC" != x; then
27856    # User has supplied compiler name already, always let that override.
27857    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27858$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27859    if test "x`basename $CC`" = "x$CC"; then
27860      # A command without a complete path is provided, search $PATH.
27861
27862      for ac_prog in $CC
27863do
27864  # Extract the first word of "$ac_prog", so it can be a program name with args.
27865set dummy $ac_prog; ac_word=$2
27866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27867$as_echo_n "checking for $ac_word... " >&6; }
27868if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27869  $as_echo_n "(cached) " >&6
27870else
27871  case $POTENTIAL_CC in
27872  [\\/]* | ?:[\\/]*)
27873  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27874  ;;
27875  *)
27876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27877for as_dir in $PATH
27878do
27879  IFS=$as_save_IFS
27880  test -z "$as_dir" && as_dir=.
27881    for ac_exec_ext in '' $ac_executable_extensions; do
27882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27883    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27885    break 2
27886  fi
27887done
27888  done
27889IFS=$as_save_IFS
27890
27891  ;;
27892esac
27893fi
27894POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27895if test -n "$POTENTIAL_CC"; then
27896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27897$as_echo "$POTENTIAL_CC" >&6; }
27898else
27899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27900$as_echo "no" >&6; }
27901fi
27902
27903
27904  test -n "$POTENTIAL_CC" && break
27905done
27906
27907      if test "x$POTENTIAL_CC" != x; then
27908        CC=$POTENTIAL_CC
27909      else
27910        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27911      fi
27912    else
27913      # Otherwise it might already be a complete path
27914      if test ! -x "$CC"; then
27915        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27916      fi
27917    fi
27918  else
27919    # No user supplied value. Locate compiler ourselves
27920    CC=
27921    # If TOOLS_DIR is set, check for all compiler names in there first
27922    # before checking the rest of the PATH.
27923    if test -n "$TOOLS_DIR"; then
27924      PATH_save="$PATH"
27925      PATH="$TOOLS_DIR"
27926      for ac_prog in $SEARCH_LIST
27927do
27928  # Extract the first word of "$ac_prog", so it can be a program name with args.
27929set dummy $ac_prog; ac_word=$2
27930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27931$as_echo_n "checking for $ac_word... " >&6; }
27932if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27933  $as_echo_n "(cached) " >&6
27934else
27935  case $TOOLS_DIR_CC in
27936  [\\/]* | ?:[\\/]*)
27937  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27938  ;;
27939  *)
27940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27941for as_dir in $PATH
27942do
27943  IFS=$as_save_IFS
27944  test -z "$as_dir" && as_dir=.
27945    for ac_exec_ext in '' $ac_executable_extensions; do
27946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27947    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27949    break 2
27950  fi
27951done
27952  done
27953IFS=$as_save_IFS
27954
27955  ;;
27956esac
27957fi
27958TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27959if test -n "$TOOLS_DIR_CC"; then
27960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27961$as_echo "$TOOLS_DIR_CC" >&6; }
27962else
27963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27964$as_echo "no" >&6; }
27965fi
27966
27967
27968  test -n "$TOOLS_DIR_CC" && break
27969done
27970
27971      CC=$TOOLS_DIR_CC
27972      PATH="$PATH_save"
27973    fi
27974
27975    # AC_PATH_PROGS can't be run multiple times with the same variable,
27976    # so create a new name for this run.
27977    if test "x$CC" = x; then
27978      for ac_prog in $SEARCH_LIST
27979do
27980  # Extract the first word of "$ac_prog", so it can be a program name with args.
27981set dummy $ac_prog; ac_word=$2
27982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27983$as_echo_n "checking for $ac_word... " >&6; }
27984if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27985  $as_echo_n "(cached) " >&6
27986else
27987  case $POTENTIAL_CC in
27988  [\\/]* | ?:[\\/]*)
27989  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27990  ;;
27991  *)
27992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27993for as_dir in $PATH
27994do
27995  IFS=$as_save_IFS
27996  test -z "$as_dir" && as_dir=.
27997    for ac_exec_ext in '' $ac_executable_extensions; do
27998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27999    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28001    break 2
28002  fi
28003done
28004  done
28005IFS=$as_save_IFS
28006
28007  ;;
28008esac
28009fi
28010POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28011if test -n "$POTENTIAL_CC"; then
28012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28013$as_echo "$POTENTIAL_CC" >&6; }
28014else
28015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28016$as_echo "no" >&6; }
28017fi
28018
28019
28020  test -n "$POTENTIAL_CC" && break
28021done
28022
28023      CC=$POTENTIAL_CC
28024    fi
28025
28026    if test "x$CC" = x; then
28027
28028  # Print a helpful message on how to acquire the necessary build dependency.
28029  # devkit is the help tag: freetype, cups, pulse, alsa etc
28030  MISSING_DEPENDENCY=devkit
28031
28032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28033    cygwin_help $MISSING_DEPENDENCY
28034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28035    msys_help $MISSING_DEPENDENCY
28036  else
28037    PKGHANDLER_COMMAND=
28038
28039    case $PKGHANDLER in
28040      apt-get)
28041        apt_help     $MISSING_DEPENDENCY ;;
28042      yum)
28043        yum_help     $MISSING_DEPENDENCY ;;
28044      port)
28045        port_help    $MISSING_DEPENDENCY ;;
28046      pkgutil)
28047        pkgutil_help $MISSING_DEPENDENCY ;;
28048      pkgadd)
28049        pkgadd_help  $MISSING_DEPENDENCY ;;
28050    esac
28051
28052    if test "x$PKGHANDLER_COMMAND" != x; then
28053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28054    fi
28055  fi
28056
28057      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28058    fi
28059  fi
28060
28061  # Now we have a compiler binary in CC. Make sure it's okay.
28062
28063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28064
28065  # First separate the path from the arguments. This will split at the first
28066  # space.
28067  complete="$CC"
28068  path="${complete%% *}"
28069  tmp="$complete EOL"
28070  arguments="${tmp#* }"
28071
28072  # Input might be given as Windows format, start by converting to
28073  # unix format.
28074  new_path=`$CYGPATH -u "$path"`
28075
28076  # Now try to locate executable using which
28077  new_path=`$WHICH "$new_path" 2> /dev/null`
28078  # bat and cmd files are not always considered executable in cygwin causing which
28079  # to not find them
28080  if test "x$new_path" = x \
28081      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28082      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28083    new_path=`$CYGPATH -u "$path"`
28084  fi
28085  if test "x$new_path" = x; then
28086    # Oops. Which didn't find the executable.
28087    # The splitting of arguments from the executable at a space might have been incorrect,
28088    # since paths with space are more likely in Windows. Give it another try with the whole
28089    # argument.
28090    path="$complete"
28091    arguments="EOL"
28092    new_path=`$CYGPATH -u "$path"`
28093    new_path=`$WHICH "$new_path" 2> /dev/null`
28094    # bat and cmd files are not always considered executable in cygwin causing which
28095    # to not find them
28096    if test "x$new_path" = x \
28097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28099      new_path=`$CYGPATH -u "$path"`
28100    fi
28101    if test "x$new_path" = x; then
28102      # It's still not found. Now this is an unrecoverable error.
28103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28104$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28105      has_space=`$ECHO "$complete" | $GREP " "`
28106      if test "x$has_space" != x; then
28107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28109      fi
28110      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28111    fi
28112  fi
28113
28114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28117  # "foo.exe" is OK but "foo" is an error.
28118  #
28119  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28120  # It is also a way to make sure we got the proper file name for the real test later on.
28121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28122  if test "x$test_shortpath" = x; then
28123    # Short path failed, file does not exist as specified.
28124    # Try adding .exe or .cmd
28125    if test -f "${new_path}.exe"; then
28126      input_to_shortpath="${new_path}.exe"
28127    elif test -f "${new_path}.cmd"; then
28128      input_to_shortpath="${new_path}.cmd"
28129    else
28130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28131$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28132      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28133$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28134      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28135    fi
28136  else
28137    input_to_shortpath="$new_path"
28138  fi
28139
28140  # Call helper function which possibly converts this using DOS-style short mode.
28141  # If so, the updated path is stored in $new_path.
28142  new_path="$input_to_shortpath"
28143
28144  input_path="$input_to_shortpath"
28145  # Check if we need to convert this using DOS-style short mode. If the path
28146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28147  # take no chances and rewrite it.
28148  # Note: m4 eats our [], so we need to use [ and ] instead.
28149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28150  if test "x$has_forbidden_chars" != x; then
28151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28155      # Going to short mode and back again did indeed matter. Since short mode is
28156      # case insensitive, let's make it lowercase to improve readability.
28157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28158      # Now convert it back to Unix-stile (cygpath)
28159      input_path=`$CYGPATH -u "$shortmode_path"`
28160      new_path="$input_path"
28161    fi
28162  fi
28163
28164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28165  if test "x$test_cygdrive_prefix" = x; then
28166    # As a simple fix, exclude /usr/bin since it's not a real path.
28167    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28169      # a path prefixed by /cygdrive for fixpath to work.
28170      new_path="$CYGWIN_ROOT_PATH$input_path"
28171    fi
28172  fi
28173
28174  # remove trailing .exe if any
28175  new_path="${new_path/%.exe/}"
28176
28177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28178
28179  # First separate the path from the arguments. This will split at the first
28180  # space.
28181  complete="$CC"
28182  path="${complete%% *}"
28183  tmp="$complete EOL"
28184  arguments="${tmp#* }"
28185
28186  # Input might be given as Windows format, start by converting to
28187  # unix format.
28188  new_path="$path"
28189
28190  windows_path="$new_path"
28191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28192    unix_path=`$CYGPATH -u "$windows_path"`
28193    new_path="$unix_path"
28194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28196    new_path="$unix_path"
28197  fi
28198
28199
28200  # Now try to locate executable using which
28201  new_path=`$WHICH "$new_path" 2> /dev/null`
28202
28203  if test "x$new_path" = x; then
28204    # Oops. Which didn't find the executable.
28205    # The splitting of arguments from the executable at a space might have been incorrect,
28206    # since paths with space are more likely in Windows. Give it another try with the whole
28207    # argument.
28208    path="$complete"
28209    arguments="EOL"
28210    new_path="$path"
28211
28212  windows_path="$new_path"
28213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28214    unix_path=`$CYGPATH -u "$windows_path"`
28215    new_path="$unix_path"
28216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28218    new_path="$unix_path"
28219  fi
28220
28221
28222    new_path=`$WHICH "$new_path" 2> /dev/null`
28223
28224    if test "x$new_path" = x; then
28225      # It's still not found. Now this is an unrecoverable error.
28226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28227$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28228      has_space=`$ECHO "$complete" | $GREP " "`
28229      if test "x$has_space" != x; then
28230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28232      fi
28233      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28234    fi
28235  fi
28236
28237  # Now new_path has a complete unix path to the binary
28238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28239    # Keep paths in /bin as-is, but remove trailing .exe if any
28240    new_path="${new_path/%.exe/}"
28241    # Do not save /bin paths to all_fixpath_prefixes!
28242  else
28243    # Not in mixed or Windows style, start by that.
28244    new_path=`cmd //c echo $new_path`
28245
28246  input_path="$new_path"
28247  # Check if we need to convert this using DOS-style short mode. If the path
28248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28249  # take no chances and rewrite it.
28250  # Note: m4 eats our [], so we need to use [ and ] instead.
28251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28252  if test "x$has_forbidden_chars" != x; then
28253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28255  fi
28256
28257    # Output is in $new_path
28258
28259  windows_path="$new_path"
28260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28261    unix_path=`$CYGPATH -u "$windows_path"`
28262    new_path="$unix_path"
28263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28265    new_path="$unix_path"
28266  fi
28267
28268    # remove trailing .exe if any
28269    new_path="${new_path/%.exe/}"
28270
28271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28273  fi
28274
28275  else
28276    # We're on a posix platform. Hooray! :)
28277    # First separate the path from the arguments. This will split at the first
28278    # space.
28279    complete="$CC"
28280    path="${complete%% *}"
28281    tmp="$complete EOL"
28282    arguments="${tmp#* }"
28283
28284    # Cannot rely on the command "which" here since it doesn't always work.
28285    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28286    if test -z "$is_absolute_path"; then
28287      # Path to executable is not absolute. Find it.
28288      IFS_save="$IFS"
28289      IFS=:
28290      for p in $PATH; do
28291        if test -f "$p/$path" && test -x "$p/$path"; then
28292          new_path="$p/$path"
28293          break
28294        fi
28295      done
28296      IFS="$IFS_save"
28297    else
28298      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
28299$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
28300      new_path="$path"
28301    fi
28302
28303    if test "x$new_path" = x; then
28304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28305$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28306      has_space=`$ECHO "$complete" | $GREP " "`
28307      if test "x$has_space" != x; then
28308        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28309$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28310      fi
28311      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28312    fi
28313  fi
28314
28315  # Now join together the path and the arguments once again
28316  if test "x$arguments" != xEOL; then
28317    new_complete="$new_path ${arguments% *}"
28318  else
28319    new_complete="$new_path"
28320  fi
28321
28322  if test "x$complete" != "x$new_complete"; then
28323    CC="$new_complete"
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28325$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28326  fi
28327
28328  TEST_COMPILER="$CC"
28329  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28330  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28331  if test "x$OPENJDK_BUILD_OS" != xaix; then
28332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28333$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28334
28335  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28336    # Follow a chain of symbolic links. Use readlink
28337    # where it exists, else fall back to horribly
28338    # complicated shell code.
28339    if test "x$READLINK_TESTED" != yes; then
28340      # On MacOSX there is a readlink tool with a different
28341      # purpose than the GNU readlink tool. Check the found readlink.
28342      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28343      if test "x$ISGNU" = x; then
28344        # A readlink that we do not know how to use.
28345        # Are there other non-GNU readlinks out there?
28346        READLINK_TESTED=yes
28347        READLINK=
28348      fi
28349    fi
28350
28351    if test "x$READLINK" != x; then
28352      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28353    else
28354      # Save the current directory for restoring afterwards
28355      STARTDIR=$PWD
28356      COUNTER=0
28357      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28358      sym_link_file=`$BASENAME $TEST_COMPILER`
28359      cd $sym_link_dir
28360      # Use -P flag to resolve symlinks in directories.
28361      cd `$THEPWDCMD -P`
28362      sym_link_dir=`$THEPWDCMD -P`
28363      # Resolve file symlinks
28364      while test $COUNTER -lt 20; do
28365        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28366        if test "x$ISLINK" == x; then
28367          # This is not a symbolic link! We are done!
28368          break
28369        fi
28370        # Again resolve directory symlinks since the target of the just found
28371        # link could be in a different directory
28372        cd `$DIRNAME $ISLINK`
28373        sym_link_dir=`$THEPWDCMD -P`
28374        sym_link_file=`$BASENAME $ISLINK`
28375        let COUNTER=COUNTER+1
28376      done
28377      cd $STARTDIR
28378      TEST_COMPILER=$sym_link_dir/$sym_link_file
28379    fi
28380  fi
28381
28382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28383$as_echo "$TEST_COMPILER" >&6; }
28384  fi
28385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28386$as_echo_n "checking if CC is disguised ccache... " >&6; }
28387
28388  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28389  if test "x$COMPILER_BASENAME" = "xccache"; then
28390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28391$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28392    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28393    # We want to control ccache invocation ourselves, so ignore this cc and try
28394    # searching again.
28395
28396    # Remove the path to the fake ccache cc from the PATH
28397    RETRY_COMPILER_SAVED_PATH="$PATH"
28398    COMPILER_DIRNAME=`$DIRNAME $CC`
28399    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28400
28401    # Try again looking for our compiler
28402    if test -n "$ac_tool_prefix"; then
28403  for ac_prog in $COMPILER_CHECK_LIST
28404  do
28405    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28406set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28408$as_echo_n "checking for $ac_word... " >&6; }
28409if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28410  $as_echo_n "(cached) " >&6
28411else
28412  if test -n "$PROPER_COMPILER_CC"; then
28413  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28414else
28415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28416for as_dir in $PATH
28417do
28418  IFS=$as_save_IFS
28419  test -z "$as_dir" && as_dir=.
28420    for ac_exec_ext in '' $ac_executable_extensions; do
28421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28422    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28424    break 2
28425  fi
28426done
28427  done
28428IFS=$as_save_IFS
28429
28430fi
28431fi
28432PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28433if test -n "$PROPER_COMPILER_CC"; then
28434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28435$as_echo "$PROPER_COMPILER_CC" >&6; }
28436else
28437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28438$as_echo "no" >&6; }
28439fi
28440
28441
28442    test -n "$PROPER_COMPILER_CC" && break
28443  done
28444fi
28445if test -z "$PROPER_COMPILER_CC"; then
28446  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28447  for ac_prog in $COMPILER_CHECK_LIST
28448do
28449  # Extract the first word of "$ac_prog", so it can be a program name with args.
28450set dummy $ac_prog; ac_word=$2
28451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28452$as_echo_n "checking for $ac_word... " >&6; }
28453if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28454  $as_echo_n "(cached) " >&6
28455else
28456  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28457  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28458else
28459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28460for as_dir in $PATH
28461do
28462  IFS=$as_save_IFS
28463  test -z "$as_dir" && as_dir=.
28464    for ac_exec_ext in '' $ac_executable_extensions; do
28465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28466    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28468    break 2
28469  fi
28470done
28471  done
28472IFS=$as_save_IFS
28473
28474fi
28475fi
28476ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28477if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28479$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28480else
28481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28482$as_echo "no" >&6; }
28483fi
28484
28485
28486  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28487done
28488
28489  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28490    PROPER_COMPILER_CC=""
28491  else
28492    case $cross_compiling:$ac_tool_warned in
28493yes:)
28494{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28495$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28496ac_tool_warned=yes ;;
28497esac
28498    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28499  fi
28500fi
28501
28502
28503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28504
28505  # First separate the path from the arguments. This will split at the first
28506  # space.
28507  complete="$PROPER_COMPILER_CC"
28508  path="${complete%% *}"
28509  tmp="$complete EOL"
28510  arguments="${tmp#* }"
28511
28512  # Input might be given as Windows format, start by converting to
28513  # unix format.
28514  new_path=`$CYGPATH -u "$path"`
28515
28516  # Now try to locate executable using which
28517  new_path=`$WHICH "$new_path" 2> /dev/null`
28518  # bat and cmd files are not always considered executable in cygwin causing which
28519  # to not find them
28520  if test "x$new_path" = x \
28521      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28522      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28523    new_path=`$CYGPATH -u "$path"`
28524  fi
28525  if test "x$new_path" = x; then
28526    # Oops. Which didn't find the executable.
28527    # The splitting of arguments from the executable at a space might have been incorrect,
28528    # since paths with space are more likely in Windows. Give it another try with the whole
28529    # argument.
28530    path="$complete"
28531    arguments="EOL"
28532    new_path=`$CYGPATH -u "$path"`
28533    new_path=`$WHICH "$new_path" 2> /dev/null`
28534    # bat and cmd files are not always considered executable in cygwin causing which
28535    # to not find them
28536    if test "x$new_path" = x \
28537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28539      new_path=`$CYGPATH -u "$path"`
28540    fi
28541    if test "x$new_path" = x; then
28542      # It's still not found. Now this is an unrecoverable error.
28543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28544$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28545      has_space=`$ECHO "$complete" | $GREP " "`
28546      if test "x$has_space" != x; then
28547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28549      fi
28550      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28551    fi
28552  fi
28553
28554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28557  # "foo.exe" is OK but "foo" is an error.
28558  #
28559  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28560  # It is also a way to make sure we got the proper file name for the real test later on.
28561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28562  if test "x$test_shortpath" = x; then
28563    # Short path failed, file does not exist as specified.
28564    # Try adding .exe or .cmd
28565    if test -f "${new_path}.exe"; then
28566      input_to_shortpath="${new_path}.exe"
28567    elif test -f "${new_path}.cmd"; then
28568      input_to_shortpath="${new_path}.cmd"
28569    else
28570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28571$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28574      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28575    fi
28576  else
28577    input_to_shortpath="$new_path"
28578  fi
28579
28580  # Call helper function which possibly converts this using DOS-style short mode.
28581  # If so, the updated path is stored in $new_path.
28582  new_path="$input_to_shortpath"
28583
28584  input_path="$input_to_shortpath"
28585  # Check if we need to convert this using DOS-style short mode. If the path
28586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28587  # take no chances and rewrite it.
28588  # Note: m4 eats our [], so we need to use [ and ] instead.
28589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28590  if test "x$has_forbidden_chars" != x; then
28591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28595      # Going to short mode and back again did indeed matter. Since short mode is
28596      # case insensitive, let's make it lowercase to improve readability.
28597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28598      # Now convert it back to Unix-stile (cygpath)
28599      input_path=`$CYGPATH -u "$shortmode_path"`
28600      new_path="$input_path"
28601    fi
28602  fi
28603
28604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28605  if test "x$test_cygdrive_prefix" = x; then
28606    # As a simple fix, exclude /usr/bin since it's not a real path.
28607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28609      # a path prefixed by /cygdrive for fixpath to work.
28610      new_path="$CYGWIN_ROOT_PATH$input_path"
28611    fi
28612  fi
28613
28614  # remove trailing .exe if any
28615  new_path="${new_path/%.exe/}"
28616
28617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28618
28619  # First separate the path from the arguments. This will split at the first
28620  # space.
28621  complete="$PROPER_COMPILER_CC"
28622  path="${complete%% *}"
28623  tmp="$complete EOL"
28624  arguments="${tmp#* }"
28625
28626  # Input might be given as Windows format, start by converting to
28627  # unix format.
28628  new_path="$path"
28629
28630  windows_path="$new_path"
28631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28632    unix_path=`$CYGPATH -u "$windows_path"`
28633    new_path="$unix_path"
28634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28636    new_path="$unix_path"
28637  fi
28638
28639
28640  # Now try to locate executable using which
28641  new_path=`$WHICH "$new_path" 2> /dev/null`
28642
28643  if test "x$new_path" = x; then
28644    # Oops. Which didn't find the executable.
28645    # The splitting of arguments from the executable at a space might have been incorrect,
28646    # since paths with space are more likely in Windows. Give it another try with the whole
28647    # argument.
28648    path="$complete"
28649    arguments="EOL"
28650    new_path="$path"
28651
28652  windows_path="$new_path"
28653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28654    unix_path=`$CYGPATH -u "$windows_path"`
28655    new_path="$unix_path"
28656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28658    new_path="$unix_path"
28659  fi
28660
28661
28662    new_path=`$WHICH "$new_path" 2> /dev/null`
28663
28664    if test "x$new_path" = x; then
28665      # It's still not found. Now this is an unrecoverable error.
28666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28667$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28668      has_space=`$ECHO "$complete" | $GREP " "`
28669      if test "x$has_space" != x; then
28670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28672      fi
28673      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28674    fi
28675  fi
28676
28677  # Now new_path has a complete unix path to the binary
28678  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28679    # Keep paths in /bin as-is, but remove trailing .exe if any
28680    new_path="${new_path/%.exe/}"
28681    # Do not save /bin paths to all_fixpath_prefixes!
28682  else
28683    # Not in mixed or Windows style, start by that.
28684    new_path=`cmd //c echo $new_path`
28685
28686  input_path="$new_path"
28687  # Check if we need to convert this using DOS-style short mode. If the path
28688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28689  # take no chances and rewrite it.
28690  # Note: m4 eats our [], so we need to use [ and ] instead.
28691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28692  if test "x$has_forbidden_chars" != x; then
28693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28695  fi
28696
28697    # Output is in $new_path
28698
28699  windows_path="$new_path"
28700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28701    unix_path=`$CYGPATH -u "$windows_path"`
28702    new_path="$unix_path"
28703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28705    new_path="$unix_path"
28706  fi
28707
28708    # remove trailing .exe if any
28709    new_path="${new_path/%.exe/}"
28710
28711    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28712    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28713  fi
28714
28715  else
28716    # We're on a posix platform. Hooray! :)
28717    # First separate the path from the arguments. This will split at the first
28718    # space.
28719    complete="$PROPER_COMPILER_CC"
28720    path="${complete%% *}"
28721    tmp="$complete EOL"
28722    arguments="${tmp#* }"
28723
28724    # Cannot rely on the command "which" here since it doesn't always work.
28725    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28726    if test -z "$is_absolute_path"; then
28727      # Path to executable is not absolute. Find it.
28728      IFS_save="$IFS"
28729      IFS=:
28730      for p in $PATH; do
28731        if test -f "$p/$path" && test -x "$p/$path"; then
28732          new_path="$p/$path"
28733          break
28734        fi
28735      done
28736      IFS="$IFS_save"
28737    else
28738      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
28739$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
28740      new_path="$path"
28741    fi
28742
28743    if test "x$new_path" = x; then
28744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28745$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28746      has_space=`$ECHO "$complete" | $GREP " "`
28747      if test "x$has_space" != x; then
28748        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28749$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28750      fi
28751      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28752    fi
28753  fi
28754
28755  # Now join together the path and the arguments once again
28756  if test "x$arguments" != xEOL; then
28757    new_complete="$new_path ${arguments% *}"
28758  else
28759    new_complete="$new_path"
28760  fi
28761
28762  if test "x$complete" != "x$new_complete"; then
28763    PROPER_COMPILER_CC="$new_complete"
28764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28765$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28766  fi
28767
28768    PATH="$RETRY_COMPILER_SAVED_PATH"
28769
28770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28771$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28772
28773  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28774    # Follow a chain of symbolic links. Use readlink
28775    # where it exists, else fall back to horribly
28776    # complicated shell code.
28777    if test "x$READLINK_TESTED" != yes; then
28778      # On MacOSX there is a readlink tool with a different
28779      # purpose than the GNU readlink tool. Check the found readlink.
28780      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28781      if test "x$ISGNU" = x; then
28782        # A readlink that we do not know how to use.
28783        # Are there other non-GNU readlinks out there?
28784        READLINK_TESTED=yes
28785        READLINK=
28786      fi
28787    fi
28788
28789    if test "x$READLINK" != x; then
28790      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28791    else
28792      # Save the current directory for restoring afterwards
28793      STARTDIR=$PWD
28794      COUNTER=0
28795      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28796      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28797      cd $sym_link_dir
28798      # Use -P flag to resolve symlinks in directories.
28799      cd `$THEPWDCMD -P`
28800      sym_link_dir=`$THEPWDCMD -P`
28801      # Resolve file symlinks
28802      while test $COUNTER -lt 20; do
28803        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28804        if test "x$ISLINK" == x; then
28805          # This is not a symbolic link! We are done!
28806          break
28807        fi
28808        # Again resolve directory symlinks since the target of the just found
28809        # link could be in a different directory
28810        cd `$DIRNAME $ISLINK`
28811        sym_link_dir=`$THEPWDCMD -P`
28812        sym_link_file=`$BASENAME $ISLINK`
28813        let COUNTER=COUNTER+1
28814      done
28815      cd $STARTDIR
28816      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28817    fi
28818  fi
28819
28820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28821$as_echo "$PROPER_COMPILER_CC" >&6; }
28822    CC="$PROPER_COMPILER_CC"
28823  else
28824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28825$as_echo "no, keeping CC" >&6; }
28826  fi
28827
28828
28829  COMPILER=$CC
28830  COMPILER_NAME=$COMPILER_NAME
28831
28832  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28833    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
28834    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
28835    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28836    if test $? -ne 0; then
28837      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
28838
28839      { $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
28840$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
28841      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
28842$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
28843      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28844    else
28845      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
28846      COMPILER_VENDOR="Sun Studio"
28847    fi
28848  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
28849      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
28850      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
28851      if test $? -ne 0; then
28852        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
28853      else
28854        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
28855        COMPILER_VENDOR='IBM'
28856      fi
28857  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
28858    # First line typically looks something like:
28859    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28860    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28861    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
28862    COMPILER_VENDOR="Microsoft CL.EXE"
28863    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
28864    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
28865      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
28866        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
28867      fi
28868    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
28869      if test "x$COMPILER_CPU_TEST" != "xx64"; then
28870        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
28871      fi
28872    fi
28873  else
28874    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
28875    # Check that this is likely to be GCC.
28876    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
28877    if test $? -ne 0; then
28878      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
28879$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
28880      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
28881$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
28882      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28883    fi
28884
28885    # First line typically looks something like:
28886    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
28887    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
28888    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
28889  fi
28890  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
28891  CC_VERSION="$COMPILER_VERSION"
28892  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
28893  CC_VENDOR="$COMPILER_VENDOR"
28894
28895  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
28896$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
28897
28898
28899  # Now that we have resolved CC ourself, let autoconf have its go at it
28900  ac_ext=c
28901ac_cpp='$CPP $CPPFLAGS'
28902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28904ac_compiler_gnu=$ac_cv_c_compiler_gnu
28905if test -n "$ac_tool_prefix"; then
28906  for ac_prog in $CC
28907  do
28908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28911$as_echo_n "checking for $ac_word... " >&6; }
28912if ${ac_cv_prog_CC+:} false; then :
28913  $as_echo_n "(cached) " >&6
28914else
28915  if test -n "$CC"; then
28916  ac_cv_prog_CC="$CC" # Let the user override the test.
28917else
28918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28919for as_dir in $PATH
28920do
28921  IFS=$as_save_IFS
28922  test -z "$as_dir" && as_dir=.
28923    for ac_exec_ext in '' $ac_executable_extensions; do
28924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28925    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28927    break 2
28928  fi
28929done
28930  done
28931IFS=$as_save_IFS
28932
28933fi
28934fi
28935CC=$ac_cv_prog_CC
28936if test -n "$CC"; then
28937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28938$as_echo "$CC" >&6; }
28939else
28940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28941$as_echo "no" >&6; }
28942fi
28943
28944
28945    test -n "$CC" && break
28946  done
28947fi
28948if test -z "$CC"; then
28949  ac_ct_CC=$CC
28950  for ac_prog in $CC
28951do
28952  # Extract the first word of "$ac_prog", so it can be a program name with args.
28953set dummy $ac_prog; ac_word=$2
28954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28955$as_echo_n "checking for $ac_word... " >&6; }
28956if ${ac_cv_prog_ac_ct_CC+:} false; then :
28957  $as_echo_n "(cached) " >&6
28958else
28959  if test -n "$ac_ct_CC"; then
28960  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28961else
28962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28963for as_dir in $PATH
28964do
28965  IFS=$as_save_IFS
28966  test -z "$as_dir" && as_dir=.
28967    for ac_exec_ext in '' $ac_executable_extensions; do
28968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28969    ac_cv_prog_ac_ct_CC="$ac_prog"
28970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28971    break 2
28972  fi
28973done
28974  done
28975IFS=$as_save_IFS
28976
28977fi
28978fi
28979ac_ct_CC=$ac_cv_prog_ac_ct_CC
28980if test -n "$ac_ct_CC"; then
28981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28982$as_echo "$ac_ct_CC" >&6; }
28983else
28984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28985$as_echo "no" >&6; }
28986fi
28987
28988
28989  test -n "$ac_ct_CC" && break
28990done
28991
28992  if test "x$ac_ct_CC" = x; then
28993    CC=""
28994  else
28995    case $cross_compiling:$ac_tool_warned in
28996yes:)
28997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28999ac_tool_warned=yes ;;
29000esac
29001    CC=$ac_ct_CC
29002  fi
29003fi
29004
29005
29006test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29008as_fn_error $? "no acceptable C compiler found in \$PATH
29009See \`config.log' for more details" "$LINENO" 5; }
29010
29011# Provide some information about the compiler.
29012$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29013set X $ac_compile
29014ac_compiler=$2
29015for ac_option in --version -v -V -qversion; do
29016  { { ac_try="$ac_compiler $ac_option >&5"
29017case "(($ac_try" in
29018  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29019  *) ac_try_echo=$ac_try;;
29020esac
29021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29022$as_echo "$ac_try_echo"; } >&5
29023  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29024  ac_status=$?
29025  if test -s conftest.err; then
29026    sed '10a\
29027... rest of stderr output deleted ...
29028         10q' conftest.err >conftest.er1
29029    cat conftest.er1 >&5
29030  fi
29031  rm -f conftest.er1 conftest.err
29032  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29033  test $ac_status = 0; }
29034done
29035
29036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29037/* end confdefs.h.  */
29038
29039int
29040main ()
29041{
29042
29043  ;
29044  return 0;
29045}
29046_ACEOF
29047ac_clean_files_save=$ac_clean_files
29048ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29049# Try to create an executable without -o first, disregard a.out.
29050# It will help us diagnose broken compilers, and finding out an intuition
29051# of exeext.
29052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29053$as_echo_n "checking whether the C compiler works... " >&6; }
29054ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29055
29056# The possible output files:
29057ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29058
29059ac_rmfiles=
29060for ac_file in $ac_files
29061do
29062  case $ac_file in
29063    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29064    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29065  esac
29066done
29067rm -f $ac_rmfiles
29068
29069if { { ac_try="$ac_link_default"
29070case "(($ac_try" in
29071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29072  *) ac_try_echo=$ac_try;;
29073esac
29074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29075$as_echo "$ac_try_echo"; } >&5
29076  (eval "$ac_link_default") 2>&5
29077  ac_status=$?
29078  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29079  test $ac_status = 0; }; then :
29080  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29081# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29082# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29083# so that the user can short-circuit this test for compilers unknown to
29084# Autoconf.
29085for ac_file in $ac_files ''
29086do
29087  test -f "$ac_file" || continue
29088  case $ac_file in
29089    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29090	;;
29091    [ab].out )
29092	# We found the default executable, but exeext='' is most
29093	# certainly right.
29094	break;;
29095    *.* )
29096	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29097	then :; else
29098	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29099	fi
29100	# We set ac_cv_exeext here because the later test for it is not
29101	# safe: cross compilers may not add the suffix if given an `-o'
29102	# argument, so we may need to know it at that point already.
29103	# Even if this section looks crufty: it has the advantage of
29104	# actually working.
29105	break;;
29106    * )
29107	break;;
29108  esac
29109done
29110test "$ac_cv_exeext" = no && ac_cv_exeext=
29111
29112else
29113  ac_file=''
29114fi
29115if test -z "$ac_file"; then :
29116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29117$as_echo "no" >&6; }
29118$as_echo "$as_me: failed program was:" >&5
29119sed 's/^/| /' conftest.$ac_ext >&5
29120
29121{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29123as_fn_error 77 "C compiler cannot create executables
29124See \`config.log' for more details" "$LINENO" 5; }
29125else
29126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29127$as_echo "yes" >&6; }
29128fi
29129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29130$as_echo_n "checking for C compiler default output file name... " >&6; }
29131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29132$as_echo "$ac_file" >&6; }
29133ac_exeext=$ac_cv_exeext
29134
29135rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29136ac_clean_files=$ac_clean_files_save
29137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29138$as_echo_n "checking for suffix of executables... " >&6; }
29139if { { ac_try="$ac_link"
29140case "(($ac_try" in
29141  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29142  *) ac_try_echo=$ac_try;;
29143esac
29144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29145$as_echo "$ac_try_echo"; } >&5
29146  (eval "$ac_link") 2>&5
29147  ac_status=$?
29148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29149  test $ac_status = 0; }; then :
29150  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29151# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29152# work properly (i.e., refer to `conftest.exe'), while it won't with
29153# `rm'.
29154for ac_file in conftest.exe conftest conftest.*; do
29155  test -f "$ac_file" || continue
29156  case $ac_file in
29157    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29158    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29159	  break;;
29160    * ) break;;
29161  esac
29162done
29163else
29164  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29166as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29167See \`config.log' for more details" "$LINENO" 5; }
29168fi
29169rm -f conftest conftest$ac_cv_exeext
29170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29171$as_echo "$ac_cv_exeext" >&6; }
29172
29173rm -f conftest.$ac_ext
29174EXEEXT=$ac_cv_exeext
29175ac_exeext=$EXEEXT
29176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29177/* end confdefs.h.  */
29178#include <stdio.h>
29179int
29180main ()
29181{
29182FILE *f = fopen ("conftest.out", "w");
29183 return ferror (f) || fclose (f) != 0;
29184
29185  ;
29186  return 0;
29187}
29188_ACEOF
29189ac_clean_files="$ac_clean_files conftest.out"
29190# Check that the compiler produces executables we can run.  If not, either
29191# the compiler is broken, or we cross compile.
29192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29193$as_echo_n "checking whether we are cross compiling... " >&6; }
29194if test "$cross_compiling" != yes; then
29195  { { ac_try="$ac_link"
29196case "(($ac_try" in
29197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29198  *) ac_try_echo=$ac_try;;
29199esac
29200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29201$as_echo "$ac_try_echo"; } >&5
29202  (eval "$ac_link") 2>&5
29203  ac_status=$?
29204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29205  test $ac_status = 0; }
29206  if { ac_try='./conftest$ac_cv_exeext'
29207  { { case "(($ac_try" in
29208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29209  *) ac_try_echo=$ac_try;;
29210esac
29211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29212$as_echo "$ac_try_echo"; } >&5
29213  (eval "$ac_try") 2>&5
29214  ac_status=$?
29215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29216  test $ac_status = 0; }; }; then
29217    cross_compiling=no
29218  else
29219    if test "$cross_compiling" = maybe; then
29220	cross_compiling=yes
29221    else
29222	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29224as_fn_error $? "cannot run C compiled programs.
29225If you meant to cross compile, use \`--host'.
29226See \`config.log' for more details" "$LINENO" 5; }
29227    fi
29228  fi
29229fi
29230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29231$as_echo "$cross_compiling" >&6; }
29232
29233rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29234ac_clean_files=$ac_clean_files_save
29235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29236$as_echo_n "checking for suffix of object files... " >&6; }
29237if ${ac_cv_objext+:} false; then :
29238  $as_echo_n "(cached) " >&6
29239else
29240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29241/* end confdefs.h.  */
29242
29243int
29244main ()
29245{
29246
29247  ;
29248  return 0;
29249}
29250_ACEOF
29251rm -f conftest.o conftest.obj
29252if { { ac_try="$ac_compile"
29253case "(($ac_try" in
29254  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29255  *) ac_try_echo=$ac_try;;
29256esac
29257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29258$as_echo "$ac_try_echo"; } >&5
29259  (eval "$ac_compile") 2>&5
29260  ac_status=$?
29261  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29262  test $ac_status = 0; }; then :
29263  for ac_file in conftest.o conftest.obj conftest.*; do
29264  test -f "$ac_file" || continue;
29265  case $ac_file in
29266    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29267    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29268       break;;
29269  esac
29270done
29271else
29272  $as_echo "$as_me: failed program was:" >&5
29273sed 's/^/| /' conftest.$ac_ext >&5
29274
29275{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29277as_fn_error $? "cannot compute suffix of object files: cannot compile
29278See \`config.log' for more details" "$LINENO" 5; }
29279fi
29280rm -f conftest.$ac_cv_objext conftest.$ac_ext
29281fi
29282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29283$as_echo "$ac_cv_objext" >&6; }
29284OBJEXT=$ac_cv_objext
29285ac_objext=$OBJEXT
29286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29287$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29288if ${ac_cv_c_compiler_gnu+:} false; then :
29289  $as_echo_n "(cached) " >&6
29290else
29291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29292/* end confdefs.h.  */
29293
29294int
29295main ()
29296{
29297#ifndef __GNUC__
29298       choke me
29299#endif
29300
29301  ;
29302  return 0;
29303}
29304_ACEOF
29305if ac_fn_c_try_compile "$LINENO"; then :
29306  ac_compiler_gnu=yes
29307else
29308  ac_compiler_gnu=no
29309fi
29310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29311ac_cv_c_compiler_gnu=$ac_compiler_gnu
29312
29313fi
29314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29315$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29316if test $ac_compiler_gnu = yes; then
29317  GCC=yes
29318else
29319  GCC=
29320fi
29321ac_test_CFLAGS=${CFLAGS+set}
29322ac_save_CFLAGS=$CFLAGS
29323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29324$as_echo_n "checking whether $CC accepts -g... " >&6; }
29325if ${ac_cv_prog_cc_g+:} false; then :
29326  $as_echo_n "(cached) " >&6
29327else
29328  ac_save_c_werror_flag=$ac_c_werror_flag
29329   ac_c_werror_flag=yes
29330   ac_cv_prog_cc_g=no
29331   CFLAGS="-g"
29332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29333/* end confdefs.h.  */
29334
29335int
29336main ()
29337{
29338
29339  ;
29340  return 0;
29341}
29342_ACEOF
29343if ac_fn_c_try_compile "$LINENO"; then :
29344  ac_cv_prog_cc_g=yes
29345else
29346  CFLAGS=""
29347      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29348/* end confdefs.h.  */
29349
29350int
29351main ()
29352{
29353
29354  ;
29355  return 0;
29356}
29357_ACEOF
29358if ac_fn_c_try_compile "$LINENO"; then :
29359
29360else
29361  ac_c_werror_flag=$ac_save_c_werror_flag
29362	 CFLAGS="-g"
29363	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29364/* end confdefs.h.  */
29365
29366int
29367main ()
29368{
29369
29370  ;
29371  return 0;
29372}
29373_ACEOF
29374if ac_fn_c_try_compile "$LINENO"; then :
29375  ac_cv_prog_cc_g=yes
29376fi
29377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29378fi
29379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29380fi
29381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29382   ac_c_werror_flag=$ac_save_c_werror_flag
29383fi
29384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29385$as_echo "$ac_cv_prog_cc_g" >&6; }
29386if test "$ac_test_CFLAGS" = set; then
29387  CFLAGS=$ac_save_CFLAGS
29388elif test $ac_cv_prog_cc_g = yes; then
29389  if test "$GCC" = yes; then
29390    CFLAGS="-g -O2"
29391  else
29392    CFLAGS="-g"
29393  fi
29394else
29395  if test "$GCC" = yes; then
29396    CFLAGS="-O2"
29397  else
29398    CFLAGS=
29399  fi
29400fi
29401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29402$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29403if ${ac_cv_prog_cc_c89+:} false; then :
29404  $as_echo_n "(cached) " >&6
29405else
29406  ac_cv_prog_cc_c89=no
29407ac_save_CC=$CC
29408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29409/* end confdefs.h.  */
29410#include <stdarg.h>
29411#include <stdio.h>
29412struct stat;
29413/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29414struct buf { int x; };
29415FILE * (*rcsopen) (struct buf *, struct stat *, int);
29416static char *e (p, i)
29417     char **p;
29418     int i;
29419{
29420  return p[i];
29421}
29422static char *f (char * (*g) (char **, int), char **p, ...)
29423{
29424  char *s;
29425  va_list v;
29426  va_start (v,p);
29427  s = g (p, va_arg (v,int));
29428  va_end (v);
29429  return s;
29430}
29431
29432/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29433   function prototypes and stuff, but not '\xHH' hex character constants.
29434   These don't provoke an error unfortunately, instead are silently treated
29435   as 'x'.  The following induces an error, until -std is added to get
29436   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29437   array size at least.  It's necessary to write '\x00'==0 to get something
29438   that's true only with -std.  */
29439int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29440
29441/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29442   inside strings and character constants.  */
29443#define FOO(x) 'x'
29444int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29445
29446int test (int i, double x);
29447struct s1 {int (*f) (int a);};
29448struct s2 {int (*f) (double a);};
29449int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29450int argc;
29451char **argv;
29452int
29453main ()
29454{
29455return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29456  ;
29457  return 0;
29458}
29459_ACEOF
29460for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29461	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29462do
29463  CC="$ac_save_CC $ac_arg"
29464  if ac_fn_c_try_compile "$LINENO"; then :
29465  ac_cv_prog_cc_c89=$ac_arg
29466fi
29467rm -f core conftest.err conftest.$ac_objext
29468  test "x$ac_cv_prog_cc_c89" != "xno" && break
29469done
29470rm -f conftest.$ac_ext
29471CC=$ac_save_CC
29472
29473fi
29474# AC_CACHE_VAL
29475case "x$ac_cv_prog_cc_c89" in
29476  x)
29477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29478$as_echo "none needed" >&6; } ;;
29479  xno)
29480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29481$as_echo "unsupported" >&6; } ;;
29482  *)
29483    CC="$CC $ac_cv_prog_cc_c89"
29484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29485$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29486esac
29487if test "x$ac_cv_prog_cc_c89" != xno; then :
29488
29489fi
29490
29491ac_ext=cpp
29492ac_cpp='$CXXCPP $CPPFLAGS'
29493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29496
29497
29498  # Option used to tell the compiler whether to create 32- or 64-bit executables
29499  # Notice that CC contains the full compiler path at this point.
29500  case $CC in
29501    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
29502    *)      COMPILER_TARGET_BITS_FLAG="-m";;
29503  esac
29504
29505
29506  ### Locate C++ compiler (CXX)
29507
29508  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29509    COMPILER_CHECK_LIST="cl"
29510  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29511    COMPILER_CHECK_LIST="CC g++"
29512  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29513    # Do not probe for CC on AIX .
29514    COMPILER_CHECK_LIST="xlC_r"
29515  else
29516    COMPILER_CHECK_LIST="g++ CC"
29517  fi
29518
29519
29520  COMPILER_NAME=C++
29521  SEARCH_LIST="$COMPILER_CHECK_LIST"
29522
29523  if test "x$CXX" != x; then
29524    # User has supplied compiler name already, always let that override.
29525    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29526$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29527    if test "x`basename $CXX`" = "x$CXX"; then
29528      # A command without a complete path is provided, search $PATH.
29529
29530      for ac_prog in $CXX
29531do
29532  # Extract the first word of "$ac_prog", so it can be a program name with args.
29533set dummy $ac_prog; ac_word=$2
29534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29535$as_echo_n "checking for $ac_word... " >&6; }
29536if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29537  $as_echo_n "(cached) " >&6
29538else
29539  case $POTENTIAL_CXX in
29540  [\\/]* | ?:[\\/]*)
29541  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29542  ;;
29543  *)
29544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29545for as_dir in $PATH
29546do
29547  IFS=$as_save_IFS
29548  test -z "$as_dir" && as_dir=.
29549    for ac_exec_ext in '' $ac_executable_extensions; do
29550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29551    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29553    break 2
29554  fi
29555done
29556  done
29557IFS=$as_save_IFS
29558
29559  ;;
29560esac
29561fi
29562POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29563if test -n "$POTENTIAL_CXX"; then
29564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29565$as_echo "$POTENTIAL_CXX" >&6; }
29566else
29567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29568$as_echo "no" >&6; }
29569fi
29570
29571
29572  test -n "$POTENTIAL_CXX" && break
29573done
29574
29575      if test "x$POTENTIAL_CXX" != x; then
29576        CXX=$POTENTIAL_CXX
29577      else
29578        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29579      fi
29580    else
29581      # Otherwise it might already be a complete path
29582      if test ! -x "$CXX"; then
29583        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29584      fi
29585    fi
29586  else
29587    # No user supplied value. Locate compiler ourselves
29588    CXX=
29589    # If TOOLS_DIR is set, check for all compiler names in there first
29590    # before checking the rest of the PATH.
29591    if test -n "$TOOLS_DIR"; then
29592      PATH_save="$PATH"
29593      PATH="$TOOLS_DIR"
29594      for ac_prog in $SEARCH_LIST
29595do
29596  # Extract the first word of "$ac_prog", so it can be a program name with args.
29597set dummy $ac_prog; ac_word=$2
29598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29599$as_echo_n "checking for $ac_word... " >&6; }
29600if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29601  $as_echo_n "(cached) " >&6
29602else
29603  case $TOOLS_DIR_CXX in
29604  [\\/]* | ?:[\\/]*)
29605  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29606  ;;
29607  *)
29608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29609for as_dir in $PATH
29610do
29611  IFS=$as_save_IFS
29612  test -z "$as_dir" && as_dir=.
29613    for ac_exec_ext in '' $ac_executable_extensions; do
29614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29615    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29617    break 2
29618  fi
29619done
29620  done
29621IFS=$as_save_IFS
29622
29623  ;;
29624esac
29625fi
29626TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29627if test -n "$TOOLS_DIR_CXX"; then
29628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29629$as_echo "$TOOLS_DIR_CXX" >&6; }
29630else
29631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29632$as_echo "no" >&6; }
29633fi
29634
29635
29636  test -n "$TOOLS_DIR_CXX" && break
29637done
29638
29639      CXX=$TOOLS_DIR_CXX
29640      PATH="$PATH_save"
29641    fi
29642
29643    # AC_PATH_PROGS can't be run multiple times with the same variable,
29644    # so create a new name for this run.
29645    if test "x$CXX" = x; then
29646      for ac_prog in $SEARCH_LIST
29647do
29648  # Extract the first word of "$ac_prog", so it can be a program name with args.
29649set dummy $ac_prog; ac_word=$2
29650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29651$as_echo_n "checking for $ac_word... " >&6; }
29652if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29653  $as_echo_n "(cached) " >&6
29654else
29655  case $POTENTIAL_CXX in
29656  [\\/]* | ?:[\\/]*)
29657  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29658  ;;
29659  *)
29660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29661for as_dir in $PATH
29662do
29663  IFS=$as_save_IFS
29664  test -z "$as_dir" && as_dir=.
29665    for ac_exec_ext in '' $ac_executable_extensions; do
29666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29667    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29669    break 2
29670  fi
29671done
29672  done
29673IFS=$as_save_IFS
29674
29675  ;;
29676esac
29677fi
29678POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29679if test -n "$POTENTIAL_CXX"; then
29680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29681$as_echo "$POTENTIAL_CXX" >&6; }
29682else
29683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29684$as_echo "no" >&6; }
29685fi
29686
29687
29688  test -n "$POTENTIAL_CXX" && break
29689done
29690
29691      CXX=$POTENTIAL_CXX
29692    fi
29693
29694    if test "x$CXX" = x; then
29695
29696  # Print a helpful message on how to acquire the necessary build dependency.
29697  # devkit is the help tag: freetype, cups, pulse, alsa etc
29698  MISSING_DEPENDENCY=devkit
29699
29700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29701    cygwin_help $MISSING_DEPENDENCY
29702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29703    msys_help $MISSING_DEPENDENCY
29704  else
29705    PKGHANDLER_COMMAND=
29706
29707    case $PKGHANDLER in
29708      apt-get)
29709        apt_help     $MISSING_DEPENDENCY ;;
29710      yum)
29711        yum_help     $MISSING_DEPENDENCY ;;
29712      port)
29713        port_help    $MISSING_DEPENDENCY ;;
29714      pkgutil)
29715        pkgutil_help $MISSING_DEPENDENCY ;;
29716      pkgadd)
29717        pkgadd_help  $MISSING_DEPENDENCY ;;
29718    esac
29719
29720    if test "x$PKGHANDLER_COMMAND" != x; then
29721      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29722    fi
29723  fi
29724
29725      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29726    fi
29727  fi
29728
29729  # Now we have a compiler binary in CXX. Make sure it's okay.
29730
29731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29732
29733  # First separate the path from the arguments. This will split at the first
29734  # space.
29735  complete="$CXX"
29736  path="${complete%% *}"
29737  tmp="$complete EOL"
29738  arguments="${tmp#* }"
29739
29740  # Input might be given as Windows format, start by converting to
29741  # unix format.
29742  new_path=`$CYGPATH -u "$path"`
29743
29744  # Now try to locate executable using which
29745  new_path=`$WHICH "$new_path" 2> /dev/null`
29746  # bat and cmd files are not always considered executable in cygwin causing which
29747  # to not find them
29748  if test "x$new_path" = x \
29749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29751    new_path=`$CYGPATH -u "$path"`
29752  fi
29753  if test "x$new_path" = x; then
29754    # Oops. Which didn't find the executable.
29755    # The splitting of arguments from the executable at a space might have been incorrect,
29756    # since paths with space are more likely in Windows. Give it another try with the whole
29757    # argument.
29758    path="$complete"
29759    arguments="EOL"
29760    new_path=`$CYGPATH -u "$path"`
29761    new_path=`$WHICH "$new_path" 2> /dev/null`
29762    # bat and cmd files are not always considered executable in cygwin causing which
29763    # to not find them
29764    if test "x$new_path" = x \
29765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29767      new_path=`$CYGPATH -u "$path"`
29768    fi
29769    if test "x$new_path" = x; then
29770      # It's still not found. Now this is an unrecoverable error.
29771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29772$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29773      has_space=`$ECHO "$complete" | $GREP " "`
29774      if test "x$has_space" != x; then
29775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29777      fi
29778      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29779    fi
29780  fi
29781
29782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29785  # "foo.exe" is OK but "foo" is an error.
29786  #
29787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29788  # It is also a way to make sure we got the proper file name for the real test later on.
29789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29790  if test "x$test_shortpath" = x; then
29791    # Short path failed, file does not exist as specified.
29792    # Try adding .exe or .cmd
29793    if test -f "${new_path}.exe"; then
29794      input_to_shortpath="${new_path}.exe"
29795    elif test -f "${new_path}.cmd"; then
29796      input_to_shortpath="${new_path}.cmd"
29797    else
29798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29799$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29802      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29803    fi
29804  else
29805    input_to_shortpath="$new_path"
29806  fi
29807
29808  # Call helper function which possibly converts this using DOS-style short mode.
29809  # If so, the updated path is stored in $new_path.
29810  new_path="$input_to_shortpath"
29811
29812  input_path="$input_to_shortpath"
29813  # Check if we need to convert this using DOS-style short mode. If the path
29814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29815  # take no chances and rewrite it.
29816  # Note: m4 eats our [], so we need to use [ and ] instead.
29817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29818  if test "x$has_forbidden_chars" != x; then
29819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29823      # Going to short mode and back again did indeed matter. Since short mode is
29824      # case insensitive, let's make it lowercase to improve readability.
29825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29826      # Now convert it back to Unix-stile (cygpath)
29827      input_path=`$CYGPATH -u "$shortmode_path"`
29828      new_path="$input_path"
29829    fi
29830  fi
29831
29832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29833  if test "x$test_cygdrive_prefix" = x; then
29834    # As a simple fix, exclude /usr/bin since it's not a real path.
29835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29837      # a path prefixed by /cygdrive for fixpath to work.
29838      new_path="$CYGWIN_ROOT_PATH$input_path"
29839    fi
29840  fi
29841
29842  # remove trailing .exe if any
29843  new_path="${new_path/%.exe/}"
29844
29845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29846
29847  # First separate the path from the arguments. This will split at the first
29848  # space.
29849  complete="$CXX"
29850  path="${complete%% *}"
29851  tmp="$complete EOL"
29852  arguments="${tmp#* }"
29853
29854  # Input might be given as Windows format, start by converting to
29855  # unix format.
29856  new_path="$path"
29857
29858  windows_path="$new_path"
29859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29860    unix_path=`$CYGPATH -u "$windows_path"`
29861    new_path="$unix_path"
29862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29864    new_path="$unix_path"
29865  fi
29866
29867
29868  # Now try to locate executable using which
29869  new_path=`$WHICH "$new_path" 2> /dev/null`
29870
29871  if test "x$new_path" = x; then
29872    # Oops. Which didn't find the executable.
29873    # The splitting of arguments from the executable at a space might have been incorrect,
29874    # since paths with space are more likely in Windows. Give it another try with the whole
29875    # argument.
29876    path="$complete"
29877    arguments="EOL"
29878    new_path="$path"
29879
29880  windows_path="$new_path"
29881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29882    unix_path=`$CYGPATH -u "$windows_path"`
29883    new_path="$unix_path"
29884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29886    new_path="$unix_path"
29887  fi
29888
29889
29890    new_path=`$WHICH "$new_path" 2> /dev/null`
29891
29892    if test "x$new_path" = x; then
29893      # It's still not found. Now this is an unrecoverable error.
29894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29895$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29896      has_space=`$ECHO "$complete" | $GREP " "`
29897      if test "x$has_space" != x; then
29898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29900      fi
29901      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29902    fi
29903  fi
29904
29905  # Now new_path has a complete unix path to the binary
29906  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29907    # Keep paths in /bin as-is, but remove trailing .exe if any
29908    new_path="${new_path/%.exe/}"
29909    # Do not save /bin paths to all_fixpath_prefixes!
29910  else
29911    # Not in mixed or Windows style, start by that.
29912    new_path=`cmd //c echo $new_path`
29913
29914  input_path="$new_path"
29915  # Check if we need to convert this using DOS-style short mode. If the path
29916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29917  # take no chances and rewrite it.
29918  # Note: m4 eats our [], so we need to use [ and ] instead.
29919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29920  if test "x$has_forbidden_chars" != x; then
29921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29923  fi
29924
29925    # Output is in $new_path
29926
29927  windows_path="$new_path"
29928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29929    unix_path=`$CYGPATH -u "$windows_path"`
29930    new_path="$unix_path"
29931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29933    new_path="$unix_path"
29934  fi
29935
29936    # remove trailing .exe if any
29937    new_path="${new_path/%.exe/}"
29938
29939    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29940    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29941  fi
29942
29943  else
29944    # We're on a posix platform. Hooray! :)
29945    # First separate the path from the arguments. This will split at the first
29946    # space.
29947    complete="$CXX"
29948    path="${complete%% *}"
29949    tmp="$complete EOL"
29950    arguments="${tmp#* }"
29951
29952    # Cannot rely on the command "which" here since it doesn't always work.
29953    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29954    if test -z "$is_absolute_path"; then
29955      # Path to executable is not absolute. Find it.
29956      IFS_save="$IFS"
29957      IFS=:
29958      for p in $PATH; do
29959        if test -f "$p/$path" && test -x "$p/$path"; then
29960          new_path="$p/$path"
29961          break
29962        fi
29963      done
29964      IFS="$IFS_save"
29965    else
29966      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
29967$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
29968      new_path="$path"
29969    fi
29970
29971    if test "x$new_path" = x; then
29972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29973$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29974      has_space=`$ECHO "$complete" | $GREP " "`
29975      if test "x$has_space" != x; then
29976        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29978      fi
29979      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29980    fi
29981  fi
29982
29983  # Now join together the path and the arguments once again
29984  if test "x$arguments" != xEOL; then
29985    new_complete="$new_path ${arguments% *}"
29986  else
29987    new_complete="$new_path"
29988  fi
29989
29990  if test "x$complete" != "x$new_complete"; then
29991    CXX="$new_complete"
29992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29993$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29994  fi
29995
29996  TEST_COMPILER="$CXX"
29997  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29998  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29999  if test "x$OPENJDK_BUILD_OS" != xaix; then
30000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30001$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30002
30003  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30004    # Follow a chain of symbolic links. Use readlink
30005    # where it exists, else fall back to horribly
30006    # complicated shell code.
30007    if test "x$READLINK_TESTED" != yes; then
30008      # On MacOSX there is a readlink tool with a different
30009      # purpose than the GNU readlink tool. Check the found readlink.
30010      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30011      if test "x$ISGNU" = x; then
30012        # A readlink that we do not know how to use.
30013        # Are there other non-GNU readlinks out there?
30014        READLINK_TESTED=yes
30015        READLINK=
30016      fi
30017    fi
30018
30019    if test "x$READLINK" != x; then
30020      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30021    else
30022      # Save the current directory for restoring afterwards
30023      STARTDIR=$PWD
30024      COUNTER=0
30025      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30026      sym_link_file=`$BASENAME $TEST_COMPILER`
30027      cd $sym_link_dir
30028      # Use -P flag to resolve symlinks in directories.
30029      cd `$THEPWDCMD -P`
30030      sym_link_dir=`$THEPWDCMD -P`
30031      # Resolve file symlinks
30032      while test $COUNTER -lt 20; do
30033        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30034        if test "x$ISLINK" == x; then
30035          # This is not a symbolic link! We are done!
30036          break
30037        fi
30038        # Again resolve directory symlinks since the target of the just found
30039        # link could be in a different directory
30040        cd `$DIRNAME $ISLINK`
30041        sym_link_dir=`$THEPWDCMD -P`
30042        sym_link_file=`$BASENAME $ISLINK`
30043        let COUNTER=COUNTER+1
30044      done
30045      cd $STARTDIR
30046      TEST_COMPILER=$sym_link_dir/$sym_link_file
30047    fi
30048  fi
30049
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30051$as_echo "$TEST_COMPILER" >&6; }
30052  fi
30053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30054$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30055
30056  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30057  if test "x$COMPILER_BASENAME" = "xccache"; then
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30059$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30060    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30061    # We want to control ccache invocation ourselves, so ignore this cc and try
30062    # searching again.
30063
30064    # Remove the path to the fake ccache cc from the PATH
30065    RETRY_COMPILER_SAVED_PATH="$PATH"
30066    COMPILER_DIRNAME=`$DIRNAME $CXX`
30067    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30068
30069    # Try again looking for our compiler
30070    if test -n "$ac_tool_prefix"; then
30071  for ac_prog in $COMPILER_CHECK_LIST
30072  do
30073    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30074set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30076$as_echo_n "checking for $ac_word... " >&6; }
30077if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30078  $as_echo_n "(cached) " >&6
30079else
30080  if test -n "$PROPER_COMPILER_CXX"; then
30081  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30082else
30083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30084for as_dir in $PATH
30085do
30086  IFS=$as_save_IFS
30087  test -z "$as_dir" && as_dir=.
30088    for ac_exec_ext in '' $ac_executable_extensions; do
30089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30090    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30092    break 2
30093  fi
30094done
30095  done
30096IFS=$as_save_IFS
30097
30098fi
30099fi
30100PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30101if test -n "$PROPER_COMPILER_CXX"; then
30102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30103$as_echo "$PROPER_COMPILER_CXX" >&6; }
30104else
30105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30106$as_echo "no" >&6; }
30107fi
30108
30109
30110    test -n "$PROPER_COMPILER_CXX" && break
30111  done
30112fi
30113if test -z "$PROPER_COMPILER_CXX"; then
30114  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30115  for ac_prog in $COMPILER_CHECK_LIST
30116do
30117  # Extract the first word of "$ac_prog", so it can be a program name with args.
30118set dummy $ac_prog; ac_word=$2
30119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30120$as_echo_n "checking for $ac_word... " >&6; }
30121if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30122  $as_echo_n "(cached) " >&6
30123else
30124  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30125  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30126else
30127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30128for as_dir in $PATH
30129do
30130  IFS=$as_save_IFS
30131  test -z "$as_dir" && as_dir=.
30132    for ac_exec_ext in '' $ac_executable_extensions; do
30133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30134    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30136    break 2
30137  fi
30138done
30139  done
30140IFS=$as_save_IFS
30141
30142fi
30143fi
30144ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30145if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30147$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30148else
30149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30150$as_echo "no" >&6; }
30151fi
30152
30153
30154  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30155done
30156
30157  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30158    PROPER_COMPILER_CXX=""
30159  else
30160    case $cross_compiling:$ac_tool_warned in
30161yes:)
30162{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30163$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30164ac_tool_warned=yes ;;
30165esac
30166    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30167  fi
30168fi
30169
30170
30171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30172
30173  # First separate the path from the arguments. This will split at the first
30174  # space.
30175  complete="$PROPER_COMPILER_CXX"
30176  path="${complete%% *}"
30177  tmp="$complete EOL"
30178  arguments="${tmp#* }"
30179
30180  # Input might be given as Windows format, start by converting to
30181  # unix format.
30182  new_path=`$CYGPATH -u "$path"`
30183
30184  # Now try to locate executable using which
30185  new_path=`$WHICH "$new_path" 2> /dev/null`
30186  # bat and cmd files are not always considered executable in cygwin causing which
30187  # to not find them
30188  if test "x$new_path" = x \
30189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30191    new_path=`$CYGPATH -u "$path"`
30192  fi
30193  if test "x$new_path" = x; then
30194    # Oops. Which didn't find the executable.
30195    # The splitting of arguments from the executable at a space might have been incorrect,
30196    # since paths with space are more likely in Windows. Give it another try with the whole
30197    # argument.
30198    path="$complete"
30199    arguments="EOL"
30200    new_path=`$CYGPATH -u "$path"`
30201    new_path=`$WHICH "$new_path" 2> /dev/null`
30202    # bat and cmd files are not always considered executable in cygwin causing which
30203    # to not find them
30204    if test "x$new_path" = x \
30205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30207      new_path=`$CYGPATH -u "$path"`
30208    fi
30209    if test "x$new_path" = x; then
30210      # It's still not found. Now this is an unrecoverable error.
30211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30212$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30213      has_space=`$ECHO "$complete" | $GREP " "`
30214      if test "x$has_space" != x; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30217      fi
30218      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30219    fi
30220  fi
30221
30222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30225  # "foo.exe" is OK but "foo" is an error.
30226  #
30227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30228  # It is also a way to make sure we got the proper file name for the real test later on.
30229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30230  if test "x$test_shortpath" = x; then
30231    # Short path failed, file does not exist as specified.
30232    # Try adding .exe or .cmd
30233    if test -f "${new_path}.exe"; then
30234      input_to_shortpath="${new_path}.exe"
30235    elif test -f "${new_path}.cmd"; then
30236      input_to_shortpath="${new_path}.cmd"
30237    else
30238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30239$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30242      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30243    fi
30244  else
30245    input_to_shortpath="$new_path"
30246  fi
30247
30248  # Call helper function which possibly converts this using DOS-style short mode.
30249  # If so, the updated path is stored in $new_path.
30250  new_path="$input_to_shortpath"
30251
30252  input_path="$input_to_shortpath"
30253  # Check if we need to convert this using DOS-style short mode. If the path
30254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30255  # take no chances and rewrite it.
30256  # Note: m4 eats our [], so we need to use [ and ] instead.
30257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30258  if test "x$has_forbidden_chars" != x; then
30259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30263      # Going to short mode and back again did indeed matter. Since short mode is
30264      # case insensitive, let's make it lowercase to improve readability.
30265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30266      # Now convert it back to Unix-stile (cygpath)
30267      input_path=`$CYGPATH -u "$shortmode_path"`
30268      new_path="$input_path"
30269    fi
30270  fi
30271
30272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30273  if test "x$test_cygdrive_prefix" = x; then
30274    # As a simple fix, exclude /usr/bin since it's not a real path.
30275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30277      # a path prefixed by /cygdrive for fixpath to work.
30278      new_path="$CYGWIN_ROOT_PATH$input_path"
30279    fi
30280  fi
30281
30282  # remove trailing .exe if any
30283  new_path="${new_path/%.exe/}"
30284
30285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30286
30287  # First separate the path from the arguments. This will split at the first
30288  # space.
30289  complete="$PROPER_COMPILER_CXX"
30290  path="${complete%% *}"
30291  tmp="$complete EOL"
30292  arguments="${tmp#* }"
30293
30294  # Input might be given as Windows format, start by converting to
30295  # unix format.
30296  new_path="$path"
30297
30298  windows_path="$new_path"
30299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30300    unix_path=`$CYGPATH -u "$windows_path"`
30301    new_path="$unix_path"
30302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30304    new_path="$unix_path"
30305  fi
30306
30307
30308  # Now try to locate executable using which
30309  new_path=`$WHICH "$new_path" 2> /dev/null`
30310
30311  if test "x$new_path" = x; then
30312    # Oops. Which didn't find the executable.
30313    # The splitting of arguments from the executable at a space might have been incorrect,
30314    # since paths with space are more likely in Windows. Give it another try with the whole
30315    # argument.
30316    path="$complete"
30317    arguments="EOL"
30318    new_path="$path"
30319
30320  windows_path="$new_path"
30321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30322    unix_path=`$CYGPATH -u "$windows_path"`
30323    new_path="$unix_path"
30324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30326    new_path="$unix_path"
30327  fi
30328
30329
30330    new_path=`$WHICH "$new_path" 2> /dev/null`
30331
30332    if test "x$new_path" = x; then
30333      # It's still not found. Now this is an unrecoverable error.
30334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30335$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30336      has_space=`$ECHO "$complete" | $GREP " "`
30337      if test "x$has_space" != x; then
30338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30340      fi
30341      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30342    fi
30343  fi
30344
30345  # Now new_path has a complete unix path to the binary
30346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30347    # Keep paths in /bin as-is, but remove trailing .exe if any
30348    new_path="${new_path/%.exe/}"
30349    # Do not save /bin paths to all_fixpath_prefixes!
30350  else
30351    # Not in mixed or Windows style, start by that.
30352    new_path=`cmd //c echo $new_path`
30353
30354  input_path="$new_path"
30355  # Check if we need to convert this using DOS-style short mode. If the path
30356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30357  # take no chances and rewrite it.
30358  # Note: m4 eats our [], so we need to use [ and ] instead.
30359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30360  if test "x$has_forbidden_chars" != x; then
30361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30363  fi
30364
30365    # Output is in $new_path
30366
30367  windows_path="$new_path"
30368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30369    unix_path=`$CYGPATH -u "$windows_path"`
30370    new_path="$unix_path"
30371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30373    new_path="$unix_path"
30374  fi
30375
30376    # remove trailing .exe if any
30377    new_path="${new_path/%.exe/}"
30378
30379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30381  fi
30382
30383  else
30384    # We're on a posix platform. Hooray! :)
30385    # First separate the path from the arguments. This will split at the first
30386    # space.
30387    complete="$PROPER_COMPILER_CXX"
30388    path="${complete%% *}"
30389    tmp="$complete EOL"
30390    arguments="${tmp#* }"
30391
30392    # Cannot rely on the command "which" here since it doesn't always work.
30393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30394    if test -z "$is_absolute_path"; then
30395      # Path to executable is not absolute. Find it.
30396      IFS_save="$IFS"
30397      IFS=:
30398      for p in $PATH; do
30399        if test -f "$p/$path" && test -x "$p/$path"; then
30400          new_path="$p/$path"
30401          break
30402        fi
30403      done
30404      IFS="$IFS_save"
30405    else
30406      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
30407$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
30408      new_path="$path"
30409    fi
30410
30411    if test "x$new_path" = x; then
30412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30413$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30414      has_space=`$ECHO "$complete" | $GREP " "`
30415      if test "x$has_space" != x; then
30416        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30418      fi
30419      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30420    fi
30421  fi
30422
30423  # Now join together the path and the arguments once again
30424  if test "x$arguments" != xEOL; then
30425    new_complete="$new_path ${arguments% *}"
30426  else
30427    new_complete="$new_path"
30428  fi
30429
30430  if test "x$complete" != "x$new_complete"; then
30431    PROPER_COMPILER_CXX="$new_complete"
30432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30433$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30434  fi
30435
30436    PATH="$RETRY_COMPILER_SAVED_PATH"
30437
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30439$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30440
30441  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30442    # Follow a chain of symbolic links. Use readlink
30443    # where it exists, else fall back to horribly
30444    # complicated shell code.
30445    if test "x$READLINK_TESTED" != yes; then
30446      # On MacOSX there is a readlink tool with a different
30447      # purpose than the GNU readlink tool. Check the found readlink.
30448      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30449      if test "x$ISGNU" = x; then
30450        # A readlink that we do not know how to use.
30451        # Are there other non-GNU readlinks out there?
30452        READLINK_TESTED=yes
30453        READLINK=
30454      fi
30455    fi
30456
30457    if test "x$READLINK" != x; then
30458      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30459    else
30460      # Save the current directory for restoring afterwards
30461      STARTDIR=$PWD
30462      COUNTER=0
30463      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30464      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30465      cd $sym_link_dir
30466      # Use -P flag to resolve symlinks in directories.
30467      cd `$THEPWDCMD -P`
30468      sym_link_dir=`$THEPWDCMD -P`
30469      # Resolve file symlinks
30470      while test $COUNTER -lt 20; do
30471        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30472        if test "x$ISLINK" == x; then
30473          # This is not a symbolic link! We are done!
30474          break
30475        fi
30476        # Again resolve directory symlinks since the target of the just found
30477        # link could be in a different directory
30478        cd `$DIRNAME $ISLINK`
30479        sym_link_dir=`$THEPWDCMD -P`
30480        sym_link_file=`$BASENAME $ISLINK`
30481        let COUNTER=COUNTER+1
30482      done
30483      cd $STARTDIR
30484      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30485    fi
30486  fi
30487
30488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30489$as_echo "$PROPER_COMPILER_CXX" >&6; }
30490    CXX="$PROPER_COMPILER_CXX"
30491  else
30492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30493$as_echo "no, keeping CXX" >&6; }
30494  fi
30495
30496
30497  COMPILER=$CXX
30498  COMPILER_NAME=$COMPILER_NAME
30499
30500  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30501    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30502    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30503    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30504    if test $? -ne 0; then
30505      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30506
30507      { $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
30508$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30509      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30510$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30511      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30512    else
30513      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30514      COMPILER_VENDOR="Sun Studio"
30515    fi
30516  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30517      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30518      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30519      if test $? -ne 0; then
30520        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30521      else
30522        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30523        COMPILER_VENDOR='IBM'
30524      fi
30525  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30526    # First line typically looks something like:
30527    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30528    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30529    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30530    COMPILER_VENDOR="Microsoft CL.EXE"
30531    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30532    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30533      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30534        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30535      fi
30536    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30537      if test "x$COMPILER_CPU_TEST" != "xx64"; then
30538        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30539      fi
30540    fi
30541  else
30542    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30543    # Check that this is likely to be GCC.
30544    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30545    if test $? -ne 0; then
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30547$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30548      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30549$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30550      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30551    fi
30552
30553    # First line typically looks something like:
30554    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30555    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30556    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30557  fi
30558  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30559  CXX_VERSION="$COMPILER_VERSION"
30560  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30561  CXX_VENDOR="$COMPILER_VENDOR"
30562
30563  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30564$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30565
30566
30567  # Now that we have resolved CXX ourself, let autoconf have its go at it
30568  ac_ext=cpp
30569ac_cpp='$CXXCPP $CPPFLAGS'
30570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30573if test -z "$CXX"; then
30574  if test -n "$CCC"; then
30575    CXX=$CCC
30576  else
30577    if test -n "$ac_tool_prefix"; then
30578  for ac_prog in $CXX
30579  do
30580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30583$as_echo_n "checking for $ac_word... " >&6; }
30584if ${ac_cv_prog_CXX+:} false; then :
30585  $as_echo_n "(cached) " >&6
30586else
30587  if test -n "$CXX"; then
30588  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30589else
30590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30591for as_dir in $PATH
30592do
30593  IFS=$as_save_IFS
30594  test -z "$as_dir" && as_dir=.
30595    for ac_exec_ext in '' $ac_executable_extensions; do
30596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30597    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30599    break 2
30600  fi
30601done
30602  done
30603IFS=$as_save_IFS
30604
30605fi
30606fi
30607CXX=$ac_cv_prog_CXX
30608if test -n "$CXX"; then
30609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30610$as_echo "$CXX" >&6; }
30611else
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30613$as_echo "no" >&6; }
30614fi
30615
30616
30617    test -n "$CXX" && break
30618  done
30619fi
30620if test -z "$CXX"; then
30621  ac_ct_CXX=$CXX
30622  for ac_prog in $CXX
30623do
30624  # Extract the first word of "$ac_prog", so it can be a program name with args.
30625set dummy $ac_prog; ac_word=$2
30626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30627$as_echo_n "checking for $ac_word... " >&6; }
30628if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30629  $as_echo_n "(cached) " >&6
30630else
30631  if test -n "$ac_ct_CXX"; then
30632  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30633else
30634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30635for as_dir in $PATH
30636do
30637  IFS=$as_save_IFS
30638  test -z "$as_dir" && as_dir=.
30639    for ac_exec_ext in '' $ac_executable_extensions; do
30640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30641    ac_cv_prog_ac_ct_CXX="$ac_prog"
30642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30643    break 2
30644  fi
30645done
30646  done
30647IFS=$as_save_IFS
30648
30649fi
30650fi
30651ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30652if test -n "$ac_ct_CXX"; then
30653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30654$as_echo "$ac_ct_CXX" >&6; }
30655else
30656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30657$as_echo "no" >&6; }
30658fi
30659
30660
30661  test -n "$ac_ct_CXX" && break
30662done
30663
30664  if test "x$ac_ct_CXX" = x; then
30665    CXX="g++"
30666  else
30667    case $cross_compiling:$ac_tool_warned in
30668yes:)
30669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30671ac_tool_warned=yes ;;
30672esac
30673    CXX=$ac_ct_CXX
30674  fi
30675fi
30676
30677  fi
30678fi
30679# Provide some information about the compiler.
30680$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30681set X $ac_compile
30682ac_compiler=$2
30683for ac_option in --version -v -V -qversion; do
30684  { { ac_try="$ac_compiler $ac_option >&5"
30685case "(($ac_try" in
30686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30687  *) ac_try_echo=$ac_try;;
30688esac
30689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30690$as_echo "$ac_try_echo"; } >&5
30691  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30692  ac_status=$?
30693  if test -s conftest.err; then
30694    sed '10a\
30695... rest of stderr output deleted ...
30696         10q' conftest.err >conftest.er1
30697    cat conftest.er1 >&5
30698  fi
30699  rm -f conftest.er1 conftest.err
30700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30701  test $ac_status = 0; }
30702done
30703
30704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30705$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30706if ${ac_cv_cxx_compiler_gnu+:} false; then :
30707  $as_echo_n "(cached) " >&6
30708else
30709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30710/* end confdefs.h.  */
30711
30712int
30713main ()
30714{
30715#ifndef __GNUC__
30716       choke me
30717#endif
30718
30719  ;
30720  return 0;
30721}
30722_ACEOF
30723if ac_fn_cxx_try_compile "$LINENO"; then :
30724  ac_compiler_gnu=yes
30725else
30726  ac_compiler_gnu=no
30727fi
30728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30729ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30730
30731fi
30732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30733$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30734if test $ac_compiler_gnu = yes; then
30735  GXX=yes
30736else
30737  GXX=
30738fi
30739ac_test_CXXFLAGS=${CXXFLAGS+set}
30740ac_save_CXXFLAGS=$CXXFLAGS
30741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30742$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30743if ${ac_cv_prog_cxx_g+:} false; then :
30744  $as_echo_n "(cached) " >&6
30745else
30746  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30747   ac_cxx_werror_flag=yes
30748   ac_cv_prog_cxx_g=no
30749   CXXFLAGS="-g"
30750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30751/* end confdefs.h.  */
30752
30753int
30754main ()
30755{
30756
30757  ;
30758  return 0;
30759}
30760_ACEOF
30761if ac_fn_cxx_try_compile "$LINENO"; then :
30762  ac_cv_prog_cxx_g=yes
30763else
30764  CXXFLAGS=""
30765      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30766/* end confdefs.h.  */
30767
30768int
30769main ()
30770{
30771
30772  ;
30773  return 0;
30774}
30775_ACEOF
30776if ac_fn_cxx_try_compile "$LINENO"; then :
30777
30778else
30779  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30780	 CXXFLAGS="-g"
30781	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30782/* end confdefs.h.  */
30783
30784int
30785main ()
30786{
30787
30788  ;
30789  return 0;
30790}
30791_ACEOF
30792if ac_fn_cxx_try_compile "$LINENO"; then :
30793  ac_cv_prog_cxx_g=yes
30794fi
30795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30796fi
30797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30798fi
30799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30800   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30801fi
30802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30803$as_echo "$ac_cv_prog_cxx_g" >&6; }
30804if test "$ac_test_CXXFLAGS" = set; then
30805  CXXFLAGS=$ac_save_CXXFLAGS
30806elif test $ac_cv_prog_cxx_g = yes; then
30807  if test "$GXX" = yes; then
30808    CXXFLAGS="-g -O2"
30809  else
30810    CXXFLAGS="-g"
30811  fi
30812else
30813  if test "$GXX" = yes; then
30814    CXXFLAGS="-O2"
30815  else
30816    CXXFLAGS=
30817  fi
30818fi
30819ac_ext=cpp
30820ac_cpp='$CXXCPP $CPPFLAGS'
30821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30824
30825
30826  ### Locate other tools
30827
30828  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30829    ac_ext=m
30830ac_cpp='$OBJCPP $CPPFLAGS'
30831ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30832ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30833ac_compiler_gnu=$ac_cv_objc_compiler_gnu
30834if test -n "$ac_tool_prefix"; then
30835  for ac_prog in gcc objcc objc cc CC
30836  do
30837    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30838set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30840$as_echo_n "checking for $ac_word... " >&6; }
30841if ${ac_cv_prog_OBJC+:} false; then :
30842  $as_echo_n "(cached) " >&6
30843else
30844  if test -n "$OBJC"; then
30845  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
30846else
30847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30848for as_dir in $PATH
30849do
30850  IFS=$as_save_IFS
30851  test -z "$as_dir" && as_dir=.
30852    for ac_exec_ext in '' $ac_executable_extensions; do
30853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30854    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
30855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30856    break 2
30857  fi
30858done
30859  done
30860IFS=$as_save_IFS
30861
30862fi
30863fi
30864OBJC=$ac_cv_prog_OBJC
30865if test -n "$OBJC"; then
30866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
30867$as_echo "$OBJC" >&6; }
30868else
30869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30870$as_echo "no" >&6; }
30871fi
30872
30873
30874    test -n "$OBJC" && break
30875  done
30876fi
30877if test -z "$OBJC"; then
30878  ac_ct_OBJC=$OBJC
30879  for ac_prog in gcc objcc objc cc CC
30880do
30881  # Extract the first word of "$ac_prog", so it can be a program name with args.
30882set dummy $ac_prog; ac_word=$2
30883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30884$as_echo_n "checking for $ac_word... " >&6; }
30885if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888  if test -n "$ac_ct_OBJC"; then
30889  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
30890else
30891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30892for as_dir in $PATH
30893do
30894  IFS=$as_save_IFS
30895  test -z "$as_dir" && as_dir=.
30896    for ac_exec_ext in '' $ac_executable_extensions; do
30897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30898    ac_cv_prog_ac_ct_OBJC="$ac_prog"
30899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30900    break 2
30901  fi
30902done
30903  done
30904IFS=$as_save_IFS
30905
30906fi
30907fi
30908ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
30909if test -n "$ac_ct_OBJC"; then
30910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
30911$as_echo "$ac_ct_OBJC" >&6; }
30912else
30913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30914$as_echo "no" >&6; }
30915fi
30916
30917
30918  test -n "$ac_ct_OBJC" && break
30919done
30920
30921  if test "x$ac_ct_OBJC" = x; then
30922    OBJC="gcc"
30923  else
30924    case $cross_compiling:$ac_tool_warned in
30925yes:)
30926{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30927$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30928ac_tool_warned=yes ;;
30929esac
30930    OBJC=$ac_ct_OBJC
30931  fi
30932fi
30933
30934# Provide some information about the compiler.
30935$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
30936set X $ac_compile
30937ac_compiler=$2
30938for ac_option in --version -v -V -qversion; do
30939  { { ac_try="$ac_compiler $ac_option >&5"
30940case "(($ac_try" in
30941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30942  *) ac_try_echo=$ac_try;;
30943esac
30944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30945$as_echo "$ac_try_echo"; } >&5
30946  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30947  ac_status=$?
30948  if test -s conftest.err; then
30949    sed '10a\
30950... rest of stderr output deleted ...
30951         10q' conftest.err >conftest.er1
30952    cat conftest.er1 >&5
30953  fi
30954  rm -f conftest.er1 conftest.err
30955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30956  test $ac_status = 0; }
30957done
30958
30959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
30960$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
30961if ${ac_cv_objc_compiler_gnu+:} false; then :
30962  $as_echo_n "(cached) " >&6
30963else
30964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30965/* end confdefs.h.  */
30966
30967int
30968main ()
30969{
30970#ifndef __GNUC__
30971       choke me
30972#endif
30973
30974  ;
30975  return 0;
30976}
30977_ACEOF
30978if ac_fn_objc_try_compile "$LINENO"; then :
30979  ac_compiler_gnu=yes
30980else
30981  ac_compiler_gnu=no
30982fi
30983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30984ac_cv_objc_compiler_gnu=$ac_compiler_gnu
30985
30986fi
30987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
30988$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
30989if test $ac_compiler_gnu = yes; then
30990  GOBJC=yes
30991else
30992  GOBJC=
30993fi
30994ac_test_OBJCFLAGS=${OBJCFLAGS+set}
30995ac_save_OBJCFLAGS=$OBJCFLAGS
30996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
30997$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
30998if ${ac_cv_prog_objc_g+:} false; then :
30999  $as_echo_n "(cached) " >&6
31000else
31001  ac_save_objc_werror_flag=$ac_objc_werror_flag
31002   ac_objc_werror_flag=yes
31003   ac_cv_prog_objc_g=no
31004   OBJCFLAGS="-g"
31005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31006/* end confdefs.h.  */
31007
31008int
31009main ()
31010{
31011
31012  ;
31013  return 0;
31014}
31015_ACEOF
31016if ac_fn_objc_try_compile "$LINENO"; then :
31017  ac_cv_prog_objc_g=yes
31018else
31019  OBJCFLAGS=""
31020      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31021/* end confdefs.h.  */
31022
31023int
31024main ()
31025{
31026
31027  ;
31028  return 0;
31029}
31030_ACEOF
31031if ac_fn_objc_try_compile "$LINENO"; then :
31032
31033else
31034  ac_objc_werror_flag=$ac_save_objc_werror_flag
31035	 OBJCFLAGS="-g"
31036	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31037/* end confdefs.h.  */
31038
31039int
31040main ()
31041{
31042
31043  ;
31044  return 0;
31045}
31046_ACEOF
31047if ac_fn_objc_try_compile "$LINENO"; then :
31048  ac_cv_prog_objc_g=yes
31049fi
31050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31051fi
31052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31053fi
31054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31055   ac_objc_werror_flag=$ac_save_objc_werror_flag
31056fi
31057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
31058$as_echo "$ac_cv_prog_objc_g" >&6; }
31059if test "$ac_test_OBJCFLAGS" = set; then
31060  OBJCFLAGS=$ac_save_OBJCFLAGS
31061elif test $ac_cv_prog_objc_g = yes; then
31062  if test "$GOBJC" = yes; then
31063    OBJCFLAGS="-g -O2"
31064  else
31065    OBJCFLAGS="-g"
31066  fi
31067else
31068  if test "$GOBJC" = yes; then
31069    OBJCFLAGS="-O2"
31070  else
31071    OBJCFLAGS=
31072  fi
31073fi
31074ac_ext=cpp
31075ac_cpp='$CXXCPP $CPPFLAGS'
31076ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31077ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31078ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31079
31080
31081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31082
31083  # First separate the path from the arguments. This will split at the first
31084  # space.
31085  complete="$OBJC"
31086  path="${complete%% *}"
31087  tmp="$complete EOL"
31088  arguments="${tmp#* }"
31089
31090  # Input might be given as Windows format, start by converting to
31091  # unix format.
31092  new_path=`$CYGPATH -u "$path"`
31093
31094  # Now try to locate executable using which
31095  new_path=`$WHICH "$new_path" 2> /dev/null`
31096  # bat and cmd files are not always considered executable in cygwin causing which
31097  # to not find them
31098  if test "x$new_path" = x \
31099      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31100      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31101    new_path=`$CYGPATH -u "$path"`
31102  fi
31103  if test "x$new_path" = x; then
31104    # Oops. Which didn't find the executable.
31105    # The splitting of arguments from the executable at a space might have been incorrect,
31106    # since paths with space are more likely in Windows. Give it another try with the whole
31107    # argument.
31108    path="$complete"
31109    arguments="EOL"
31110    new_path=`$CYGPATH -u "$path"`
31111    new_path=`$WHICH "$new_path" 2> /dev/null`
31112    # bat and cmd files are not always considered executable in cygwin causing which
31113    # to not find them
31114    if test "x$new_path" = x \
31115        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31116        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31117      new_path=`$CYGPATH -u "$path"`
31118    fi
31119    if test "x$new_path" = x; then
31120      # It's still not found. Now this is an unrecoverable error.
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31122$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31123      has_space=`$ECHO "$complete" | $GREP " "`
31124      if test "x$has_space" != x; then
31125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31127      fi
31128      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31129    fi
31130  fi
31131
31132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31135  # "foo.exe" is OK but "foo" is an error.
31136  #
31137  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31138  # It is also a way to make sure we got the proper file name for the real test later on.
31139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31140  if test "x$test_shortpath" = x; then
31141    # Short path failed, file does not exist as specified.
31142    # Try adding .exe or .cmd
31143    if test -f "${new_path}.exe"; then
31144      input_to_shortpath="${new_path}.exe"
31145    elif test -f "${new_path}.cmd"; then
31146      input_to_shortpath="${new_path}.cmd"
31147    else
31148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
31149$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
31150      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31151$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31152      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31153    fi
31154  else
31155    input_to_shortpath="$new_path"
31156  fi
31157
31158  # Call helper function which possibly converts this using DOS-style short mode.
31159  # If so, the updated path is stored in $new_path.
31160  new_path="$input_to_shortpath"
31161
31162  input_path="$input_to_shortpath"
31163  # Check if we need to convert this using DOS-style short mode. If the path
31164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31165  # take no chances and rewrite it.
31166  # Note: m4 eats our [], so we need to use [ and ] instead.
31167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31168  if test "x$has_forbidden_chars" != x; then
31169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31173      # Going to short mode and back again did indeed matter. Since short mode is
31174      # case insensitive, let's make it lowercase to improve readability.
31175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31176      # Now convert it back to Unix-stile (cygpath)
31177      input_path=`$CYGPATH -u "$shortmode_path"`
31178      new_path="$input_path"
31179    fi
31180  fi
31181
31182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31183  if test "x$test_cygdrive_prefix" = x; then
31184    # As a simple fix, exclude /usr/bin since it's not a real path.
31185    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31187      # a path prefixed by /cygdrive for fixpath to work.
31188      new_path="$CYGWIN_ROOT_PATH$input_path"
31189    fi
31190  fi
31191
31192  # remove trailing .exe if any
31193  new_path="${new_path/%.exe/}"
31194
31195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31196
31197  # First separate the path from the arguments. This will split at the first
31198  # space.
31199  complete="$OBJC"
31200  path="${complete%% *}"
31201  tmp="$complete EOL"
31202  arguments="${tmp#* }"
31203
31204  # Input might be given as Windows format, start by converting to
31205  # unix format.
31206  new_path="$path"
31207
31208  windows_path="$new_path"
31209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31210    unix_path=`$CYGPATH -u "$windows_path"`
31211    new_path="$unix_path"
31212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31214    new_path="$unix_path"
31215  fi
31216
31217
31218  # Now try to locate executable using which
31219  new_path=`$WHICH "$new_path" 2> /dev/null`
31220
31221  if test "x$new_path" = x; then
31222    # Oops. Which didn't find the executable.
31223    # The splitting of arguments from the executable at a space might have been incorrect,
31224    # since paths with space are more likely in Windows. Give it another try with the whole
31225    # argument.
31226    path="$complete"
31227    arguments="EOL"
31228    new_path="$path"
31229
31230  windows_path="$new_path"
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232    unix_path=`$CYGPATH -u "$windows_path"`
31233    new_path="$unix_path"
31234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31236    new_path="$unix_path"
31237  fi
31238
31239
31240    new_path=`$WHICH "$new_path" 2> /dev/null`
31241
31242    if test "x$new_path" = x; then
31243      # It's still not found. Now this is an unrecoverable error.
31244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31245$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31246      has_space=`$ECHO "$complete" | $GREP " "`
31247      if test "x$has_space" != x; then
31248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31250      fi
31251      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31252    fi
31253  fi
31254
31255  # Now new_path has a complete unix path to the binary
31256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31257    # Keep paths in /bin as-is, but remove trailing .exe if any
31258    new_path="${new_path/%.exe/}"
31259    # Do not save /bin paths to all_fixpath_prefixes!
31260  else
31261    # Not in mixed or Windows style, start by that.
31262    new_path=`cmd //c echo $new_path`
31263
31264  input_path="$new_path"
31265  # Check if we need to convert this using DOS-style short mode. If the path
31266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31267  # take no chances and rewrite it.
31268  # Note: m4 eats our [], so we need to use [ and ] instead.
31269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31270  if test "x$has_forbidden_chars" != x; then
31271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31273  fi
31274
31275    # Output is in $new_path
31276
31277  windows_path="$new_path"
31278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31279    unix_path=`$CYGPATH -u "$windows_path"`
31280    new_path="$unix_path"
31281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31283    new_path="$unix_path"
31284  fi
31285
31286    # remove trailing .exe if any
31287    new_path="${new_path/%.exe/}"
31288
31289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31291  fi
31292
31293  else
31294    # We're on a posix platform. Hooray! :)
31295    # First separate the path from the arguments. This will split at the first
31296    # space.
31297    complete="$OBJC"
31298    path="${complete%% *}"
31299    tmp="$complete EOL"
31300    arguments="${tmp#* }"
31301
31302    # Cannot rely on the command "which" here since it doesn't always work.
31303    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31304    if test -z "$is_absolute_path"; then
31305      # Path to executable is not absolute. Find it.
31306      IFS_save="$IFS"
31307      IFS=:
31308      for p in $PATH; do
31309        if test -f "$p/$path" && test -x "$p/$path"; then
31310          new_path="$p/$path"
31311          break
31312        fi
31313      done
31314      IFS="$IFS_save"
31315    else
31316      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
31317$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
31318      new_path="$path"
31319    fi
31320
31321    if test "x$new_path" = x; then
31322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
31323$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
31324      has_space=`$ECHO "$complete" | $GREP " "`
31325      if test "x$has_space" != x; then
31326        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31328      fi
31329      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
31330    fi
31331  fi
31332
31333  # Now join together the path and the arguments once again
31334  if test "x$arguments" != xEOL; then
31335    new_complete="$new_path ${arguments% *}"
31336  else
31337    new_complete="$new_path"
31338  fi
31339
31340  if test "x$complete" != "x$new_complete"; then
31341    OBJC="$new_complete"
31342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
31343$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
31344  fi
31345
31346  else
31347    OBJC=
31348  fi
31349
31350  # Restore the flags to the user specified values.
31351  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
31352  CFLAGS="$ORG_CFLAGS"
31353  CXXFLAGS="$ORG_CXXFLAGS"
31354  OBJCFLAGS="$ORG_OBJCFLAGS"
31355
31356  LD="$CC"
31357  LDEXE="$CC"
31358  LDCXX="$CXX"
31359  LDEXECXX="$CXX"
31360
31361  # LDEXE is the linker to use, when creating executables.
31362
31363  # Linking C++ libraries.
31364
31365  # Linking C++ executables.
31366
31367
31368  if test "x$OPENJDK_TARGET_OS" != xwindows; then
31369
31370
31371  # Publish this variable in the help.
31372
31373
31374  if test "x$AR" = x; then
31375    # The variable is not set by user, try to locate tool using the code snippet
31376    if test -n "$ac_tool_prefix"; then
31377  for ac_prog in ar
31378  do
31379    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31380set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31382$as_echo_n "checking for $ac_word... " >&6; }
31383if ${ac_cv_prog_AR+:} false; then :
31384  $as_echo_n "(cached) " >&6
31385else
31386  if test -n "$AR"; then
31387  ac_cv_prog_AR="$AR" # Let the user override the test.
31388else
31389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31390for as_dir in $PATH
31391do
31392  IFS=$as_save_IFS
31393  test -z "$as_dir" && as_dir=.
31394    for ac_exec_ext in '' $ac_executable_extensions; do
31395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31396    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31398    break 2
31399  fi
31400done
31401  done
31402IFS=$as_save_IFS
31403
31404fi
31405fi
31406AR=$ac_cv_prog_AR
31407if test -n "$AR"; then
31408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31409$as_echo "$AR" >&6; }
31410else
31411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31412$as_echo "no" >&6; }
31413fi
31414
31415
31416    test -n "$AR" && break
31417  done
31418fi
31419if test -z "$AR"; then
31420  ac_ct_AR=$AR
31421  for ac_prog in ar
31422do
31423  # Extract the first word of "$ac_prog", so it can be a program name with args.
31424set dummy $ac_prog; ac_word=$2
31425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31426$as_echo_n "checking for $ac_word... " >&6; }
31427if ${ac_cv_prog_ac_ct_AR+:} false; then :
31428  $as_echo_n "(cached) " >&6
31429else
31430  if test -n "$ac_ct_AR"; then
31431  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31432else
31433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31434for as_dir in $PATH
31435do
31436  IFS=$as_save_IFS
31437  test -z "$as_dir" && as_dir=.
31438    for ac_exec_ext in '' $ac_executable_extensions; do
31439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31440    ac_cv_prog_ac_ct_AR="$ac_prog"
31441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31442    break 2
31443  fi
31444done
31445  done
31446IFS=$as_save_IFS
31447
31448fi
31449fi
31450ac_ct_AR=$ac_cv_prog_ac_ct_AR
31451if test -n "$ac_ct_AR"; then
31452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31453$as_echo "$ac_ct_AR" >&6; }
31454else
31455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31456$as_echo "no" >&6; }
31457fi
31458
31459
31460  test -n "$ac_ct_AR" && break
31461done
31462
31463  if test "x$ac_ct_AR" = x; then
31464    AR=""
31465  else
31466    case $cross_compiling:$ac_tool_warned in
31467yes:)
31468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31470ac_tool_warned=yes ;;
31471esac
31472    AR=$ac_ct_AR
31473  fi
31474fi
31475
31476  else
31477    # The variable is set, but is it from the command line or the environment?
31478
31479    # Try to remove the string !AR! from our list.
31480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31482      # If it failed, the variable was not from the command line. Ignore it,
31483      # but warn the user (except for BASH, which is always set by the calling BASH).
31484      if test "xAR" != xBASH; then
31485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31486$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31487      fi
31488      # Try to locate tool using the code snippet
31489      if test -n "$ac_tool_prefix"; then
31490  for ac_prog in ar
31491  do
31492    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31493set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31495$as_echo_n "checking for $ac_word... " >&6; }
31496if ${ac_cv_prog_AR+:} false; then :
31497  $as_echo_n "(cached) " >&6
31498else
31499  if test -n "$AR"; then
31500  ac_cv_prog_AR="$AR" # Let the user override the test.
31501else
31502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31503for as_dir in $PATH
31504do
31505  IFS=$as_save_IFS
31506  test -z "$as_dir" && as_dir=.
31507    for ac_exec_ext in '' $ac_executable_extensions; do
31508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31509    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31511    break 2
31512  fi
31513done
31514  done
31515IFS=$as_save_IFS
31516
31517fi
31518fi
31519AR=$ac_cv_prog_AR
31520if test -n "$AR"; then
31521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31522$as_echo "$AR" >&6; }
31523else
31524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31525$as_echo "no" >&6; }
31526fi
31527
31528
31529    test -n "$AR" && break
31530  done
31531fi
31532if test -z "$AR"; then
31533  ac_ct_AR=$AR
31534  for ac_prog in ar
31535do
31536  # Extract the first word of "$ac_prog", so it can be a program name with args.
31537set dummy $ac_prog; ac_word=$2
31538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31539$as_echo_n "checking for $ac_word... " >&6; }
31540if ${ac_cv_prog_ac_ct_AR+:} false; then :
31541  $as_echo_n "(cached) " >&6
31542else
31543  if test -n "$ac_ct_AR"; then
31544  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31545else
31546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31547for as_dir in $PATH
31548do
31549  IFS=$as_save_IFS
31550  test -z "$as_dir" && as_dir=.
31551    for ac_exec_ext in '' $ac_executable_extensions; do
31552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31553    ac_cv_prog_ac_ct_AR="$ac_prog"
31554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31555    break 2
31556  fi
31557done
31558  done
31559IFS=$as_save_IFS
31560
31561fi
31562fi
31563ac_ct_AR=$ac_cv_prog_ac_ct_AR
31564if test -n "$ac_ct_AR"; then
31565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31566$as_echo "$ac_ct_AR" >&6; }
31567else
31568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31569$as_echo "no" >&6; }
31570fi
31571
31572
31573  test -n "$ac_ct_AR" && break
31574done
31575
31576  if test "x$ac_ct_AR" = x; then
31577    AR=""
31578  else
31579    case $cross_compiling:$ac_tool_warned in
31580yes:)
31581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31583ac_tool_warned=yes ;;
31584esac
31585    AR=$ac_ct_AR
31586  fi
31587fi
31588
31589    else
31590      # If it succeeded, then it was overridden by the user. We will use it
31591      # for the tool.
31592
31593      # First remove it from the list of overridden variables, so we can test
31594      # for unknown variables in the end.
31595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31596
31597      # Check if the provided tool contains a complete path.
31598      tool_specified="$AR"
31599      tool_basename="${tool_specified##*/}"
31600      if test "x$tool_basename" = "x$tool_specified"; then
31601        # A command without a complete path is provided, search $PATH.
31602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
31603$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
31604        # Extract the first word of "$tool_basename", so it can be a program name with args.
31605set dummy $tool_basename; ac_word=$2
31606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31607$as_echo_n "checking for $ac_word... " >&6; }
31608if ${ac_cv_path_AR+:} false; then :
31609  $as_echo_n "(cached) " >&6
31610else
31611  case $AR in
31612  [\\/]* | ?:[\\/]*)
31613  ac_cv_path_AR="$AR" # Let the user override the test with a path.
31614  ;;
31615  *)
31616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31617for as_dir in $PATH
31618do
31619  IFS=$as_save_IFS
31620  test -z "$as_dir" && as_dir=.
31621    for ac_exec_ext in '' $ac_executable_extensions; do
31622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31623    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
31624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31625    break 2
31626  fi
31627done
31628  done
31629IFS=$as_save_IFS
31630
31631  ;;
31632esac
31633fi
31634AR=$ac_cv_path_AR
31635if test -n "$AR"; then
31636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31637$as_echo "$AR" >&6; }
31638else
31639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31640$as_echo "no" >&6; }
31641fi
31642
31643
31644        if test "x$AR" = x; then
31645          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31646        fi
31647      else
31648        # Otherwise we believe it is a complete path. Use it as it is.
31649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
31650$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
31651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
31652$as_echo_n "checking for AR... " >&6; }
31653        if test ! -x "$tool_specified"; then
31654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31655$as_echo "not found" >&6; }
31656          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
31657        fi
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31659$as_echo "$tool_specified" >&6; }
31660      fi
31661    fi
31662  fi
31663
31664
31665
31666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31667
31668  # First separate the path from the arguments. This will split at the first
31669  # space.
31670  complete="$AR"
31671  path="${complete%% *}"
31672  tmp="$complete EOL"
31673  arguments="${tmp#* }"
31674
31675  # Input might be given as Windows format, start by converting to
31676  # unix format.
31677  new_path=`$CYGPATH -u "$path"`
31678
31679  # Now try to locate executable using which
31680  new_path=`$WHICH "$new_path" 2> /dev/null`
31681  # bat and cmd files are not always considered executable in cygwin causing which
31682  # to not find them
31683  if test "x$new_path" = x \
31684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31686    new_path=`$CYGPATH -u "$path"`
31687  fi
31688  if test "x$new_path" = x; then
31689    # Oops. Which didn't find the executable.
31690    # The splitting of arguments from the executable at a space might have been incorrect,
31691    # since paths with space are more likely in Windows. Give it another try with the whole
31692    # argument.
31693    path="$complete"
31694    arguments="EOL"
31695    new_path=`$CYGPATH -u "$path"`
31696    new_path=`$WHICH "$new_path" 2> /dev/null`
31697    # bat and cmd files are not always considered executable in cygwin causing which
31698    # to not find them
31699    if test "x$new_path" = x \
31700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31702      new_path=`$CYGPATH -u "$path"`
31703    fi
31704    if test "x$new_path" = x; then
31705      # It's still not found. Now this is an unrecoverable error.
31706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31707$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31708      has_space=`$ECHO "$complete" | $GREP " "`
31709      if test "x$has_space" != x; then
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31712      fi
31713      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31714    fi
31715  fi
31716
31717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31720  # "foo.exe" is OK but "foo" is an error.
31721  #
31722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31723  # It is also a way to make sure we got the proper file name for the real test later on.
31724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31725  if test "x$test_shortpath" = x; then
31726    # Short path failed, file does not exist as specified.
31727    # Try adding .exe or .cmd
31728    if test -f "${new_path}.exe"; then
31729      input_to_shortpath="${new_path}.exe"
31730    elif test -f "${new_path}.cmd"; then
31731      input_to_shortpath="${new_path}.cmd"
31732    else
31733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
31734$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
31735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31737      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31738    fi
31739  else
31740    input_to_shortpath="$new_path"
31741  fi
31742
31743  # Call helper function which possibly converts this using DOS-style short mode.
31744  # If so, the updated path is stored in $new_path.
31745  new_path="$input_to_shortpath"
31746
31747  input_path="$input_to_shortpath"
31748  # Check if we need to convert this using DOS-style short mode. If the path
31749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31750  # take no chances and rewrite it.
31751  # Note: m4 eats our [], so we need to use [ and ] instead.
31752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31753  if test "x$has_forbidden_chars" != x; then
31754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31758      # Going to short mode and back again did indeed matter. Since short mode is
31759      # case insensitive, let's make it lowercase to improve readability.
31760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31761      # Now convert it back to Unix-stile (cygpath)
31762      input_path=`$CYGPATH -u "$shortmode_path"`
31763      new_path="$input_path"
31764    fi
31765  fi
31766
31767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31768  if test "x$test_cygdrive_prefix" = x; then
31769    # As a simple fix, exclude /usr/bin since it's not a real path.
31770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31772      # a path prefixed by /cygdrive for fixpath to work.
31773      new_path="$CYGWIN_ROOT_PATH$input_path"
31774    fi
31775  fi
31776
31777  # remove trailing .exe if any
31778  new_path="${new_path/%.exe/}"
31779
31780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31781
31782  # First separate the path from the arguments. This will split at the first
31783  # space.
31784  complete="$AR"
31785  path="${complete%% *}"
31786  tmp="$complete EOL"
31787  arguments="${tmp#* }"
31788
31789  # Input might be given as Windows format, start by converting to
31790  # unix format.
31791  new_path="$path"
31792
31793  windows_path="$new_path"
31794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31795    unix_path=`$CYGPATH -u "$windows_path"`
31796    new_path="$unix_path"
31797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31799    new_path="$unix_path"
31800  fi
31801
31802
31803  # Now try to locate executable using which
31804  new_path=`$WHICH "$new_path" 2> /dev/null`
31805
31806  if test "x$new_path" = x; then
31807    # Oops. Which didn't find the executable.
31808    # The splitting of arguments from the executable at a space might have been incorrect,
31809    # since paths with space are more likely in Windows. Give it another try with the whole
31810    # argument.
31811    path="$complete"
31812    arguments="EOL"
31813    new_path="$path"
31814
31815  windows_path="$new_path"
31816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31817    unix_path=`$CYGPATH -u "$windows_path"`
31818    new_path="$unix_path"
31819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31821    new_path="$unix_path"
31822  fi
31823
31824
31825    new_path=`$WHICH "$new_path" 2> /dev/null`
31826
31827    if test "x$new_path" = x; then
31828      # It's still not found. Now this is an unrecoverable error.
31829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31830$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31831      has_space=`$ECHO "$complete" | $GREP " "`
31832      if test "x$has_space" != x; then
31833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31835      fi
31836      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31837    fi
31838  fi
31839
31840  # Now new_path has a complete unix path to the binary
31841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31842    # Keep paths in /bin as-is, but remove trailing .exe if any
31843    new_path="${new_path/%.exe/}"
31844    # Do not save /bin paths to all_fixpath_prefixes!
31845  else
31846    # Not in mixed or Windows style, start by that.
31847    new_path=`cmd //c echo $new_path`
31848
31849  input_path="$new_path"
31850  # Check if we need to convert this using DOS-style short mode. If the path
31851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31852  # take no chances and rewrite it.
31853  # Note: m4 eats our [], so we need to use [ and ] instead.
31854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31855  if test "x$has_forbidden_chars" != x; then
31856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31858  fi
31859
31860    # Output is in $new_path
31861
31862  windows_path="$new_path"
31863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31864    unix_path=`$CYGPATH -u "$windows_path"`
31865    new_path="$unix_path"
31866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31868    new_path="$unix_path"
31869  fi
31870
31871    # remove trailing .exe if any
31872    new_path="${new_path/%.exe/}"
31873
31874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31876  fi
31877
31878  else
31879    # We're on a posix platform. Hooray! :)
31880    # First separate the path from the arguments. This will split at the first
31881    # space.
31882    complete="$AR"
31883    path="${complete%% *}"
31884    tmp="$complete EOL"
31885    arguments="${tmp#* }"
31886
31887    # Cannot rely on the command "which" here since it doesn't always work.
31888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31889    if test -z "$is_absolute_path"; then
31890      # Path to executable is not absolute. Find it.
31891      IFS_save="$IFS"
31892      IFS=:
31893      for p in $PATH; do
31894        if test -f "$p/$path" && test -x "$p/$path"; then
31895          new_path="$p/$path"
31896          break
31897        fi
31898      done
31899      IFS="$IFS_save"
31900    else
31901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
31902$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
31903      new_path="$path"
31904    fi
31905
31906    if test "x$new_path" = x; then
31907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31908$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31909      has_space=`$ECHO "$complete" | $GREP " "`
31910      if test "x$has_space" != x; then
31911        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31913      fi
31914      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31915    fi
31916  fi
31917
31918  # Now join together the path and the arguments once again
31919  if test "x$arguments" != xEOL; then
31920    new_complete="$new_path ${arguments% *}"
31921  else
31922    new_complete="$new_path"
31923  fi
31924
31925  if test "x$complete" != "x$new_complete"; then
31926    AR="$new_complete"
31927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
31928$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
31929  fi
31930
31931  fi
31932  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31933    ARFLAGS="-r"
31934  elif test "x$OPENJDK_TARGET_OS" = xaix; then
31935    ARFLAGS="-X64"
31936  else
31937    ARFLAGS=""
31938  fi
31939
31940
31941  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
31942  HOTSPOT_CXX="$CXX"
31943  HOTSPOT_LD="$LD"
31944
31945
31946
31947  COMPILER_NAME=gcc
31948  COMPILER_TYPE=CC
31949  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
31950
31951    # For now, assume that we are always compiling using cl.exe.
31952    CC_OUT_OPTION=-Fo
31953    EXE_OUT_OPTION=-out:
31954    LD_OUT_OPTION=-out:
31955    AR_OUT_OPTION=-out:
31956    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
31957    # program for something completely different.
31958    # Extract the first word of "link", so it can be a program name with args.
31959set dummy link; ac_word=$2
31960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31961$as_echo_n "checking for $ac_word... " >&6; }
31962if ${ac_cv_prog_WINLD+:} false; then :
31963  $as_echo_n "(cached) " >&6
31964else
31965  if test -n "$WINLD"; then
31966  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
31967else
31968  ac_prog_rejected=no
31969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31970for as_dir in $PATH
31971do
31972  IFS=$as_save_IFS
31973  test -z "$as_dir" && as_dir=.
31974    for ac_exec_ext in '' $ac_executable_extensions; do
31975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31976    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31977       ac_prog_rejected=yes
31978       continue
31979     fi
31980    ac_cv_prog_WINLD="link"
31981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31982    break 2
31983  fi
31984done
31985  done
31986IFS=$as_save_IFS
31987
31988if test $ac_prog_rejected = yes; then
31989  # We found a bogon in the path, so make sure we never use it.
31990  set dummy $ac_cv_prog_WINLD
31991  shift
31992  if test $# != 0; then
31993    # We chose a different compiler from the bogus one.
31994    # However, it has the same basename, so the bogon will be chosen
31995    # first if we set WINLD to just the basename; use the full file name.
31996    shift
31997    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
31998  fi
31999fi
32000fi
32001fi
32002WINLD=$ac_cv_prog_WINLD
32003if test -n "$WINLD"; then
32004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
32005$as_echo "$WINLD" >&6; }
32006else
32007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32008$as_echo "no" >&6; }
32009fi
32010
32011
32012    # Since we must ignore the first found link, WINLD will contain
32013    # the full path to the link.exe program.
32014
32015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016
32017  # First separate the path from the arguments. This will split at the first
32018  # space.
32019  complete="$WINLD"
32020  path="${complete%% *}"
32021  tmp="$complete EOL"
32022  arguments="${tmp#* }"
32023
32024  # Input might be given as Windows format, start by converting to
32025  # unix format.
32026  new_path=`$CYGPATH -u "$path"`
32027
32028  # Now try to locate executable using which
32029  new_path=`$WHICH "$new_path" 2> /dev/null`
32030  # bat and cmd files are not always considered executable in cygwin causing which
32031  # to not find them
32032  if test "x$new_path" = x \
32033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32035    new_path=`$CYGPATH -u "$path"`
32036  fi
32037  if test "x$new_path" = x; then
32038    # Oops. Which didn't find the executable.
32039    # The splitting of arguments from the executable at a space might have been incorrect,
32040    # since paths with space are more likely in Windows. Give it another try with the whole
32041    # argument.
32042    path="$complete"
32043    arguments="EOL"
32044    new_path=`$CYGPATH -u "$path"`
32045    new_path=`$WHICH "$new_path" 2> /dev/null`
32046    # bat and cmd files are not always considered executable in cygwin causing which
32047    # to not find them
32048    if test "x$new_path" = x \
32049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32051      new_path=`$CYGPATH -u "$path"`
32052    fi
32053    if test "x$new_path" = x; then
32054      # It's still not found. Now this is an unrecoverable error.
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32056$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32057      has_space=`$ECHO "$complete" | $GREP " "`
32058      if test "x$has_space" != x; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32061      fi
32062      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32063    fi
32064  fi
32065
32066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32069  # "foo.exe" is OK but "foo" is an error.
32070  #
32071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32072  # It is also a way to make sure we got the proper file name for the real test later on.
32073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32074  if test "x$test_shortpath" = x; then
32075    # Short path failed, file does not exist as specified.
32076    # Try adding .exe or .cmd
32077    if test -f "${new_path}.exe"; then
32078      input_to_shortpath="${new_path}.exe"
32079    elif test -f "${new_path}.cmd"; then
32080      input_to_shortpath="${new_path}.cmd"
32081    else
32082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
32083$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
32084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32086      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32087    fi
32088  else
32089    input_to_shortpath="$new_path"
32090  fi
32091
32092  # Call helper function which possibly converts this using DOS-style short mode.
32093  # If so, the updated path is stored in $new_path.
32094  new_path="$input_to_shortpath"
32095
32096  input_path="$input_to_shortpath"
32097  # Check if we need to convert this using DOS-style short mode. If the path
32098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32099  # take no chances and rewrite it.
32100  # Note: m4 eats our [], so we need to use [ and ] instead.
32101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32102  if test "x$has_forbidden_chars" != x; then
32103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32107      # Going to short mode and back again did indeed matter. Since short mode is
32108      # case insensitive, let's make it lowercase to improve readability.
32109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32110      # Now convert it back to Unix-stile (cygpath)
32111      input_path=`$CYGPATH -u "$shortmode_path"`
32112      new_path="$input_path"
32113    fi
32114  fi
32115
32116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32117  if test "x$test_cygdrive_prefix" = x; then
32118    # As a simple fix, exclude /usr/bin since it's not a real path.
32119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32121      # a path prefixed by /cygdrive for fixpath to work.
32122      new_path="$CYGWIN_ROOT_PATH$input_path"
32123    fi
32124  fi
32125
32126  # remove trailing .exe if any
32127  new_path="${new_path/%.exe/}"
32128
32129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130
32131  # First separate the path from the arguments. This will split at the first
32132  # space.
32133  complete="$WINLD"
32134  path="${complete%% *}"
32135  tmp="$complete EOL"
32136  arguments="${tmp#* }"
32137
32138  # Input might be given as Windows format, start by converting to
32139  # unix format.
32140  new_path="$path"
32141
32142  windows_path="$new_path"
32143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32144    unix_path=`$CYGPATH -u "$windows_path"`
32145    new_path="$unix_path"
32146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32148    new_path="$unix_path"
32149  fi
32150
32151
32152  # Now try to locate executable using which
32153  new_path=`$WHICH "$new_path" 2> /dev/null`
32154
32155  if test "x$new_path" = x; then
32156    # Oops. Which didn't find the executable.
32157    # The splitting of arguments from the executable at a space might have been incorrect,
32158    # since paths with space are more likely in Windows. Give it another try with the whole
32159    # argument.
32160    path="$complete"
32161    arguments="EOL"
32162    new_path="$path"
32163
32164  windows_path="$new_path"
32165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32166    unix_path=`$CYGPATH -u "$windows_path"`
32167    new_path="$unix_path"
32168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32170    new_path="$unix_path"
32171  fi
32172
32173
32174    new_path=`$WHICH "$new_path" 2> /dev/null`
32175
32176    if test "x$new_path" = x; then
32177      # It's still not found. Now this is an unrecoverable error.
32178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32179$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32180      has_space=`$ECHO "$complete" | $GREP " "`
32181      if test "x$has_space" != x; then
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32184      fi
32185      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32186    fi
32187  fi
32188
32189  # Now new_path has a complete unix path to the binary
32190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32191    # Keep paths in /bin as-is, but remove trailing .exe if any
32192    new_path="${new_path/%.exe/}"
32193    # Do not save /bin paths to all_fixpath_prefixes!
32194  else
32195    # Not in mixed or Windows style, start by that.
32196    new_path=`cmd //c echo $new_path`
32197
32198  input_path="$new_path"
32199  # Check if we need to convert this using DOS-style short mode. If the path
32200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32201  # take no chances and rewrite it.
32202  # Note: m4 eats our [], so we need to use [ and ] instead.
32203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32204  if test "x$has_forbidden_chars" != x; then
32205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32207  fi
32208
32209    # Output is in $new_path
32210
32211  windows_path="$new_path"
32212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32213    unix_path=`$CYGPATH -u "$windows_path"`
32214    new_path="$unix_path"
32215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32217    new_path="$unix_path"
32218  fi
32219
32220    # remove trailing .exe if any
32221    new_path="${new_path/%.exe/}"
32222
32223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32225  fi
32226
32227  else
32228    # We're on a posix platform. Hooray! :)
32229    # First separate the path from the arguments. This will split at the first
32230    # space.
32231    complete="$WINLD"
32232    path="${complete%% *}"
32233    tmp="$complete EOL"
32234    arguments="${tmp#* }"
32235
32236    # Cannot rely on the command "which" here since it doesn't always work.
32237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32238    if test -z "$is_absolute_path"; then
32239      # Path to executable is not absolute. Find it.
32240      IFS_save="$IFS"
32241      IFS=:
32242      for p in $PATH; do
32243        if test -f "$p/$path" && test -x "$p/$path"; then
32244          new_path="$p/$path"
32245          break
32246        fi
32247      done
32248      IFS="$IFS_save"
32249    else
32250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
32251$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
32252      new_path="$path"
32253    fi
32254
32255    if test "x$new_path" = x; then
32256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
32257$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
32258      has_space=`$ECHO "$complete" | $GREP " "`
32259      if test "x$has_space" != x; then
32260        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32262      fi
32263      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
32264    fi
32265  fi
32266
32267  # Now join together the path and the arguments once again
32268  if test "x$arguments" != xEOL; then
32269    new_complete="$new_path ${arguments% *}"
32270  else
32271    new_complete="$new_path"
32272  fi
32273
32274  if test "x$complete" != "x$new_complete"; then
32275    WINLD="$new_complete"
32276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
32277$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
32278  fi
32279
32280    printf "Windows linker was found at $WINLD\n"
32281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32282$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32283    "$WINLD" --version > /dev/null
32284    if test $? -eq 0 ; then
32285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32286$as_echo "no" >&6; }
32287      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32288    else
32289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32290$as_echo "yes" >&6; }
32291    fi
32292    LD="$WINLD"
32293    LDEXE="$WINLD"
32294    LDCXX="$WINLD"
32295    LDEXECXX="$WINLD"
32296
32297    # Extract the first word of "mt", so it can be a program name with args.
32298set dummy mt; ac_word=$2
32299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32300$as_echo_n "checking for $ac_word... " >&6; }
32301if ${ac_cv_prog_MT+:} false; then :
32302  $as_echo_n "(cached) " >&6
32303else
32304  if test -n "$MT"; then
32305  ac_cv_prog_MT="$MT" # Let the user override the test.
32306else
32307  ac_prog_rejected=no
32308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32309for as_dir in $PATH
32310do
32311  IFS=$as_save_IFS
32312  test -z "$as_dir" && as_dir=.
32313    for ac_exec_ext in '' $ac_executable_extensions; do
32314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32315    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
32316       ac_prog_rejected=yes
32317       continue
32318     fi
32319    ac_cv_prog_MT="mt"
32320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32321    break 2
32322  fi
32323done
32324  done
32325IFS=$as_save_IFS
32326
32327if test $ac_prog_rejected = yes; then
32328  # We found a bogon in the path, so make sure we never use it.
32329  set dummy $ac_cv_prog_MT
32330  shift
32331  if test $# != 0; then
32332    # We chose a different compiler from the bogus one.
32333    # However, it has the same basename, so the bogon will be chosen
32334    # first if we set MT to just the basename; use the full file name.
32335    shift
32336    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
32337  fi
32338fi
32339fi
32340fi
32341MT=$ac_cv_prog_MT
32342if test -n "$MT"; then
32343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
32344$as_echo "$MT" >&6; }
32345else
32346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32347$as_echo "no" >&6; }
32348fi
32349
32350
32351
32352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32353
32354  # First separate the path from the arguments. This will split at the first
32355  # space.
32356  complete="$MT"
32357  path="${complete%% *}"
32358  tmp="$complete EOL"
32359  arguments="${tmp#* }"
32360
32361  # Input might be given as Windows format, start by converting to
32362  # unix format.
32363  new_path=`$CYGPATH -u "$path"`
32364
32365  # Now try to locate executable using which
32366  new_path=`$WHICH "$new_path" 2> /dev/null`
32367  # bat and cmd files are not always considered executable in cygwin causing which
32368  # to not find them
32369  if test "x$new_path" = x \
32370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32372    new_path=`$CYGPATH -u "$path"`
32373  fi
32374  if test "x$new_path" = x; then
32375    # Oops. Which didn't find the executable.
32376    # The splitting of arguments from the executable at a space might have been incorrect,
32377    # since paths with space are more likely in Windows. Give it another try with the whole
32378    # argument.
32379    path="$complete"
32380    arguments="EOL"
32381    new_path=`$CYGPATH -u "$path"`
32382    new_path=`$WHICH "$new_path" 2> /dev/null`
32383    # bat and cmd files are not always considered executable in cygwin causing which
32384    # to not find them
32385    if test "x$new_path" = x \
32386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32388      new_path=`$CYGPATH -u "$path"`
32389    fi
32390    if test "x$new_path" = x; then
32391      # It's still not found. Now this is an unrecoverable error.
32392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32393$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32394      has_space=`$ECHO "$complete" | $GREP " "`
32395      if test "x$has_space" != x; then
32396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32398      fi
32399      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32400    fi
32401  fi
32402
32403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32406  # "foo.exe" is OK but "foo" is an error.
32407  #
32408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32409  # It is also a way to make sure we got the proper file name for the real test later on.
32410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32411  if test "x$test_shortpath" = x; then
32412    # Short path failed, file does not exist as specified.
32413    # Try adding .exe or .cmd
32414    if test -f "${new_path}.exe"; then
32415      input_to_shortpath="${new_path}.exe"
32416    elif test -f "${new_path}.cmd"; then
32417      input_to_shortpath="${new_path}.cmd"
32418    else
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
32420$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
32421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32423      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32424    fi
32425  else
32426    input_to_shortpath="$new_path"
32427  fi
32428
32429  # Call helper function which possibly converts this using DOS-style short mode.
32430  # If so, the updated path is stored in $new_path.
32431  new_path="$input_to_shortpath"
32432
32433  input_path="$input_to_shortpath"
32434  # Check if we need to convert this using DOS-style short mode. If the path
32435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32436  # take no chances and rewrite it.
32437  # Note: m4 eats our [], so we need to use [ and ] instead.
32438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32439  if test "x$has_forbidden_chars" != x; then
32440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32444      # Going to short mode and back again did indeed matter. Since short mode is
32445      # case insensitive, let's make it lowercase to improve readability.
32446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32447      # Now convert it back to Unix-stile (cygpath)
32448      input_path=`$CYGPATH -u "$shortmode_path"`
32449      new_path="$input_path"
32450    fi
32451  fi
32452
32453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32454  if test "x$test_cygdrive_prefix" = x; then
32455    # As a simple fix, exclude /usr/bin since it's not a real path.
32456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32458      # a path prefixed by /cygdrive for fixpath to work.
32459      new_path="$CYGWIN_ROOT_PATH$input_path"
32460    fi
32461  fi
32462
32463  # remove trailing .exe if any
32464  new_path="${new_path/%.exe/}"
32465
32466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32467
32468  # First separate the path from the arguments. This will split at the first
32469  # space.
32470  complete="$MT"
32471  path="${complete%% *}"
32472  tmp="$complete EOL"
32473  arguments="${tmp#* }"
32474
32475  # Input might be given as Windows format, start by converting to
32476  # unix format.
32477  new_path="$path"
32478
32479  windows_path="$new_path"
32480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32481    unix_path=`$CYGPATH -u "$windows_path"`
32482    new_path="$unix_path"
32483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32485    new_path="$unix_path"
32486  fi
32487
32488
32489  # Now try to locate executable using which
32490  new_path=`$WHICH "$new_path" 2> /dev/null`
32491
32492  if test "x$new_path" = x; then
32493    # Oops. Which didn't find the executable.
32494    # The splitting of arguments from the executable at a space might have been incorrect,
32495    # since paths with space are more likely in Windows. Give it another try with the whole
32496    # argument.
32497    path="$complete"
32498    arguments="EOL"
32499    new_path="$path"
32500
32501  windows_path="$new_path"
32502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32503    unix_path=`$CYGPATH -u "$windows_path"`
32504    new_path="$unix_path"
32505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32507    new_path="$unix_path"
32508  fi
32509
32510
32511    new_path=`$WHICH "$new_path" 2> /dev/null`
32512
32513    if test "x$new_path" = x; then
32514      # It's still not found. Now this is an unrecoverable error.
32515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32516$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32517      has_space=`$ECHO "$complete" | $GREP " "`
32518      if test "x$has_space" != x; then
32519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32521      fi
32522      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32523    fi
32524  fi
32525
32526  # Now new_path has a complete unix path to the binary
32527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32528    # Keep paths in /bin as-is, but remove trailing .exe if any
32529    new_path="${new_path/%.exe/}"
32530    # Do not save /bin paths to all_fixpath_prefixes!
32531  else
32532    # Not in mixed or Windows style, start by that.
32533    new_path=`cmd //c echo $new_path`
32534
32535  input_path="$new_path"
32536  # Check if we need to convert this using DOS-style short mode. If the path
32537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32538  # take no chances and rewrite it.
32539  # Note: m4 eats our [], so we need to use [ and ] instead.
32540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32541  if test "x$has_forbidden_chars" != x; then
32542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32544  fi
32545
32546    # Output is in $new_path
32547
32548  windows_path="$new_path"
32549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32550    unix_path=`$CYGPATH -u "$windows_path"`
32551    new_path="$unix_path"
32552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32554    new_path="$unix_path"
32555  fi
32556
32557    # remove trailing .exe if any
32558    new_path="${new_path/%.exe/}"
32559
32560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32562  fi
32563
32564  else
32565    # We're on a posix platform. Hooray! :)
32566    # First separate the path from the arguments. This will split at the first
32567    # space.
32568    complete="$MT"
32569    path="${complete%% *}"
32570    tmp="$complete EOL"
32571    arguments="${tmp#* }"
32572
32573    # Cannot rely on the command "which" here since it doesn't always work.
32574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32575    if test -z "$is_absolute_path"; then
32576      # Path to executable is not absolute. Find it.
32577      IFS_save="$IFS"
32578      IFS=:
32579      for p in $PATH; do
32580        if test -f "$p/$path" && test -x "$p/$path"; then
32581          new_path="$p/$path"
32582          break
32583        fi
32584      done
32585      IFS="$IFS_save"
32586    else
32587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
32588$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
32589      new_path="$path"
32590    fi
32591
32592    if test "x$new_path" = x; then
32593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
32594$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
32595      has_space=`$ECHO "$complete" | $GREP " "`
32596      if test "x$has_space" != x; then
32597        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32599      fi
32600      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
32601    fi
32602  fi
32603
32604  # Now join together the path and the arguments once again
32605  if test "x$arguments" != xEOL; then
32606    new_complete="$new_path ${arguments% *}"
32607  else
32608    new_complete="$new_path"
32609  fi
32610
32611  if test "x$complete" != "x$new_complete"; then
32612    MT="$new_complete"
32613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
32614$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
32615  fi
32616
32617    # The resource compiler
32618    # Extract the first word of "rc", so it can be a program name with args.
32619set dummy rc; ac_word=$2
32620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32621$as_echo_n "checking for $ac_word... " >&6; }
32622if ${ac_cv_prog_RC+:} false; then :
32623  $as_echo_n "(cached) " >&6
32624else
32625  if test -n "$RC"; then
32626  ac_cv_prog_RC="$RC" # Let the user override the test.
32627else
32628  ac_prog_rejected=no
32629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32630for as_dir in $PATH
32631do
32632  IFS=$as_save_IFS
32633  test -z "$as_dir" && as_dir=.
32634    for ac_exec_ext in '' $ac_executable_extensions; do
32635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32636    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
32637       ac_prog_rejected=yes
32638       continue
32639     fi
32640    ac_cv_prog_RC="rc"
32641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32642    break 2
32643  fi
32644done
32645  done
32646IFS=$as_save_IFS
32647
32648if test $ac_prog_rejected = yes; then
32649  # We found a bogon in the path, so make sure we never use it.
32650  set dummy $ac_cv_prog_RC
32651  shift
32652  if test $# != 0; then
32653    # We chose a different compiler from the bogus one.
32654    # However, it has the same basename, so the bogon will be chosen
32655    # first if we set RC to just the basename; use the full file name.
32656    shift
32657    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
32658  fi
32659fi
32660fi
32661fi
32662RC=$ac_cv_prog_RC
32663if test -n "$RC"; then
32664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
32665$as_echo "$RC" >&6; }
32666else
32667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32668$as_echo "no" >&6; }
32669fi
32670
32671
32672
32673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32674
32675  # First separate the path from the arguments. This will split at the first
32676  # space.
32677  complete="$RC"
32678  path="${complete%% *}"
32679  tmp="$complete EOL"
32680  arguments="${tmp#* }"
32681
32682  # Input might be given as Windows format, start by converting to
32683  # unix format.
32684  new_path=`$CYGPATH -u "$path"`
32685
32686  # Now try to locate executable using which
32687  new_path=`$WHICH "$new_path" 2> /dev/null`
32688  # bat and cmd files are not always considered executable in cygwin causing which
32689  # to not find them
32690  if test "x$new_path" = x \
32691      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32692      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32693    new_path=`$CYGPATH -u "$path"`
32694  fi
32695  if test "x$new_path" = x; then
32696    # Oops. Which didn't find the executable.
32697    # The splitting of arguments from the executable at a space might have been incorrect,
32698    # since paths with space are more likely in Windows. Give it another try with the whole
32699    # argument.
32700    path="$complete"
32701    arguments="EOL"
32702    new_path=`$CYGPATH -u "$path"`
32703    new_path=`$WHICH "$new_path" 2> /dev/null`
32704    # bat and cmd files are not always considered executable in cygwin causing which
32705    # to not find them
32706    if test "x$new_path" = x \
32707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32709      new_path=`$CYGPATH -u "$path"`
32710    fi
32711    if test "x$new_path" = x; then
32712      # It's still not found. Now this is an unrecoverable error.
32713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32714$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32715      has_space=`$ECHO "$complete" | $GREP " "`
32716      if test "x$has_space" != x; then
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32719      fi
32720      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32721    fi
32722  fi
32723
32724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32727  # "foo.exe" is OK but "foo" is an error.
32728  #
32729  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32730  # It is also a way to make sure we got the proper file name for the real test later on.
32731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32732  if test "x$test_shortpath" = x; then
32733    # Short path failed, file does not exist as specified.
32734    # Try adding .exe or .cmd
32735    if test -f "${new_path}.exe"; then
32736      input_to_shortpath="${new_path}.exe"
32737    elif test -f "${new_path}.cmd"; then
32738      input_to_shortpath="${new_path}.cmd"
32739    else
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
32741$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
32742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32744      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32745    fi
32746  else
32747    input_to_shortpath="$new_path"
32748  fi
32749
32750  # Call helper function which possibly converts this using DOS-style short mode.
32751  # If so, the updated path is stored in $new_path.
32752  new_path="$input_to_shortpath"
32753
32754  input_path="$input_to_shortpath"
32755  # Check if we need to convert this using DOS-style short mode. If the path
32756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32757  # take no chances and rewrite it.
32758  # Note: m4 eats our [], so we need to use [ and ] instead.
32759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32760  if test "x$has_forbidden_chars" != x; then
32761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32765      # Going to short mode and back again did indeed matter. Since short mode is
32766      # case insensitive, let's make it lowercase to improve readability.
32767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32768      # Now convert it back to Unix-stile (cygpath)
32769      input_path=`$CYGPATH -u "$shortmode_path"`
32770      new_path="$input_path"
32771    fi
32772  fi
32773
32774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32775  if test "x$test_cygdrive_prefix" = x; then
32776    # As a simple fix, exclude /usr/bin since it's not a real path.
32777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32779      # a path prefixed by /cygdrive for fixpath to work.
32780      new_path="$CYGWIN_ROOT_PATH$input_path"
32781    fi
32782  fi
32783
32784  # remove trailing .exe if any
32785  new_path="${new_path/%.exe/}"
32786
32787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32788
32789  # First separate the path from the arguments. This will split at the first
32790  # space.
32791  complete="$RC"
32792  path="${complete%% *}"
32793  tmp="$complete EOL"
32794  arguments="${tmp#* }"
32795
32796  # Input might be given as Windows format, start by converting to
32797  # unix format.
32798  new_path="$path"
32799
32800  windows_path="$new_path"
32801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802    unix_path=`$CYGPATH -u "$windows_path"`
32803    new_path="$unix_path"
32804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32806    new_path="$unix_path"
32807  fi
32808
32809
32810  # Now try to locate executable using which
32811  new_path=`$WHICH "$new_path" 2> /dev/null`
32812
32813  if test "x$new_path" = x; then
32814    # Oops. Which didn't find the executable.
32815    # The splitting of arguments from the executable at a space might have been incorrect,
32816    # since paths with space are more likely in Windows. Give it another try with the whole
32817    # argument.
32818    path="$complete"
32819    arguments="EOL"
32820    new_path="$path"
32821
32822  windows_path="$new_path"
32823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32824    unix_path=`$CYGPATH -u "$windows_path"`
32825    new_path="$unix_path"
32826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32828    new_path="$unix_path"
32829  fi
32830
32831
32832    new_path=`$WHICH "$new_path" 2> /dev/null`
32833
32834    if test "x$new_path" = x; then
32835      # It's still not found. Now this is an unrecoverable error.
32836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32837$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32838      has_space=`$ECHO "$complete" | $GREP " "`
32839      if test "x$has_space" != x; then
32840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32842      fi
32843      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32844    fi
32845  fi
32846
32847  # Now new_path has a complete unix path to the binary
32848  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32849    # Keep paths in /bin as-is, but remove trailing .exe if any
32850    new_path="${new_path/%.exe/}"
32851    # Do not save /bin paths to all_fixpath_prefixes!
32852  else
32853    # Not in mixed or Windows style, start by that.
32854    new_path=`cmd //c echo $new_path`
32855
32856  input_path="$new_path"
32857  # Check if we need to convert this using DOS-style short mode. If the path
32858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32859  # take no chances and rewrite it.
32860  # Note: m4 eats our [], so we need to use [ and ] instead.
32861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32862  if test "x$has_forbidden_chars" != x; then
32863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32865  fi
32866
32867    # Output is in $new_path
32868
32869  windows_path="$new_path"
32870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32871    unix_path=`$CYGPATH -u "$windows_path"`
32872    new_path="$unix_path"
32873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32875    new_path="$unix_path"
32876  fi
32877
32878    # remove trailing .exe if any
32879    new_path="${new_path/%.exe/}"
32880
32881    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32882    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32883  fi
32884
32885  else
32886    # We're on a posix platform. Hooray! :)
32887    # First separate the path from the arguments. This will split at the first
32888    # space.
32889    complete="$RC"
32890    path="${complete%% *}"
32891    tmp="$complete EOL"
32892    arguments="${tmp#* }"
32893
32894    # Cannot rely on the command "which" here since it doesn't always work.
32895    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32896    if test -z "$is_absolute_path"; then
32897      # Path to executable is not absolute. Find it.
32898      IFS_save="$IFS"
32899      IFS=:
32900      for p in $PATH; do
32901        if test -f "$p/$path" && test -x "$p/$path"; then
32902          new_path="$p/$path"
32903          break
32904        fi
32905      done
32906      IFS="$IFS_save"
32907    else
32908      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
32909$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
32910      new_path="$path"
32911    fi
32912
32913    if test "x$new_path" = x; then
32914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
32915$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
32916      has_space=`$ECHO "$complete" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32920      fi
32921      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
32922    fi
32923  fi
32924
32925  # Now join together the path and the arguments once again
32926  if test "x$arguments" != xEOL; then
32927    new_complete="$new_path ${arguments% *}"
32928  else
32929    new_complete="$new_path"
32930  fi
32931
32932  if test "x$complete" != "x$new_complete"; then
32933    RC="$new_complete"
32934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
32935$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
32936  fi
32937
32938
32939    # For hotspot, we need these in Windows mixed path,
32940    # so rewrite them all. Need added .exe suffix.
32941    HOTSPOT_CXX="$CXX.exe"
32942    HOTSPOT_LD="$LD.exe"
32943    HOTSPOT_MT="$MT.exe"
32944    HOTSPOT_RC="$RC.exe"
32945
32946  unix_path="$HOTSPOT_CXX"
32947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32948    windows_path=`$CYGPATH -m "$unix_path"`
32949    HOTSPOT_CXX="$windows_path"
32950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32951    windows_path=`cmd //c echo $unix_path`
32952    HOTSPOT_CXX="$windows_path"
32953  fi
32954
32955
32956  unix_path="$HOTSPOT_LD"
32957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32958    windows_path=`$CYGPATH -m "$unix_path"`
32959    HOTSPOT_LD="$windows_path"
32960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32961    windows_path=`cmd //c echo $unix_path`
32962    HOTSPOT_LD="$windows_path"
32963  fi
32964
32965
32966  unix_path="$HOTSPOT_MT"
32967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32968    windows_path=`$CYGPATH -m "$unix_path"`
32969    HOTSPOT_MT="$windows_path"
32970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32971    windows_path=`cmd //c echo $unix_path`
32972    HOTSPOT_MT="$windows_path"
32973  fi
32974
32975
32976  unix_path="$HOTSPOT_RC"
32977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978    windows_path=`$CYGPATH -m "$unix_path"`
32979    HOTSPOT_RC="$windows_path"
32980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981    windows_path=`cmd //c echo $unix_path`
32982    HOTSPOT_RC="$windows_path"
32983  fi
32984
32985
32986
32987
32988    RC_FLAGS="-nologo -l 0x409 -r"
32989    if test "x$VARIANT" = xOPT; then :
32990
32991    RC_FLAGS="$RC_FLAGS -d NDEBUG"
32992
32993fi
32994
32995  # The version variables used to create RC_FLAGS may be overridden
32996  # in a custom configure script, or possibly the command line.
32997  # Let those variables be expanded at make time in spec.gmk.
32998  # The \$ are escaped to the shell, and the $(...) variables
32999  # are evaluated by make.
33000  RC_FLAGS="$RC_FLAGS \
33001      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
33002      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
33003      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
33004      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
33005      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
33006      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
33007      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
33008
33009  # lib.exe is used to create static libraries.
33010  # Extract the first word of "lib", so it can be a program name with args.
33011set dummy lib; ac_word=$2
33012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33013$as_echo_n "checking for $ac_word... " >&6; }
33014if ${ac_cv_prog_WINAR+:} false; then :
33015  $as_echo_n "(cached) " >&6
33016else
33017  if test -n "$WINAR"; then
33018  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
33019else
33020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33021for as_dir in $PATH
33022do
33023  IFS=$as_save_IFS
33024  test -z "$as_dir" && as_dir=.
33025    for ac_exec_ext in '' $ac_executable_extensions; do
33026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33027    ac_cv_prog_WINAR="lib"
33028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33029    break 2
33030  fi
33031done
33032  done
33033IFS=$as_save_IFS
33034
33035fi
33036fi
33037WINAR=$ac_cv_prog_WINAR
33038if test -n "$WINAR"; then
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
33040$as_echo "$WINAR" >&6; }
33041else
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33043$as_echo "no" >&6; }
33044fi
33045
33046
33047
33048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33049
33050  # First separate the path from the arguments. This will split at the first
33051  # space.
33052  complete="$WINAR"
33053  path="${complete%% *}"
33054  tmp="$complete EOL"
33055  arguments="${tmp#* }"
33056
33057  # Input might be given as Windows format, start by converting to
33058  # unix format.
33059  new_path=`$CYGPATH -u "$path"`
33060
33061  # Now try to locate executable using which
33062  new_path=`$WHICH "$new_path" 2> /dev/null`
33063  # bat and cmd files are not always considered executable in cygwin causing which
33064  # to not find them
33065  if test "x$new_path" = x \
33066      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33067      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33068    new_path=`$CYGPATH -u "$path"`
33069  fi
33070  if test "x$new_path" = x; then
33071    # Oops. Which didn't find the executable.
33072    # The splitting of arguments from the executable at a space might have been incorrect,
33073    # since paths with space are more likely in Windows. Give it another try with the whole
33074    # argument.
33075    path="$complete"
33076    arguments="EOL"
33077    new_path=`$CYGPATH -u "$path"`
33078    new_path=`$WHICH "$new_path" 2> /dev/null`
33079    # bat and cmd files are not always considered executable in cygwin causing which
33080    # to not find them
33081    if test "x$new_path" = x \
33082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33084      new_path=`$CYGPATH -u "$path"`
33085    fi
33086    if test "x$new_path" = x; then
33087      # It's still not found. Now this is an unrecoverable error.
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33089$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33090      has_space=`$ECHO "$complete" | $GREP " "`
33091      if test "x$has_space" != x; then
33092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33094      fi
33095      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33096    fi
33097  fi
33098
33099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33102  # "foo.exe" is OK but "foo" is an error.
33103  #
33104  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33105  # It is also a way to make sure we got the proper file name for the real test later on.
33106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33107  if test "x$test_shortpath" = x; then
33108    # Short path failed, file does not exist as specified.
33109    # Try adding .exe or .cmd
33110    if test -f "${new_path}.exe"; then
33111      input_to_shortpath="${new_path}.exe"
33112    elif test -f "${new_path}.cmd"; then
33113      input_to_shortpath="${new_path}.cmd"
33114    else
33115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
33116$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
33117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33119      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33120    fi
33121  else
33122    input_to_shortpath="$new_path"
33123  fi
33124
33125  # Call helper function which possibly converts this using DOS-style short mode.
33126  # If so, the updated path is stored in $new_path.
33127  new_path="$input_to_shortpath"
33128
33129  input_path="$input_to_shortpath"
33130  # Check if we need to convert this using DOS-style short mode. If the path
33131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33132  # take no chances and rewrite it.
33133  # Note: m4 eats our [], so we need to use [ and ] instead.
33134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33135  if test "x$has_forbidden_chars" != x; then
33136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33140      # Going to short mode and back again did indeed matter. Since short mode is
33141      # case insensitive, let's make it lowercase to improve readability.
33142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33143      # Now convert it back to Unix-stile (cygpath)
33144      input_path=`$CYGPATH -u "$shortmode_path"`
33145      new_path="$input_path"
33146    fi
33147  fi
33148
33149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33150  if test "x$test_cygdrive_prefix" = x; then
33151    # As a simple fix, exclude /usr/bin since it's not a real path.
33152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33154      # a path prefixed by /cygdrive for fixpath to work.
33155      new_path="$CYGWIN_ROOT_PATH$input_path"
33156    fi
33157  fi
33158
33159  # remove trailing .exe if any
33160  new_path="${new_path/%.exe/}"
33161
33162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33163
33164  # First separate the path from the arguments. This will split at the first
33165  # space.
33166  complete="$WINAR"
33167  path="${complete%% *}"
33168  tmp="$complete EOL"
33169  arguments="${tmp#* }"
33170
33171  # Input might be given as Windows format, start by converting to
33172  # unix format.
33173  new_path="$path"
33174
33175  windows_path="$new_path"
33176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33177    unix_path=`$CYGPATH -u "$windows_path"`
33178    new_path="$unix_path"
33179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33181    new_path="$unix_path"
33182  fi
33183
33184
33185  # Now try to locate executable using which
33186  new_path=`$WHICH "$new_path" 2> /dev/null`
33187
33188  if test "x$new_path" = x; then
33189    # Oops. Which didn't find the executable.
33190    # The splitting of arguments from the executable at a space might have been incorrect,
33191    # since paths with space are more likely in Windows. Give it another try with the whole
33192    # argument.
33193    path="$complete"
33194    arguments="EOL"
33195    new_path="$path"
33196
33197  windows_path="$new_path"
33198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33199    unix_path=`$CYGPATH -u "$windows_path"`
33200    new_path="$unix_path"
33201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33203    new_path="$unix_path"
33204  fi
33205
33206
33207    new_path=`$WHICH "$new_path" 2> /dev/null`
33208
33209    if test "x$new_path" = x; then
33210      # It's still not found. Now this is an unrecoverable error.
33211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33212$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33213      has_space=`$ECHO "$complete" | $GREP " "`
33214      if test "x$has_space" != x; then
33215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33217      fi
33218      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33219    fi
33220  fi
33221
33222  # Now new_path has a complete unix path to the binary
33223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33224    # Keep paths in /bin as-is, but remove trailing .exe if any
33225    new_path="${new_path/%.exe/}"
33226    # Do not save /bin paths to all_fixpath_prefixes!
33227  else
33228    # Not in mixed or Windows style, start by that.
33229    new_path=`cmd //c echo $new_path`
33230
33231  input_path="$new_path"
33232  # Check if we need to convert this using DOS-style short mode. If the path
33233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33234  # take no chances and rewrite it.
33235  # Note: m4 eats our [], so we need to use [ and ] instead.
33236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33237  if test "x$has_forbidden_chars" != x; then
33238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33240  fi
33241
33242    # Output is in $new_path
33243
33244  windows_path="$new_path"
33245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33246    unix_path=`$CYGPATH -u "$windows_path"`
33247    new_path="$unix_path"
33248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33250    new_path="$unix_path"
33251  fi
33252
33253    # remove trailing .exe if any
33254    new_path="${new_path/%.exe/}"
33255
33256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33258  fi
33259
33260  else
33261    # We're on a posix platform. Hooray! :)
33262    # First separate the path from the arguments. This will split at the first
33263    # space.
33264    complete="$WINAR"
33265    path="${complete%% *}"
33266    tmp="$complete EOL"
33267    arguments="${tmp#* }"
33268
33269    # Cannot rely on the command "which" here since it doesn't always work.
33270    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33271    if test -z "$is_absolute_path"; then
33272      # Path to executable is not absolute. Find it.
33273      IFS_save="$IFS"
33274      IFS=:
33275      for p in $PATH; do
33276        if test -f "$p/$path" && test -x "$p/$path"; then
33277          new_path="$p/$path"
33278          break
33279        fi
33280      done
33281      IFS="$IFS_save"
33282    else
33283      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
33284$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
33285      new_path="$path"
33286    fi
33287
33288    if test "x$new_path" = x; then
33289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
33290$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
33291      has_space=`$ECHO "$complete" | $GREP " "`
33292      if test "x$has_space" != x; then
33293        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33295      fi
33296      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
33297    fi
33298  fi
33299
33300  # Now join together the path and the arguments once again
33301  if test "x$arguments" != xEOL; then
33302    new_complete="$new_path ${arguments% *}"
33303  else
33304    new_complete="$new_path"
33305  fi
33306
33307  if test "x$complete" != "x$new_complete"; then
33308    WINAR="$new_complete"
33309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
33310$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
33311  fi
33312
33313  AR="$WINAR"
33314  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
33315
33316  # Extract the first word of "dumpbin", so it can be a program name with args.
33317set dummy dumpbin; ac_word=$2
33318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33319$as_echo_n "checking for $ac_word... " >&6; }
33320if ${ac_cv_prog_DUMPBIN+:} false; then :
33321  $as_echo_n "(cached) " >&6
33322else
33323  if test -n "$DUMPBIN"; then
33324  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
33325else
33326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33327for as_dir in $PATH
33328do
33329  IFS=$as_save_IFS
33330  test -z "$as_dir" && as_dir=.
33331    for ac_exec_ext in '' $ac_executable_extensions; do
33332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33333    ac_cv_prog_DUMPBIN="dumpbin"
33334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33335    break 2
33336  fi
33337done
33338  done
33339IFS=$as_save_IFS
33340
33341fi
33342fi
33343DUMPBIN=$ac_cv_prog_DUMPBIN
33344if test -n "$DUMPBIN"; then
33345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
33346$as_echo "$DUMPBIN" >&6; }
33347else
33348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33349$as_echo "no" >&6; }
33350fi
33351
33352
33353
33354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33355
33356  # First separate the path from the arguments. This will split at the first
33357  # space.
33358  complete="$DUMPBIN"
33359  path="${complete%% *}"
33360  tmp="$complete EOL"
33361  arguments="${tmp#* }"
33362
33363  # Input might be given as Windows format, start by converting to
33364  # unix format.
33365  new_path=`$CYGPATH -u "$path"`
33366
33367  # Now try to locate executable using which
33368  new_path=`$WHICH "$new_path" 2> /dev/null`
33369  # bat and cmd files are not always considered executable in cygwin causing which
33370  # to not find them
33371  if test "x$new_path" = x \
33372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33374    new_path=`$CYGPATH -u "$path"`
33375  fi
33376  if test "x$new_path" = x; then
33377    # Oops. Which didn't find the executable.
33378    # The splitting of arguments from the executable at a space might have been incorrect,
33379    # since paths with space are more likely in Windows. Give it another try with the whole
33380    # argument.
33381    path="$complete"
33382    arguments="EOL"
33383    new_path=`$CYGPATH -u "$path"`
33384    new_path=`$WHICH "$new_path" 2> /dev/null`
33385    # bat and cmd files are not always considered executable in cygwin causing which
33386    # to not find them
33387    if test "x$new_path" = x \
33388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33390      new_path=`$CYGPATH -u "$path"`
33391    fi
33392    if test "x$new_path" = x; then
33393      # It's still not found. Now this is an unrecoverable error.
33394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33395$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33396      has_space=`$ECHO "$complete" | $GREP " "`
33397      if test "x$has_space" != x; then
33398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33400      fi
33401      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33402    fi
33403  fi
33404
33405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33408  # "foo.exe" is OK but "foo" is an error.
33409  #
33410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33411  # It is also a way to make sure we got the proper file name for the real test later on.
33412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33413  if test "x$test_shortpath" = x; then
33414    # Short path failed, file does not exist as specified.
33415    # Try adding .exe or .cmd
33416    if test -f "${new_path}.exe"; then
33417      input_to_shortpath="${new_path}.exe"
33418    elif test -f "${new_path}.cmd"; then
33419      input_to_shortpath="${new_path}.cmd"
33420    else
33421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
33422$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
33423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33425      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33426    fi
33427  else
33428    input_to_shortpath="$new_path"
33429  fi
33430
33431  # Call helper function which possibly converts this using DOS-style short mode.
33432  # If so, the updated path is stored in $new_path.
33433  new_path="$input_to_shortpath"
33434
33435  input_path="$input_to_shortpath"
33436  # Check if we need to convert this using DOS-style short mode. If the path
33437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33438  # take no chances and rewrite it.
33439  # Note: m4 eats our [], so we need to use [ and ] instead.
33440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33441  if test "x$has_forbidden_chars" != x; then
33442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33446      # Going to short mode and back again did indeed matter. Since short mode is
33447      # case insensitive, let's make it lowercase to improve readability.
33448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33449      # Now convert it back to Unix-stile (cygpath)
33450      input_path=`$CYGPATH -u "$shortmode_path"`
33451      new_path="$input_path"
33452    fi
33453  fi
33454
33455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33456  if test "x$test_cygdrive_prefix" = x; then
33457    # As a simple fix, exclude /usr/bin since it's not a real path.
33458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33460      # a path prefixed by /cygdrive for fixpath to work.
33461      new_path="$CYGWIN_ROOT_PATH$input_path"
33462    fi
33463  fi
33464
33465  # remove trailing .exe if any
33466  new_path="${new_path/%.exe/}"
33467
33468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33469
33470  # First separate the path from the arguments. This will split at the first
33471  # space.
33472  complete="$DUMPBIN"
33473  path="${complete%% *}"
33474  tmp="$complete EOL"
33475  arguments="${tmp#* }"
33476
33477  # Input might be given as Windows format, start by converting to
33478  # unix format.
33479  new_path="$path"
33480
33481  windows_path="$new_path"
33482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33483    unix_path=`$CYGPATH -u "$windows_path"`
33484    new_path="$unix_path"
33485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33487    new_path="$unix_path"
33488  fi
33489
33490
33491  # Now try to locate executable using which
33492  new_path=`$WHICH "$new_path" 2> /dev/null`
33493
33494  if test "x$new_path" = x; then
33495    # Oops. Which didn't find the executable.
33496    # The splitting of arguments from the executable at a space might have been incorrect,
33497    # since paths with space are more likely in Windows. Give it another try with the whole
33498    # argument.
33499    path="$complete"
33500    arguments="EOL"
33501    new_path="$path"
33502
33503  windows_path="$new_path"
33504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33505    unix_path=`$CYGPATH -u "$windows_path"`
33506    new_path="$unix_path"
33507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33509    new_path="$unix_path"
33510  fi
33511
33512
33513    new_path=`$WHICH "$new_path" 2> /dev/null`
33514
33515    if test "x$new_path" = x; then
33516      # It's still not found. Now this is an unrecoverable error.
33517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33518$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33519      has_space=`$ECHO "$complete" | $GREP " "`
33520      if test "x$has_space" != x; then
33521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33523      fi
33524      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33525    fi
33526  fi
33527
33528  # Now new_path has a complete unix path to the binary
33529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33530    # Keep paths in /bin as-is, but remove trailing .exe if any
33531    new_path="${new_path/%.exe/}"
33532    # Do not save /bin paths to all_fixpath_prefixes!
33533  else
33534    # Not in mixed or Windows style, start by that.
33535    new_path=`cmd //c echo $new_path`
33536
33537  input_path="$new_path"
33538  # Check if we need to convert this using DOS-style short mode. If the path
33539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33540  # take no chances and rewrite it.
33541  # Note: m4 eats our [], so we need to use [ and ] instead.
33542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33543  if test "x$has_forbidden_chars" != x; then
33544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33546  fi
33547
33548    # Output is in $new_path
33549
33550  windows_path="$new_path"
33551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33552    unix_path=`$CYGPATH -u "$windows_path"`
33553    new_path="$unix_path"
33554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33556    new_path="$unix_path"
33557  fi
33558
33559    # remove trailing .exe if any
33560    new_path="${new_path/%.exe/}"
33561
33562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33564  fi
33565
33566  else
33567    # We're on a posix platform. Hooray! :)
33568    # First separate the path from the arguments. This will split at the first
33569    # space.
33570    complete="$DUMPBIN"
33571    path="${complete%% *}"
33572    tmp="$complete EOL"
33573    arguments="${tmp#* }"
33574
33575    # Cannot rely on the command "which" here since it doesn't always work.
33576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33577    if test -z "$is_absolute_path"; then
33578      # Path to executable is not absolute. Find it.
33579      IFS_save="$IFS"
33580      IFS=:
33581      for p in $PATH; do
33582        if test -f "$p/$path" && test -x "$p/$path"; then
33583          new_path="$p/$path"
33584          break
33585        fi
33586      done
33587      IFS="$IFS_save"
33588    else
33589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
33590$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
33591      new_path="$path"
33592    fi
33593
33594    if test "x$new_path" = x; then
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33596$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33597      has_space=`$ECHO "$complete" | $GREP " "`
33598      if test "x$has_space" != x; then
33599        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33601      fi
33602      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33603    fi
33604  fi
33605
33606  # Now join together the path and the arguments once again
33607  if test "x$arguments" != xEOL; then
33608    new_complete="$new_path ${arguments% *}"
33609  else
33610    new_complete="$new_path"
33611  fi
33612
33613  if test "x$complete" != "x$new_complete"; then
33614    DUMPBIN="$new_complete"
33615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
33616$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
33617  fi
33618
33619
33620      COMPILER_TYPE=CL
33621      CCXXFLAGS="$CCXXFLAGS -nologo"
33622
33623fi
33624
33625
33626
33627  ac_ext=c
33628ac_cpp='$CPP $CPPFLAGS'
33629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33631ac_compiler_gnu=$ac_cv_c_compiler_gnu
33632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33633$as_echo_n "checking how to run the C preprocessor... " >&6; }
33634# On Suns, sometimes $CPP names a directory.
33635if test -n "$CPP" && test -d "$CPP"; then
33636  CPP=
33637fi
33638if test -z "$CPP"; then
33639  if ${ac_cv_prog_CPP+:} false; then :
33640  $as_echo_n "(cached) " >&6
33641else
33642      # Double quotes because CPP needs to be expanded
33643    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33644    do
33645      ac_preproc_ok=false
33646for ac_c_preproc_warn_flag in '' yes
33647do
33648  # Use a header file that comes with gcc, so configuring glibc
33649  # with a fresh cross-compiler works.
33650  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33651  # <limits.h> exists even on freestanding compilers.
33652  # On the NeXT, cc -E runs the code through the compiler's parser,
33653  # not just through cpp. "Syntax error" is here to catch this case.
33654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33655/* end confdefs.h.  */
33656#ifdef __STDC__
33657# include <limits.h>
33658#else
33659# include <assert.h>
33660#endif
33661		     Syntax error
33662_ACEOF
33663if ac_fn_c_try_cpp "$LINENO"; then :
33664
33665else
33666  # Broken: fails on valid input.
33667continue
33668fi
33669rm -f conftest.err conftest.i conftest.$ac_ext
33670
33671  # OK, works on sane cases.  Now check whether nonexistent headers
33672  # can be detected and how.
33673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33674/* end confdefs.h.  */
33675#include <ac_nonexistent.h>
33676_ACEOF
33677if ac_fn_c_try_cpp "$LINENO"; then :
33678  # Broken: success on invalid input.
33679continue
33680else
33681  # Passes both tests.
33682ac_preproc_ok=:
33683break
33684fi
33685rm -f conftest.err conftest.i conftest.$ac_ext
33686
33687done
33688# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33689rm -f conftest.i conftest.err conftest.$ac_ext
33690if $ac_preproc_ok; then :
33691  break
33692fi
33693
33694    done
33695    ac_cv_prog_CPP=$CPP
33696
33697fi
33698  CPP=$ac_cv_prog_CPP
33699else
33700  ac_cv_prog_CPP=$CPP
33701fi
33702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33703$as_echo "$CPP" >&6; }
33704ac_preproc_ok=false
33705for ac_c_preproc_warn_flag in '' yes
33706do
33707  # Use a header file that comes with gcc, so configuring glibc
33708  # with a fresh cross-compiler works.
33709  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33710  # <limits.h> exists even on freestanding compilers.
33711  # On the NeXT, cc -E runs the code through the compiler's parser,
33712  # not just through cpp. "Syntax error" is here to catch this case.
33713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33714/* end confdefs.h.  */
33715#ifdef __STDC__
33716# include <limits.h>
33717#else
33718# include <assert.h>
33719#endif
33720		     Syntax error
33721_ACEOF
33722if ac_fn_c_try_cpp "$LINENO"; then :
33723
33724else
33725  # Broken: fails on valid input.
33726continue
33727fi
33728rm -f conftest.err conftest.i conftest.$ac_ext
33729
33730  # OK, works on sane cases.  Now check whether nonexistent headers
33731  # can be detected and how.
33732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33733/* end confdefs.h.  */
33734#include <ac_nonexistent.h>
33735_ACEOF
33736if ac_fn_c_try_cpp "$LINENO"; then :
33737  # Broken: success on invalid input.
33738continue
33739else
33740  # Passes both tests.
33741ac_preproc_ok=:
33742break
33743fi
33744rm -f conftest.err conftest.i conftest.$ac_ext
33745
33746done
33747# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33748rm -f conftest.i conftest.err conftest.$ac_ext
33749if $ac_preproc_ok; then :
33750
33751else
33752  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33754as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
33755See \`config.log' for more details" "$LINENO" 5; }
33756fi
33757
33758ac_ext=cpp
33759ac_cpp='$CXXCPP $CPPFLAGS'
33760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33763
33764
33765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33766
33767  # First separate the path from the arguments. This will split at the first
33768  # space.
33769  complete="$CPP"
33770  path="${complete%% *}"
33771  tmp="$complete EOL"
33772  arguments="${tmp#* }"
33773
33774  # Input might be given as Windows format, start by converting to
33775  # unix format.
33776  new_path=`$CYGPATH -u "$path"`
33777
33778  # Now try to locate executable using which
33779  new_path=`$WHICH "$new_path" 2> /dev/null`
33780  # bat and cmd files are not always considered executable in cygwin causing which
33781  # to not find them
33782  if test "x$new_path" = x \
33783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33785    new_path=`$CYGPATH -u "$path"`
33786  fi
33787  if test "x$new_path" = x; then
33788    # Oops. Which didn't find the executable.
33789    # The splitting of arguments from the executable at a space might have been incorrect,
33790    # since paths with space are more likely in Windows. Give it another try with the whole
33791    # argument.
33792    path="$complete"
33793    arguments="EOL"
33794    new_path=`$CYGPATH -u "$path"`
33795    new_path=`$WHICH "$new_path" 2> /dev/null`
33796    # bat and cmd files are not always considered executable in cygwin causing which
33797    # to not find them
33798    if test "x$new_path" = x \
33799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33801      new_path=`$CYGPATH -u "$path"`
33802    fi
33803    if test "x$new_path" = x; then
33804      # It's still not found. Now this is an unrecoverable error.
33805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33806$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33807      has_space=`$ECHO "$complete" | $GREP " "`
33808      if test "x$has_space" != x; then
33809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33811      fi
33812      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33813    fi
33814  fi
33815
33816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33819  # "foo.exe" is OK but "foo" is an error.
33820  #
33821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33822  # It is also a way to make sure we got the proper file name for the real test later on.
33823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33824  if test "x$test_shortpath" = x; then
33825    # Short path failed, file does not exist as specified.
33826    # Try adding .exe or .cmd
33827    if test -f "${new_path}.exe"; then
33828      input_to_shortpath="${new_path}.exe"
33829    elif test -f "${new_path}.cmd"; then
33830      input_to_shortpath="${new_path}.cmd"
33831    else
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
33833$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
33834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33836      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33837    fi
33838  else
33839    input_to_shortpath="$new_path"
33840  fi
33841
33842  # Call helper function which possibly converts this using DOS-style short mode.
33843  # If so, the updated path is stored in $new_path.
33844  new_path="$input_to_shortpath"
33845
33846  input_path="$input_to_shortpath"
33847  # Check if we need to convert this using DOS-style short mode. If the path
33848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33849  # take no chances and rewrite it.
33850  # Note: m4 eats our [], so we need to use [ and ] instead.
33851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33852  if test "x$has_forbidden_chars" != x; then
33853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33857      # Going to short mode and back again did indeed matter. Since short mode is
33858      # case insensitive, let's make it lowercase to improve readability.
33859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33860      # Now convert it back to Unix-stile (cygpath)
33861      input_path=`$CYGPATH -u "$shortmode_path"`
33862      new_path="$input_path"
33863    fi
33864  fi
33865
33866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33867  if test "x$test_cygdrive_prefix" = x; then
33868    # As a simple fix, exclude /usr/bin since it's not a real path.
33869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33871      # a path prefixed by /cygdrive for fixpath to work.
33872      new_path="$CYGWIN_ROOT_PATH$input_path"
33873    fi
33874  fi
33875
33876  # remove trailing .exe if any
33877  new_path="${new_path/%.exe/}"
33878
33879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33880
33881  # First separate the path from the arguments. This will split at the first
33882  # space.
33883  complete="$CPP"
33884  path="${complete%% *}"
33885  tmp="$complete EOL"
33886  arguments="${tmp#* }"
33887
33888  # Input might be given as Windows format, start by converting to
33889  # unix format.
33890  new_path="$path"
33891
33892  windows_path="$new_path"
33893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33894    unix_path=`$CYGPATH -u "$windows_path"`
33895    new_path="$unix_path"
33896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33898    new_path="$unix_path"
33899  fi
33900
33901
33902  # Now try to locate executable using which
33903  new_path=`$WHICH "$new_path" 2> /dev/null`
33904
33905  if test "x$new_path" = x; then
33906    # Oops. Which didn't find the executable.
33907    # The splitting of arguments from the executable at a space might have been incorrect,
33908    # since paths with space are more likely in Windows. Give it another try with the whole
33909    # argument.
33910    path="$complete"
33911    arguments="EOL"
33912    new_path="$path"
33913
33914  windows_path="$new_path"
33915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33916    unix_path=`$CYGPATH -u "$windows_path"`
33917    new_path="$unix_path"
33918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33920    new_path="$unix_path"
33921  fi
33922
33923
33924    new_path=`$WHICH "$new_path" 2> /dev/null`
33925
33926    if test "x$new_path" = x; then
33927      # It's still not found. Now this is an unrecoverable error.
33928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
33929$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
33930      has_space=`$ECHO "$complete" | $GREP " "`
33931      if test "x$has_space" != x; then
33932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33934      fi
33935      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
33936    fi
33937  fi
33938
33939  # Now new_path has a complete unix path to the binary
33940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33941    # Keep paths in /bin as-is, but remove trailing .exe if any
33942    new_path="${new_path/%.exe/}"
33943    # Do not save /bin paths to all_fixpath_prefixes!
33944  else
33945    # Not in mixed or Windows style, start by that.
33946    new_path=`cmd //c echo $new_path`
33947
33948  input_path="$new_path"
33949  # Check if we need to convert this using DOS-style short mode. If the path
33950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33951  # take no chances and rewrite it.
33952  # Note: m4 eats our [], so we need to use [ and ] instead.
33953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33954  if test "x$has_forbidden_chars" != x; then
33955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33957  fi
33958
33959    # Output is in $new_path
33960
33961  windows_path="$new_path"
33962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33963    unix_path=`$CYGPATH -u "$windows_path"`
33964    new_path="$unix_path"
33965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33967    new_path="$unix_path"
33968  fi
33969
33970    # remove trailing .exe if any
33971    new_path="${new_path/%.exe/}"
33972
33973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33975  fi
33976
33977  else
33978    # We're on a posix platform. Hooray! :)
33979    # First separate the path from the arguments. This will split at the first
33980    # space.
33981    complete="$CPP"
33982    path="${complete%% *}"
33983    tmp="$complete EOL"
33984    arguments="${tmp#* }"
33985
33986    # Cannot rely on the command "which" here since it doesn't always work.
33987    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33988    if test -z "$is_absolute_path"; then
33989      # Path to executable is not absolute. Find it.
33990      IFS_save="$IFS"
33991      IFS=:
33992      for p in $PATH; do
33993        if test -f "$p/$path" && test -x "$p/$path"; then
33994          new_path="$p/$path"
33995          break
33996        fi
33997      done
33998      IFS="$IFS_save"
33999    else
34000      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
34001$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
34002      new_path="$path"
34003    fi
34004
34005    if test "x$new_path" = x; then
34006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34007$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34008      has_space=`$ECHO "$complete" | $GREP " "`
34009      if test "x$has_space" != x; then
34010        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34012      fi
34013      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34014    fi
34015  fi
34016
34017  # Now join together the path and the arguments once again
34018  if test "x$arguments" != xEOL; then
34019    new_complete="$new_path ${arguments% *}"
34020  else
34021    new_complete="$new_path"
34022  fi
34023
34024  if test "x$complete" != "x$new_complete"; then
34025    CPP="$new_complete"
34026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34027$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34028  fi
34029
34030
34031  ac_ext=cpp
34032ac_cpp='$CXXCPP $CPPFLAGS'
34033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34037$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34038if test -z "$CXXCPP"; then
34039  if ${ac_cv_prog_CXXCPP+:} false; then :
34040  $as_echo_n "(cached) " >&6
34041else
34042      # Double quotes because CXXCPP needs to be expanded
34043    for CXXCPP in "$CXX -E" "/lib/cpp"
34044    do
34045      ac_preproc_ok=false
34046for ac_cxx_preproc_warn_flag in '' yes
34047do
34048  # Use a header file that comes with gcc, so configuring glibc
34049  # with a fresh cross-compiler works.
34050  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34051  # <limits.h> exists even on freestanding compilers.
34052  # On the NeXT, cc -E runs the code through the compiler's parser,
34053  # not just through cpp. "Syntax error" is here to catch this case.
34054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34055/* end confdefs.h.  */
34056#ifdef __STDC__
34057# include <limits.h>
34058#else
34059# include <assert.h>
34060#endif
34061		     Syntax error
34062_ACEOF
34063if ac_fn_cxx_try_cpp "$LINENO"; then :
34064
34065else
34066  # Broken: fails on valid input.
34067continue
34068fi
34069rm -f conftest.err conftest.i conftest.$ac_ext
34070
34071  # OK, works on sane cases.  Now check whether nonexistent headers
34072  # can be detected and how.
34073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34074/* end confdefs.h.  */
34075#include <ac_nonexistent.h>
34076_ACEOF
34077if ac_fn_cxx_try_cpp "$LINENO"; then :
34078  # Broken: success on invalid input.
34079continue
34080else
34081  # Passes both tests.
34082ac_preproc_ok=:
34083break
34084fi
34085rm -f conftest.err conftest.i conftest.$ac_ext
34086
34087done
34088# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34089rm -f conftest.i conftest.err conftest.$ac_ext
34090if $ac_preproc_ok; then :
34091  break
34092fi
34093
34094    done
34095    ac_cv_prog_CXXCPP=$CXXCPP
34096
34097fi
34098  CXXCPP=$ac_cv_prog_CXXCPP
34099else
34100  ac_cv_prog_CXXCPP=$CXXCPP
34101fi
34102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34103$as_echo "$CXXCPP" >&6; }
34104ac_preproc_ok=false
34105for ac_cxx_preproc_warn_flag in '' yes
34106do
34107  # Use a header file that comes with gcc, so configuring glibc
34108  # with a fresh cross-compiler works.
34109  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34110  # <limits.h> exists even on freestanding compilers.
34111  # On the NeXT, cc -E runs the code through the compiler's parser,
34112  # not just through cpp. "Syntax error" is here to catch this case.
34113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34114/* end confdefs.h.  */
34115#ifdef __STDC__
34116# include <limits.h>
34117#else
34118# include <assert.h>
34119#endif
34120		     Syntax error
34121_ACEOF
34122if ac_fn_cxx_try_cpp "$LINENO"; then :
34123
34124else
34125  # Broken: fails on valid input.
34126continue
34127fi
34128rm -f conftest.err conftest.i conftest.$ac_ext
34129
34130  # OK, works on sane cases.  Now check whether nonexistent headers
34131  # can be detected and how.
34132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34133/* end confdefs.h.  */
34134#include <ac_nonexistent.h>
34135_ACEOF
34136if ac_fn_cxx_try_cpp "$LINENO"; then :
34137  # Broken: success on invalid input.
34138continue
34139else
34140  # Passes both tests.
34141ac_preproc_ok=:
34142break
34143fi
34144rm -f conftest.err conftest.i conftest.$ac_ext
34145
34146done
34147# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34148rm -f conftest.i conftest.err conftest.$ac_ext
34149if $ac_preproc_ok; then :
34150
34151else
34152  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34154as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34155See \`config.log' for more details" "$LINENO" 5; }
34156fi
34157
34158ac_ext=cpp
34159ac_cpp='$CXXCPP $CPPFLAGS'
34160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34163
34164
34165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34166
34167  # First separate the path from the arguments. This will split at the first
34168  # space.
34169  complete="$CXXCPP"
34170  path="${complete%% *}"
34171  tmp="$complete EOL"
34172  arguments="${tmp#* }"
34173
34174  # Input might be given as Windows format, start by converting to
34175  # unix format.
34176  new_path=`$CYGPATH -u "$path"`
34177
34178  # Now try to locate executable using which
34179  new_path=`$WHICH "$new_path" 2> /dev/null`
34180  # bat and cmd files are not always considered executable in cygwin causing which
34181  # to not find them
34182  if test "x$new_path" = x \
34183      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34184      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34185    new_path=`$CYGPATH -u "$path"`
34186  fi
34187  if test "x$new_path" = x; then
34188    # Oops. Which didn't find the executable.
34189    # The splitting of arguments from the executable at a space might have been incorrect,
34190    # since paths with space are more likely in Windows. Give it another try with the whole
34191    # argument.
34192    path="$complete"
34193    arguments="EOL"
34194    new_path=`$CYGPATH -u "$path"`
34195    new_path=`$WHICH "$new_path" 2> /dev/null`
34196    # bat and cmd files are not always considered executable in cygwin causing which
34197    # to not find them
34198    if test "x$new_path" = x \
34199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34201      new_path=`$CYGPATH -u "$path"`
34202    fi
34203    if test "x$new_path" = x; then
34204      # It's still not found. Now this is an unrecoverable error.
34205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34206$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34207      has_space=`$ECHO "$complete" | $GREP " "`
34208      if test "x$has_space" != x; then
34209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34211      fi
34212      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34213    fi
34214  fi
34215
34216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34219  # "foo.exe" is OK but "foo" is an error.
34220  #
34221  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34222  # It is also a way to make sure we got the proper file name for the real test later on.
34223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34224  if test "x$test_shortpath" = x; then
34225    # Short path failed, file does not exist as specified.
34226    # Try adding .exe or .cmd
34227    if test -f "${new_path}.exe"; then
34228      input_to_shortpath="${new_path}.exe"
34229    elif test -f "${new_path}.cmd"; then
34230      input_to_shortpath="${new_path}.cmd"
34231    else
34232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34233$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34234      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34235$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34236      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34237    fi
34238  else
34239    input_to_shortpath="$new_path"
34240  fi
34241
34242  # Call helper function which possibly converts this using DOS-style short mode.
34243  # If so, the updated path is stored in $new_path.
34244  new_path="$input_to_shortpath"
34245
34246  input_path="$input_to_shortpath"
34247  # Check if we need to convert this using DOS-style short mode. If the path
34248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34249  # take no chances and rewrite it.
34250  # Note: m4 eats our [], so we need to use [ and ] instead.
34251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34252  if test "x$has_forbidden_chars" != x; then
34253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34257      # Going to short mode and back again did indeed matter. Since short mode is
34258      # case insensitive, let's make it lowercase to improve readability.
34259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34260      # Now convert it back to Unix-stile (cygpath)
34261      input_path=`$CYGPATH -u "$shortmode_path"`
34262      new_path="$input_path"
34263    fi
34264  fi
34265
34266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34267  if test "x$test_cygdrive_prefix" = x; then
34268    # As a simple fix, exclude /usr/bin since it's not a real path.
34269    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34271      # a path prefixed by /cygdrive for fixpath to work.
34272      new_path="$CYGWIN_ROOT_PATH$input_path"
34273    fi
34274  fi
34275
34276  # remove trailing .exe if any
34277  new_path="${new_path/%.exe/}"
34278
34279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34280
34281  # First separate the path from the arguments. This will split at the first
34282  # space.
34283  complete="$CXXCPP"
34284  path="${complete%% *}"
34285  tmp="$complete EOL"
34286  arguments="${tmp#* }"
34287
34288  # Input might be given as Windows format, start by converting to
34289  # unix format.
34290  new_path="$path"
34291
34292  windows_path="$new_path"
34293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34294    unix_path=`$CYGPATH -u "$windows_path"`
34295    new_path="$unix_path"
34296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34298    new_path="$unix_path"
34299  fi
34300
34301
34302  # Now try to locate executable using which
34303  new_path=`$WHICH "$new_path" 2> /dev/null`
34304
34305  if test "x$new_path" = x; then
34306    # Oops. Which didn't find the executable.
34307    # The splitting of arguments from the executable at a space might have been incorrect,
34308    # since paths with space are more likely in Windows. Give it another try with the whole
34309    # argument.
34310    path="$complete"
34311    arguments="EOL"
34312    new_path="$path"
34313
34314  windows_path="$new_path"
34315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34316    unix_path=`$CYGPATH -u "$windows_path"`
34317    new_path="$unix_path"
34318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34320    new_path="$unix_path"
34321  fi
34322
34323
34324    new_path=`$WHICH "$new_path" 2> /dev/null`
34325
34326    if test "x$new_path" = x; then
34327      # It's still not found. Now this is an unrecoverable error.
34328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34329$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34330      has_space=`$ECHO "$complete" | $GREP " "`
34331      if test "x$has_space" != x; then
34332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34334      fi
34335      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34336    fi
34337  fi
34338
34339  # Now new_path has a complete unix path to the binary
34340  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34341    # Keep paths in /bin as-is, but remove trailing .exe if any
34342    new_path="${new_path/%.exe/}"
34343    # Do not save /bin paths to all_fixpath_prefixes!
34344  else
34345    # Not in mixed or Windows style, start by that.
34346    new_path=`cmd //c echo $new_path`
34347
34348  input_path="$new_path"
34349  # Check if we need to convert this using DOS-style short mode. If the path
34350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34351  # take no chances and rewrite it.
34352  # Note: m4 eats our [], so we need to use [ and ] instead.
34353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34354  if test "x$has_forbidden_chars" != x; then
34355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34357  fi
34358
34359    # Output is in $new_path
34360
34361  windows_path="$new_path"
34362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34363    unix_path=`$CYGPATH -u "$windows_path"`
34364    new_path="$unix_path"
34365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34367    new_path="$unix_path"
34368  fi
34369
34370    # remove trailing .exe if any
34371    new_path="${new_path/%.exe/}"
34372
34373    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34374    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34375  fi
34376
34377  else
34378    # We're on a posix platform. Hooray! :)
34379    # First separate the path from the arguments. This will split at the first
34380    # space.
34381    complete="$CXXCPP"
34382    path="${complete%% *}"
34383    tmp="$complete EOL"
34384    arguments="${tmp#* }"
34385
34386    # Cannot rely on the command "which" here since it doesn't always work.
34387    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34388    if test -z "$is_absolute_path"; then
34389      # Path to executable is not absolute. Find it.
34390      IFS_save="$IFS"
34391      IFS=:
34392      for p in $PATH; do
34393        if test -f "$p/$path" && test -x "$p/$path"; then
34394          new_path="$p/$path"
34395          break
34396        fi
34397      done
34398      IFS="$IFS_save"
34399    else
34400      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
34401$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
34402      new_path="$path"
34403    fi
34404
34405    if test "x$new_path" = x; then
34406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34407$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34408      has_space=`$ECHO "$complete" | $GREP " "`
34409      if test "x$has_space" != x; then
34410        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34411$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34412      fi
34413      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34414    fi
34415  fi
34416
34417  # Now join together the path and the arguments once again
34418  if test "x$arguments" != xEOL; then
34419    new_complete="$new_path ${arguments% *}"
34420  else
34421    new_complete="$new_path"
34422  fi
34423
34424  if test "x$complete" != "x$new_complete"; then
34425    CXXCPP="$new_complete"
34426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34427$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34428  fi
34429
34430
34431  if test "x$COMPILE_TYPE" != "xcross"; then
34432    # If we are not cross compiling, use the same compilers for
34433    # building the build platform executables. The cross-compilation
34434    # case needed to be done earlier, but this can only be done after
34435    # the native tools have been localized.
34436    BUILD_CC="$CC"
34437    BUILD_CXX="$CXX"
34438    BUILD_LD="$LD"
34439  fi
34440
34441  # for solaris we really need solaris tools, and not gnu equivalent
34442  #   these seems to normally reside in /usr/ccs/bin so add that to path before
34443  #   starting to probe
34444  #
34445  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
34446  #         so that it can be overriden --with-tools-dir
34447  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
34448    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
34449  fi
34450
34451  # Find the right assembler.
34452  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34453
34454
34455  # Publish this variable in the help.
34456
34457
34458  if test "x$AS" = x; then
34459    # The variable is not set by user, try to locate tool using the code snippet
34460    for ac_prog in as
34461do
34462  # Extract the first word of "$ac_prog", so it can be a program name with args.
34463set dummy $ac_prog; ac_word=$2
34464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34465$as_echo_n "checking for $ac_word... " >&6; }
34466if ${ac_cv_path_AS+:} false; then :
34467  $as_echo_n "(cached) " >&6
34468else
34469  case $AS in
34470  [\\/]* | ?:[\\/]*)
34471  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34472  ;;
34473  *)
34474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34475for as_dir in $PATH
34476do
34477  IFS=$as_save_IFS
34478  test -z "$as_dir" && as_dir=.
34479    for ac_exec_ext in '' $ac_executable_extensions; do
34480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34481    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34483    break 2
34484  fi
34485done
34486  done
34487IFS=$as_save_IFS
34488
34489  ;;
34490esac
34491fi
34492AS=$ac_cv_path_AS
34493if test -n "$AS"; then
34494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34495$as_echo "$AS" >&6; }
34496else
34497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34498$as_echo "no" >&6; }
34499fi
34500
34501
34502  test -n "$AS" && break
34503done
34504
34505  else
34506    # The variable is set, but is it from the command line or the environment?
34507
34508    # Try to remove the string !AS! from our list.
34509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
34510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34511      # If it failed, the variable was not from the command line. Ignore it,
34512      # but warn the user (except for BASH, which is always set by the calling BASH).
34513      if test "xAS" != xBASH; then
34514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
34515$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
34516      fi
34517      # Try to locate tool using the code snippet
34518      for ac_prog in as
34519do
34520  # Extract the first word of "$ac_prog", so it can be a program name with args.
34521set dummy $ac_prog; ac_word=$2
34522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34523$as_echo_n "checking for $ac_word... " >&6; }
34524if ${ac_cv_path_AS+:} false; then :
34525  $as_echo_n "(cached) " >&6
34526else
34527  case $AS in
34528  [\\/]* | ?:[\\/]*)
34529  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34530  ;;
34531  *)
34532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34533for as_dir in $PATH
34534do
34535  IFS=$as_save_IFS
34536  test -z "$as_dir" && as_dir=.
34537    for ac_exec_ext in '' $ac_executable_extensions; do
34538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34539    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34541    break 2
34542  fi
34543done
34544  done
34545IFS=$as_save_IFS
34546
34547  ;;
34548esac
34549fi
34550AS=$ac_cv_path_AS
34551if test -n "$AS"; then
34552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34553$as_echo "$AS" >&6; }
34554else
34555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34556$as_echo "no" >&6; }
34557fi
34558
34559
34560  test -n "$AS" && break
34561done
34562
34563    else
34564      # If it succeeded, then it was overridden by the user. We will use it
34565      # for the tool.
34566
34567      # First remove it from the list of overridden variables, so we can test
34568      # for unknown variables in the end.
34569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34570
34571      # Check if the provided tool contains a complete path.
34572      tool_specified="$AS"
34573      tool_basename="${tool_specified##*/}"
34574      if test "x$tool_basename" = "x$tool_specified"; then
34575        # A command without a complete path is provided, search $PATH.
34576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
34577$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
34578        # Extract the first word of "$tool_basename", so it can be a program name with args.
34579set dummy $tool_basename; ac_word=$2
34580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34581$as_echo_n "checking for $ac_word... " >&6; }
34582if ${ac_cv_path_AS+:} false; then :
34583  $as_echo_n "(cached) " >&6
34584else
34585  case $AS in
34586  [\\/]* | ?:[\\/]*)
34587  ac_cv_path_AS="$AS" # Let the user override the test with a path.
34588  ;;
34589  *)
34590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34591for as_dir in $PATH
34592do
34593  IFS=$as_save_IFS
34594  test -z "$as_dir" && as_dir=.
34595    for ac_exec_ext in '' $ac_executable_extensions; do
34596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34597    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
34598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34599    break 2
34600  fi
34601done
34602  done
34603IFS=$as_save_IFS
34604
34605  ;;
34606esac
34607fi
34608AS=$ac_cv_path_AS
34609if test -n "$AS"; then
34610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
34611$as_echo "$AS" >&6; }
34612else
34613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34614$as_echo "no" >&6; }
34615fi
34616
34617
34618        if test "x$AS" = x; then
34619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34620        fi
34621      else
34622        # Otherwise we believe it is a complete path. Use it as it is.
34623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
34624$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
34625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
34626$as_echo_n "checking for AS... " >&6; }
34627        if test ! -x "$tool_specified"; then
34628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34629$as_echo "not found" >&6; }
34630          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
34631        fi
34632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34633$as_echo "$tool_specified" >&6; }
34634      fi
34635    fi
34636  fi
34637
34638
34639
34640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34641
34642  # First separate the path from the arguments. This will split at the first
34643  # space.
34644  complete="$AS"
34645  path="${complete%% *}"
34646  tmp="$complete EOL"
34647  arguments="${tmp#* }"
34648
34649  # Input might be given as Windows format, start by converting to
34650  # unix format.
34651  new_path=`$CYGPATH -u "$path"`
34652
34653  # Now try to locate executable using which
34654  new_path=`$WHICH "$new_path" 2> /dev/null`
34655  # bat and cmd files are not always considered executable in cygwin causing which
34656  # to not find them
34657  if test "x$new_path" = x \
34658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34660    new_path=`$CYGPATH -u "$path"`
34661  fi
34662  if test "x$new_path" = x; then
34663    # Oops. Which didn't find the executable.
34664    # The splitting of arguments from the executable at a space might have been incorrect,
34665    # since paths with space are more likely in Windows. Give it another try with the whole
34666    # argument.
34667    path="$complete"
34668    arguments="EOL"
34669    new_path=`$CYGPATH -u "$path"`
34670    new_path=`$WHICH "$new_path" 2> /dev/null`
34671    # bat and cmd files are not always considered executable in cygwin causing which
34672    # to not find them
34673    if test "x$new_path" = x \
34674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34676      new_path=`$CYGPATH -u "$path"`
34677    fi
34678    if test "x$new_path" = x; then
34679      # It's still not found. Now this is an unrecoverable error.
34680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34681$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34682      has_space=`$ECHO "$complete" | $GREP " "`
34683      if test "x$has_space" != x; then
34684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34686      fi
34687      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34688    fi
34689  fi
34690
34691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34694  # "foo.exe" is OK but "foo" is an error.
34695  #
34696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34697  # It is also a way to make sure we got the proper file name for the real test later on.
34698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34699  if test "x$test_shortpath" = x; then
34700    # Short path failed, file does not exist as specified.
34701    # Try adding .exe or .cmd
34702    if test -f "${new_path}.exe"; then
34703      input_to_shortpath="${new_path}.exe"
34704    elif test -f "${new_path}.cmd"; then
34705      input_to_shortpath="${new_path}.cmd"
34706    else
34707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
34708$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
34709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34711      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34712    fi
34713  else
34714    input_to_shortpath="$new_path"
34715  fi
34716
34717  # Call helper function which possibly converts this using DOS-style short mode.
34718  # If so, the updated path is stored in $new_path.
34719  new_path="$input_to_shortpath"
34720
34721  input_path="$input_to_shortpath"
34722  # Check if we need to convert this using DOS-style short mode. If the path
34723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34724  # take no chances and rewrite it.
34725  # Note: m4 eats our [], so we need to use [ and ] instead.
34726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34727  if test "x$has_forbidden_chars" != x; then
34728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34732      # Going to short mode and back again did indeed matter. Since short mode is
34733      # case insensitive, let's make it lowercase to improve readability.
34734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34735      # Now convert it back to Unix-stile (cygpath)
34736      input_path=`$CYGPATH -u "$shortmode_path"`
34737      new_path="$input_path"
34738    fi
34739  fi
34740
34741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34742  if test "x$test_cygdrive_prefix" = x; then
34743    # As a simple fix, exclude /usr/bin since it's not a real path.
34744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34746      # a path prefixed by /cygdrive for fixpath to work.
34747      new_path="$CYGWIN_ROOT_PATH$input_path"
34748    fi
34749  fi
34750
34751  # remove trailing .exe if any
34752  new_path="${new_path/%.exe/}"
34753
34754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34755
34756  # First separate the path from the arguments. This will split at the first
34757  # space.
34758  complete="$AS"
34759  path="${complete%% *}"
34760  tmp="$complete EOL"
34761  arguments="${tmp#* }"
34762
34763  # Input might be given as Windows format, start by converting to
34764  # unix format.
34765  new_path="$path"
34766
34767  windows_path="$new_path"
34768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34769    unix_path=`$CYGPATH -u "$windows_path"`
34770    new_path="$unix_path"
34771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34773    new_path="$unix_path"
34774  fi
34775
34776
34777  # Now try to locate executable using which
34778  new_path=`$WHICH "$new_path" 2> /dev/null`
34779
34780  if test "x$new_path" = x; then
34781    # Oops. Which didn't find the executable.
34782    # The splitting of arguments from the executable at a space might have been incorrect,
34783    # since paths with space are more likely in Windows. Give it another try with the whole
34784    # argument.
34785    path="$complete"
34786    arguments="EOL"
34787    new_path="$path"
34788
34789  windows_path="$new_path"
34790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34791    unix_path=`$CYGPATH -u "$windows_path"`
34792    new_path="$unix_path"
34793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34795    new_path="$unix_path"
34796  fi
34797
34798
34799    new_path=`$WHICH "$new_path" 2> /dev/null`
34800
34801    if test "x$new_path" = x; then
34802      # It's still not found. Now this is an unrecoverable error.
34803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34804$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34805      has_space=`$ECHO "$complete" | $GREP " "`
34806      if test "x$has_space" != x; then
34807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34809      fi
34810      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34811    fi
34812  fi
34813
34814  # Now new_path has a complete unix path to the binary
34815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34816    # Keep paths in /bin as-is, but remove trailing .exe if any
34817    new_path="${new_path/%.exe/}"
34818    # Do not save /bin paths to all_fixpath_prefixes!
34819  else
34820    # Not in mixed or Windows style, start by that.
34821    new_path=`cmd //c echo $new_path`
34822
34823  input_path="$new_path"
34824  # Check if we need to convert this using DOS-style short mode. If the path
34825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34826  # take no chances and rewrite it.
34827  # Note: m4 eats our [], so we need to use [ and ] instead.
34828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34829  if test "x$has_forbidden_chars" != x; then
34830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34832  fi
34833
34834    # Output is in $new_path
34835
34836  windows_path="$new_path"
34837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34838    unix_path=`$CYGPATH -u "$windows_path"`
34839    new_path="$unix_path"
34840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34842    new_path="$unix_path"
34843  fi
34844
34845    # remove trailing .exe if any
34846    new_path="${new_path/%.exe/}"
34847
34848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34850  fi
34851
34852  else
34853    # We're on a posix platform. Hooray! :)
34854    # First separate the path from the arguments. This will split at the first
34855    # space.
34856    complete="$AS"
34857    path="${complete%% *}"
34858    tmp="$complete EOL"
34859    arguments="${tmp#* }"
34860
34861    # Cannot rely on the command "which" here since it doesn't always work.
34862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34863    if test -z "$is_absolute_path"; then
34864      # Path to executable is not absolute. Find it.
34865      IFS_save="$IFS"
34866      IFS=:
34867      for p in $PATH; do
34868        if test -f "$p/$path" && test -x "$p/$path"; then
34869          new_path="$p/$path"
34870          break
34871        fi
34872      done
34873      IFS="$IFS_save"
34874    else
34875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
34876$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
34877      new_path="$path"
34878    fi
34879
34880    if test "x$new_path" = x; then
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34882$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34883      has_space=`$ECHO "$complete" | $GREP " "`
34884      if test "x$has_space" != x; then
34885        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34887      fi
34888      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34889    fi
34890  fi
34891
34892  # Now join together the path and the arguments once again
34893  if test "x$arguments" != xEOL; then
34894    new_complete="$new_path ${arguments% *}"
34895  else
34896    new_complete="$new_path"
34897  fi
34898
34899  if test "x$complete" != "x$new_complete"; then
34900    AS="$new_complete"
34901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
34902$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
34903  fi
34904
34905  else
34906    AS="$CC -c"
34907  fi
34908
34909
34910  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34911
34912
34913  # Publish this variable in the help.
34914
34915
34916  if test "x$NM" = x; then
34917    # The variable is not set by user, try to locate tool using the code snippet
34918    for ac_prog in nm
34919do
34920  # Extract the first word of "$ac_prog", so it can be a program name with args.
34921set dummy $ac_prog; ac_word=$2
34922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34923$as_echo_n "checking for $ac_word... " >&6; }
34924if ${ac_cv_path_NM+:} false; then :
34925  $as_echo_n "(cached) " >&6
34926else
34927  case $NM in
34928  [\\/]* | ?:[\\/]*)
34929  ac_cv_path_NM="$NM" # Let the user override the test with a path.
34930  ;;
34931  *)
34932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34933for as_dir in $PATH
34934do
34935  IFS=$as_save_IFS
34936  test -z "$as_dir" && as_dir=.
34937    for ac_exec_ext in '' $ac_executable_extensions; do
34938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34939    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34941    break 2
34942  fi
34943done
34944  done
34945IFS=$as_save_IFS
34946
34947  ;;
34948esac
34949fi
34950NM=$ac_cv_path_NM
34951if test -n "$NM"; then
34952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34953$as_echo "$NM" >&6; }
34954else
34955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34956$as_echo "no" >&6; }
34957fi
34958
34959
34960  test -n "$NM" && break
34961done
34962
34963  else
34964    # The variable is set, but is it from the command line or the environment?
34965
34966    # Try to remove the string !NM! from our list.
34967    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34968    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34969      # If it failed, the variable was not from the command line. Ignore it,
34970      # but warn the user (except for BASH, which is always set by the calling BASH).
34971      if test "xNM" != xBASH; then
34972        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34973$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34974      fi
34975      # Try to locate tool using the code snippet
34976      for ac_prog in nm
34977do
34978  # Extract the first word of "$ac_prog", so it can be a program name with args.
34979set dummy $ac_prog; ac_word=$2
34980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34981$as_echo_n "checking for $ac_word... " >&6; }
34982if ${ac_cv_path_NM+:} false; then :
34983  $as_echo_n "(cached) " >&6
34984else
34985  case $NM in
34986  [\\/]* | ?:[\\/]*)
34987  ac_cv_path_NM="$NM" # Let the user override the test with a path.
34988  ;;
34989  *)
34990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34991for as_dir in $PATH
34992do
34993  IFS=$as_save_IFS
34994  test -z "$as_dir" && as_dir=.
34995    for ac_exec_ext in '' $ac_executable_extensions; do
34996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34997    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34999    break 2
35000  fi
35001done
35002  done
35003IFS=$as_save_IFS
35004
35005  ;;
35006esac
35007fi
35008NM=$ac_cv_path_NM
35009if test -n "$NM"; then
35010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35011$as_echo "$NM" >&6; }
35012else
35013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35014$as_echo "no" >&6; }
35015fi
35016
35017
35018  test -n "$NM" && break
35019done
35020
35021    else
35022      # If it succeeded, then it was overridden by the user. We will use it
35023      # for the tool.
35024
35025      # First remove it from the list of overridden variables, so we can test
35026      # for unknown variables in the end.
35027      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35028
35029      # Check if the provided tool contains a complete path.
35030      tool_specified="$NM"
35031      tool_basename="${tool_specified##*/}"
35032      if test "x$tool_basename" = "x$tool_specified"; then
35033        # A command without a complete path is provided, search $PATH.
35034        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35035$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35036        # Extract the first word of "$tool_basename", so it can be a program name with args.
35037set dummy $tool_basename; ac_word=$2
35038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35039$as_echo_n "checking for $ac_word... " >&6; }
35040if ${ac_cv_path_NM+:} false; then :
35041  $as_echo_n "(cached) " >&6
35042else
35043  case $NM in
35044  [\\/]* | ?:[\\/]*)
35045  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35046  ;;
35047  *)
35048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35049for as_dir in $PATH
35050do
35051  IFS=$as_save_IFS
35052  test -z "$as_dir" && as_dir=.
35053    for ac_exec_ext in '' $ac_executable_extensions; do
35054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35055    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35057    break 2
35058  fi
35059done
35060  done
35061IFS=$as_save_IFS
35062
35063  ;;
35064esac
35065fi
35066NM=$ac_cv_path_NM
35067if test -n "$NM"; then
35068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35069$as_echo "$NM" >&6; }
35070else
35071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35072$as_echo "no" >&6; }
35073fi
35074
35075
35076        if test "x$NM" = x; then
35077          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35078        fi
35079      else
35080        # Otherwise we believe it is a complete path. Use it as it is.
35081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35082$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35083        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35084$as_echo_n "checking for NM... " >&6; }
35085        if test ! -x "$tool_specified"; then
35086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35087$as_echo "not found" >&6; }
35088          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35089        fi
35090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35091$as_echo "$tool_specified" >&6; }
35092      fi
35093    fi
35094  fi
35095
35096
35097
35098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35099
35100  # First separate the path from the arguments. This will split at the first
35101  # space.
35102  complete="$NM"
35103  path="${complete%% *}"
35104  tmp="$complete EOL"
35105  arguments="${tmp#* }"
35106
35107  # Input might be given as Windows format, start by converting to
35108  # unix format.
35109  new_path=`$CYGPATH -u "$path"`
35110
35111  # Now try to locate executable using which
35112  new_path=`$WHICH "$new_path" 2> /dev/null`
35113  # bat and cmd files are not always considered executable in cygwin causing which
35114  # to not find them
35115  if test "x$new_path" = x \
35116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35118    new_path=`$CYGPATH -u "$path"`
35119  fi
35120  if test "x$new_path" = x; then
35121    # Oops. Which didn't find the executable.
35122    # The splitting of arguments from the executable at a space might have been incorrect,
35123    # since paths with space are more likely in Windows. Give it another try with the whole
35124    # argument.
35125    path="$complete"
35126    arguments="EOL"
35127    new_path=`$CYGPATH -u "$path"`
35128    new_path=`$WHICH "$new_path" 2> /dev/null`
35129    # bat and cmd files are not always considered executable in cygwin causing which
35130    # to not find them
35131    if test "x$new_path" = x \
35132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35134      new_path=`$CYGPATH -u "$path"`
35135    fi
35136    if test "x$new_path" = x; then
35137      # It's still not found. Now this is an unrecoverable error.
35138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35139$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35140      has_space=`$ECHO "$complete" | $GREP " "`
35141      if test "x$has_space" != x; then
35142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35144      fi
35145      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35146    fi
35147  fi
35148
35149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35152  # "foo.exe" is OK but "foo" is an error.
35153  #
35154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35155  # It is also a way to make sure we got the proper file name for the real test later on.
35156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35157  if test "x$test_shortpath" = x; then
35158    # Short path failed, file does not exist as specified.
35159    # Try adding .exe or .cmd
35160    if test -f "${new_path}.exe"; then
35161      input_to_shortpath="${new_path}.exe"
35162    elif test -f "${new_path}.cmd"; then
35163      input_to_shortpath="${new_path}.cmd"
35164    else
35165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35166$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35169      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35170    fi
35171  else
35172    input_to_shortpath="$new_path"
35173  fi
35174
35175  # Call helper function which possibly converts this using DOS-style short mode.
35176  # If so, the updated path is stored in $new_path.
35177  new_path="$input_to_shortpath"
35178
35179  input_path="$input_to_shortpath"
35180  # Check if we need to convert this using DOS-style short mode. If the path
35181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35182  # take no chances and rewrite it.
35183  # Note: m4 eats our [], so we need to use [ and ] instead.
35184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35185  if test "x$has_forbidden_chars" != x; then
35186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35190      # Going to short mode and back again did indeed matter. Since short mode is
35191      # case insensitive, let's make it lowercase to improve readability.
35192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35193      # Now convert it back to Unix-stile (cygpath)
35194      input_path=`$CYGPATH -u "$shortmode_path"`
35195      new_path="$input_path"
35196    fi
35197  fi
35198
35199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35200  if test "x$test_cygdrive_prefix" = x; then
35201    # As a simple fix, exclude /usr/bin since it's not a real path.
35202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35204      # a path prefixed by /cygdrive for fixpath to work.
35205      new_path="$CYGWIN_ROOT_PATH$input_path"
35206    fi
35207  fi
35208
35209  # remove trailing .exe if any
35210  new_path="${new_path/%.exe/}"
35211
35212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35213
35214  # First separate the path from the arguments. This will split at the first
35215  # space.
35216  complete="$NM"
35217  path="${complete%% *}"
35218  tmp="$complete EOL"
35219  arguments="${tmp#* }"
35220
35221  # Input might be given as Windows format, start by converting to
35222  # unix format.
35223  new_path="$path"
35224
35225  windows_path="$new_path"
35226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35227    unix_path=`$CYGPATH -u "$windows_path"`
35228    new_path="$unix_path"
35229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35231    new_path="$unix_path"
35232  fi
35233
35234
35235  # Now try to locate executable using which
35236  new_path=`$WHICH "$new_path" 2> /dev/null`
35237
35238  if test "x$new_path" = x; then
35239    # Oops. Which didn't find the executable.
35240    # The splitting of arguments from the executable at a space might have been incorrect,
35241    # since paths with space are more likely in Windows. Give it another try with the whole
35242    # argument.
35243    path="$complete"
35244    arguments="EOL"
35245    new_path="$path"
35246
35247  windows_path="$new_path"
35248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35249    unix_path=`$CYGPATH -u "$windows_path"`
35250    new_path="$unix_path"
35251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35253    new_path="$unix_path"
35254  fi
35255
35256
35257    new_path=`$WHICH "$new_path" 2> /dev/null`
35258
35259    if test "x$new_path" = x; then
35260      # It's still not found. Now this is an unrecoverable error.
35261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35262$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35263      has_space=`$ECHO "$complete" | $GREP " "`
35264      if test "x$has_space" != x; then
35265        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35266$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35267      fi
35268      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35269    fi
35270  fi
35271
35272  # Now new_path has a complete unix path to the binary
35273  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35274    # Keep paths in /bin as-is, but remove trailing .exe if any
35275    new_path="${new_path/%.exe/}"
35276    # Do not save /bin paths to all_fixpath_prefixes!
35277  else
35278    # Not in mixed or Windows style, start by that.
35279    new_path=`cmd //c echo $new_path`
35280
35281  input_path="$new_path"
35282  # Check if we need to convert this using DOS-style short mode. If the path
35283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35284  # take no chances and rewrite it.
35285  # Note: m4 eats our [], so we need to use [ and ] instead.
35286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35287  if test "x$has_forbidden_chars" != x; then
35288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35290  fi
35291
35292    # Output is in $new_path
35293
35294  windows_path="$new_path"
35295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35296    unix_path=`$CYGPATH -u "$windows_path"`
35297    new_path="$unix_path"
35298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35300    new_path="$unix_path"
35301  fi
35302
35303    # remove trailing .exe if any
35304    new_path="${new_path/%.exe/}"
35305
35306    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35307    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35308  fi
35309
35310  else
35311    # We're on a posix platform. Hooray! :)
35312    # First separate the path from the arguments. This will split at the first
35313    # space.
35314    complete="$NM"
35315    path="${complete%% *}"
35316    tmp="$complete EOL"
35317    arguments="${tmp#* }"
35318
35319    # Cannot rely on the command "which" here since it doesn't always work.
35320    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35321    if test -z "$is_absolute_path"; then
35322      # Path to executable is not absolute. Find it.
35323      IFS_save="$IFS"
35324      IFS=:
35325      for p in $PATH; do
35326        if test -f "$p/$path" && test -x "$p/$path"; then
35327          new_path="$p/$path"
35328          break
35329        fi
35330      done
35331      IFS="$IFS_save"
35332    else
35333      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
35334$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
35335      new_path="$path"
35336    fi
35337
35338    if test "x$new_path" = x; then
35339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35340$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35341      has_space=`$ECHO "$complete" | $GREP " "`
35342      if test "x$has_space" != x; then
35343        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35344$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35345      fi
35346      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35347    fi
35348  fi
35349
35350  # Now join together the path and the arguments once again
35351  if test "x$arguments" != xEOL; then
35352    new_complete="$new_path ${arguments% *}"
35353  else
35354    new_complete="$new_path"
35355  fi
35356
35357  if test "x$complete" != "x$new_complete"; then
35358    NM="$new_complete"
35359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35360$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35361  fi
35362
35363
35364
35365  # Publish this variable in the help.
35366
35367
35368  if test "x$GNM" = x; then
35369    # The variable is not set by user, try to locate tool using the code snippet
35370    for ac_prog in gnm
35371do
35372  # Extract the first word of "$ac_prog", so it can be a program name with args.
35373set dummy $ac_prog; ac_word=$2
35374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35375$as_echo_n "checking for $ac_word... " >&6; }
35376if ${ac_cv_path_GNM+:} false; then :
35377  $as_echo_n "(cached) " >&6
35378else
35379  case $GNM in
35380  [\\/]* | ?:[\\/]*)
35381  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35382  ;;
35383  *)
35384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35385for as_dir in $PATH
35386do
35387  IFS=$as_save_IFS
35388  test -z "$as_dir" && as_dir=.
35389    for ac_exec_ext in '' $ac_executable_extensions; do
35390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35391    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35393    break 2
35394  fi
35395done
35396  done
35397IFS=$as_save_IFS
35398
35399  ;;
35400esac
35401fi
35402GNM=$ac_cv_path_GNM
35403if test -n "$GNM"; then
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35405$as_echo "$GNM" >&6; }
35406else
35407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35408$as_echo "no" >&6; }
35409fi
35410
35411
35412  test -n "$GNM" && break
35413done
35414
35415  else
35416    # The variable is set, but is it from the command line or the environment?
35417
35418    # Try to remove the string !GNM! from our list.
35419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35421      # If it failed, the variable was not from the command line. Ignore it,
35422      # but warn the user (except for BASH, which is always set by the calling BASH).
35423      if test "xGNM" != xBASH; then
35424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35425$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35426      fi
35427      # Try to locate tool using the code snippet
35428      for ac_prog in gnm
35429do
35430  # Extract the first word of "$ac_prog", so it can be a program name with args.
35431set dummy $ac_prog; ac_word=$2
35432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35433$as_echo_n "checking for $ac_word... " >&6; }
35434if ${ac_cv_path_GNM+:} false; then :
35435  $as_echo_n "(cached) " >&6
35436else
35437  case $GNM in
35438  [\\/]* | ?:[\\/]*)
35439  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35440  ;;
35441  *)
35442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35443for as_dir in $PATH
35444do
35445  IFS=$as_save_IFS
35446  test -z "$as_dir" && as_dir=.
35447    for ac_exec_ext in '' $ac_executable_extensions; do
35448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35449    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35451    break 2
35452  fi
35453done
35454  done
35455IFS=$as_save_IFS
35456
35457  ;;
35458esac
35459fi
35460GNM=$ac_cv_path_GNM
35461if test -n "$GNM"; then
35462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35463$as_echo "$GNM" >&6; }
35464else
35465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35466$as_echo "no" >&6; }
35467fi
35468
35469
35470  test -n "$GNM" && break
35471done
35472
35473    else
35474      # If it succeeded, then it was overridden by the user. We will use it
35475      # for the tool.
35476
35477      # First remove it from the list of overridden variables, so we can test
35478      # for unknown variables in the end.
35479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35480
35481      # Check if the provided tool contains a complete path.
35482      tool_specified="$GNM"
35483      tool_basename="${tool_specified##*/}"
35484      if test "x$tool_basename" = "x$tool_specified"; then
35485        # A command without a complete path is provided, search $PATH.
35486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35487$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35488        # Extract the first word of "$tool_basename", so it can be a program name with args.
35489set dummy $tool_basename; ac_word=$2
35490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35491$as_echo_n "checking for $ac_word... " >&6; }
35492if ${ac_cv_path_GNM+:} false; then :
35493  $as_echo_n "(cached) " >&6
35494else
35495  case $GNM in
35496  [\\/]* | ?:[\\/]*)
35497  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35498  ;;
35499  *)
35500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35501for as_dir in $PATH
35502do
35503  IFS=$as_save_IFS
35504  test -z "$as_dir" && as_dir=.
35505    for ac_exec_ext in '' $ac_executable_extensions; do
35506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35507    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35509    break 2
35510  fi
35511done
35512  done
35513IFS=$as_save_IFS
35514
35515  ;;
35516esac
35517fi
35518GNM=$ac_cv_path_GNM
35519if test -n "$GNM"; then
35520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35521$as_echo "$GNM" >&6; }
35522else
35523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35524$as_echo "no" >&6; }
35525fi
35526
35527
35528        if test "x$GNM" = x; then
35529          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35530        fi
35531      else
35532        # Otherwise we believe it is a complete path. Use it as it is.
35533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35534$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35536$as_echo_n "checking for GNM... " >&6; }
35537        if test ! -x "$tool_specified"; then
35538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35539$as_echo "not found" >&6; }
35540          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35541        fi
35542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35543$as_echo "$tool_specified" >&6; }
35544      fi
35545    fi
35546  fi
35547
35548
35549
35550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35551
35552  # First separate the path from the arguments. This will split at the first
35553  # space.
35554  complete="$GNM"
35555  path="${complete%% *}"
35556  tmp="$complete EOL"
35557  arguments="${tmp#* }"
35558
35559  # Input might be given as Windows format, start by converting to
35560  # unix format.
35561  new_path=`$CYGPATH -u "$path"`
35562
35563  # Now try to locate executable using which
35564  new_path=`$WHICH "$new_path" 2> /dev/null`
35565  # bat and cmd files are not always considered executable in cygwin causing which
35566  # to not find them
35567  if test "x$new_path" = x \
35568      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35569      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35570    new_path=`$CYGPATH -u "$path"`
35571  fi
35572  if test "x$new_path" = x; then
35573    # Oops. Which didn't find the executable.
35574    # The splitting of arguments from the executable at a space might have been incorrect,
35575    # since paths with space are more likely in Windows. Give it another try with the whole
35576    # argument.
35577    path="$complete"
35578    arguments="EOL"
35579    new_path=`$CYGPATH -u "$path"`
35580    new_path=`$WHICH "$new_path" 2> /dev/null`
35581    # bat and cmd files are not always considered executable in cygwin causing which
35582    # to not find them
35583    if test "x$new_path" = x \
35584        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35585        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35586      new_path=`$CYGPATH -u "$path"`
35587    fi
35588    if test "x$new_path" = x; then
35589      # It's still not found. Now this is an unrecoverable error.
35590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35591$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35592      has_space=`$ECHO "$complete" | $GREP " "`
35593      if test "x$has_space" != x; then
35594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35596      fi
35597      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35598    fi
35599  fi
35600
35601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35604  # "foo.exe" is OK but "foo" is an error.
35605  #
35606  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35607  # It is also a way to make sure we got the proper file name for the real test later on.
35608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35609  if test "x$test_shortpath" = x; then
35610    # Short path failed, file does not exist as specified.
35611    # Try adding .exe or .cmd
35612    if test -f "${new_path}.exe"; then
35613      input_to_shortpath="${new_path}.exe"
35614    elif test -f "${new_path}.cmd"; then
35615      input_to_shortpath="${new_path}.cmd"
35616    else
35617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35618$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35619      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35620$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35621      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35622    fi
35623  else
35624    input_to_shortpath="$new_path"
35625  fi
35626
35627  # Call helper function which possibly converts this using DOS-style short mode.
35628  # If so, the updated path is stored in $new_path.
35629  new_path="$input_to_shortpath"
35630
35631  input_path="$input_to_shortpath"
35632  # Check if we need to convert this using DOS-style short mode. If the path
35633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35634  # take no chances and rewrite it.
35635  # Note: m4 eats our [], so we need to use [ and ] instead.
35636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35637  if test "x$has_forbidden_chars" != x; then
35638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35642      # Going to short mode and back again did indeed matter. Since short mode is
35643      # case insensitive, let's make it lowercase to improve readability.
35644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35645      # Now convert it back to Unix-stile (cygpath)
35646      input_path=`$CYGPATH -u "$shortmode_path"`
35647      new_path="$input_path"
35648    fi
35649  fi
35650
35651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35652  if test "x$test_cygdrive_prefix" = x; then
35653    # As a simple fix, exclude /usr/bin since it's not a real path.
35654    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35656      # a path prefixed by /cygdrive for fixpath to work.
35657      new_path="$CYGWIN_ROOT_PATH$input_path"
35658    fi
35659  fi
35660
35661  # remove trailing .exe if any
35662  new_path="${new_path/%.exe/}"
35663
35664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35665
35666  # First separate the path from the arguments. This will split at the first
35667  # space.
35668  complete="$GNM"
35669  path="${complete%% *}"
35670  tmp="$complete EOL"
35671  arguments="${tmp#* }"
35672
35673  # Input might be given as Windows format, start by converting to
35674  # unix format.
35675  new_path="$path"
35676
35677  windows_path="$new_path"
35678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35679    unix_path=`$CYGPATH -u "$windows_path"`
35680    new_path="$unix_path"
35681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35683    new_path="$unix_path"
35684  fi
35685
35686
35687  # Now try to locate executable using which
35688  new_path=`$WHICH "$new_path" 2> /dev/null`
35689
35690  if test "x$new_path" = x; then
35691    # Oops. Which didn't find the executable.
35692    # The splitting of arguments from the executable at a space might have been incorrect,
35693    # since paths with space are more likely in Windows. Give it another try with the whole
35694    # argument.
35695    path="$complete"
35696    arguments="EOL"
35697    new_path="$path"
35698
35699  windows_path="$new_path"
35700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35701    unix_path=`$CYGPATH -u "$windows_path"`
35702    new_path="$unix_path"
35703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35705    new_path="$unix_path"
35706  fi
35707
35708
35709    new_path=`$WHICH "$new_path" 2> /dev/null`
35710
35711    if test "x$new_path" = x; then
35712      # It's still not found. Now this is an unrecoverable error.
35713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35714$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35715      has_space=`$ECHO "$complete" | $GREP " "`
35716      if test "x$has_space" != x; then
35717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35719      fi
35720      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35721    fi
35722  fi
35723
35724  # Now new_path has a complete unix path to the binary
35725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35726    # Keep paths in /bin as-is, but remove trailing .exe if any
35727    new_path="${new_path/%.exe/}"
35728    # Do not save /bin paths to all_fixpath_prefixes!
35729  else
35730    # Not in mixed or Windows style, start by that.
35731    new_path=`cmd //c echo $new_path`
35732
35733  input_path="$new_path"
35734  # Check if we need to convert this using DOS-style short mode. If the path
35735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35736  # take no chances and rewrite it.
35737  # Note: m4 eats our [], so we need to use [ and ] instead.
35738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35739  if test "x$has_forbidden_chars" != x; then
35740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35742  fi
35743
35744    # Output is in $new_path
35745
35746  windows_path="$new_path"
35747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35748    unix_path=`$CYGPATH -u "$windows_path"`
35749    new_path="$unix_path"
35750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35752    new_path="$unix_path"
35753  fi
35754
35755    # remove trailing .exe if any
35756    new_path="${new_path/%.exe/}"
35757
35758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35760  fi
35761
35762  else
35763    # We're on a posix platform. Hooray! :)
35764    # First separate the path from the arguments. This will split at the first
35765    # space.
35766    complete="$GNM"
35767    path="${complete%% *}"
35768    tmp="$complete EOL"
35769    arguments="${tmp#* }"
35770
35771    # Cannot rely on the command "which" here since it doesn't always work.
35772    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35773    if test -z "$is_absolute_path"; then
35774      # Path to executable is not absolute. Find it.
35775      IFS_save="$IFS"
35776      IFS=:
35777      for p in $PATH; do
35778        if test -f "$p/$path" && test -x "$p/$path"; then
35779          new_path="$p/$path"
35780          break
35781        fi
35782      done
35783      IFS="$IFS_save"
35784    else
35785      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
35786$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
35787      new_path="$path"
35788    fi
35789
35790    if test "x$new_path" = x; then
35791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35792$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35793      has_space=`$ECHO "$complete" | $GREP " "`
35794      if test "x$has_space" != x; then
35795        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35797      fi
35798      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35799    fi
35800  fi
35801
35802  # Now join together the path and the arguments once again
35803  if test "x$arguments" != xEOL; then
35804    new_complete="$new_path ${arguments% *}"
35805  else
35806    new_complete="$new_path"
35807  fi
35808
35809  if test "x$complete" != "x$new_complete"; then
35810    GNM="$new_complete"
35811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35812$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35813  fi
35814
35815
35816
35817  # Publish this variable in the help.
35818
35819
35820  if test "x$STRIP" = x; then
35821    # The variable is not set by user, try to locate tool using the code snippet
35822    for ac_prog in strip
35823do
35824  # Extract the first word of "$ac_prog", so it can be a program name with args.
35825set dummy $ac_prog; ac_word=$2
35826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35827$as_echo_n "checking for $ac_word... " >&6; }
35828if ${ac_cv_path_STRIP+:} false; then :
35829  $as_echo_n "(cached) " >&6
35830else
35831  case $STRIP in
35832  [\\/]* | ?:[\\/]*)
35833  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35834  ;;
35835  *)
35836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35837for as_dir in $PATH
35838do
35839  IFS=$as_save_IFS
35840  test -z "$as_dir" && as_dir=.
35841    for ac_exec_ext in '' $ac_executable_extensions; do
35842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35843    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35845    break 2
35846  fi
35847done
35848  done
35849IFS=$as_save_IFS
35850
35851  ;;
35852esac
35853fi
35854STRIP=$ac_cv_path_STRIP
35855if test -n "$STRIP"; then
35856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35857$as_echo "$STRIP" >&6; }
35858else
35859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35860$as_echo "no" >&6; }
35861fi
35862
35863
35864  test -n "$STRIP" && break
35865done
35866
35867  else
35868    # The variable is set, but is it from the command line or the environment?
35869
35870    # Try to remove the string !STRIP! from our list.
35871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35873      # If it failed, the variable was not from the command line. Ignore it,
35874      # but warn the user (except for BASH, which is always set by the calling BASH).
35875      if test "xSTRIP" != xBASH; then
35876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35877$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35878      fi
35879      # Try to locate tool using the code snippet
35880      for ac_prog in strip
35881do
35882  # Extract the first word of "$ac_prog", so it can be a program name with args.
35883set dummy $ac_prog; ac_word=$2
35884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35885$as_echo_n "checking for $ac_word... " >&6; }
35886if ${ac_cv_path_STRIP+:} false; then :
35887  $as_echo_n "(cached) " >&6
35888else
35889  case $STRIP in
35890  [\\/]* | ?:[\\/]*)
35891  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35892  ;;
35893  *)
35894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35895for as_dir in $PATH
35896do
35897  IFS=$as_save_IFS
35898  test -z "$as_dir" && as_dir=.
35899    for ac_exec_ext in '' $ac_executable_extensions; do
35900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35901    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35903    break 2
35904  fi
35905done
35906  done
35907IFS=$as_save_IFS
35908
35909  ;;
35910esac
35911fi
35912STRIP=$ac_cv_path_STRIP
35913if test -n "$STRIP"; then
35914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35915$as_echo "$STRIP" >&6; }
35916else
35917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35918$as_echo "no" >&6; }
35919fi
35920
35921
35922  test -n "$STRIP" && break
35923done
35924
35925    else
35926      # If it succeeded, then it was overridden by the user. We will use it
35927      # for the tool.
35928
35929      # First remove it from the list of overridden variables, so we can test
35930      # for unknown variables in the end.
35931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35932
35933      # Check if the provided tool contains a complete path.
35934      tool_specified="$STRIP"
35935      tool_basename="${tool_specified##*/}"
35936      if test "x$tool_basename" = "x$tool_specified"; then
35937        # A command without a complete path is provided, search $PATH.
35938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35939$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35940        # Extract the first word of "$tool_basename", so it can be a program name with args.
35941set dummy $tool_basename; ac_word=$2
35942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35943$as_echo_n "checking for $ac_word... " >&6; }
35944if ${ac_cv_path_STRIP+:} false; then :
35945  $as_echo_n "(cached) " >&6
35946else
35947  case $STRIP in
35948  [\\/]* | ?:[\\/]*)
35949  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35950  ;;
35951  *)
35952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35953for as_dir in $PATH
35954do
35955  IFS=$as_save_IFS
35956  test -z "$as_dir" && as_dir=.
35957    for ac_exec_ext in '' $ac_executable_extensions; do
35958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35959    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35961    break 2
35962  fi
35963done
35964  done
35965IFS=$as_save_IFS
35966
35967  ;;
35968esac
35969fi
35970STRIP=$ac_cv_path_STRIP
35971if test -n "$STRIP"; then
35972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35973$as_echo "$STRIP" >&6; }
35974else
35975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35976$as_echo "no" >&6; }
35977fi
35978
35979
35980        if test "x$STRIP" = x; then
35981          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35982        fi
35983      else
35984        # Otherwise we believe it is a complete path. Use it as it is.
35985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35986$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35988$as_echo_n "checking for STRIP... " >&6; }
35989        if test ! -x "$tool_specified"; then
35990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35991$as_echo "not found" >&6; }
35992          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35993        fi
35994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35995$as_echo "$tool_specified" >&6; }
35996      fi
35997    fi
35998  fi
35999
36000
36001
36002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36003
36004  # First separate the path from the arguments. This will split at the first
36005  # space.
36006  complete="$STRIP"
36007  path="${complete%% *}"
36008  tmp="$complete EOL"
36009  arguments="${tmp#* }"
36010
36011  # Input might be given as Windows format, start by converting to
36012  # unix format.
36013  new_path=`$CYGPATH -u "$path"`
36014
36015  # Now try to locate executable using which
36016  new_path=`$WHICH "$new_path" 2> /dev/null`
36017  # bat and cmd files are not always considered executable in cygwin causing which
36018  # to not find them
36019  if test "x$new_path" = x \
36020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36022    new_path=`$CYGPATH -u "$path"`
36023  fi
36024  if test "x$new_path" = x; then
36025    # Oops. Which didn't find the executable.
36026    # The splitting of arguments from the executable at a space might have been incorrect,
36027    # since paths with space are more likely in Windows. Give it another try with the whole
36028    # argument.
36029    path="$complete"
36030    arguments="EOL"
36031    new_path=`$CYGPATH -u "$path"`
36032    new_path=`$WHICH "$new_path" 2> /dev/null`
36033    # bat and cmd files are not always considered executable in cygwin causing which
36034    # to not find them
36035    if test "x$new_path" = x \
36036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36038      new_path=`$CYGPATH -u "$path"`
36039    fi
36040    if test "x$new_path" = x; then
36041      # It's still not found. Now this is an unrecoverable error.
36042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36043$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36044      has_space=`$ECHO "$complete" | $GREP " "`
36045      if test "x$has_space" != x; then
36046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36048      fi
36049      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36050    fi
36051  fi
36052
36053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36056  # "foo.exe" is OK but "foo" is an error.
36057  #
36058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36059  # It is also a way to make sure we got the proper file name for the real test later on.
36060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36061  if test "x$test_shortpath" = x; then
36062    # Short path failed, file does not exist as specified.
36063    # Try adding .exe or .cmd
36064    if test -f "${new_path}.exe"; then
36065      input_to_shortpath="${new_path}.exe"
36066    elif test -f "${new_path}.cmd"; then
36067      input_to_shortpath="${new_path}.cmd"
36068    else
36069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36070$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36073      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36074    fi
36075  else
36076    input_to_shortpath="$new_path"
36077  fi
36078
36079  # Call helper function which possibly converts this using DOS-style short mode.
36080  # If so, the updated path is stored in $new_path.
36081  new_path="$input_to_shortpath"
36082
36083  input_path="$input_to_shortpath"
36084  # Check if we need to convert this using DOS-style short mode. If the path
36085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36086  # take no chances and rewrite it.
36087  # Note: m4 eats our [], so we need to use [ and ] instead.
36088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36089  if test "x$has_forbidden_chars" != x; then
36090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36094      # Going to short mode and back again did indeed matter. Since short mode is
36095      # case insensitive, let's make it lowercase to improve readability.
36096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36097      # Now convert it back to Unix-stile (cygpath)
36098      input_path=`$CYGPATH -u "$shortmode_path"`
36099      new_path="$input_path"
36100    fi
36101  fi
36102
36103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36104  if test "x$test_cygdrive_prefix" = x; then
36105    # As a simple fix, exclude /usr/bin since it's not a real path.
36106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36108      # a path prefixed by /cygdrive for fixpath to work.
36109      new_path="$CYGWIN_ROOT_PATH$input_path"
36110    fi
36111  fi
36112
36113  # remove trailing .exe if any
36114  new_path="${new_path/%.exe/}"
36115
36116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36117
36118  # First separate the path from the arguments. This will split at the first
36119  # space.
36120  complete="$STRIP"
36121  path="${complete%% *}"
36122  tmp="$complete EOL"
36123  arguments="${tmp#* }"
36124
36125  # Input might be given as Windows format, start by converting to
36126  # unix format.
36127  new_path="$path"
36128
36129  windows_path="$new_path"
36130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36131    unix_path=`$CYGPATH -u "$windows_path"`
36132    new_path="$unix_path"
36133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36135    new_path="$unix_path"
36136  fi
36137
36138
36139  # Now try to locate executable using which
36140  new_path=`$WHICH "$new_path" 2> /dev/null`
36141
36142  if test "x$new_path" = x; then
36143    # Oops. Which didn't find the executable.
36144    # The splitting of arguments from the executable at a space might have been incorrect,
36145    # since paths with space are more likely in Windows. Give it another try with the whole
36146    # argument.
36147    path="$complete"
36148    arguments="EOL"
36149    new_path="$path"
36150
36151  windows_path="$new_path"
36152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36153    unix_path=`$CYGPATH -u "$windows_path"`
36154    new_path="$unix_path"
36155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36157    new_path="$unix_path"
36158  fi
36159
36160
36161    new_path=`$WHICH "$new_path" 2> /dev/null`
36162
36163    if test "x$new_path" = x; then
36164      # It's still not found. Now this is an unrecoverable error.
36165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36166$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36167      has_space=`$ECHO "$complete" | $GREP " "`
36168      if test "x$has_space" != x; then
36169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36171      fi
36172      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36173    fi
36174  fi
36175
36176  # Now new_path has a complete unix path to the binary
36177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36178    # Keep paths in /bin as-is, but remove trailing .exe if any
36179    new_path="${new_path/%.exe/}"
36180    # Do not save /bin paths to all_fixpath_prefixes!
36181  else
36182    # Not in mixed or Windows style, start by that.
36183    new_path=`cmd //c echo $new_path`
36184
36185  input_path="$new_path"
36186  # Check if we need to convert this using DOS-style short mode. If the path
36187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36188  # take no chances and rewrite it.
36189  # Note: m4 eats our [], so we need to use [ and ] instead.
36190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36191  if test "x$has_forbidden_chars" != x; then
36192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36194  fi
36195
36196    # Output is in $new_path
36197
36198  windows_path="$new_path"
36199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36200    unix_path=`$CYGPATH -u "$windows_path"`
36201    new_path="$unix_path"
36202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36204    new_path="$unix_path"
36205  fi
36206
36207    # remove trailing .exe if any
36208    new_path="${new_path/%.exe/}"
36209
36210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36212  fi
36213
36214  else
36215    # We're on a posix platform. Hooray! :)
36216    # First separate the path from the arguments. This will split at the first
36217    # space.
36218    complete="$STRIP"
36219    path="${complete%% *}"
36220    tmp="$complete EOL"
36221    arguments="${tmp#* }"
36222
36223    # Cannot rely on the command "which" here since it doesn't always work.
36224    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36225    if test -z "$is_absolute_path"; then
36226      # Path to executable is not absolute. Find it.
36227      IFS_save="$IFS"
36228      IFS=:
36229      for p in $PATH; do
36230        if test -f "$p/$path" && test -x "$p/$path"; then
36231          new_path="$p/$path"
36232          break
36233        fi
36234      done
36235      IFS="$IFS_save"
36236    else
36237      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
36238$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
36239      new_path="$path"
36240    fi
36241
36242    if test "x$new_path" = x; then
36243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36244$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36245      has_space=`$ECHO "$complete" | $GREP " "`
36246      if test "x$has_space" != x; then
36247        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36249      fi
36250      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36251    fi
36252  fi
36253
36254  # Now join together the path and the arguments once again
36255  if test "x$arguments" != xEOL; then
36256    new_complete="$new_path ${arguments% *}"
36257  else
36258    new_complete="$new_path"
36259  fi
36260
36261  if test "x$complete" != "x$new_complete"; then
36262    STRIP="$new_complete"
36263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36264$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36265  fi
36266
36267
36268
36269  # Publish this variable in the help.
36270
36271
36272  if test "x$MCS" = x; then
36273    # The variable is not set by user, try to locate tool using the code snippet
36274    for ac_prog in mcs
36275do
36276  # Extract the first word of "$ac_prog", so it can be a program name with args.
36277set dummy $ac_prog; ac_word=$2
36278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36279$as_echo_n "checking for $ac_word... " >&6; }
36280if ${ac_cv_path_MCS+:} false; then :
36281  $as_echo_n "(cached) " >&6
36282else
36283  case $MCS in
36284  [\\/]* | ?:[\\/]*)
36285  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36286  ;;
36287  *)
36288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36289for as_dir in $PATH
36290do
36291  IFS=$as_save_IFS
36292  test -z "$as_dir" && as_dir=.
36293    for ac_exec_ext in '' $ac_executable_extensions; do
36294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36295    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36297    break 2
36298  fi
36299done
36300  done
36301IFS=$as_save_IFS
36302
36303  ;;
36304esac
36305fi
36306MCS=$ac_cv_path_MCS
36307if test -n "$MCS"; then
36308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36309$as_echo "$MCS" >&6; }
36310else
36311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36312$as_echo "no" >&6; }
36313fi
36314
36315
36316  test -n "$MCS" && break
36317done
36318
36319  else
36320    # The variable is set, but is it from the command line or the environment?
36321
36322    # Try to remove the string !MCS! from our list.
36323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36325      # If it failed, the variable was not from the command line. Ignore it,
36326      # but warn the user (except for BASH, which is always set by the calling BASH).
36327      if test "xMCS" != xBASH; then
36328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36329$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36330      fi
36331      # Try to locate tool using the code snippet
36332      for ac_prog in mcs
36333do
36334  # Extract the first word of "$ac_prog", so it can be a program name with args.
36335set dummy $ac_prog; ac_word=$2
36336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36337$as_echo_n "checking for $ac_word... " >&6; }
36338if ${ac_cv_path_MCS+:} false; then :
36339  $as_echo_n "(cached) " >&6
36340else
36341  case $MCS in
36342  [\\/]* | ?:[\\/]*)
36343  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36344  ;;
36345  *)
36346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36347for as_dir in $PATH
36348do
36349  IFS=$as_save_IFS
36350  test -z "$as_dir" && as_dir=.
36351    for ac_exec_ext in '' $ac_executable_extensions; do
36352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36353    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36355    break 2
36356  fi
36357done
36358  done
36359IFS=$as_save_IFS
36360
36361  ;;
36362esac
36363fi
36364MCS=$ac_cv_path_MCS
36365if test -n "$MCS"; then
36366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36367$as_echo "$MCS" >&6; }
36368else
36369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36370$as_echo "no" >&6; }
36371fi
36372
36373
36374  test -n "$MCS" && break
36375done
36376
36377    else
36378      # If it succeeded, then it was overridden by the user. We will use it
36379      # for the tool.
36380
36381      # First remove it from the list of overridden variables, so we can test
36382      # for unknown variables in the end.
36383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36384
36385      # Check if the provided tool contains a complete path.
36386      tool_specified="$MCS"
36387      tool_basename="${tool_specified##*/}"
36388      if test "x$tool_basename" = "x$tool_specified"; then
36389        # A command without a complete path is provided, search $PATH.
36390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36391$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36392        # Extract the first word of "$tool_basename", so it can be a program name with args.
36393set dummy $tool_basename; ac_word=$2
36394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36395$as_echo_n "checking for $ac_word... " >&6; }
36396if ${ac_cv_path_MCS+:} false; then :
36397  $as_echo_n "(cached) " >&6
36398else
36399  case $MCS in
36400  [\\/]* | ?:[\\/]*)
36401  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36402  ;;
36403  *)
36404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36405for as_dir in $PATH
36406do
36407  IFS=$as_save_IFS
36408  test -z "$as_dir" && as_dir=.
36409    for ac_exec_ext in '' $ac_executable_extensions; do
36410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36411    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36413    break 2
36414  fi
36415done
36416  done
36417IFS=$as_save_IFS
36418
36419  ;;
36420esac
36421fi
36422MCS=$ac_cv_path_MCS
36423if test -n "$MCS"; then
36424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36425$as_echo "$MCS" >&6; }
36426else
36427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36428$as_echo "no" >&6; }
36429fi
36430
36431
36432        if test "x$MCS" = x; then
36433          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36434        fi
36435      else
36436        # Otherwise we believe it is a complete path. Use it as it is.
36437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36438$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36440$as_echo_n "checking for MCS... " >&6; }
36441        if test ! -x "$tool_specified"; then
36442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36443$as_echo "not found" >&6; }
36444          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36445        fi
36446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36447$as_echo "$tool_specified" >&6; }
36448      fi
36449    fi
36450  fi
36451
36452
36453
36454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36455
36456  # First separate the path from the arguments. This will split at the first
36457  # space.
36458  complete="$MCS"
36459  path="${complete%% *}"
36460  tmp="$complete EOL"
36461  arguments="${tmp#* }"
36462
36463  # Input might be given as Windows format, start by converting to
36464  # unix format.
36465  new_path=`$CYGPATH -u "$path"`
36466
36467  # Now try to locate executable using which
36468  new_path=`$WHICH "$new_path" 2> /dev/null`
36469  # bat and cmd files are not always considered executable in cygwin causing which
36470  # to not find them
36471  if test "x$new_path" = x \
36472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36474    new_path=`$CYGPATH -u "$path"`
36475  fi
36476  if test "x$new_path" = x; then
36477    # Oops. Which didn't find the executable.
36478    # The splitting of arguments from the executable at a space might have been incorrect,
36479    # since paths with space are more likely in Windows. Give it another try with the whole
36480    # argument.
36481    path="$complete"
36482    arguments="EOL"
36483    new_path=`$CYGPATH -u "$path"`
36484    new_path=`$WHICH "$new_path" 2> /dev/null`
36485    # bat and cmd files are not always considered executable in cygwin causing which
36486    # to not find them
36487    if test "x$new_path" = x \
36488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36490      new_path=`$CYGPATH -u "$path"`
36491    fi
36492    if test "x$new_path" = x; then
36493      # It's still not found. Now this is an unrecoverable error.
36494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36495$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36496      has_space=`$ECHO "$complete" | $GREP " "`
36497      if test "x$has_space" != x; then
36498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36500      fi
36501      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36502    fi
36503  fi
36504
36505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36508  # "foo.exe" is OK but "foo" is an error.
36509  #
36510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36511  # It is also a way to make sure we got the proper file name for the real test later on.
36512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36513  if test "x$test_shortpath" = x; then
36514    # Short path failed, file does not exist as specified.
36515    # Try adding .exe or .cmd
36516    if test -f "${new_path}.exe"; then
36517      input_to_shortpath="${new_path}.exe"
36518    elif test -f "${new_path}.cmd"; then
36519      input_to_shortpath="${new_path}.cmd"
36520    else
36521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36522$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36525      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36526    fi
36527  else
36528    input_to_shortpath="$new_path"
36529  fi
36530
36531  # Call helper function which possibly converts this using DOS-style short mode.
36532  # If so, the updated path is stored in $new_path.
36533  new_path="$input_to_shortpath"
36534
36535  input_path="$input_to_shortpath"
36536  # Check if we need to convert this using DOS-style short mode. If the path
36537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36538  # take no chances and rewrite it.
36539  # Note: m4 eats our [], so we need to use [ and ] instead.
36540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36541  if test "x$has_forbidden_chars" != x; then
36542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36546      # Going to short mode and back again did indeed matter. Since short mode is
36547      # case insensitive, let's make it lowercase to improve readability.
36548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36549      # Now convert it back to Unix-stile (cygpath)
36550      input_path=`$CYGPATH -u "$shortmode_path"`
36551      new_path="$input_path"
36552    fi
36553  fi
36554
36555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36556  if test "x$test_cygdrive_prefix" = x; then
36557    # As a simple fix, exclude /usr/bin since it's not a real path.
36558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36560      # a path prefixed by /cygdrive for fixpath to work.
36561      new_path="$CYGWIN_ROOT_PATH$input_path"
36562    fi
36563  fi
36564
36565  # remove trailing .exe if any
36566  new_path="${new_path/%.exe/}"
36567
36568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36569
36570  # First separate the path from the arguments. This will split at the first
36571  # space.
36572  complete="$MCS"
36573  path="${complete%% *}"
36574  tmp="$complete EOL"
36575  arguments="${tmp#* }"
36576
36577  # Input might be given as Windows format, start by converting to
36578  # unix format.
36579  new_path="$path"
36580
36581  windows_path="$new_path"
36582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36583    unix_path=`$CYGPATH -u "$windows_path"`
36584    new_path="$unix_path"
36585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36587    new_path="$unix_path"
36588  fi
36589
36590
36591  # Now try to locate executable using which
36592  new_path=`$WHICH "$new_path" 2> /dev/null`
36593
36594  if test "x$new_path" = x; then
36595    # Oops. Which didn't find the executable.
36596    # The splitting of arguments from the executable at a space might have been incorrect,
36597    # since paths with space are more likely in Windows. Give it another try with the whole
36598    # argument.
36599    path="$complete"
36600    arguments="EOL"
36601    new_path="$path"
36602
36603  windows_path="$new_path"
36604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36605    unix_path=`$CYGPATH -u "$windows_path"`
36606    new_path="$unix_path"
36607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36609    new_path="$unix_path"
36610  fi
36611
36612
36613    new_path=`$WHICH "$new_path" 2> /dev/null`
36614
36615    if test "x$new_path" = x; then
36616      # It's still not found. Now this is an unrecoverable error.
36617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36618$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36619      has_space=`$ECHO "$complete" | $GREP " "`
36620      if test "x$has_space" != x; then
36621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36623      fi
36624      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36625    fi
36626  fi
36627
36628  # Now new_path has a complete unix path to the binary
36629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36630    # Keep paths in /bin as-is, but remove trailing .exe if any
36631    new_path="${new_path/%.exe/}"
36632    # Do not save /bin paths to all_fixpath_prefixes!
36633  else
36634    # Not in mixed or Windows style, start by that.
36635    new_path=`cmd //c echo $new_path`
36636
36637  input_path="$new_path"
36638  # Check if we need to convert this using DOS-style short mode. If the path
36639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36640  # take no chances and rewrite it.
36641  # Note: m4 eats our [], so we need to use [ and ] instead.
36642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36643  if test "x$has_forbidden_chars" != x; then
36644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36646  fi
36647
36648    # Output is in $new_path
36649
36650  windows_path="$new_path"
36651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36652    unix_path=`$CYGPATH -u "$windows_path"`
36653    new_path="$unix_path"
36654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36656    new_path="$unix_path"
36657  fi
36658
36659    # remove trailing .exe if any
36660    new_path="${new_path/%.exe/}"
36661
36662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36664  fi
36665
36666  else
36667    # We're on a posix platform. Hooray! :)
36668    # First separate the path from the arguments. This will split at the first
36669    # space.
36670    complete="$MCS"
36671    path="${complete%% *}"
36672    tmp="$complete EOL"
36673    arguments="${tmp#* }"
36674
36675    # Cannot rely on the command "which" here since it doesn't always work.
36676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36677    if test -z "$is_absolute_path"; then
36678      # Path to executable is not absolute. Find it.
36679      IFS_save="$IFS"
36680      IFS=:
36681      for p in $PATH; do
36682        if test -f "$p/$path" && test -x "$p/$path"; then
36683          new_path="$p/$path"
36684          break
36685        fi
36686      done
36687      IFS="$IFS_save"
36688    else
36689      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
36690$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
36691      new_path="$path"
36692    fi
36693
36694    if test "x$new_path" = x; then
36695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36696$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36697      has_space=`$ECHO "$complete" | $GREP " "`
36698      if test "x$has_space" != x; then
36699        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36701      fi
36702      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36703    fi
36704  fi
36705
36706  # Now join together the path and the arguments once again
36707  if test "x$arguments" != xEOL; then
36708    new_complete="$new_path ${arguments% *}"
36709  else
36710    new_complete="$new_path"
36711  fi
36712
36713  if test "x$complete" != "x$new_complete"; then
36714    MCS="$new_complete"
36715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36716$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36717  fi
36718
36719  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36720
36721
36722  # Publish this variable in the help.
36723
36724
36725  if test "x$NM" = x; then
36726    # The variable is not set by user, try to locate tool using the code snippet
36727    if test -n "$ac_tool_prefix"; then
36728  for ac_prog in nm
36729  do
36730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36733$as_echo_n "checking for $ac_word... " >&6; }
36734if ${ac_cv_prog_NM+:} false; then :
36735  $as_echo_n "(cached) " >&6
36736else
36737  if test -n "$NM"; then
36738  ac_cv_prog_NM="$NM" # Let the user override the test.
36739else
36740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36741for as_dir in $PATH
36742do
36743  IFS=$as_save_IFS
36744  test -z "$as_dir" && as_dir=.
36745    for ac_exec_ext in '' $ac_executable_extensions; do
36746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36747    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36749    break 2
36750  fi
36751done
36752  done
36753IFS=$as_save_IFS
36754
36755fi
36756fi
36757NM=$ac_cv_prog_NM
36758if test -n "$NM"; then
36759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36760$as_echo "$NM" >&6; }
36761else
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36763$as_echo "no" >&6; }
36764fi
36765
36766
36767    test -n "$NM" && break
36768  done
36769fi
36770if test -z "$NM"; then
36771  ac_ct_NM=$NM
36772  for ac_prog in nm
36773do
36774  # Extract the first word of "$ac_prog", so it can be a program name with args.
36775set dummy $ac_prog; ac_word=$2
36776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36777$as_echo_n "checking for $ac_word... " >&6; }
36778if ${ac_cv_prog_ac_ct_NM+:} false; then :
36779  $as_echo_n "(cached) " >&6
36780else
36781  if test -n "$ac_ct_NM"; then
36782  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36783else
36784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36785for as_dir in $PATH
36786do
36787  IFS=$as_save_IFS
36788  test -z "$as_dir" && as_dir=.
36789    for ac_exec_ext in '' $ac_executable_extensions; do
36790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36791    ac_cv_prog_ac_ct_NM="$ac_prog"
36792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36793    break 2
36794  fi
36795done
36796  done
36797IFS=$as_save_IFS
36798
36799fi
36800fi
36801ac_ct_NM=$ac_cv_prog_ac_ct_NM
36802if test -n "$ac_ct_NM"; then
36803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36804$as_echo "$ac_ct_NM" >&6; }
36805else
36806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36807$as_echo "no" >&6; }
36808fi
36809
36810
36811  test -n "$ac_ct_NM" && break
36812done
36813
36814  if test "x$ac_ct_NM" = x; then
36815    NM=""
36816  else
36817    case $cross_compiling:$ac_tool_warned in
36818yes:)
36819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36821ac_tool_warned=yes ;;
36822esac
36823    NM=$ac_ct_NM
36824  fi
36825fi
36826
36827  else
36828    # The variable is set, but is it from the command line or the environment?
36829
36830    # Try to remove the string !NM! from our list.
36831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36833      # If it failed, the variable was not from the command line. Ignore it,
36834      # but warn the user (except for BASH, which is always set by the calling BASH).
36835      if test "xNM" != xBASH; then
36836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36837$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36838      fi
36839      # Try to locate tool using the code snippet
36840      if test -n "$ac_tool_prefix"; then
36841  for ac_prog in nm
36842  do
36843    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36846$as_echo_n "checking for $ac_word... " >&6; }
36847if ${ac_cv_prog_NM+:} false; then :
36848  $as_echo_n "(cached) " >&6
36849else
36850  if test -n "$NM"; then
36851  ac_cv_prog_NM="$NM" # Let the user override the test.
36852else
36853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36854for as_dir in $PATH
36855do
36856  IFS=$as_save_IFS
36857  test -z "$as_dir" && as_dir=.
36858    for ac_exec_ext in '' $ac_executable_extensions; do
36859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36860    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36862    break 2
36863  fi
36864done
36865  done
36866IFS=$as_save_IFS
36867
36868fi
36869fi
36870NM=$ac_cv_prog_NM
36871if test -n "$NM"; then
36872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36873$as_echo "$NM" >&6; }
36874else
36875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36876$as_echo "no" >&6; }
36877fi
36878
36879
36880    test -n "$NM" && break
36881  done
36882fi
36883if test -z "$NM"; then
36884  ac_ct_NM=$NM
36885  for ac_prog in nm
36886do
36887  # Extract the first word of "$ac_prog", so it can be a program name with args.
36888set dummy $ac_prog; ac_word=$2
36889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36890$as_echo_n "checking for $ac_word... " >&6; }
36891if ${ac_cv_prog_ac_ct_NM+:} false; then :
36892  $as_echo_n "(cached) " >&6
36893else
36894  if test -n "$ac_ct_NM"; then
36895  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36896else
36897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36898for as_dir in $PATH
36899do
36900  IFS=$as_save_IFS
36901  test -z "$as_dir" && as_dir=.
36902    for ac_exec_ext in '' $ac_executable_extensions; do
36903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36904    ac_cv_prog_ac_ct_NM="$ac_prog"
36905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36906    break 2
36907  fi
36908done
36909  done
36910IFS=$as_save_IFS
36911
36912fi
36913fi
36914ac_ct_NM=$ac_cv_prog_ac_ct_NM
36915if test -n "$ac_ct_NM"; then
36916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36917$as_echo "$ac_ct_NM" >&6; }
36918else
36919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36920$as_echo "no" >&6; }
36921fi
36922
36923
36924  test -n "$ac_ct_NM" && break
36925done
36926
36927  if test "x$ac_ct_NM" = x; then
36928    NM=""
36929  else
36930    case $cross_compiling:$ac_tool_warned in
36931yes:)
36932{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36933$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36934ac_tool_warned=yes ;;
36935esac
36936    NM=$ac_ct_NM
36937  fi
36938fi
36939
36940    else
36941      # If it succeeded, then it was overridden by the user. We will use it
36942      # for the tool.
36943
36944      # First remove it from the list of overridden variables, so we can test
36945      # for unknown variables in the end.
36946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36947
36948      # Check if the provided tool contains a complete path.
36949      tool_specified="$NM"
36950      tool_basename="${tool_specified##*/}"
36951      if test "x$tool_basename" = "x$tool_specified"; then
36952        # A command without a complete path is provided, search $PATH.
36953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36954$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36955        # Extract the first word of "$tool_basename", so it can be a program name with args.
36956set dummy $tool_basename; ac_word=$2
36957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36958$as_echo_n "checking for $ac_word... " >&6; }
36959if ${ac_cv_path_NM+:} false; then :
36960  $as_echo_n "(cached) " >&6
36961else
36962  case $NM in
36963  [\\/]* | ?:[\\/]*)
36964  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36965  ;;
36966  *)
36967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36968for as_dir in $PATH
36969do
36970  IFS=$as_save_IFS
36971  test -z "$as_dir" && as_dir=.
36972    for ac_exec_ext in '' $ac_executable_extensions; do
36973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36974    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36976    break 2
36977  fi
36978done
36979  done
36980IFS=$as_save_IFS
36981
36982  ;;
36983esac
36984fi
36985NM=$ac_cv_path_NM
36986if test -n "$NM"; then
36987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36988$as_echo "$NM" >&6; }
36989else
36990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36991$as_echo "no" >&6; }
36992fi
36993
36994
36995        if test "x$NM" = x; then
36996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36997        fi
36998      else
36999        # Otherwise we believe it is a complete path. Use it as it is.
37000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37001$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37003$as_echo_n "checking for NM... " >&6; }
37004        if test ! -x "$tool_specified"; then
37005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37006$as_echo "not found" >&6; }
37007          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37008        fi
37009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37010$as_echo "$tool_specified" >&6; }
37011      fi
37012    fi
37013  fi
37014
37015
37016
37017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37018
37019  # First separate the path from the arguments. This will split at the first
37020  # space.
37021  complete="$NM"
37022  path="${complete%% *}"
37023  tmp="$complete EOL"
37024  arguments="${tmp#* }"
37025
37026  # Input might be given as Windows format, start by converting to
37027  # unix format.
37028  new_path=`$CYGPATH -u "$path"`
37029
37030  # Now try to locate executable using which
37031  new_path=`$WHICH "$new_path" 2> /dev/null`
37032  # bat and cmd files are not always considered executable in cygwin causing which
37033  # to not find them
37034  if test "x$new_path" = x \
37035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37037    new_path=`$CYGPATH -u "$path"`
37038  fi
37039  if test "x$new_path" = x; then
37040    # Oops. Which didn't find the executable.
37041    # The splitting of arguments from the executable at a space might have been incorrect,
37042    # since paths with space are more likely in Windows. Give it another try with the whole
37043    # argument.
37044    path="$complete"
37045    arguments="EOL"
37046    new_path=`$CYGPATH -u "$path"`
37047    new_path=`$WHICH "$new_path" 2> /dev/null`
37048    # bat and cmd files are not always considered executable in cygwin causing which
37049    # to not find them
37050    if test "x$new_path" = x \
37051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37053      new_path=`$CYGPATH -u "$path"`
37054    fi
37055    if test "x$new_path" = x; then
37056      # It's still not found. Now this is an unrecoverable error.
37057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37058$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37059      has_space=`$ECHO "$complete" | $GREP " "`
37060      if test "x$has_space" != x; then
37061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37063      fi
37064      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37065    fi
37066  fi
37067
37068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37071  # "foo.exe" is OK but "foo" is an error.
37072  #
37073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37074  # It is also a way to make sure we got the proper file name for the real test later on.
37075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37076  if test "x$test_shortpath" = x; then
37077    # Short path failed, file does not exist as specified.
37078    # Try adding .exe or .cmd
37079    if test -f "${new_path}.exe"; then
37080      input_to_shortpath="${new_path}.exe"
37081    elif test -f "${new_path}.cmd"; then
37082      input_to_shortpath="${new_path}.cmd"
37083    else
37084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37085$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37088      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37089    fi
37090  else
37091    input_to_shortpath="$new_path"
37092  fi
37093
37094  # Call helper function which possibly converts this using DOS-style short mode.
37095  # If so, the updated path is stored in $new_path.
37096  new_path="$input_to_shortpath"
37097
37098  input_path="$input_to_shortpath"
37099  # Check if we need to convert this using DOS-style short mode. If the path
37100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37101  # take no chances and rewrite it.
37102  # Note: m4 eats our [], so we need to use [ and ] instead.
37103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37104  if test "x$has_forbidden_chars" != x; then
37105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37109      # Going to short mode and back again did indeed matter. Since short mode is
37110      # case insensitive, let's make it lowercase to improve readability.
37111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37112      # Now convert it back to Unix-stile (cygpath)
37113      input_path=`$CYGPATH -u "$shortmode_path"`
37114      new_path="$input_path"
37115    fi
37116  fi
37117
37118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37119  if test "x$test_cygdrive_prefix" = x; then
37120    # As a simple fix, exclude /usr/bin since it's not a real path.
37121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37123      # a path prefixed by /cygdrive for fixpath to work.
37124      new_path="$CYGWIN_ROOT_PATH$input_path"
37125    fi
37126  fi
37127
37128  # remove trailing .exe if any
37129  new_path="${new_path/%.exe/}"
37130
37131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37132
37133  # First separate the path from the arguments. This will split at the first
37134  # space.
37135  complete="$NM"
37136  path="${complete%% *}"
37137  tmp="$complete EOL"
37138  arguments="${tmp#* }"
37139
37140  # Input might be given as Windows format, start by converting to
37141  # unix format.
37142  new_path="$path"
37143
37144  windows_path="$new_path"
37145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37146    unix_path=`$CYGPATH -u "$windows_path"`
37147    new_path="$unix_path"
37148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37150    new_path="$unix_path"
37151  fi
37152
37153
37154  # Now try to locate executable using which
37155  new_path=`$WHICH "$new_path" 2> /dev/null`
37156
37157  if test "x$new_path" = x; then
37158    # Oops. Which didn't find the executable.
37159    # The splitting of arguments from the executable at a space might have been incorrect,
37160    # since paths with space are more likely in Windows. Give it another try with the whole
37161    # argument.
37162    path="$complete"
37163    arguments="EOL"
37164    new_path="$path"
37165
37166  windows_path="$new_path"
37167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37168    unix_path=`$CYGPATH -u "$windows_path"`
37169    new_path="$unix_path"
37170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37172    new_path="$unix_path"
37173  fi
37174
37175
37176    new_path=`$WHICH "$new_path" 2> /dev/null`
37177
37178    if test "x$new_path" = x; then
37179      # It's still not found. Now this is an unrecoverable error.
37180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37181$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37182      has_space=`$ECHO "$complete" | $GREP " "`
37183      if test "x$has_space" != x; then
37184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37186      fi
37187      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37188    fi
37189  fi
37190
37191  # Now new_path has a complete unix path to the binary
37192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37193    # Keep paths in /bin as-is, but remove trailing .exe if any
37194    new_path="${new_path/%.exe/}"
37195    # Do not save /bin paths to all_fixpath_prefixes!
37196  else
37197    # Not in mixed or Windows style, start by that.
37198    new_path=`cmd //c echo $new_path`
37199
37200  input_path="$new_path"
37201  # Check if we need to convert this using DOS-style short mode. If the path
37202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37203  # take no chances and rewrite it.
37204  # Note: m4 eats our [], so we need to use [ and ] instead.
37205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37206  if test "x$has_forbidden_chars" != x; then
37207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37209  fi
37210
37211    # Output is in $new_path
37212
37213  windows_path="$new_path"
37214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37215    unix_path=`$CYGPATH -u "$windows_path"`
37216    new_path="$unix_path"
37217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37219    new_path="$unix_path"
37220  fi
37221
37222    # remove trailing .exe if any
37223    new_path="${new_path/%.exe/}"
37224
37225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37227  fi
37228
37229  else
37230    # We're on a posix platform. Hooray! :)
37231    # First separate the path from the arguments. This will split at the first
37232    # space.
37233    complete="$NM"
37234    path="${complete%% *}"
37235    tmp="$complete EOL"
37236    arguments="${tmp#* }"
37237
37238    # Cannot rely on the command "which" here since it doesn't always work.
37239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37240    if test -z "$is_absolute_path"; then
37241      # Path to executable is not absolute. Find it.
37242      IFS_save="$IFS"
37243      IFS=:
37244      for p in $PATH; do
37245        if test -f "$p/$path" && test -x "$p/$path"; then
37246          new_path="$p/$path"
37247          break
37248        fi
37249      done
37250      IFS="$IFS_save"
37251    else
37252      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
37253$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
37254      new_path="$path"
37255    fi
37256
37257    if test "x$new_path" = x; then
37258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37259$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37260      has_space=`$ECHO "$complete" | $GREP " "`
37261      if test "x$has_space" != x; then
37262        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37264      fi
37265      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37266    fi
37267  fi
37268
37269  # Now join together the path and the arguments once again
37270  if test "x$arguments" != xEOL; then
37271    new_complete="$new_path ${arguments% *}"
37272  else
37273    new_complete="$new_path"
37274  fi
37275
37276  if test "x$complete" != "x$new_complete"; then
37277    NM="$new_complete"
37278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37279$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37280  fi
37281
37282    GNM="$NM"
37283
37284
37285
37286  # Publish this variable in the help.
37287
37288
37289  if test "x$STRIP" = x; then
37290    # The variable is not set by user, try to locate tool using the code snippet
37291    if test -n "$ac_tool_prefix"; then
37292  for ac_prog in strip
37293  do
37294    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37295set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37297$as_echo_n "checking for $ac_word... " >&6; }
37298if ${ac_cv_prog_STRIP+:} false; then :
37299  $as_echo_n "(cached) " >&6
37300else
37301  if test -n "$STRIP"; then
37302  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37303else
37304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37305for as_dir in $PATH
37306do
37307  IFS=$as_save_IFS
37308  test -z "$as_dir" && as_dir=.
37309    for ac_exec_ext in '' $ac_executable_extensions; do
37310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37311    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37313    break 2
37314  fi
37315done
37316  done
37317IFS=$as_save_IFS
37318
37319fi
37320fi
37321STRIP=$ac_cv_prog_STRIP
37322if test -n "$STRIP"; then
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37324$as_echo "$STRIP" >&6; }
37325else
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37327$as_echo "no" >&6; }
37328fi
37329
37330
37331    test -n "$STRIP" && break
37332  done
37333fi
37334if test -z "$STRIP"; then
37335  ac_ct_STRIP=$STRIP
37336  for ac_prog in strip
37337do
37338  # Extract the first word of "$ac_prog", so it can be a program name with args.
37339set dummy $ac_prog; ac_word=$2
37340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37341$as_echo_n "checking for $ac_word... " >&6; }
37342if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37343  $as_echo_n "(cached) " >&6
37344else
37345  if test -n "$ac_ct_STRIP"; then
37346  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37347else
37348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37349for as_dir in $PATH
37350do
37351  IFS=$as_save_IFS
37352  test -z "$as_dir" && as_dir=.
37353    for ac_exec_ext in '' $ac_executable_extensions; do
37354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37355    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37357    break 2
37358  fi
37359done
37360  done
37361IFS=$as_save_IFS
37362
37363fi
37364fi
37365ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37366if test -n "$ac_ct_STRIP"; then
37367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37368$as_echo "$ac_ct_STRIP" >&6; }
37369else
37370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37371$as_echo "no" >&6; }
37372fi
37373
37374
37375  test -n "$ac_ct_STRIP" && break
37376done
37377
37378  if test "x$ac_ct_STRIP" = x; then
37379    STRIP=""
37380  else
37381    case $cross_compiling:$ac_tool_warned in
37382yes:)
37383{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37384$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37385ac_tool_warned=yes ;;
37386esac
37387    STRIP=$ac_ct_STRIP
37388  fi
37389fi
37390
37391  else
37392    # The variable is set, but is it from the command line or the environment?
37393
37394    # Try to remove the string !STRIP! from our list.
37395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37397      # If it failed, the variable was not from the command line. Ignore it,
37398      # but warn the user (except for BASH, which is always set by the calling BASH).
37399      if test "xSTRIP" != xBASH; then
37400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37401$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37402      fi
37403      # Try to locate tool using the code snippet
37404      if test -n "$ac_tool_prefix"; then
37405  for ac_prog in strip
37406  do
37407    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37408set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37410$as_echo_n "checking for $ac_word... " >&6; }
37411if ${ac_cv_prog_STRIP+:} false; then :
37412  $as_echo_n "(cached) " >&6
37413else
37414  if test -n "$STRIP"; then
37415  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37416else
37417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37418for as_dir in $PATH
37419do
37420  IFS=$as_save_IFS
37421  test -z "$as_dir" && as_dir=.
37422    for ac_exec_ext in '' $ac_executable_extensions; do
37423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37424    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37426    break 2
37427  fi
37428done
37429  done
37430IFS=$as_save_IFS
37431
37432fi
37433fi
37434STRIP=$ac_cv_prog_STRIP
37435if test -n "$STRIP"; then
37436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37437$as_echo "$STRIP" >&6; }
37438else
37439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37440$as_echo "no" >&6; }
37441fi
37442
37443
37444    test -n "$STRIP" && break
37445  done
37446fi
37447if test -z "$STRIP"; then
37448  ac_ct_STRIP=$STRIP
37449  for ac_prog in strip
37450do
37451  # Extract the first word of "$ac_prog", so it can be a program name with args.
37452set dummy $ac_prog; ac_word=$2
37453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37454$as_echo_n "checking for $ac_word... " >&6; }
37455if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37456  $as_echo_n "(cached) " >&6
37457else
37458  if test -n "$ac_ct_STRIP"; then
37459  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37460else
37461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37462for as_dir in $PATH
37463do
37464  IFS=$as_save_IFS
37465  test -z "$as_dir" && as_dir=.
37466    for ac_exec_ext in '' $ac_executable_extensions; do
37467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37468    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37470    break 2
37471  fi
37472done
37473  done
37474IFS=$as_save_IFS
37475
37476fi
37477fi
37478ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37479if test -n "$ac_ct_STRIP"; then
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37481$as_echo "$ac_ct_STRIP" >&6; }
37482else
37483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37484$as_echo "no" >&6; }
37485fi
37486
37487
37488  test -n "$ac_ct_STRIP" && break
37489done
37490
37491  if test "x$ac_ct_STRIP" = x; then
37492    STRIP=""
37493  else
37494    case $cross_compiling:$ac_tool_warned in
37495yes:)
37496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37498ac_tool_warned=yes ;;
37499esac
37500    STRIP=$ac_ct_STRIP
37501  fi
37502fi
37503
37504    else
37505      # If it succeeded, then it was overridden by the user. We will use it
37506      # for the tool.
37507
37508      # First remove it from the list of overridden variables, so we can test
37509      # for unknown variables in the end.
37510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37511
37512      # Check if the provided tool contains a complete path.
37513      tool_specified="$STRIP"
37514      tool_basename="${tool_specified##*/}"
37515      if test "x$tool_basename" = "x$tool_specified"; then
37516        # A command without a complete path is provided, search $PATH.
37517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37518$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37519        # Extract the first word of "$tool_basename", so it can be a program name with args.
37520set dummy $tool_basename; ac_word=$2
37521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37522$as_echo_n "checking for $ac_word... " >&6; }
37523if ${ac_cv_path_STRIP+:} false; then :
37524  $as_echo_n "(cached) " >&6
37525else
37526  case $STRIP in
37527  [\\/]* | ?:[\\/]*)
37528  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37529  ;;
37530  *)
37531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37532for as_dir in $PATH
37533do
37534  IFS=$as_save_IFS
37535  test -z "$as_dir" && as_dir=.
37536    for ac_exec_ext in '' $ac_executable_extensions; do
37537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37538    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37540    break 2
37541  fi
37542done
37543  done
37544IFS=$as_save_IFS
37545
37546  ;;
37547esac
37548fi
37549STRIP=$ac_cv_path_STRIP
37550if test -n "$STRIP"; then
37551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37552$as_echo "$STRIP" >&6; }
37553else
37554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37555$as_echo "no" >&6; }
37556fi
37557
37558
37559        if test "x$STRIP" = x; then
37560          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37561        fi
37562      else
37563        # Otherwise we believe it is a complete path. Use it as it is.
37564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37565$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37567$as_echo_n "checking for STRIP... " >&6; }
37568        if test ! -x "$tool_specified"; then
37569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37570$as_echo "not found" >&6; }
37571          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37572        fi
37573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37574$as_echo "$tool_specified" >&6; }
37575      fi
37576    fi
37577  fi
37578
37579
37580
37581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37582
37583  # First separate the path from the arguments. This will split at the first
37584  # space.
37585  complete="$STRIP"
37586  path="${complete%% *}"
37587  tmp="$complete EOL"
37588  arguments="${tmp#* }"
37589
37590  # Input might be given as Windows format, start by converting to
37591  # unix format.
37592  new_path=`$CYGPATH -u "$path"`
37593
37594  # Now try to locate executable using which
37595  new_path=`$WHICH "$new_path" 2> /dev/null`
37596  # bat and cmd files are not always considered executable in cygwin causing which
37597  # to not find them
37598  if test "x$new_path" = x \
37599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37601    new_path=`$CYGPATH -u "$path"`
37602  fi
37603  if test "x$new_path" = x; then
37604    # Oops. Which didn't find the executable.
37605    # The splitting of arguments from the executable at a space might have been incorrect,
37606    # since paths with space are more likely in Windows. Give it another try with the whole
37607    # argument.
37608    path="$complete"
37609    arguments="EOL"
37610    new_path=`$CYGPATH -u "$path"`
37611    new_path=`$WHICH "$new_path" 2> /dev/null`
37612    # bat and cmd files are not always considered executable in cygwin causing which
37613    # to not find them
37614    if test "x$new_path" = x \
37615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37617      new_path=`$CYGPATH -u "$path"`
37618    fi
37619    if test "x$new_path" = x; then
37620      # It's still not found. Now this is an unrecoverable error.
37621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37622$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37623      has_space=`$ECHO "$complete" | $GREP " "`
37624      if test "x$has_space" != x; then
37625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37627      fi
37628      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37629    fi
37630  fi
37631
37632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37635  # "foo.exe" is OK but "foo" is an error.
37636  #
37637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37638  # It is also a way to make sure we got the proper file name for the real test later on.
37639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37640  if test "x$test_shortpath" = x; then
37641    # Short path failed, file does not exist as specified.
37642    # Try adding .exe or .cmd
37643    if test -f "${new_path}.exe"; then
37644      input_to_shortpath="${new_path}.exe"
37645    elif test -f "${new_path}.cmd"; then
37646      input_to_shortpath="${new_path}.cmd"
37647    else
37648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37649$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37652      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37653    fi
37654  else
37655    input_to_shortpath="$new_path"
37656  fi
37657
37658  # Call helper function which possibly converts this using DOS-style short mode.
37659  # If so, the updated path is stored in $new_path.
37660  new_path="$input_to_shortpath"
37661
37662  input_path="$input_to_shortpath"
37663  # Check if we need to convert this using DOS-style short mode. If the path
37664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37665  # take no chances and rewrite it.
37666  # Note: m4 eats our [], so we need to use [ and ] instead.
37667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37668  if test "x$has_forbidden_chars" != x; then
37669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37673      # Going to short mode and back again did indeed matter. Since short mode is
37674      # case insensitive, let's make it lowercase to improve readability.
37675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37676      # Now convert it back to Unix-stile (cygpath)
37677      input_path=`$CYGPATH -u "$shortmode_path"`
37678      new_path="$input_path"
37679    fi
37680  fi
37681
37682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37683  if test "x$test_cygdrive_prefix" = x; then
37684    # As a simple fix, exclude /usr/bin since it's not a real path.
37685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37687      # a path prefixed by /cygdrive for fixpath to work.
37688      new_path="$CYGWIN_ROOT_PATH$input_path"
37689    fi
37690  fi
37691
37692  # remove trailing .exe if any
37693  new_path="${new_path/%.exe/}"
37694
37695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37696
37697  # First separate the path from the arguments. This will split at the first
37698  # space.
37699  complete="$STRIP"
37700  path="${complete%% *}"
37701  tmp="$complete EOL"
37702  arguments="${tmp#* }"
37703
37704  # Input might be given as Windows format, start by converting to
37705  # unix format.
37706  new_path="$path"
37707
37708  windows_path="$new_path"
37709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37710    unix_path=`$CYGPATH -u "$windows_path"`
37711    new_path="$unix_path"
37712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37714    new_path="$unix_path"
37715  fi
37716
37717
37718  # Now try to locate executable using which
37719  new_path=`$WHICH "$new_path" 2> /dev/null`
37720
37721  if test "x$new_path" = x; then
37722    # Oops. Which didn't find the executable.
37723    # The splitting of arguments from the executable at a space might have been incorrect,
37724    # since paths with space are more likely in Windows. Give it another try with the whole
37725    # argument.
37726    path="$complete"
37727    arguments="EOL"
37728    new_path="$path"
37729
37730  windows_path="$new_path"
37731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37732    unix_path=`$CYGPATH -u "$windows_path"`
37733    new_path="$unix_path"
37734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37736    new_path="$unix_path"
37737  fi
37738
37739
37740    new_path=`$WHICH "$new_path" 2> /dev/null`
37741
37742    if test "x$new_path" = x; then
37743      # It's still not found. Now this is an unrecoverable error.
37744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37745$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37746      has_space=`$ECHO "$complete" | $GREP " "`
37747      if test "x$has_space" != x; then
37748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37750      fi
37751      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37752    fi
37753  fi
37754
37755  # Now new_path has a complete unix path to the binary
37756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37757    # Keep paths in /bin as-is, but remove trailing .exe if any
37758    new_path="${new_path/%.exe/}"
37759    # Do not save /bin paths to all_fixpath_prefixes!
37760  else
37761    # Not in mixed or Windows style, start by that.
37762    new_path=`cmd //c echo $new_path`
37763
37764  input_path="$new_path"
37765  # Check if we need to convert this using DOS-style short mode. If the path
37766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37767  # take no chances and rewrite it.
37768  # Note: m4 eats our [], so we need to use [ and ] instead.
37769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37770  if test "x$has_forbidden_chars" != x; then
37771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37773  fi
37774
37775    # Output is in $new_path
37776
37777  windows_path="$new_path"
37778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37779    unix_path=`$CYGPATH -u "$windows_path"`
37780    new_path="$unix_path"
37781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37783    new_path="$unix_path"
37784  fi
37785
37786    # remove trailing .exe if any
37787    new_path="${new_path/%.exe/}"
37788
37789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37791  fi
37792
37793  else
37794    # We're on a posix platform. Hooray! :)
37795    # First separate the path from the arguments. This will split at the first
37796    # space.
37797    complete="$STRIP"
37798    path="${complete%% *}"
37799    tmp="$complete EOL"
37800    arguments="${tmp#* }"
37801
37802    # Cannot rely on the command "which" here since it doesn't always work.
37803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37804    if test -z "$is_absolute_path"; then
37805      # Path to executable is not absolute. Find it.
37806      IFS_save="$IFS"
37807      IFS=:
37808      for p in $PATH; do
37809        if test -f "$p/$path" && test -x "$p/$path"; then
37810          new_path="$p/$path"
37811          break
37812        fi
37813      done
37814      IFS="$IFS_save"
37815    else
37816      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37817$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37818      new_path="$path"
37819    fi
37820
37821    if test "x$new_path" = x; then
37822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37823$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37824      has_space=`$ECHO "$complete" | $GREP " "`
37825      if test "x$has_space" != x; then
37826        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37828      fi
37829      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37830    fi
37831  fi
37832
37833  # Now join together the path and the arguments once again
37834  if test "x$arguments" != xEOL; then
37835    new_complete="$new_path ${arguments% *}"
37836  else
37837    new_complete="$new_path"
37838  fi
37839
37840  if test "x$complete" != "x$new_complete"; then
37841    STRIP="$new_complete"
37842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37843$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37844  fi
37845
37846  fi
37847
37848  # objcopy is used for moving debug symbols to separate files when
37849  # full debug symbols are enabled.
37850  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37851
37852
37853  # Publish this variable in the help.
37854
37855
37856  if test "x$OBJCOPY" = x; then
37857    # The variable is not set by user, try to locate tool using the code snippet
37858    if test -n "$ac_tool_prefix"; then
37859  for ac_prog in gobjcopy objcopy
37860  do
37861    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37862set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37864$as_echo_n "checking for $ac_word... " >&6; }
37865if ${ac_cv_prog_OBJCOPY+:} false; then :
37866  $as_echo_n "(cached) " >&6
37867else
37868  if test -n "$OBJCOPY"; then
37869  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37870else
37871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37872for as_dir in $PATH
37873do
37874  IFS=$as_save_IFS
37875  test -z "$as_dir" && as_dir=.
37876    for ac_exec_ext in '' $ac_executable_extensions; do
37877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37878    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37880    break 2
37881  fi
37882done
37883  done
37884IFS=$as_save_IFS
37885
37886fi
37887fi
37888OBJCOPY=$ac_cv_prog_OBJCOPY
37889if test -n "$OBJCOPY"; then
37890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37891$as_echo "$OBJCOPY" >&6; }
37892else
37893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37894$as_echo "no" >&6; }
37895fi
37896
37897
37898    test -n "$OBJCOPY" && break
37899  done
37900fi
37901if test -z "$OBJCOPY"; then
37902  ac_ct_OBJCOPY=$OBJCOPY
37903  for ac_prog in gobjcopy objcopy
37904do
37905  # Extract the first word of "$ac_prog", so it can be a program name with args.
37906set dummy $ac_prog; ac_word=$2
37907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37908$as_echo_n "checking for $ac_word... " >&6; }
37909if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37910  $as_echo_n "(cached) " >&6
37911else
37912  if test -n "$ac_ct_OBJCOPY"; then
37913  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37914else
37915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37916for as_dir in $PATH
37917do
37918  IFS=$as_save_IFS
37919  test -z "$as_dir" && as_dir=.
37920    for ac_exec_ext in '' $ac_executable_extensions; do
37921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37922    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37924    break 2
37925  fi
37926done
37927  done
37928IFS=$as_save_IFS
37929
37930fi
37931fi
37932ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37933if test -n "$ac_ct_OBJCOPY"; then
37934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37935$as_echo "$ac_ct_OBJCOPY" >&6; }
37936else
37937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37938$as_echo "no" >&6; }
37939fi
37940
37941
37942  test -n "$ac_ct_OBJCOPY" && break
37943done
37944
37945  if test "x$ac_ct_OBJCOPY" = x; then
37946    OBJCOPY=""
37947  else
37948    case $cross_compiling:$ac_tool_warned in
37949yes:)
37950{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37951$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37952ac_tool_warned=yes ;;
37953esac
37954    OBJCOPY=$ac_ct_OBJCOPY
37955  fi
37956fi
37957
37958  else
37959    # The variable is set, but is it from the command line or the environment?
37960
37961    # Try to remove the string !OBJCOPY! from our list.
37962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37964      # If it failed, the variable was not from the command line. Ignore it,
37965      # but warn the user (except for BASH, which is always set by the calling BASH).
37966      if test "xOBJCOPY" != xBASH; then
37967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37968$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37969      fi
37970      # Try to locate tool using the code snippet
37971      if test -n "$ac_tool_prefix"; then
37972  for ac_prog in gobjcopy objcopy
37973  do
37974    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37975set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37977$as_echo_n "checking for $ac_word... " >&6; }
37978if ${ac_cv_prog_OBJCOPY+:} false; then :
37979  $as_echo_n "(cached) " >&6
37980else
37981  if test -n "$OBJCOPY"; then
37982  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37983else
37984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37985for as_dir in $PATH
37986do
37987  IFS=$as_save_IFS
37988  test -z "$as_dir" && as_dir=.
37989    for ac_exec_ext in '' $ac_executable_extensions; do
37990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37991    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37993    break 2
37994  fi
37995done
37996  done
37997IFS=$as_save_IFS
37998
37999fi
38000fi
38001OBJCOPY=$ac_cv_prog_OBJCOPY
38002if test -n "$OBJCOPY"; then
38003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38004$as_echo "$OBJCOPY" >&6; }
38005else
38006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38007$as_echo "no" >&6; }
38008fi
38009
38010
38011    test -n "$OBJCOPY" && break
38012  done
38013fi
38014if test -z "$OBJCOPY"; then
38015  ac_ct_OBJCOPY=$OBJCOPY
38016  for ac_prog in gobjcopy objcopy
38017do
38018  # Extract the first word of "$ac_prog", so it can be a program name with args.
38019set dummy $ac_prog; ac_word=$2
38020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38021$as_echo_n "checking for $ac_word... " >&6; }
38022if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38023  $as_echo_n "(cached) " >&6
38024else
38025  if test -n "$ac_ct_OBJCOPY"; then
38026  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38027else
38028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38029for as_dir in $PATH
38030do
38031  IFS=$as_save_IFS
38032  test -z "$as_dir" && as_dir=.
38033    for ac_exec_ext in '' $ac_executable_extensions; do
38034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38035    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38037    break 2
38038  fi
38039done
38040  done
38041IFS=$as_save_IFS
38042
38043fi
38044fi
38045ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38046if test -n "$ac_ct_OBJCOPY"; then
38047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38048$as_echo "$ac_ct_OBJCOPY" >&6; }
38049else
38050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38051$as_echo "no" >&6; }
38052fi
38053
38054
38055  test -n "$ac_ct_OBJCOPY" && break
38056done
38057
38058  if test "x$ac_ct_OBJCOPY" = x; then
38059    OBJCOPY=""
38060  else
38061    case $cross_compiling:$ac_tool_warned in
38062yes:)
38063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38065ac_tool_warned=yes ;;
38066esac
38067    OBJCOPY=$ac_ct_OBJCOPY
38068  fi
38069fi
38070
38071    else
38072      # If it succeeded, then it was overridden by the user. We will use it
38073      # for the tool.
38074
38075      # First remove it from the list of overridden variables, so we can test
38076      # for unknown variables in the end.
38077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38078
38079      # Check if the provided tool contains a complete path.
38080      tool_specified="$OBJCOPY"
38081      tool_basename="${tool_specified##*/}"
38082      if test "x$tool_basename" = "x$tool_specified"; then
38083        # A command without a complete path is provided, search $PATH.
38084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38085$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38086        # Extract the first word of "$tool_basename", so it can be a program name with args.
38087set dummy $tool_basename; ac_word=$2
38088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38089$as_echo_n "checking for $ac_word... " >&6; }
38090if ${ac_cv_path_OBJCOPY+:} false; then :
38091  $as_echo_n "(cached) " >&6
38092else
38093  case $OBJCOPY in
38094  [\\/]* | ?:[\\/]*)
38095  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38096  ;;
38097  *)
38098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38099for as_dir in $PATH
38100do
38101  IFS=$as_save_IFS
38102  test -z "$as_dir" && as_dir=.
38103    for ac_exec_ext in '' $ac_executable_extensions; do
38104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38105    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38107    break 2
38108  fi
38109done
38110  done
38111IFS=$as_save_IFS
38112
38113  ;;
38114esac
38115fi
38116OBJCOPY=$ac_cv_path_OBJCOPY
38117if test -n "$OBJCOPY"; then
38118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38119$as_echo "$OBJCOPY" >&6; }
38120else
38121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38122$as_echo "no" >&6; }
38123fi
38124
38125
38126        if test "x$OBJCOPY" = x; then
38127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38128        fi
38129      else
38130        # Otherwise we believe it is a complete path. Use it as it is.
38131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38132$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38134$as_echo_n "checking for OBJCOPY... " >&6; }
38135        if test ! -x "$tool_specified"; then
38136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38137$as_echo "not found" >&6; }
38138          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38139        fi
38140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38141$as_echo "$tool_specified" >&6; }
38142      fi
38143    fi
38144  fi
38145
38146
38147    # Only call fixup if objcopy was found.
38148    if test -n "$OBJCOPY"; then
38149
38150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38151
38152  # First separate the path from the arguments. This will split at the first
38153  # space.
38154  complete="$OBJCOPY"
38155  path="${complete%% *}"
38156  tmp="$complete EOL"
38157  arguments="${tmp#* }"
38158
38159  # Input might be given as Windows format, start by converting to
38160  # unix format.
38161  new_path=`$CYGPATH -u "$path"`
38162
38163  # Now try to locate executable using which
38164  new_path=`$WHICH "$new_path" 2> /dev/null`
38165  # bat and cmd files are not always considered executable in cygwin causing which
38166  # to not find them
38167  if test "x$new_path" = x \
38168      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38169      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38170    new_path=`$CYGPATH -u "$path"`
38171  fi
38172  if test "x$new_path" = x; then
38173    # Oops. Which didn't find the executable.
38174    # The splitting of arguments from the executable at a space might have been incorrect,
38175    # since paths with space are more likely in Windows. Give it another try with the whole
38176    # argument.
38177    path="$complete"
38178    arguments="EOL"
38179    new_path=`$CYGPATH -u "$path"`
38180    new_path=`$WHICH "$new_path" 2> /dev/null`
38181    # bat and cmd files are not always considered executable in cygwin causing which
38182    # to not find them
38183    if test "x$new_path" = x \
38184        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38185        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38186      new_path=`$CYGPATH -u "$path"`
38187    fi
38188    if test "x$new_path" = x; then
38189      # It's still not found. Now this is an unrecoverable error.
38190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38191$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38192      has_space=`$ECHO "$complete" | $GREP " "`
38193      if test "x$has_space" != x; then
38194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38196      fi
38197      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38198    fi
38199  fi
38200
38201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38204  # "foo.exe" is OK but "foo" is an error.
38205  #
38206  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38207  # It is also a way to make sure we got the proper file name for the real test later on.
38208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38209  if test "x$test_shortpath" = x; then
38210    # Short path failed, file does not exist as specified.
38211    # Try adding .exe or .cmd
38212    if test -f "${new_path}.exe"; then
38213      input_to_shortpath="${new_path}.exe"
38214    elif test -f "${new_path}.cmd"; then
38215      input_to_shortpath="${new_path}.cmd"
38216    else
38217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38218$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38219      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38220$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38221      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38222    fi
38223  else
38224    input_to_shortpath="$new_path"
38225  fi
38226
38227  # Call helper function which possibly converts this using DOS-style short mode.
38228  # If so, the updated path is stored in $new_path.
38229  new_path="$input_to_shortpath"
38230
38231  input_path="$input_to_shortpath"
38232  # Check if we need to convert this using DOS-style short mode. If the path
38233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38234  # take no chances and rewrite it.
38235  # Note: m4 eats our [], so we need to use [ and ] instead.
38236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38237  if test "x$has_forbidden_chars" != x; then
38238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38242      # Going to short mode and back again did indeed matter. Since short mode is
38243      # case insensitive, let's make it lowercase to improve readability.
38244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38245      # Now convert it back to Unix-stile (cygpath)
38246      input_path=`$CYGPATH -u "$shortmode_path"`
38247      new_path="$input_path"
38248    fi
38249  fi
38250
38251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38252  if test "x$test_cygdrive_prefix" = x; then
38253    # As a simple fix, exclude /usr/bin since it's not a real path.
38254    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38256      # a path prefixed by /cygdrive for fixpath to work.
38257      new_path="$CYGWIN_ROOT_PATH$input_path"
38258    fi
38259  fi
38260
38261  # remove trailing .exe if any
38262  new_path="${new_path/%.exe/}"
38263
38264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38265
38266  # First separate the path from the arguments. This will split at the first
38267  # space.
38268  complete="$OBJCOPY"
38269  path="${complete%% *}"
38270  tmp="$complete EOL"
38271  arguments="${tmp#* }"
38272
38273  # Input might be given as Windows format, start by converting to
38274  # unix format.
38275  new_path="$path"
38276
38277  windows_path="$new_path"
38278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38279    unix_path=`$CYGPATH -u "$windows_path"`
38280    new_path="$unix_path"
38281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38283    new_path="$unix_path"
38284  fi
38285
38286
38287  # Now try to locate executable using which
38288  new_path=`$WHICH "$new_path" 2> /dev/null`
38289
38290  if test "x$new_path" = x; then
38291    # Oops. Which didn't find the executable.
38292    # The splitting of arguments from the executable at a space might have been incorrect,
38293    # since paths with space are more likely in Windows. Give it another try with the whole
38294    # argument.
38295    path="$complete"
38296    arguments="EOL"
38297    new_path="$path"
38298
38299  windows_path="$new_path"
38300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38301    unix_path=`$CYGPATH -u "$windows_path"`
38302    new_path="$unix_path"
38303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38305    new_path="$unix_path"
38306  fi
38307
38308
38309    new_path=`$WHICH "$new_path" 2> /dev/null`
38310
38311    if test "x$new_path" = x; then
38312      # It's still not found. Now this is an unrecoverable error.
38313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38314$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38315      has_space=`$ECHO "$complete" | $GREP " "`
38316      if test "x$has_space" != x; then
38317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38319      fi
38320      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38321    fi
38322  fi
38323
38324  # Now new_path has a complete unix path to the binary
38325  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38326    # Keep paths in /bin as-is, but remove trailing .exe if any
38327    new_path="${new_path/%.exe/}"
38328    # Do not save /bin paths to all_fixpath_prefixes!
38329  else
38330    # Not in mixed or Windows style, start by that.
38331    new_path=`cmd //c echo $new_path`
38332
38333  input_path="$new_path"
38334  # Check if we need to convert this using DOS-style short mode. If the path
38335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38336  # take no chances and rewrite it.
38337  # Note: m4 eats our [], so we need to use [ and ] instead.
38338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38339  if test "x$has_forbidden_chars" != x; then
38340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38342  fi
38343
38344    # Output is in $new_path
38345
38346  windows_path="$new_path"
38347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38348    unix_path=`$CYGPATH -u "$windows_path"`
38349    new_path="$unix_path"
38350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38352    new_path="$unix_path"
38353  fi
38354
38355    # remove trailing .exe if any
38356    new_path="${new_path/%.exe/}"
38357
38358    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38359    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38360  fi
38361
38362  else
38363    # We're on a posix platform. Hooray! :)
38364    # First separate the path from the arguments. This will split at the first
38365    # space.
38366    complete="$OBJCOPY"
38367    path="${complete%% *}"
38368    tmp="$complete EOL"
38369    arguments="${tmp#* }"
38370
38371    # Cannot rely on the command "which" here since it doesn't always work.
38372    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38373    if test -z "$is_absolute_path"; then
38374      # Path to executable is not absolute. Find it.
38375      IFS_save="$IFS"
38376      IFS=:
38377      for p in $PATH; do
38378        if test -f "$p/$path" && test -x "$p/$path"; then
38379          new_path="$p/$path"
38380          break
38381        fi
38382      done
38383      IFS="$IFS_save"
38384    else
38385      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
38386$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
38387      new_path="$path"
38388    fi
38389
38390    if test "x$new_path" = x; then
38391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38392$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38393      has_space=`$ECHO "$complete" | $GREP " "`
38394      if test "x$has_space" != x; then
38395        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38397      fi
38398      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38399    fi
38400  fi
38401
38402  # Now join together the path and the arguments once again
38403  if test "x$arguments" != xEOL; then
38404    new_complete="$new_path ${arguments% *}"
38405  else
38406    new_complete="$new_path"
38407  fi
38408
38409  if test "x$complete" != "x$new_complete"; then
38410    OBJCOPY="$new_complete"
38411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38412$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38413  fi
38414
38415    fi
38416  fi
38417
38418
38419
38420  # Publish this variable in the help.
38421
38422
38423  if test "x$OBJDUMP" = x; then
38424    # The variable is not set by user, try to locate tool using the code snippet
38425    if test -n "$ac_tool_prefix"; then
38426  for ac_prog in gobjdump objdump
38427  do
38428    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38429set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38431$as_echo_n "checking for $ac_word... " >&6; }
38432if ${ac_cv_prog_OBJDUMP+:} false; then :
38433  $as_echo_n "(cached) " >&6
38434else
38435  if test -n "$OBJDUMP"; then
38436  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38437else
38438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38439for as_dir in $PATH
38440do
38441  IFS=$as_save_IFS
38442  test -z "$as_dir" && as_dir=.
38443    for ac_exec_ext in '' $ac_executable_extensions; do
38444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38445    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38447    break 2
38448  fi
38449done
38450  done
38451IFS=$as_save_IFS
38452
38453fi
38454fi
38455OBJDUMP=$ac_cv_prog_OBJDUMP
38456if test -n "$OBJDUMP"; then
38457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38458$as_echo "$OBJDUMP" >&6; }
38459else
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38461$as_echo "no" >&6; }
38462fi
38463
38464
38465    test -n "$OBJDUMP" && break
38466  done
38467fi
38468if test -z "$OBJDUMP"; then
38469  ac_ct_OBJDUMP=$OBJDUMP
38470  for ac_prog in gobjdump objdump
38471do
38472  # Extract the first word of "$ac_prog", so it can be a program name with args.
38473set dummy $ac_prog; ac_word=$2
38474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38475$as_echo_n "checking for $ac_word... " >&6; }
38476if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38477  $as_echo_n "(cached) " >&6
38478else
38479  if test -n "$ac_ct_OBJDUMP"; then
38480  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38481else
38482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38483for as_dir in $PATH
38484do
38485  IFS=$as_save_IFS
38486  test -z "$as_dir" && as_dir=.
38487    for ac_exec_ext in '' $ac_executable_extensions; do
38488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38489    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38491    break 2
38492  fi
38493done
38494  done
38495IFS=$as_save_IFS
38496
38497fi
38498fi
38499ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38500if test -n "$ac_ct_OBJDUMP"; then
38501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38502$as_echo "$ac_ct_OBJDUMP" >&6; }
38503else
38504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38505$as_echo "no" >&6; }
38506fi
38507
38508
38509  test -n "$ac_ct_OBJDUMP" && break
38510done
38511
38512  if test "x$ac_ct_OBJDUMP" = x; then
38513    OBJDUMP=""
38514  else
38515    case $cross_compiling:$ac_tool_warned in
38516yes:)
38517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38519ac_tool_warned=yes ;;
38520esac
38521    OBJDUMP=$ac_ct_OBJDUMP
38522  fi
38523fi
38524
38525  else
38526    # The variable is set, but is it from the command line or the environment?
38527
38528    # Try to remove the string !OBJDUMP! from our list.
38529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38531      # If it failed, the variable was not from the command line. Ignore it,
38532      # but warn the user (except for BASH, which is always set by the calling BASH).
38533      if test "xOBJDUMP" != xBASH; then
38534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38535$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38536      fi
38537      # Try to locate tool using the code snippet
38538      if test -n "$ac_tool_prefix"; then
38539  for ac_prog in gobjdump objdump
38540  do
38541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38544$as_echo_n "checking for $ac_word... " >&6; }
38545if ${ac_cv_prog_OBJDUMP+:} false; then :
38546  $as_echo_n "(cached) " >&6
38547else
38548  if test -n "$OBJDUMP"; then
38549  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38550else
38551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38552for as_dir in $PATH
38553do
38554  IFS=$as_save_IFS
38555  test -z "$as_dir" && as_dir=.
38556    for ac_exec_ext in '' $ac_executable_extensions; do
38557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38558    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38560    break 2
38561  fi
38562done
38563  done
38564IFS=$as_save_IFS
38565
38566fi
38567fi
38568OBJDUMP=$ac_cv_prog_OBJDUMP
38569if test -n "$OBJDUMP"; then
38570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38571$as_echo "$OBJDUMP" >&6; }
38572else
38573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38574$as_echo "no" >&6; }
38575fi
38576
38577
38578    test -n "$OBJDUMP" && break
38579  done
38580fi
38581if test -z "$OBJDUMP"; then
38582  ac_ct_OBJDUMP=$OBJDUMP
38583  for ac_prog in gobjdump objdump
38584do
38585  # Extract the first word of "$ac_prog", so it can be a program name with args.
38586set dummy $ac_prog; ac_word=$2
38587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38588$as_echo_n "checking for $ac_word... " >&6; }
38589if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38590  $as_echo_n "(cached) " >&6
38591else
38592  if test -n "$ac_ct_OBJDUMP"; then
38593  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38594else
38595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38596for as_dir in $PATH
38597do
38598  IFS=$as_save_IFS
38599  test -z "$as_dir" && as_dir=.
38600    for ac_exec_ext in '' $ac_executable_extensions; do
38601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38602    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38604    break 2
38605  fi
38606done
38607  done
38608IFS=$as_save_IFS
38609
38610fi
38611fi
38612ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38613if test -n "$ac_ct_OBJDUMP"; then
38614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38615$as_echo "$ac_ct_OBJDUMP" >&6; }
38616else
38617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38618$as_echo "no" >&6; }
38619fi
38620
38621
38622  test -n "$ac_ct_OBJDUMP" && break
38623done
38624
38625  if test "x$ac_ct_OBJDUMP" = x; then
38626    OBJDUMP=""
38627  else
38628    case $cross_compiling:$ac_tool_warned in
38629yes:)
38630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38632ac_tool_warned=yes ;;
38633esac
38634    OBJDUMP=$ac_ct_OBJDUMP
38635  fi
38636fi
38637
38638    else
38639      # If it succeeded, then it was overridden by the user. We will use it
38640      # for the tool.
38641
38642      # First remove it from the list of overridden variables, so we can test
38643      # for unknown variables in the end.
38644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38645
38646      # Check if the provided tool contains a complete path.
38647      tool_specified="$OBJDUMP"
38648      tool_basename="${tool_specified##*/}"
38649      if test "x$tool_basename" = "x$tool_specified"; then
38650        # A command without a complete path is provided, search $PATH.
38651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38652$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38653        # Extract the first word of "$tool_basename", so it can be a program name with args.
38654set dummy $tool_basename; ac_word=$2
38655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38656$as_echo_n "checking for $ac_word... " >&6; }
38657if ${ac_cv_path_OBJDUMP+:} false; then :
38658  $as_echo_n "(cached) " >&6
38659else
38660  case $OBJDUMP in
38661  [\\/]* | ?:[\\/]*)
38662  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38663  ;;
38664  *)
38665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38666for as_dir in $PATH
38667do
38668  IFS=$as_save_IFS
38669  test -z "$as_dir" && as_dir=.
38670    for ac_exec_ext in '' $ac_executable_extensions; do
38671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38672    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38674    break 2
38675  fi
38676done
38677  done
38678IFS=$as_save_IFS
38679
38680  ;;
38681esac
38682fi
38683OBJDUMP=$ac_cv_path_OBJDUMP
38684if test -n "$OBJDUMP"; then
38685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38686$as_echo "$OBJDUMP" >&6; }
38687else
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38689$as_echo "no" >&6; }
38690fi
38691
38692
38693        if test "x$OBJDUMP" = x; then
38694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38695        fi
38696      else
38697        # Otherwise we believe it is a complete path. Use it as it is.
38698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38699$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38701$as_echo_n "checking for OBJDUMP... " >&6; }
38702        if test ! -x "$tool_specified"; then
38703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38704$as_echo "not found" >&6; }
38705          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38706        fi
38707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38708$as_echo "$tool_specified" >&6; }
38709      fi
38710    fi
38711  fi
38712
38713
38714  if test "x$OBJDUMP" != x; then
38715    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
38716
38717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38718
38719  # First separate the path from the arguments. This will split at the first
38720  # space.
38721  complete="$OBJDUMP"
38722  path="${complete%% *}"
38723  tmp="$complete EOL"
38724  arguments="${tmp#* }"
38725
38726  # Input might be given as Windows format, start by converting to
38727  # unix format.
38728  new_path=`$CYGPATH -u "$path"`
38729
38730  # Now try to locate executable using which
38731  new_path=`$WHICH "$new_path" 2> /dev/null`
38732  # bat and cmd files are not always considered executable in cygwin causing which
38733  # to not find them
38734  if test "x$new_path" = x \
38735      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38736      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38737    new_path=`$CYGPATH -u "$path"`
38738  fi
38739  if test "x$new_path" = x; then
38740    # Oops. Which didn't find the executable.
38741    # The splitting of arguments from the executable at a space might have been incorrect,
38742    # since paths with space are more likely in Windows. Give it another try with the whole
38743    # argument.
38744    path="$complete"
38745    arguments="EOL"
38746    new_path=`$CYGPATH -u "$path"`
38747    new_path=`$WHICH "$new_path" 2> /dev/null`
38748    # bat and cmd files are not always considered executable in cygwin causing which
38749    # to not find them
38750    if test "x$new_path" = x \
38751        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38752        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38753      new_path=`$CYGPATH -u "$path"`
38754    fi
38755    if test "x$new_path" = x; then
38756      # It's still not found. Now this is an unrecoverable error.
38757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38758$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38759      has_space=`$ECHO "$complete" | $GREP " "`
38760      if test "x$has_space" != x; then
38761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38763      fi
38764      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38765    fi
38766  fi
38767
38768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38771  # "foo.exe" is OK but "foo" is an error.
38772  #
38773  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38774  # It is also a way to make sure we got the proper file name for the real test later on.
38775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38776  if test "x$test_shortpath" = x; then
38777    # Short path failed, file does not exist as specified.
38778    # Try adding .exe or .cmd
38779    if test -f "${new_path}.exe"; then
38780      input_to_shortpath="${new_path}.exe"
38781    elif test -f "${new_path}.cmd"; then
38782      input_to_shortpath="${new_path}.cmd"
38783    else
38784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38785$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38786      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38787$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38788      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38789    fi
38790  else
38791    input_to_shortpath="$new_path"
38792  fi
38793
38794  # Call helper function which possibly converts this using DOS-style short mode.
38795  # If so, the updated path is stored in $new_path.
38796  new_path="$input_to_shortpath"
38797
38798  input_path="$input_to_shortpath"
38799  # Check if we need to convert this using DOS-style short mode. If the path
38800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38801  # take no chances and rewrite it.
38802  # Note: m4 eats our [], so we need to use [ and ] instead.
38803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38804  if test "x$has_forbidden_chars" != x; then
38805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38809      # Going to short mode and back again did indeed matter. Since short mode is
38810      # case insensitive, let's make it lowercase to improve readability.
38811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38812      # Now convert it back to Unix-stile (cygpath)
38813      input_path=`$CYGPATH -u "$shortmode_path"`
38814      new_path="$input_path"
38815    fi
38816  fi
38817
38818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38819  if test "x$test_cygdrive_prefix" = x; then
38820    # As a simple fix, exclude /usr/bin since it's not a real path.
38821    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38823      # a path prefixed by /cygdrive for fixpath to work.
38824      new_path="$CYGWIN_ROOT_PATH$input_path"
38825    fi
38826  fi
38827
38828  # remove trailing .exe if any
38829  new_path="${new_path/%.exe/}"
38830
38831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38832
38833  # First separate the path from the arguments. This will split at the first
38834  # space.
38835  complete="$OBJDUMP"
38836  path="${complete%% *}"
38837  tmp="$complete EOL"
38838  arguments="${tmp#* }"
38839
38840  # Input might be given as Windows format, start by converting to
38841  # unix format.
38842  new_path="$path"
38843
38844  windows_path="$new_path"
38845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38846    unix_path=`$CYGPATH -u "$windows_path"`
38847    new_path="$unix_path"
38848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38850    new_path="$unix_path"
38851  fi
38852
38853
38854  # Now try to locate executable using which
38855  new_path=`$WHICH "$new_path" 2> /dev/null`
38856
38857  if test "x$new_path" = x; then
38858    # Oops. Which didn't find the executable.
38859    # The splitting of arguments from the executable at a space might have been incorrect,
38860    # since paths with space are more likely in Windows. Give it another try with the whole
38861    # argument.
38862    path="$complete"
38863    arguments="EOL"
38864    new_path="$path"
38865
38866  windows_path="$new_path"
38867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868    unix_path=`$CYGPATH -u "$windows_path"`
38869    new_path="$unix_path"
38870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38872    new_path="$unix_path"
38873  fi
38874
38875
38876    new_path=`$WHICH "$new_path" 2> /dev/null`
38877
38878    if test "x$new_path" = x; then
38879      # It's still not found. Now this is an unrecoverable error.
38880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38881$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38882      has_space=`$ECHO "$complete" | $GREP " "`
38883      if test "x$has_space" != x; then
38884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38886      fi
38887      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38888    fi
38889  fi
38890
38891  # Now new_path has a complete unix path to the binary
38892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38893    # Keep paths in /bin as-is, but remove trailing .exe if any
38894    new_path="${new_path/%.exe/}"
38895    # Do not save /bin paths to all_fixpath_prefixes!
38896  else
38897    # Not in mixed or Windows style, start by that.
38898    new_path=`cmd //c echo $new_path`
38899
38900  input_path="$new_path"
38901  # Check if we need to convert this using DOS-style short mode. If the path
38902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38903  # take no chances and rewrite it.
38904  # Note: m4 eats our [], so we need to use [ and ] instead.
38905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38906  if test "x$has_forbidden_chars" != x; then
38907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38909  fi
38910
38911    # Output is in $new_path
38912
38913  windows_path="$new_path"
38914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38915    unix_path=`$CYGPATH -u "$windows_path"`
38916    new_path="$unix_path"
38917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38919    new_path="$unix_path"
38920  fi
38921
38922    # remove trailing .exe if any
38923    new_path="${new_path/%.exe/}"
38924
38925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38927  fi
38928
38929  else
38930    # We're on a posix platform. Hooray! :)
38931    # First separate the path from the arguments. This will split at the first
38932    # space.
38933    complete="$OBJDUMP"
38934    path="${complete%% *}"
38935    tmp="$complete EOL"
38936    arguments="${tmp#* }"
38937
38938    # Cannot rely on the command "which" here since it doesn't always work.
38939    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38940    if test -z "$is_absolute_path"; then
38941      # Path to executable is not absolute. Find it.
38942      IFS_save="$IFS"
38943      IFS=:
38944      for p in $PATH; do
38945        if test -f "$p/$path" && test -x "$p/$path"; then
38946          new_path="$p/$path"
38947          break
38948        fi
38949      done
38950      IFS="$IFS_save"
38951    else
38952      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
38953$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
38954      new_path="$path"
38955    fi
38956
38957    if test "x$new_path" = x; then
38958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38959$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38960      has_space=`$ECHO "$complete" | $GREP " "`
38961      if test "x$has_space" != x; then
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38964      fi
38965      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38966    fi
38967  fi
38968
38969  # Now join together the path and the arguments once again
38970  if test "x$arguments" != xEOL; then
38971    new_complete="$new_path ${arguments% *}"
38972  else
38973    new_complete="$new_path"
38974  fi
38975
38976  if test "x$complete" != "x$new_complete"; then
38977    OBJDUMP="$new_complete"
38978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38979$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38980  fi
38981
38982  fi
38983
38984  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38985
38986
38987  # Publish this variable in the help.
38988
38989
38990  if test "x$LIPO" = x; then
38991    # The variable is not set by user, try to locate tool using the code snippet
38992    for ac_prog in lipo
38993do
38994  # Extract the first word of "$ac_prog", so it can be a program name with args.
38995set dummy $ac_prog; ac_word=$2
38996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38997$as_echo_n "checking for $ac_word... " >&6; }
38998if ${ac_cv_path_LIPO+:} false; then :
38999  $as_echo_n "(cached) " >&6
39000else
39001  case $LIPO in
39002  [\\/]* | ?:[\\/]*)
39003  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39004  ;;
39005  *)
39006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39007for as_dir in $PATH
39008do
39009  IFS=$as_save_IFS
39010  test -z "$as_dir" && as_dir=.
39011    for ac_exec_ext in '' $ac_executable_extensions; do
39012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39013    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39015    break 2
39016  fi
39017done
39018  done
39019IFS=$as_save_IFS
39020
39021  ;;
39022esac
39023fi
39024LIPO=$ac_cv_path_LIPO
39025if test -n "$LIPO"; then
39026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39027$as_echo "$LIPO" >&6; }
39028else
39029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39030$as_echo "no" >&6; }
39031fi
39032
39033
39034  test -n "$LIPO" && break
39035done
39036
39037  else
39038    # The variable is set, but is it from the command line or the environment?
39039
39040    # Try to remove the string !LIPO! from our list.
39041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39043      # If it failed, the variable was not from the command line. Ignore it,
39044      # but warn the user (except for BASH, which is always set by the calling BASH).
39045      if test "xLIPO" != xBASH; then
39046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39047$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39048      fi
39049      # Try to locate tool using the code snippet
39050      for ac_prog in lipo
39051do
39052  # Extract the first word of "$ac_prog", so it can be a program name with args.
39053set dummy $ac_prog; ac_word=$2
39054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39055$as_echo_n "checking for $ac_word... " >&6; }
39056if ${ac_cv_path_LIPO+:} false; then :
39057  $as_echo_n "(cached) " >&6
39058else
39059  case $LIPO in
39060  [\\/]* | ?:[\\/]*)
39061  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39062  ;;
39063  *)
39064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39065for as_dir in $PATH
39066do
39067  IFS=$as_save_IFS
39068  test -z "$as_dir" && as_dir=.
39069    for ac_exec_ext in '' $ac_executable_extensions; do
39070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39071    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39073    break 2
39074  fi
39075done
39076  done
39077IFS=$as_save_IFS
39078
39079  ;;
39080esac
39081fi
39082LIPO=$ac_cv_path_LIPO
39083if test -n "$LIPO"; then
39084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39085$as_echo "$LIPO" >&6; }
39086else
39087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39088$as_echo "no" >&6; }
39089fi
39090
39091
39092  test -n "$LIPO" && break
39093done
39094
39095    else
39096      # If it succeeded, then it was overridden by the user. We will use it
39097      # for the tool.
39098
39099      # First remove it from the list of overridden variables, so we can test
39100      # for unknown variables in the end.
39101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39102
39103      # Check if the provided tool contains a complete path.
39104      tool_specified="$LIPO"
39105      tool_basename="${tool_specified##*/}"
39106      if test "x$tool_basename" = "x$tool_specified"; then
39107        # A command without a complete path is provided, search $PATH.
39108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39109$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39110        # Extract the first word of "$tool_basename", so it can be a program name with args.
39111set dummy $tool_basename; ac_word=$2
39112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39113$as_echo_n "checking for $ac_word... " >&6; }
39114if ${ac_cv_path_LIPO+:} false; then :
39115  $as_echo_n "(cached) " >&6
39116else
39117  case $LIPO in
39118  [\\/]* | ?:[\\/]*)
39119  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39120  ;;
39121  *)
39122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39123for as_dir in $PATH
39124do
39125  IFS=$as_save_IFS
39126  test -z "$as_dir" && as_dir=.
39127    for ac_exec_ext in '' $ac_executable_extensions; do
39128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39129    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39131    break 2
39132  fi
39133done
39134  done
39135IFS=$as_save_IFS
39136
39137  ;;
39138esac
39139fi
39140LIPO=$ac_cv_path_LIPO
39141if test -n "$LIPO"; then
39142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39143$as_echo "$LIPO" >&6; }
39144else
39145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39146$as_echo "no" >&6; }
39147fi
39148
39149
39150        if test "x$LIPO" = x; then
39151          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39152        fi
39153      else
39154        # Otherwise we believe it is a complete path. Use it as it is.
39155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39156$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39158$as_echo_n "checking for LIPO... " >&6; }
39159        if test ! -x "$tool_specified"; then
39160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39161$as_echo "not found" >&6; }
39162          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39163        fi
39164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39165$as_echo "$tool_specified" >&6; }
39166      fi
39167    fi
39168  fi
39169
39170
39171
39172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39173
39174  # First separate the path from the arguments. This will split at the first
39175  # space.
39176  complete="$LIPO"
39177  path="${complete%% *}"
39178  tmp="$complete EOL"
39179  arguments="${tmp#* }"
39180
39181  # Input might be given as Windows format, start by converting to
39182  # unix format.
39183  new_path=`$CYGPATH -u "$path"`
39184
39185  # Now try to locate executable using which
39186  new_path=`$WHICH "$new_path" 2> /dev/null`
39187  # bat and cmd files are not always considered executable in cygwin causing which
39188  # to not find them
39189  if test "x$new_path" = x \
39190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39192    new_path=`$CYGPATH -u "$path"`
39193  fi
39194  if test "x$new_path" = x; then
39195    # Oops. Which didn't find the executable.
39196    # The splitting of arguments from the executable at a space might have been incorrect,
39197    # since paths with space are more likely in Windows. Give it another try with the whole
39198    # argument.
39199    path="$complete"
39200    arguments="EOL"
39201    new_path=`$CYGPATH -u "$path"`
39202    new_path=`$WHICH "$new_path" 2> /dev/null`
39203    # bat and cmd files are not always considered executable in cygwin causing which
39204    # to not find them
39205    if test "x$new_path" = x \
39206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39208      new_path=`$CYGPATH -u "$path"`
39209    fi
39210    if test "x$new_path" = x; then
39211      # It's still not found. Now this is an unrecoverable error.
39212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39213$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39214      has_space=`$ECHO "$complete" | $GREP " "`
39215      if test "x$has_space" != x; then
39216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39218      fi
39219      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39220    fi
39221  fi
39222
39223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39226  # "foo.exe" is OK but "foo" is an error.
39227  #
39228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39229  # It is also a way to make sure we got the proper file name for the real test later on.
39230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39231  if test "x$test_shortpath" = x; then
39232    # Short path failed, file does not exist as specified.
39233    # Try adding .exe or .cmd
39234    if test -f "${new_path}.exe"; then
39235      input_to_shortpath="${new_path}.exe"
39236    elif test -f "${new_path}.cmd"; then
39237      input_to_shortpath="${new_path}.cmd"
39238    else
39239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39240$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39243      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39244    fi
39245  else
39246    input_to_shortpath="$new_path"
39247  fi
39248
39249  # Call helper function which possibly converts this using DOS-style short mode.
39250  # If so, the updated path is stored in $new_path.
39251  new_path="$input_to_shortpath"
39252
39253  input_path="$input_to_shortpath"
39254  # Check if we need to convert this using DOS-style short mode. If the path
39255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39256  # take no chances and rewrite it.
39257  # Note: m4 eats our [], so we need to use [ and ] instead.
39258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39259  if test "x$has_forbidden_chars" != x; then
39260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39264      # Going to short mode and back again did indeed matter. Since short mode is
39265      # case insensitive, let's make it lowercase to improve readability.
39266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39267      # Now convert it back to Unix-stile (cygpath)
39268      input_path=`$CYGPATH -u "$shortmode_path"`
39269      new_path="$input_path"
39270    fi
39271  fi
39272
39273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39274  if test "x$test_cygdrive_prefix" = x; then
39275    # As a simple fix, exclude /usr/bin since it's not a real path.
39276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39278      # a path prefixed by /cygdrive for fixpath to work.
39279      new_path="$CYGWIN_ROOT_PATH$input_path"
39280    fi
39281  fi
39282
39283  # remove trailing .exe if any
39284  new_path="${new_path/%.exe/}"
39285
39286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39287
39288  # First separate the path from the arguments. This will split at the first
39289  # space.
39290  complete="$LIPO"
39291  path="${complete%% *}"
39292  tmp="$complete EOL"
39293  arguments="${tmp#* }"
39294
39295  # Input might be given as Windows format, start by converting to
39296  # unix format.
39297  new_path="$path"
39298
39299  windows_path="$new_path"
39300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39301    unix_path=`$CYGPATH -u "$windows_path"`
39302    new_path="$unix_path"
39303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39305    new_path="$unix_path"
39306  fi
39307
39308
39309  # Now try to locate executable using which
39310  new_path=`$WHICH "$new_path" 2> /dev/null`
39311
39312  if test "x$new_path" = x; then
39313    # Oops. Which didn't find the executable.
39314    # The splitting of arguments from the executable at a space might have been incorrect,
39315    # since paths with space are more likely in Windows. Give it another try with the whole
39316    # argument.
39317    path="$complete"
39318    arguments="EOL"
39319    new_path="$path"
39320
39321  windows_path="$new_path"
39322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39323    unix_path=`$CYGPATH -u "$windows_path"`
39324    new_path="$unix_path"
39325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39327    new_path="$unix_path"
39328  fi
39329
39330
39331    new_path=`$WHICH "$new_path" 2> /dev/null`
39332
39333    if test "x$new_path" = x; then
39334      # It's still not found. Now this is an unrecoverable error.
39335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39336$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39337      has_space=`$ECHO "$complete" | $GREP " "`
39338      if test "x$has_space" != x; then
39339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39341      fi
39342      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39343    fi
39344  fi
39345
39346  # Now new_path has a complete unix path to the binary
39347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39348    # Keep paths in /bin as-is, but remove trailing .exe if any
39349    new_path="${new_path/%.exe/}"
39350    # Do not save /bin paths to all_fixpath_prefixes!
39351  else
39352    # Not in mixed or Windows style, start by that.
39353    new_path=`cmd //c echo $new_path`
39354
39355  input_path="$new_path"
39356  # Check if we need to convert this using DOS-style short mode. If the path
39357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39358  # take no chances and rewrite it.
39359  # Note: m4 eats our [], so we need to use [ and ] instead.
39360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39361  if test "x$has_forbidden_chars" != x; then
39362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39364  fi
39365
39366    # Output is in $new_path
39367
39368  windows_path="$new_path"
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370    unix_path=`$CYGPATH -u "$windows_path"`
39371    new_path="$unix_path"
39372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39374    new_path="$unix_path"
39375  fi
39376
39377    # remove trailing .exe if any
39378    new_path="${new_path/%.exe/}"
39379
39380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39382  fi
39383
39384  else
39385    # We're on a posix platform. Hooray! :)
39386    # First separate the path from the arguments. This will split at the first
39387    # space.
39388    complete="$LIPO"
39389    path="${complete%% *}"
39390    tmp="$complete EOL"
39391    arguments="${tmp#* }"
39392
39393    # Cannot rely on the command "which" here since it doesn't always work.
39394    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39395    if test -z "$is_absolute_path"; then
39396      # Path to executable is not absolute. Find it.
39397      IFS_save="$IFS"
39398      IFS=:
39399      for p in $PATH; do
39400        if test -f "$p/$path" && test -x "$p/$path"; then
39401          new_path="$p/$path"
39402          break
39403        fi
39404      done
39405      IFS="$IFS_save"
39406    else
39407      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
39408$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
39409      new_path="$path"
39410    fi
39411
39412    if test "x$new_path" = x; then
39413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39414$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39415      has_space=`$ECHO "$complete" | $GREP " "`
39416      if test "x$has_space" != x; then
39417        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39419      fi
39420      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39421    fi
39422  fi
39423
39424  # Now join together the path and the arguments once again
39425  if test "x$arguments" != xEOL; then
39426    new_complete="$new_path ${arguments% *}"
39427  else
39428    new_complete="$new_path"
39429  fi
39430
39431  if test "x$complete" != "x$new_complete"; then
39432    LIPO="$new_complete"
39433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39434$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39435  fi
39436
39437  fi
39438
39439
39440
39441  # Restore old path without tools dir
39442  PATH="$OLD_PATH"
39443
39444
39445# FIXME: Currently we must test this after paths but before flags. Fix!
39446
39447# And we can test some aspects on the target using configure macros.
39448
39449
39450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
39451$as_echo_n "checking for ANSI C header files... " >&6; }
39452if ${ac_cv_header_stdc+:} false; then :
39453  $as_echo_n "(cached) " >&6
39454else
39455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39456/* end confdefs.h.  */
39457#include <stdlib.h>
39458#include <stdarg.h>
39459#include <string.h>
39460#include <float.h>
39461
39462int
39463main ()
39464{
39465
39466  ;
39467  return 0;
39468}
39469_ACEOF
39470if ac_fn_cxx_try_compile "$LINENO"; then :
39471  ac_cv_header_stdc=yes
39472else
39473  ac_cv_header_stdc=no
39474fi
39475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39476
39477if test $ac_cv_header_stdc = yes; then
39478  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
39479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39480/* end confdefs.h.  */
39481#include <string.h>
39482
39483_ACEOF
39484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39485  $EGREP "memchr" >/dev/null 2>&1; then :
39486
39487else
39488  ac_cv_header_stdc=no
39489fi
39490rm -f conftest*
39491
39492fi
39493
39494if test $ac_cv_header_stdc = yes; then
39495  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
39496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39497/* end confdefs.h.  */
39498#include <stdlib.h>
39499
39500_ACEOF
39501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39502  $EGREP "free" >/dev/null 2>&1; then :
39503
39504else
39505  ac_cv_header_stdc=no
39506fi
39507rm -f conftest*
39508
39509fi
39510
39511if test $ac_cv_header_stdc = yes; then
39512  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
39513  if test "$cross_compiling" = yes; then :
39514  :
39515else
39516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39517/* end confdefs.h.  */
39518#include <ctype.h>
39519#include <stdlib.h>
39520#if ((' ' & 0x0FF) == 0x020)
39521# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
39522# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
39523#else
39524# define ISLOWER(c) \
39525		   (('a' <= (c) && (c) <= 'i') \
39526		     || ('j' <= (c) && (c) <= 'r') \
39527		     || ('s' <= (c) && (c) <= 'z'))
39528# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
39529#endif
39530
39531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
39532int
39533main ()
39534{
39535  int i;
39536  for (i = 0; i < 256; i++)
39537    if (XOR (islower (i), ISLOWER (i))
39538	|| toupper (i) != TOUPPER (i))
39539      return 2;
39540  return 0;
39541}
39542_ACEOF
39543if ac_fn_cxx_try_run "$LINENO"; then :
39544
39545else
39546  ac_cv_header_stdc=no
39547fi
39548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39549  conftest.$ac_objext conftest.beam conftest.$ac_ext
39550fi
39551
39552fi
39553fi
39554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
39555$as_echo "$ac_cv_header_stdc" >&6; }
39556if test $ac_cv_header_stdc = yes; then
39557
39558$as_echo "#define STDC_HEADERS 1" >>confdefs.h
39559
39560fi
39561
39562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
39563for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
39564		  inttypes.h stdint.h unistd.h
39565do :
39566  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
39567ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
39568"
39569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
39570  cat >>confdefs.h <<_ACEOF
39571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
39572_ACEOF
39573
39574fi
39575
39576done
39577
39578
39579
39580  ###############################################################################
39581  #
39582  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
39583  # (The JVM can use 32 or 64 bit Java pointers but that decision
39584  # is made at runtime.)
39585  #
39586
39587  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
39588    # Always specify -m flag on Solaris
39589    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
39590
39591  # When we add flags to the "official" CFLAGS etc, we need to
39592  # keep track of these additions in ADDED_CFLAGS etc. These
39593  # will later be checked to make sure only controlled additions
39594  # have been made to CFLAGS etc.
39595  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39596  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39597  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39598
39599  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39600  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39601  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39602
39603  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39604  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39605  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39606
39607  elif test "x$COMPILE_TYPE" = xreduced; then
39608    if test "x$OPENJDK_TARGET_OS" != xwindows; then
39609      # Specify -m if running reduced on other Posix platforms
39610
39611  # When we add flags to the "official" CFLAGS etc, we need to
39612  # keep track of these additions in ADDED_CFLAGS etc. These
39613  # will later be checked to make sure only controlled additions
39614  # have been made to CFLAGS etc.
39615  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39616  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39617  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39618
39619  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39620  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39621  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39622
39623  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39624  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39625  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39626
39627    fi
39628  fi
39629
39630  # Make compilation sanity check
39631  for ac_header in stdio.h
39632do :
39633  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
39634if test "x$ac_cv_header_stdio_h" = xyes; then :
39635  cat >>confdefs.h <<_ACEOF
39636#define HAVE_STDIO_H 1
39637_ACEOF
39638
39639else
39640
39641    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
39642$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
39643    if test "x$COMPILE_TYPE" = xreduced; then
39644      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
39645$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
39646    elif test "x$COMPILE_TYPE" = xcross; then
39647      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
39648$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
39649    fi
39650    as_fn_error $? "Cannot continue." "$LINENO" 5
39651
39652fi
39653
39654done
39655
39656
39657  # The cast to long int works around a bug in the HP C Compiler
39658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
39659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
39660# This bug is HP SR number 8606223364.
39661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
39662$as_echo_n "checking size of int *... " >&6; }
39663if ${ac_cv_sizeof_int_p+:} false; then :
39664  $as_echo_n "(cached) " >&6
39665else
39666  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
39667
39668else
39669  if test "$ac_cv_type_int_p" = yes; then
39670     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
39672as_fn_error 77 "cannot compute sizeof (int *)
39673See \`config.log' for more details" "$LINENO" 5; }
39674   else
39675     ac_cv_sizeof_int_p=0
39676   fi
39677fi
39678
39679fi
39680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
39681$as_echo "$ac_cv_sizeof_int_p" >&6; }
39682
39683
39684
39685cat >>confdefs.h <<_ACEOF
39686#define SIZEOF_INT_P $ac_cv_sizeof_int_p
39687_ACEOF
39688
39689
39690
39691  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
39692  if test "x$ac_cv_sizeof_int_p" = x; then
39693    # The test failed, lets stick to the assumed value.
39694    { $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
39695$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
39696  else
39697    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
39698
39699    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
39700      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
39701      # Let's try to implicitely set the compilers target architecture and retry the test
39702      { $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
39703$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;}
39704      { $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
39705$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;}
39706
39707  # When we add flags to the "official" CFLAGS etc, we need to
39708  # keep track of these additions in ADDED_CFLAGS etc. These
39709  # will later be checked to make sure only controlled additions
39710  # have been made to CFLAGS etc.
39711  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39712  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39713  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
39714
39715  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
39716  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
39717  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
39718
39719  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
39720  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
39721  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
39722
39723
39724      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
39725      unset ac_cv_sizeof_int_p
39726      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
39727      cat >>confdefs.h <<_ACEOF
39728#undef SIZEOF_INT_P
39729_ACEOF
39730
39731      # The cast to long int works around a bug in the HP C Compiler
39732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
39733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
39734# This bug is HP SR number 8606223364.
39735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
39736$as_echo_n "checking size of int *... " >&6; }
39737if ${ac_cv_sizeof_int_p+:} false; then :
39738  $as_echo_n "(cached) " >&6
39739else
39740  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
39741
39742else
39743  if test "$ac_cv_type_int_p" = yes; then
39744     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
39746as_fn_error 77 "cannot compute sizeof (int *)
39747See \`config.log' for more details" "$LINENO" 5; }
39748   else
39749     ac_cv_sizeof_int_p=0
39750   fi
39751fi
39752
39753fi
39754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
39755$as_echo "$ac_cv_sizeof_int_p" >&6; }
39756
39757
39758
39759cat >>confdefs.h <<_ACEOF
39760#define SIZEOF_INT_P $ac_cv_sizeof_int_p
39761_ACEOF
39762
39763
39764
39765      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
39766
39767      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
39768        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
39769      fi
39770    fi
39771  fi
39772
39773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
39774$as_echo_n "checking for target address size... " >&6; }
39775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
39776$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
39777
39778
39779  ###############################################################################
39780  #
39781  # Is the target little of big endian?
39782  #
39783   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
39784$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
39785if ${ac_cv_c_bigendian+:} false; then :
39786  $as_echo_n "(cached) " >&6
39787else
39788  ac_cv_c_bigendian=unknown
39789    # See if we're dealing with a universal compiler.
39790    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39791/* end confdefs.h.  */
39792#ifndef __APPLE_CC__
39793	       not a universal capable compiler
39794	     #endif
39795	     typedef int dummy;
39796
39797_ACEOF
39798if ac_fn_cxx_try_compile "$LINENO"; then :
39799
39800	# Check for potential -arch flags.  It is not universal unless
39801	# there are at least two -arch flags with different values.
39802	ac_arch=
39803	ac_prev=
39804	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
39805	 if test -n "$ac_prev"; then
39806	   case $ac_word in
39807	     i?86 | x86_64 | ppc | ppc64)
39808	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
39809		 ac_arch=$ac_word
39810	       else
39811		 ac_cv_c_bigendian=universal
39812		 break
39813	       fi
39814	       ;;
39815	   esac
39816	   ac_prev=
39817	 elif test "x$ac_word" = "x-arch"; then
39818	   ac_prev=arch
39819	 fi
39820       done
39821fi
39822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39823    if test $ac_cv_c_bigendian = unknown; then
39824      # See if sys/param.h defines the BYTE_ORDER macro.
39825      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39826/* end confdefs.h.  */
39827#include <sys/types.h>
39828	     #include <sys/param.h>
39829
39830int
39831main ()
39832{
39833#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
39834		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
39835		     && LITTLE_ENDIAN)
39836	      bogus endian macros
39837	     #endif
39838
39839  ;
39840  return 0;
39841}
39842_ACEOF
39843if ac_fn_cxx_try_compile "$LINENO"; then :
39844  # It does; now see whether it defined to BIG_ENDIAN or not.
39845	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39846/* end confdefs.h.  */
39847#include <sys/types.h>
39848		#include <sys/param.h>
39849
39850int
39851main ()
39852{
39853#if BYTE_ORDER != BIG_ENDIAN
39854		 not big endian
39855		#endif
39856
39857  ;
39858  return 0;
39859}
39860_ACEOF
39861if ac_fn_cxx_try_compile "$LINENO"; then :
39862  ac_cv_c_bigendian=yes
39863else
39864  ac_cv_c_bigendian=no
39865fi
39866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39867fi
39868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39869    fi
39870    if test $ac_cv_c_bigendian = unknown; then
39871      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
39872      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39873/* end confdefs.h.  */
39874#include <limits.h>
39875
39876int
39877main ()
39878{
39879#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
39880	      bogus endian macros
39881	     #endif
39882
39883  ;
39884  return 0;
39885}
39886_ACEOF
39887if ac_fn_cxx_try_compile "$LINENO"; then :
39888  # It does; now see whether it defined to _BIG_ENDIAN or not.
39889	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39890/* end confdefs.h.  */
39891#include <limits.h>
39892
39893int
39894main ()
39895{
39896#ifndef _BIG_ENDIAN
39897		 not big endian
39898		#endif
39899
39900  ;
39901  return 0;
39902}
39903_ACEOF
39904if ac_fn_cxx_try_compile "$LINENO"; then :
39905  ac_cv_c_bigendian=yes
39906else
39907  ac_cv_c_bigendian=no
39908fi
39909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39910fi
39911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39912    fi
39913    if test $ac_cv_c_bigendian = unknown; then
39914      # Compile a test program.
39915      if test "$cross_compiling" = yes; then :
39916  # Try to guess by grepping values from an object file.
39917	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39918/* end confdefs.h.  */
39919short int ascii_mm[] =
39920		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
39921		short int ascii_ii[] =
39922		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
39923		int use_ascii (int i) {
39924		  return ascii_mm[i] + ascii_ii[i];
39925		}
39926		short int ebcdic_ii[] =
39927		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
39928		short int ebcdic_mm[] =
39929		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
39930		int use_ebcdic (int i) {
39931		  return ebcdic_mm[i] + ebcdic_ii[i];
39932		}
39933		extern int foo;
39934
39935int
39936main ()
39937{
39938return use_ascii (foo) == use_ebcdic (foo);
39939  ;
39940  return 0;
39941}
39942_ACEOF
39943if ac_fn_cxx_try_compile "$LINENO"; then :
39944  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
39945	      ac_cv_c_bigendian=yes
39946	    fi
39947	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
39948	      if test "$ac_cv_c_bigendian" = unknown; then
39949		ac_cv_c_bigendian=no
39950	      else
39951		# finding both strings is unlikely to happen, but who knows?
39952		ac_cv_c_bigendian=unknown
39953	      fi
39954	    fi
39955fi
39956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39957else
39958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39959/* end confdefs.h.  */
39960$ac_includes_default
39961int
39962main ()
39963{
39964
39965	     /* Are we little or big endian?  From Harbison&Steele.  */
39966	     union
39967	     {
39968	       long int l;
39969	       char c[sizeof (long int)];
39970	     } u;
39971	     u.l = 1;
39972	     return u.c[sizeof (long int) - 1] == 1;
39973
39974  ;
39975  return 0;
39976}
39977_ACEOF
39978if ac_fn_cxx_try_run "$LINENO"; then :
39979  ac_cv_c_bigendian=no
39980else
39981  ac_cv_c_bigendian=yes
39982fi
39983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39984  conftest.$ac_objext conftest.beam conftest.$ac_ext
39985fi
39986
39987    fi
39988fi
39989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
39990$as_echo "$ac_cv_c_bigendian" >&6; }
39991 case $ac_cv_c_bigendian in #(
39992   yes)
39993     ENDIAN="big";; #(
39994   no)
39995     ENDIAN="little" ;; #(
39996   universal)
39997     ENDIAN="universal_endianness"
39998     ;; #(
39999   *)
40000     ENDIAN="unknown" ;;
40001 esac
40002
40003
40004  if test "x$ENDIAN" = xuniversal_endianness; then
40005    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
40006  fi
40007  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
40008    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
40009  fi
40010
40011
40012# Configure flags for the tools
40013
40014
40015  ###############################################################################
40016  #
40017  # How to compile shared libraries.
40018  #
40019
40020  if test "x$GCC" = xyes; then
40021    COMPILER_NAME=gcc
40022    PICFLAG="-fPIC"
40023    LIBRARY_PREFIX=lib
40024    SHARED_LIBRARY='lib$1.so'
40025    STATIC_LIBRARY='lib$1.a'
40026    SHARED_LIBRARY_FLAGS="-shared"
40027    SHARED_LIBRARY_SUFFIX='.so'
40028    STATIC_LIBRARY_SUFFIX='.a'
40029    OBJ_SUFFIX='.o'
40030    EXE_SUFFIX=''
40031    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
40032    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
40033    C_FLAG_REORDER=''
40034    CXX_FLAG_REORDER=''
40035    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
40036    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
40037    LD="$CC"
40038    LDEXE="$CC"
40039    LDCXX="$CXX"
40040    LDEXECXX="$CXX"
40041    POST_STRIP_CMD="$STRIP -g"
40042
40043    # Linking is different on MacOSX
40044    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40045      # Might change in the future to clang.
40046      COMPILER_NAME=gcc
40047      SHARED_LIBRARY='lib$1.dylib'
40048      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
40049      SHARED_LIBRARY_SUFFIX='.dylib'
40050      EXE_SUFFIX=''
40051      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
40052      SET_SHARED_LIBRARY_MAPFILE=''
40053      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
40054      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
40055      POST_STRIP_CMD="$STRIP -S"
40056    fi
40057  else
40058    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40059      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
40060      COMPILER_NAME=ossc
40061      PICFLAG="-KPIC"
40062      LIBRARY_PREFIX=lib
40063      SHARED_LIBRARY='lib$1.so'
40064      STATIC_LIBRARY='lib$1.a'
40065      SHARED_LIBRARY_FLAGS="-G"
40066      SHARED_LIBRARY_SUFFIX='.so'
40067      STATIC_LIBRARY_SUFFIX='.a'
40068      OBJ_SUFFIX='.o'
40069      EXE_SUFFIX=''
40070      SET_SHARED_LIBRARY_NAME=''
40071      SET_SHARED_LIBRARY_MAPFILE='-M$1'
40072      C_FLAG_REORDER='-xF'
40073      CXX_FLAG_REORDER='-xF'
40074      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
40075      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
40076      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
40077      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
40078      CFLAGS_JDKLIB_EXTRA='-xstrconst'
40079      POST_STRIP_CMD="$STRIP -x"
40080      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40081    fi
40082    if test "x$OPENJDK_TARGET_OS" = xaix; then
40083        COMPILER_NAME=xlc
40084        PICFLAG="-qpic=large"
40085        LIBRARY_PREFIX=lib
40086        SHARED_LIBRARY='lib$1.so'
40087        STATIC_LIBRARY='lib$1.a'
40088        SHARED_LIBRARY_FLAGS="-qmkshrobj"
40089        SHARED_LIBRARY_SUFFIX='.so'
40090        STATIC_LIBRARY_SUFFIX='.a'
40091        OBJ_SUFFIX='.o'
40092        EXE_SUFFIX=''
40093        SET_SHARED_LIBRARY_NAME=''
40094        SET_SHARED_LIBRARY_MAPFILE=''
40095        C_FLAG_REORDER=''
40096        CXX_FLAG_REORDER=''
40097        SET_SHARED_LIBRARY_ORIGIN=''
40098        SET_EXECUTABLE_ORIGIN=""
40099        CFLAGS_JDK=""
40100        CXXFLAGS_JDK=""
40101        CFLAGS_JDKLIB_EXTRA=''
40102        POST_STRIP_CMD="$STRIP -X32_64"
40103        POST_MCS_CMD=""
40104    fi
40105    if test "x$OPENJDK_TARGET_OS" = xwindows; then
40106      # If it is not gcc, then assume it is the MS Visual Studio compiler
40107      COMPILER_NAME=cl
40108      PICFLAG=""
40109      LIBRARY_PREFIX=
40110      SHARED_LIBRARY='$1.dll'
40111      STATIC_LIBRARY='$1.lib'
40112      SHARED_LIBRARY_FLAGS="-LD"
40113      SHARED_LIBRARY_SUFFIX='.dll'
40114      STATIC_LIBRARY_SUFFIX='.lib'
40115      OBJ_SUFFIX='.obj'
40116      EXE_SUFFIX='.exe'
40117      SET_SHARED_LIBRARY_NAME=''
40118      SET_SHARED_LIBRARY_MAPFILE=''
40119      SET_SHARED_LIBRARY_ORIGIN=''
40120      SET_EXECUTABLE_ORIGIN=''
40121    fi
40122  fi
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142  # The (cross) compiler is now configured, we can now test capabilities
40143  # of the target platform.
40144
40145
40146
40147  ###############################################################################
40148  #
40149  # Setup the opt flags for different compilers
40150  # and different operating systems.
40151  #
40152
40153  #
40154  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
40155  #
40156  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
40157    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
40158    # While waiting for a better solution, the current workaround is to use -mstackrealign.
40159    CFLAGS="$CFLAGS -mstackrealign"
40160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
40161$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
40162    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40163/* end confdefs.h.  */
40164int main() { return 0; }
40165_ACEOF
40166if ac_fn_cxx_try_link "$LINENO"; then :
40167
40168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40169$as_echo "yes" >&6; }
40170
40171else
40172
40173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40174$as_echo "no" >&6; }
40175          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
40176
40177
40178fi
40179rm -f core conftest.err conftest.$ac_objext \
40180    conftest$ac_exeext conftest.$ac_ext
40181  fi
40182
40183  C_FLAG_DEPS="-MMD -MF"
40184  CXX_FLAG_DEPS="-MMD -MF"
40185
40186  case $COMPILER_TYPE in
40187    CC )
40188      case $COMPILER_NAME in
40189        gcc )
40190          case $OPENJDK_TARGET_OS in
40191            macosx )
40192              # On MacOSX we optimize for size, something
40193              # we should do for all platforms?
40194              C_O_FLAG_HI="-Os"
40195              C_O_FLAG_NORM="-Os"
40196              C_O_FLAG_NONE=""
40197              ;;
40198            *)
40199              C_O_FLAG_HI="-O3"
40200              C_O_FLAG_NORM="-O2"
40201              C_O_FLAG_NONE="-O0"
40202              ;;
40203          esac
40204          CXX_O_FLAG_HI="$C_O_FLAG_HI"
40205          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
40206          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
40207          CFLAGS_DEBUG_SYMBOLS="-g"
40208          CXXFLAGS_DEBUG_SYMBOLS="-g"
40209          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
40210            CFLAGS_DEBUG_SYMBOLS="-g1"
40211            CXXFLAGS_DEBUG_SYMBOLS="-g1"
40212          fi
40213          ;;
40214        ossc )
40215          #
40216          # Forte has different names for this with their C++ compiler...
40217          #
40218          C_FLAG_DEPS="-xMMD -xMF"
40219          CXX_FLAG_DEPS="-xMMD -xMF"
40220
40221          # Extra options used with HIGHEST
40222          #
40223          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
40224          #          done with care, there are some assumptions below that need to
40225          #          be understood about the use of pointers, and IEEE behavior.
40226          #
40227          # Use non-standard floating point mode (not IEEE 754)
40228          CC_HIGHEST="$CC_HIGHEST -fns"
40229          # Do some simplification of floating point arithmetic (not IEEE 754)
40230          CC_HIGHEST="$CC_HIGHEST -fsimple"
40231          # Use single precision floating point with 'float'
40232          CC_HIGHEST="$CC_HIGHEST -fsingle"
40233          # Assume memory references via basic pointer types do not alias
40234          #   (Source with excessing pointer casting and data access with mixed
40235          #    pointer types are not recommended)
40236          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
40237          # Use intrinsic or inline versions for math/std functions
40238          #   (If you expect perfect errno behavior, do not use this)
40239          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
40240          # Loop data dependency optimizations (need -xO3 or higher)
40241          CC_HIGHEST="$CC_HIGHEST -xdepend"
40242          # Pointer parameters to functions do not overlap
40243          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
40244          #    If you pass in multiple pointers to the same data, do not use this)
40245          CC_HIGHEST="$CC_HIGHEST -xrestrict"
40246          # Inline some library routines
40247          #   (If you expect perfect errno behavior, do not use this)
40248          CC_HIGHEST="$CC_HIGHEST -xlibmil"
40249          # Use optimized math routines
40250          #   (If you expect perfect errno behavior, do not use this)
40251          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
40252          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
40253
40254          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
40255            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
40256            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
40257          fi
40258
40259          case $OPENJDK_TARGET_CPU_ARCH in
40260            x86)
40261              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
40262              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
40263              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
40264              C_O_FLAG_NONE="-xregs=no%frameptr"
40265              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
40266              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
40267              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
40268              CXX_O_FLAG_NONE="-xregs=no%frameptr"
40269              if test "x$OPENJDK_TARGET_CPU" = xx86; then
40270                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
40271                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
40272              fi
40273              ;;
40274            sparc)
40275              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
40276              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
40277              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
40278              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
40279              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
40280              C_O_FLAG_NONE=""
40281              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
40282              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
40283              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
40284              CXX_O_FLAG_NONE=""
40285              ;;
40286          esac
40287
40288          CFLAGS_DEBUG_SYMBOLS="-g -xs"
40289          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
40290          ;;
40291        xlc )
40292          C_FLAG_DEPS="-qmakedep=gcc -MF"
40293          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
40294          C_O_FLAG_HIGHEST="-O3"
40295          C_O_FLAG_HI="-O3 -qstrict"
40296          C_O_FLAG_NORM="-O2"
40297          C_O_FLAG_NONE=""
40298          CXX_O_FLAG_HIGHEST="-O3"
40299          CXX_O_FLAG_HI="-O3 -qstrict"
40300          CXX_O_FLAG_NORM="-O2"
40301          CXX_O_FLAG_NONE=""
40302          CFLAGS_DEBUG_SYMBOLS="-g"
40303          CXXFLAGS_DEBUG_SYMBOLS="-g"
40304          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
40305          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
40306          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
40307          ;;
40308      esac
40309      ;;
40310    CL )
40311      C_O_FLAG_HIGHEST="-O2"
40312      C_O_FLAG_HI="-O1"
40313      C_O_FLAG_NORM="-O1"
40314      C_O_FLAG_NONE="-Od"
40315      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
40316      CXX_O_FLAG_HI="$C_O_FLAG_HI"
40317      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
40318      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
40319      ;;
40320  esac
40321
40322  if test -z "$C_O_FLAG_HIGHEST"; then
40323    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
40324  fi
40325
40326  if test -z "$CXX_O_FLAG_HIGHEST"; then
40327    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
40328  fi
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
40344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
40345$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
40346  fi
40347
40348  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
40349    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
40350$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
40351  fi
40352
40353  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
40354    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
40355$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
40356  fi
40357
40358
40359# Check whether --with-extra-cflags was given.
40360if test "${with_extra_cflags+set}" = set; then :
40361  withval=$with_extra_cflags;
40362fi
40363
40364
40365
40366# Check whether --with-extra-cxxflags was given.
40367if test "${with_extra_cxxflags+set}" = set; then :
40368  withval=$with_extra_cxxflags;
40369fi
40370
40371
40372
40373# Check whether --with-extra-ldflags was given.
40374if test "${with_extra_ldflags+set}" = set; then :
40375  withval=$with_extra_ldflags;
40376fi
40377
40378
40379  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
40380  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
40381  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
40382
40383  # Hotspot needs these set in their legacy form
40384  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
40385  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
40386  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
40387
40388
40389
40390
40391
40392  ###############################################################################
40393  #
40394  # Now setup the CFLAGS and LDFLAGS for the JDK build.
40395  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
40396  #
40397  case $COMPILER_NAME in
40398    gcc )
40399      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
40400      -pipe \
40401      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
40402      case $OPENJDK_TARGET_CPU_ARCH in
40403        arm )
40404          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
40405          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
40406          ;;
40407        ppc )
40408          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
40409          ;;
40410        * )
40411          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
40412          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
40413          ;;
40414      esac
40415      ;;
40416    ossc )
40417      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
40418      case $OPENJDK_TARGET_CPU_ARCH in
40419        x86 )
40420          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
40421          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
40422          ;;
40423      esac
40424
40425      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
40426      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
40427
40428      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
40429      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
40430      ;;
40431    xlc )
40432      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
40433      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
40434
40435      LDFLAGS_JDK="$LDFLAGS_JDK"
40436      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
40437      ;;
40438    cl )
40439      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
40440      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
40441      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
40442      -DWIN32 -DIAL"
40443      case $OPENJDK_TARGET_CPU in
40444        x86 )
40445          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
40446          ;;
40447        x86_64 )
40448          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
40449          ;;
40450      esac
40451      ;;
40452  esac
40453
40454  ###############################################################################
40455
40456  # Adjust flags according to debug level.
40457  case $DEBUG_LEVEL in
40458    fastdebug )
40459      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
40460      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
40461      C_O_FLAG_HI="$C_O_FLAG_NORM"
40462      C_O_FLAG_NORM="$C_O_FLAG_NORM"
40463      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
40464      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
40465      JAVAC_FLAGS="$JAVAC_FLAGS -g"
40466      ;;
40467    slowdebug )
40468      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
40469      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
40470      C_O_FLAG_HI="$C_O_FLAG_NONE"
40471      C_O_FLAG_NORM="$C_O_FLAG_NONE"
40472      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
40473      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
40474      JAVAC_FLAGS="$JAVAC_FLAGS -g"
40475      ;;
40476  esac
40477
40478  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
40479
40480  # The package path is used only on macosx?
40481  PACKAGE_PATH=/opt/local
40482
40483
40484  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
40485    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
40486    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
40487    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
40488    #   Note: -Dmacro         is the same as    #define macro 1
40489    #         -Dmacro=        is the same as    #define macro
40490    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40491      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
40492    else
40493      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
40494    fi
40495  else
40496    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
40497  fi
40498  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40499    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
40500  fi
40501  if test "x$OPENJDK_TARGET_OS" = xwindows; then
40502    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
40503  fi
40504  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40505    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
40506  fi
40507  if test "x$OPENJDK_TARGET_OS" = xaix; then
40508    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
40509  fi
40510  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40511    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
40512    # Setting these parameters makes it an error to link to macosx APIs that are
40513    # newer than the given OS version and makes the linked binaries compatible even
40514    # if built on a newer version of the OS.
40515    # The expected format is X.Y.Z
40516    MACOSX_VERSION_MIN=10.7.0
40517
40518    # The macro takes the version with no dots, ex: 1070
40519    # Let the flags variables get resolved in make for easier override on make
40520    # command line.
40521    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
40522    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
40523  fi
40524  if test "x$OPENJDK_TARGET_OS" = xbsd; then
40525    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
40526  fi
40527  if test "x$DEBUG_LEVEL" = xrelease; then
40528    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
40529  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40530    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
40531  fi
40532  else
40533    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
40534  fi
40535
40536  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
40537  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
40538
40539  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
40540      -I${JDK_OUTPUTDIR}/include \
40541      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
40542      -I${JDK_TOPDIR}/src/share/javavm/export \
40543      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
40544      -I${JDK_TOPDIR}/src/share/native/common \
40545      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
40546
40547  # The shared libraries are compiled using the picflag.
40548  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
40549  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
40550
40551  # Executable flags
40552  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
40553  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
40554
40555  # Now this is odd. The JDK native libraries have to link against libjvm.so
40556  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
40557  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
40558  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
40559  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
40560  # libraries will link to whatever is in memory. Yuck.
40561  #
40562  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
40563  if test "x$COMPILER_NAME" = xcl; then
40564    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
40565    if test "x$OPENJDK_TARGET_CPU" = xx86; then
40566      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
40567    fi
40568    # TODO: make -debug optional "--disable-full-debug-symbols"
40569    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
40570    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
40571    LDFLAGS_JDKLIB_SUFFIX=""
40572    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
40573      LDFLAGS_STACK_SIZE=1048576
40574    else
40575      LDFLAGS_STACK_SIZE=327680
40576    fi
40577    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
40578  else
40579    if test "x$COMPILER_NAME" = xgcc; then
40580      # If this is a --hash-style=gnu system, use --hash-style=both, why?
40581      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40582      if test -n "$HAS_GNU_HASH"; then
40583        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
40584      fi
40585      if test "x$OPENJDK_TARGET_OS" = xlinux; then
40586        # And since we now know that the linker is gnu, then add -z defs, to forbid
40587        # undefined symbols in object files.
40588        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
40589        if test "x$DEBUG_LEVEL" = "xrelease"; then
40590          # When building release libraries, tell the linker optimize them.
40591          # Should this be supplied to the OSS linker as well?
40592          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
40593        fi
40594      fi
40595    fi
40596    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
40597        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
40598
40599    # On some platforms (mac) the linker warns about non existing -L dirs.
40600    # Add server first if available. Linking aginst client does not always produce the same results.
40601    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
40602    # Default to server for other variants.
40603    if test "x$JVM_VARIANT_SERVER" = xtrue; then
40604      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
40605    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
40606      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
40607    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
40608      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
40609    else
40610      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
40611    fi
40612
40613    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
40614    if test "x$COMPILER_NAME" = xossc; then
40615      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
40616    fi
40617
40618    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
40619    if test "x$OPENJDK_TARGET_OS" = xlinux; then
40620      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
40621    fi
40622  fi
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638  # Some Zero and Shark settings.
40639  # ZERO_ARCHFLAG tells the compiler which mode to build for
40640  case "${OPENJDK_TARGET_CPU}" in
40641    s390)
40642      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
40643      ;;
40644    *)
40645      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40646  esac
40647
40648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
40649$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
40650  supports=yes
40651
40652  saved_cflags="$CFLAGS"
40653  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
40654  ac_ext=c
40655ac_cpp='$CPP $CPPFLAGS'
40656ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40657ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40658ac_compiler_gnu=$ac_cv_c_compiler_gnu
40659
40660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40661/* end confdefs.h.  */
40662int i;
40663_ACEOF
40664if ac_fn_c_try_compile "$LINENO"; then :
40665
40666else
40667  supports=no
40668fi
40669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40670  ac_ext=cpp
40671ac_cpp='$CXXCPP $CPPFLAGS'
40672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40675
40676  CFLAGS="$saved_cflags"
40677
40678  saved_cxxflags="$CXXFLAGS"
40679  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
40680  ac_ext=cpp
40681ac_cpp='$CXXCPP $CPPFLAGS'
40682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40685
40686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40687/* end confdefs.h.  */
40688int i;
40689_ACEOF
40690if ac_fn_cxx_try_compile "$LINENO"; then :
40691
40692else
40693  supports=no
40694fi
40695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40696  ac_ext=cpp
40697ac_cpp='$CXXCPP $CPPFLAGS'
40698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40701
40702  CXXFLAGS="$saved_cxxflags"
40703
40704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40705$as_echo "$supports" >&6; }
40706  if test "x$supports" = "xyes" ; then
40707    :
40708  else
40709    ZERO_ARCHFLAG=""
40710  fi
40711
40712
40713
40714  # Check that the compiler supports -mX (or -qX on AIX) flags
40715  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
40716
40717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
40718$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
40719  supports=yes
40720
40721  saved_cflags="$CFLAGS"
40722  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40723  ac_ext=c
40724ac_cpp='$CPP $CPPFLAGS'
40725ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40726ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40727ac_compiler_gnu=$ac_cv_c_compiler_gnu
40728
40729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40730/* end confdefs.h.  */
40731int i;
40732_ACEOF
40733if ac_fn_c_try_compile "$LINENO"; then :
40734
40735else
40736  supports=no
40737fi
40738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40739  ac_ext=cpp
40740ac_cpp='$CXXCPP $CPPFLAGS'
40741ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40742ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40743ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40744
40745  CFLAGS="$saved_cflags"
40746
40747  saved_cxxflags="$CXXFLAGS"
40748  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40749  ac_ext=cpp
40750ac_cpp='$CXXCPP $CPPFLAGS'
40751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40754
40755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40756/* end confdefs.h.  */
40757int i;
40758_ACEOF
40759if ac_fn_cxx_try_compile "$LINENO"; then :
40760
40761else
40762  supports=no
40763fi
40764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40765  ac_ext=cpp
40766ac_cpp='$CXXCPP $CPPFLAGS'
40767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40770
40771  CXXFLAGS="$saved_cxxflags"
40772
40773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40774$as_echo "$supports" >&6; }
40775  if test "x$supports" = "xyes" ; then
40776    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
40777  else
40778    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
40779  fi
40780
40781
40782
40783
40784  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
40785  USING_BROKEN_SUSE_LD=no
40786  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
40787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40788$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40789    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40790    echo "int main() { }" > main.c
40791    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40793$as_echo "no" >&6; }
40794      USING_BROKEN_SUSE_LD=no
40795    else
40796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40797$as_echo "yes" >&6; }
40798      USING_BROKEN_SUSE_LD=yes
40799    fi
40800    rm -rf version-script.map main.c
40801  fi
40802
40803
40804
40805# Setup debug symbols (need objcopy from the toolchain for that)
40806
40807  #
40808  # ENABLE_DEBUG_SYMBOLS
40809  # This must be done after the toolchain is setup, since we're looking at objcopy.
40810  #
40811  # Check whether --enable-debug-symbols was given.
40812if test "${enable_debug_symbols+set}" = set; then :
40813  enableval=$enable_debug_symbols;
40814fi
40815
40816
40817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
40818$as_echo_n "checking if we should generate debug symbols... " >&6; }
40819
40820  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
40821    # explicit enabling of enable-debug-symbols and can't find objcopy
40822    #   this is an error
40823    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
40824  fi
40825
40826  if test "x$enable_debug_symbols" = "xyes"; then
40827    ENABLE_DEBUG_SYMBOLS=true
40828  elif test "x$enable_debug_symbols" = "xno"; then
40829    ENABLE_DEBUG_SYMBOLS=false
40830  else
40831    # Default is on if objcopy is found
40832    if test "x$OBJCOPY" != x; then
40833      ENABLE_DEBUG_SYMBOLS=true
40834    # MacOS X and Windows don't use objcopy but default is on for those OSes
40835    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
40836      ENABLE_DEBUG_SYMBOLS=true
40837    else
40838      ENABLE_DEBUG_SYMBOLS=false
40839    fi
40840  fi
40841
40842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
40843$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
40844
40845  #
40846  # ZIP_DEBUGINFO_FILES
40847  #
40848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
40849$as_echo_n "checking if we should zip debug-info files... " >&6; }
40850  # Check whether --enable-zip-debug-info was given.
40851if test "${enable_zip_debug_info+set}" = set; then :
40852  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
40853else
40854  enable_zip_debug_info="yes"
40855fi
40856
40857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
40858$as_echo "${enable_zip_debug_info}" >&6; }
40859
40860  if test "x${enable_zip_debug_info}" = "xno"; then
40861    ZIP_DEBUGINFO_FILES=false
40862  else
40863    ZIP_DEBUGINFO_FILES=true
40864  fi
40865
40866
40867
40868
40869
40870
40871
40872###############################################################################
40873#
40874# Check dependencies for external and internal libraries.
40875#
40876###############################################################################
40877
40878# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
40879
40880  # When using cygwin or msys, we need a wrapper binary that renames
40881  # /cygdrive/c/ arguments into c:/ arguments and peeks into
40882  # @files and rewrites these too! This wrapper binary is
40883  # called fixpath.
40884  FIXPATH=
40885  if test "x$OPENJDK_BUILD_OS" = xwindows; then
40886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
40887$as_echo_n "checking if fixpath can be created... " >&6; }
40888    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
40889    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
40890    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
40891      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
40892      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
40893      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
40894      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
40895    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
40896      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
40897      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
40898
40899      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
40900      # @ was chosen as separator to minimize risk of other tools messing around with it
40901      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
40902      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
40903
40904      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
40905    fi
40906    rm -f $OUTPUT_ROOT/fixpath*
40907    cd $OUTPUT_ROOT
40908    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
40909    cd $CURDIR
40910
40911    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
40912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40913$as_echo "no" >&6; }
40914      cat $OUTPUT_ROOT/fixpath1.log
40915      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
40916    fi
40917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40918$as_echo "yes" >&6; }
40919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
40920$as_echo_n "checking if fixpath.exe works... " >&6; }
40921    cd $OUTPUT_ROOT
40922    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
40923    cd $CURDIR
40924    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
40925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40926$as_echo "no" >&6; }
40927      cat $OUTPUT_ROOT/fixpath2.log
40928      as_fn_error $? "fixpath did not work!" "$LINENO" 5
40929    fi
40930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40931$as_echo "yes" >&6; }
40932    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
40933  fi
40934
40935
40936
40937
40938
40939
40940  ###############################################################################
40941  #
40942  # OS specific settings that we never will need to probe.
40943  #
40944  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
40946$as_echo_n "checking what is not needed on Linux?... " >&6; }
40947    PULSE_NOT_NEEDED=yes
40948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
40949$as_echo "pulse" >&6; }
40950  fi
40951
40952  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
40954$as_echo_n "checking what is not needed on Solaris?... " >&6; }
40955    ALSA_NOT_NEEDED=yes
40956    PULSE_NOT_NEEDED=yes
40957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
40958$as_echo "alsa pulse" >&6; }
40959  fi
40960
40961  if test "x$OPENJDK_TARGET_OS" = xaix; then
40962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
40963$as_echo_n "checking what is not needed on AIX?... " >&6; }
40964    ALSA_NOT_NEEDED=yes
40965    PULSE_NOT_NEEDED=yes
40966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
40967$as_echo "alsa pulse" >&6; }
40968  fi
40969
40970
40971  if test "x$OPENJDK_TARGET_OS" = xwindows; then
40972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
40973$as_echo_n "checking what is not needed on Windows?... " >&6; }
40974    CUPS_NOT_NEEDED=yes
40975    ALSA_NOT_NEEDED=yes
40976    PULSE_NOT_NEEDED=yes
40977    X11_NOT_NEEDED=yes
40978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
40979$as_echo "alsa cups pulse x11" >&6; }
40980  fi
40981
40982  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
40984$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
40985    ALSA_NOT_NEEDED=yes
40986    PULSE_NOT_NEEDED=yes
40987    X11_NOT_NEEDED=yes
40988    # If the java runtime framework is disabled, then we need X11.
40989    # This will be adjusted below.
40990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
40991$as_echo "alsa pulse x11" >&6; }
40992  fi
40993
40994  if test "x$OPENJDK_TARGET_OS" = xbsd; then
40995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
40996$as_echo_n "checking what is not needed on bsd?... " >&6; }
40997    ALSA_NOT_NEEDED=yes
40998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
40999$as_echo "alsa" >&6; }
41000  fi
41001
41002  if test "x$OPENJDK" = "xfalse"; then
41003    FREETYPE_NOT_NEEDED=yes
41004  fi
41005
41006  if test "x$SUPPORT_HEADFUL" = xno; then
41007    X11_NOT_NEEDED=yes
41008  fi
41009
41010  ###############################################################################
41011  #
41012  # Check for MacOSX support for OpenJDK.
41013  #
41014
41015
41016  # Check whether --enable-macosx-runtime-support was given.
41017if test "${enable_macosx_runtime_support+set}" = set; then :
41018  enableval=$enable_macosx_runtime_support;
41019fi
41020
41021  if test "x$enable_macosx_runtime_support" != x; then
41022    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
41023$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
41024  fi
41025
41026
41027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
41028$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
41029  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
41030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
41031$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
41032  else
41033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41034$as_echo "no" >&6; }
41035  fi
41036
41037
41038
41039  ###############################################################################
41040  #
41041  # Check for X Windows
41042  #
41043
41044  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
41045  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
41046  # --x-libraries for the sysroot, if that seems to be correct.
41047  if test "x$SYS_ROOT" != "x/"; then
41048    if test "x$x_includes" = xNONE; then
41049      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
41050        x_includes="$SYS_ROOT/usr/X11R6/include"
41051      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
41052        x_includes="$SYS_ROOT/usr/include"
41053      fi
41054    fi
41055    if test "x$x_libraries" = xNONE; then
41056      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
41057        x_libraries="$SYS_ROOT/usr/X11R6/lib"
41058      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
41059        x_libraries="$SYS_ROOT/usr/lib64"
41060      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
41061        x_libraries="$SYS_ROOT/usr/lib"
41062      fi
41063    fi
41064  fi
41065
41066  # Now let autoconf do it's magic
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
41068$as_echo_n "checking for X... " >&6; }
41069
41070
41071# Check whether --with-x was given.
41072if test "${with_x+set}" = set; then :
41073  withval=$with_x;
41074fi
41075
41076# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
41077if test "x$with_x" = xno; then
41078  # The user explicitly disabled X.
41079  have_x=disabled
41080else
41081  case $x_includes,$x_libraries in #(
41082    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
41083    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
41084  $as_echo_n "(cached) " >&6
41085else
41086  # One or both of the vars are not set, and there is no cached value.
41087ac_x_includes=no ac_x_libraries=no
41088rm -f -r conftest.dir
41089if mkdir conftest.dir; then
41090  cd conftest.dir
41091  cat >Imakefile <<'_ACEOF'
41092incroot:
41093	@echo incroot='${INCROOT}'
41094usrlibdir:
41095	@echo usrlibdir='${USRLIBDIR}'
41096libdir:
41097	@echo libdir='${LIBDIR}'
41098_ACEOF
41099  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
41100    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
41101    for ac_var in incroot usrlibdir libdir; do
41102      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
41103    done
41104    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
41105    for ac_extension in a so sl dylib la dll; do
41106      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
41107	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
41108	ac_im_usrlibdir=$ac_im_libdir; break
41109      fi
41110    done
41111    # Screen out bogus values from the imake configuration.  They are
41112    # bogus both because they are the default anyway, and because
41113    # using them would break gcc on systems where it needs fixed includes.
41114    case $ac_im_incroot in
41115	/usr/include) ac_x_includes= ;;
41116	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
41117    esac
41118    case $ac_im_usrlibdir in
41119	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
41120	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
41121    esac
41122  fi
41123  cd ..
41124  rm -f -r conftest.dir
41125fi
41126
41127# Standard set of common directories for X headers.
41128# Check X11 before X11Rn because it is often a symlink to the current release.
41129ac_x_header_dirs='
41130/usr/X11/include
41131/usr/X11R7/include
41132/usr/X11R6/include
41133/usr/X11R5/include
41134/usr/X11R4/include
41135
41136/usr/include/X11
41137/usr/include/X11R7
41138/usr/include/X11R6
41139/usr/include/X11R5
41140/usr/include/X11R4
41141
41142/usr/local/X11/include
41143/usr/local/X11R7/include
41144/usr/local/X11R6/include
41145/usr/local/X11R5/include
41146/usr/local/X11R4/include
41147
41148/usr/local/include/X11
41149/usr/local/include/X11R7
41150/usr/local/include/X11R6
41151/usr/local/include/X11R5
41152/usr/local/include/X11R4
41153
41154/usr/X386/include
41155/usr/x386/include
41156/usr/XFree86/include/X11
41157
41158/usr/include
41159/usr/local/include
41160/usr/unsupported/include
41161/usr/athena/include
41162/usr/local/x11r5/include
41163/usr/lpp/Xamples/include
41164
41165/usr/openwin/include
41166/usr/openwin/share/include'
41167
41168if test "$ac_x_includes" = no; then
41169  # Guess where to find include files, by looking for Xlib.h.
41170  # First, try using that file with no special directory specified.
41171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41172/* end confdefs.h.  */
41173#include <X11/Xlib.h>
41174_ACEOF
41175if ac_fn_cxx_try_cpp "$LINENO"; then :
41176  # We can compile using X headers with no special include directory.
41177ac_x_includes=
41178else
41179  for ac_dir in $ac_x_header_dirs; do
41180  if test -r "$ac_dir/X11/Xlib.h"; then
41181    ac_x_includes=$ac_dir
41182    break
41183  fi
41184done
41185fi
41186rm -f conftest.err conftest.i conftest.$ac_ext
41187fi # $ac_x_includes = no
41188
41189if test "$ac_x_libraries" = no; then
41190  # Check for the libraries.
41191  # See if we find them without any special options.
41192  # Don't add to $LIBS permanently.
41193  ac_save_LIBS=$LIBS
41194  LIBS="-lX11 $LIBS"
41195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41196/* end confdefs.h.  */
41197#include <X11/Xlib.h>
41198int
41199main ()
41200{
41201XrmInitialize ()
41202  ;
41203  return 0;
41204}
41205_ACEOF
41206if ac_fn_cxx_try_link "$LINENO"; then :
41207  LIBS=$ac_save_LIBS
41208# We can link X programs with no special library path.
41209ac_x_libraries=
41210else
41211  LIBS=$ac_save_LIBS
41212for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
41213do
41214  # Don't even attempt the hair of trying to link an X program!
41215  for ac_extension in a so sl dylib la dll; do
41216    if test -r "$ac_dir/libX11.$ac_extension"; then
41217      ac_x_libraries=$ac_dir
41218      break 2
41219    fi
41220  done
41221done
41222fi
41223rm -f core conftest.err conftest.$ac_objext \
41224    conftest$ac_exeext conftest.$ac_ext
41225fi # $ac_x_libraries = no
41226
41227case $ac_x_includes,$ac_x_libraries in #(
41228  no,* | *,no | *\'*)
41229    # Didn't find X, or a directory has "'" in its name.
41230    ac_cv_have_x="have_x=no";; #(
41231  *)
41232    # Record where we found X for the cache.
41233    ac_cv_have_x="have_x=yes\
41234	ac_x_includes='$ac_x_includes'\
41235	ac_x_libraries='$ac_x_libraries'"
41236esac
41237fi
41238;; #(
41239    *) have_x=yes;;
41240  esac
41241  eval "$ac_cv_have_x"
41242fi # $with_x != no
41243
41244if test "$have_x" != yes; then
41245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
41246$as_echo "$have_x" >&6; }
41247  no_x=yes
41248else
41249  # If each of the values was on the command line, it overrides each guess.
41250  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
41251  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
41252  # Update the cache value to reflect the command line values.
41253  ac_cv_have_x="have_x=yes\
41254	ac_x_includes='$x_includes'\
41255	ac_x_libraries='$x_libraries'"
41256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
41257$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
41258fi
41259
41260  if test "$no_x" = yes; then
41261  # Not all programs may use this symbol, but it does not hurt to define it.
41262
41263$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
41264
41265  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
41266else
41267  if test -n "$x_includes"; then
41268    X_CFLAGS="$X_CFLAGS -I$x_includes"
41269  fi
41270
41271  # It would also be nice to do this for all -L options, not just this one.
41272  if test -n "$x_libraries"; then
41273    X_LIBS="$X_LIBS -L$x_libraries"
41274    # For Solaris; some versions of Sun CC require a space after -R and
41275    # others require no space.  Words are not sufficient . . . .
41276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
41277$as_echo_n "checking whether -R must be followed by a space... " >&6; }
41278    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
41279    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
41280    ac_cxx_werror_flag=yes
41281    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41282/* end confdefs.h.  */
41283
41284int
41285main ()
41286{
41287
41288  ;
41289  return 0;
41290}
41291_ACEOF
41292if ac_fn_cxx_try_link "$LINENO"; then :
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41294$as_echo "no" >&6; }
41295       X_LIBS="$X_LIBS -R$x_libraries"
41296else
41297  LIBS="$ac_xsave_LIBS -R $x_libraries"
41298       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41299/* end confdefs.h.  */
41300
41301int
41302main ()
41303{
41304
41305  ;
41306  return 0;
41307}
41308_ACEOF
41309if ac_fn_cxx_try_link "$LINENO"; then :
41310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41311$as_echo "yes" >&6; }
41312	  X_LIBS="$X_LIBS -R $x_libraries"
41313else
41314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
41315$as_echo "neither works" >&6; }
41316fi
41317rm -f core conftest.err conftest.$ac_objext \
41318    conftest$ac_exeext conftest.$ac_ext
41319fi
41320rm -f core conftest.err conftest.$ac_objext \
41321    conftest$ac_exeext conftest.$ac_ext
41322    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
41323    LIBS=$ac_xsave_LIBS
41324  fi
41325
41326  # Check for system-dependent libraries X programs must link with.
41327  # Do this before checking for the system-independent R6 libraries
41328  # (-lICE), since we may need -lsocket or whatever for X linking.
41329
41330  if test "$ISC" = yes; then
41331    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
41332  else
41333    # Martyn Johnson says this is needed for Ultrix, if the X
41334    # libraries were built with DECnet support.  And Karl Berry says
41335    # the Alpha needs dnet_stub (dnet does not exist).
41336    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
41337    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41338/* end confdefs.h.  */
41339
41340/* Override any GCC internal prototype to avoid an error.
41341   Use char because int might match the return type of a GCC
41342   builtin and then its argument prototype would still apply.  */
41343#ifdef __cplusplus
41344extern "C"
41345#endif
41346char XOpenDisplay ();
41347int
41348main ()
41349{
41350return XOpenDisplay ();
41351  ;
41352  return 0;
41353}
41354_ACEOF
41355if ac_fn_cxx_try_link "$LINENO"; then :
41356
41357else
41358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
41359$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
41360if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
41361  $as_echo_n "(cached) " >&6
41362else
41363  ac_check_lib_save_LIBS=$LIBS
41364LIBS="-ldnet  $LIBS"
41365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41366/* end confdefs.h.  */
41367
41368/* Override any GCC internal prototype to avoid an error.
41369   Use char because int might match the return type of a GCC
41370   builtin and then its argument prototype would still apply.  */
41371#ifdef __cplusplus
41372extern "C"
41373#endif
41374char dnet_ntoa ();
41375int
41376main ()
41377{
41378return dnet_ntoa ();
41379  ;
41380  return 0;
41381}
41382_ACEOF
41383if ac_fn_cxx_try_link "$LINENO"; then :
41384  ac_cv_lib_dnet_dnet_ntoa=yes
41385else
41386  ac_cv_lib_dnet_dnet_ntoa=no
41387fi
41388rm -f core conftest.err conftest.$ac_objext \
41389    conftest$ac_exeext conftest.$ac_ext
41390LIBS=$ac_check_lib_save_LIBS
41391fi
41392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
41393$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
41394if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
41395  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
41396fi
41397
41398    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
41399      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
41400$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
41401if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
41402  $as_echo_n "(cached) " >&6
41403else
41404  ac_check_lib_save_LIBS=$LIBS
41405LIBS="-ldnet_stub  $LIBS"
41406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41407/* end confdefs.h.  */
41408
41409/* Override any GCC internal prototype to avoid an error.
41410   Use char because int might match the return type of a GCC
41411   builtin and then its argument prototype would still apply.  */
41412#ifdef __cplusplus
41413extern "C"
41414#endif
41415char dnet_ntoa ();
41416int
41417main ()
41418{
41419return dnet_ntoa ();
41420  ;
41421  return 0;
41422}
41423_ACEOF
41424if ac_fn_cxx_try_link "$LINENO"; then :
41425  ac_cv_lib_dnet_stub_dnet_ntoa=yes
41426else
41427  ac_cv_lib_dnet_stub_dnet_ntoa=no
41428fi
41429rm -f core conftest.err conftest.$ac_objext \
41430    conftest$ac_exeext conftest.$ac_ext
41431LIBS=$ac_check_lib_save_LIBS
41432fi
41433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
41434$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
41435if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
41436  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
41437fi
41438
41439    fi
41440fi
41441rm -f core conftest.err conftest.$ac_objext \
41442    conftest$ac_exeext conftest.$ac_ext
41443    LIBS="$ac_xsave_LIBS"
41444
41445    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
41446    # to get the SysV transport functions.
41447    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
41448    # needs -lnsl.
41449    # The nsl library prevents programs from opening the X display
41450    # on Irix 5.2, according to T.E. Dickey.
41451    # The functions gethostbyname, getservbyname, and inet_addr are
41452    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
41453    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
41454if test "x$ac_cv_func_gethostbyname" = xyes; then :
41455
41456fi
41457
41458    if test $ac_cv_func_gethostbyname = no; then
41459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
41460$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
41461if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
41462  $as_echo_n "(cached) " >&6
41463else
41464  ac_check_lib_save_LIBS=$LIBS
41465LIBS="-lnsl  $LIBS"
41466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41467/* end confdefs.h.  */
41468
41469/* Override any GCC internal prototype to avoid an error.
41470   Use char because int might match the return type of a GCC
41471   builtin and then its argument prototype would still apply.  */
41472#ifdef __cplusplus
41473extern "C"
41474#endif
41475char gethostbyname ();
41476int
41477main ()
41478{
41479return gethostbyname ();
41480  ;
41481  return 0;
41482}
41483_ACEOF
41484if ac_fn_cxx_try_link "$LINENO"; then :
41485  ac_cv_lib_nsl_gethostbyname=yes
41486else
41487  ac_cv_lib_nsl_gethostbyname=no
41488fi
41489rm -f core conftest.err conftest.$ac_objext \
41490    conftest$ac_exeext conftest.$ac_ext
41491LIBS=$ac_check_lib_save_LIBS
41492fi
41493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
41494$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
41495if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
41496  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
41497fi
41498
41499      if test $ac_cv_lib_nsl_gethostbyname = no; then
41500	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
41501$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
41502if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
41503  $as_echo_n "(cached) " >&6
41504else
41505  ac_check_lib_save_LIBS=$LIBS
41506LIBS="-lbsd  $LIBS"
41507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41508/* end confdefs.h.  */
41509
41510/* Override any GCC internal prototype to avoid an error.
41511   Use char because int might match the return type of a GCC
41512   builtin and then its argument prototype would still apply.  */
41513#ifdef __cplusplus
41514extern "C"
41515#endif
41516char gethostbyname ();
41517int
41518main ()
41519{
41520return gethostbyname ();
41521  ;
41522  return 0;
41523}
41524_ACEOF
41525if ac_fn_cxx_try_link "$LINENO"; then :
41526  ac_cv_lib_bsd_gethostbyname=yes
41527else
41528  ac_cv_lib_bsd_gethostbyname=no
41529fi
41530rm -f core conftest.err conftest.$ac_objext \
41531    conftest$ac_exeext conftest.$ac_ext
41532LIBS=$ac_check_lib_save_LIBS
41533fi
41534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
41535$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
41536if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
41537  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
41538fi
41539
41540      fi
41541    fi
41542
41543    # lieder@skyler.mavd.honeywell.com says without -lsocket,
41544    # socket/setsockopt and other routines are undefined under SCO ODT
41545    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
41546    # on later versions), says Simon Leinen: it contains gethostby*
41547    # variants that don't use the name server (or something).  -lsocket
41548    # must be given before -lnsl if both are needed.  We assume that
41549    # if connect needs -lnsl, so does gethostbyname.
41550    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
41551if test "x$ac_cv_func_connect" = xyes; then :
41552
41553fi
41554
41555    if test $ac_cv_func_connect = no; then
41556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
41557$as_echo_n "checking for connect in -lsocket... " >&6; }
41558if ${ac_cv_lib_socket_connect+:} false; then :
41559  $as_echo_n "(cached) " >&6
41560else
41561  ac_check_lib_save_LIBS=$LIBS
41562LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
41563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41564/* end confdefs.h.  */
41565
41566/* Override any GCC internal prototype to avoid an error.
41567   Use char because int might match the return type of a GCC
41568   builtin and then its argument prototype would still apply.  */
41569#ifdef __cplusplus
41570extern "C"
41571#endif
41572char connect ();
41573int
41574main ()
41575{
41576return connect ();
41577  ;
41578  return 0;
41579}
41580_ACEOF
41581if ac_fn_cxx_try_link "$LINENO"; then :
41582  ac_cv_lib_socket_connect=yes
41583else
41584  ac_cv_lib_socket_connect=no
41585fi
41586rm -f core conftest.err conftest.$ac_objext \
41587    conftest$ac_exeext conftest.$ac_ext
41588LIBS=$ac_check_lib_save_LIBS
41589fi
41590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
41591$as_echo "$ac_cv_lib_socket_connect" >&6; }
41592if test "x$ac_cv_lib_socket_connect" = xyes; then :
41593  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
41594fi
41595
41596    fi
41597
41598    # Guillermo Gomez says -lposix is necessary on A/UX.
41599    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
41600if test "x$ac_cv_func_remove" = xyes; then :
41601
41602fi
41603
41604    if test $ac_cv_func_remove = no; then
41605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
41606$as_echo_n "checking for remove in -lposix... " >&6; }
41607if ${ac_cv_lib_posix_remove+:} false; then :
41608  $as_echo_n "(cached) " >&6
41609else
41610  ac_check_lib_save_LIBS=$LIBS
41611LIBS="-lposix  $LIBS"
41612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41613/* end confdefs.h.  */
41614
41615/* Override any GCC internal prototype to avoid an error.
41616   Use char because int might match the return type of a GCC
41617   builtin and then its argument prototype would still apply.  */
41618#ifdef __cplusplus
41619extern "C"
41620#endif
41621char remove ();
41622int
41623main ()
41624{
41625return remove ();
41626  ;
41627  return 0;
41628}
41629_ACEOF
41630if ac_fn_cxx_try_link "$LINENO"; then :
41631  ac_cv_lib_posix_remove=yes
41632else
41633  ac_cv_lib_posix_remove=no
41634fi
41635rm -f core conftest.err conftest.$ac_objext \
41636    conftest$ac_exeext conftest.$ac_ext
41637LIBS=$ac_check_lib_save_LIBS
41638fi
41639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
41640$as_echo "$ac_cv_lib_posix_remove" >&6; }
41641if test "x$ac_cv_lib_posix_remove" = xyes; then :
41642  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
41643fi
41644
41645    fi
41646
41647    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
41648    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
41649if test "x$ac_cv_func_shmat" = xyes; then :
41650
41651fi
41652
41653    if test $ac_cv_func_shmat = no; then
41654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
41655$as_echo_n "checking for shmat in -lipc... " >&6; }
41656if ${ac_cv_lib_ipc_shmat+:} false; then :
41657  $as_echo_n "(cached) " >&6
41658else
41659  ac_check_lib_save_LIBS=$LIBS
41660LIBS="-lipc  $LIBS"
41661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41662/* end confdefs.h.  */
41663
41664/* Override any GCC internal prototype to avoid an error.
41665   Use char because int might match the return type of a GCC
41666   builtin and then its argument prototype would still apply.  */
41667#ifdef __cplusplus
41668extern "C"
41669#endif
41670char shmat ();
41671int
41672main ()
41673{
41674return shmat ();
41675  ;
41676  return 0;
41677}
41678_ACEOF
41679if ac_fn_cxx_try_link "$LINENO"; then :
41680  ac_cv_lib_ipc_shmat=yes
41681else
41682  ac_cv_lib_ipc_shmat=no
41683fi
41684rm -f core conftest.err conftest.$ac_objext \
41685    conftest$ac_exeext conftest.$ac_ext
41686LIBS=$ac_check_lib_save_LIBS
41687fi
41688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
41689$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
41690if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
41691  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
41692fi
41693
41694    fi
41695  fi
41696
41697  # Check for libraries that X11R6 Xt/Xaw programs need.
41698  ac_save_LDFLAGS=$LDFLAGS
41699  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
41700  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
41701  # check for ICE first), but we must link in the order -lSM -lICE or
41702  # we get undefined symbols.  So assume we have SM if we have ICE.
41703  # These have to be linked with before -lX11, unlike the other
41704  # libraries we check for below, so use a different variable.
41705  # John Interrante, Karl Berry
41706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
41707$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
41708if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
41709  $as_echo_n "(cached) " >&6
41710else
41711  ac_check_lib_save_LIBS=$LIBS
41712LIBS="-lICE $X_EXTRA_LIBS $LIBS"
41713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41714/* end confdefs.h.  */
41715
41716/* Override any GCC internal prototype to avoid an error.
41717   Use char because int might match the return type of a GCC
41718   builtin and then its argument prototype would still apply.  */
41719#ifdef __cplusplus
41720extern "C"
41721#endif
41722char IceConnectionNumber ();
41723int
41724main ()
41725{
41726return IceConnectionNumber ();
41727  ;
41728  return 0;
41729}
41730_ACEOF
41731if ac_fn_cxx_try_link "$LINENO"; then :
41732  ac_cv_lib_ICE_IceConnectionNumber=yes
41733else
41734  ac_cv_lib_ICE_IceConnectionNumber=no
41735fi
41736rm -f core conftest.err conftest.$ac_objext \
41737    conftest$ac_exeext conftest.$ac_ext
41738LIBS=$ac_check_lib_save_LIBS
41739fi
41740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
41741$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
41742if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
41743  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
41744fi
41745
41746  LDFLAGS=$ac_save_LDFLAGS
41747
41748fi
41749
41750
41751  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
41752  # this doesn't make sense so we remove it.
41753  if test "x$COMPILE_TYPE" = xcross; then
41754    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
41755  fi
41756
41757  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
41758
41759  # Print a helpful message on how to acquire the necessary build dependency.
41760  # x11 is the help tag: freetype, cups, pulse, alsa etc
41761  MISSING_DEPENDENCY=x11
41762
41763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41764    cygwin_help $MISSING_DEPENDENCY
41765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41766    msys_help $MISSING_DEPENDENCY
41767  else
41768    PKGHANDLER_COMMAND=
41769
41770    case $PKGHANDLER in
41771      apt-get)
41772        apt_help     $MISSING_DEPENDENCY ;;
41773      yum)
41774        yum_help     $MISSING_DEPENDENCY ;;
41775      port)
41776        port_help    $MISSING_DEPENDENCY ;;
41777      pkgutil)
41778        pkgutil_help $MISSING_DEPENDENCY ;;
41779      pkgadd)
41780        pkgadd_help  $MISSING_DEPENDENCY ;;
41781    esac
41782
41783    if test "x$PKGHANDLER_COMMAND" != x; then
41784      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41785    fi
41786  fi
41787
41788    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
41789  fi
41790
41791  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41792    OPENWIN_HOME="/usr/openwin"
41793  fi
41794
41795
41796
41797  #
41798  # Weird Sol10 something check...TODO change to try compile
41799  #
41800  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
41801    if test "`uname -r`" = "5.10"; then
41802      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
41803        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
41804      fi
41805    fi
41806  fi
41807
41808  ac_ext=c
41809ac_cpp='$CPP $CPPFLAGS'
41810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41812ac_compiler_gnu=$ac_cv_c_compiler_gnu
41813
41814  OLD_CFLAGS="$CFLAGS"
41815  CFLAGS="$CFLAGS $X_CFLAGS"
41816
41817  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
41818  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
41819do :
41820  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41821ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
41822        # include <X11/Xlib.h>
41823        # include <X11/Xutil.h>
41824
41825
41826"
41827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41828  cat >>confdefs.h <<_ACEOF
41829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41830_ACEOF
41831 X11_A_OK=yes
41832else
41833  X11_A_OK=no; break
41834fi
41835
41836done
41837
41838
41839  CFLAGS="$OLD_CFLAGS"
41840  ac_ext=cpp
41841ac_cpp='$CXXCPP $CPPFLAGS'
41842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41845
41846
41847  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
41848
41849  # Print a helpful message on how to acquire the necessary build dependency.
41850  # x11 is the help tag: freetype, cups, pulse, alsa etc
41851  MISSING_DEPENDENCY=x11
41852
41853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41854    cygwin_help $MISSING_DEPENDENCY
41855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41856    msys_help $MISSING_DEPENDENCY
41857  else
41858    PKGHANDLER_COMMAND=
41859
41860    case $PKGHANDLER in
41861      apt-get)
41862        apt_help     $MISSING_DEPENDENCY ;;
41863      yum)
41864        yum_help     $MISSING_DEPENDENCY ;;
41865      port)
41866        port_help    $MISSING_DEPENDENCY ;;
41867      pkgutil)
41868        pkgutil_help $MISSING_DEPENDENCY ;;
41869      pkgadd)
41870        pkgadd_help  $MISSING_DEPENDENCY ;;
41871    esac
41872
41873    if test "x$PKGHANDLER_COMMAND" != x; then
41874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41875    fi
41876  fi
41877
41878    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
41879  fi
41880
41881
41882
41883
41884
41885
41886  ###############################################################################
41887  #
41888  # The common unix printing system cups is used to print from java.
41889  #
41890
41891# Check whether --with-cups was given.
41892if test "${with_cups+set}" = set; then :
41893  withval=$with_cups;
41894fi
41895
41896
41897# Check whether --with-cups-include was given.
41898if test "${with_cups_include+set}" = set; then :
41899  withval=$with_cups_include;
41900fi
41901
41902
41903  if test "x$CUPS_NOT_NEEDED" = xyes; then
41904    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
41905      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
41906$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
41907    fi
41908    CUPS_CFLAGS=
41909  else
41910    CUPS_FOUND=no
41911
41912    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
41913      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
41914    fi
41915
41916    if test "x${with_cups}" != x; then
41917      CUPS_CFLAGS="-I${with_cups}/include"
41918      CUPS_FOUND=yes
41919    fi
41920    if test "x${with_cups_include}" != x; then
41921      CUPS_CFLAGS="-I${with_cups_include}"
41922      CUPS_FOUND=yes
41923    fi
41924    if test "x$CUPS_FOUND" = xno; then
41925
41926
41927  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
41928    # Source the builddeps file again, to make sure it uses the latest variables!
41929    . $builddepsfile
41930    # Look for a target and build machine specific resource!
41931    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
41932    if test "x$resource" = x; then
41933      # Ok, lets instead look for a target specific resource
41934      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
41935    fi
41936    if test "x$resource" = x; then
41937      # Ok, lets instead look for a build specific resource
41938      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
41939    fi
41940    if test "x$resource" = x; then
41941      # Ok, lets instead look for a generic resource
41942      # (The cups comes from M4 and not the shell, thus no need for eval here.)
41943      resource=${builddep_cups}
41944    fi
41945    if test "x$resource" != x; then
41946      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
41947$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
41948      # If the resource in the builddeps.conf file is an existing directory,
41949      # for example /java/linux/cups
41950      if test -d ${resource}; then
41951        depdir=${resource}
41952      else
41953
41954  # cups is for example mymodule
41955  # $resource is for example libs/general/libmymod_1_2_3.zip
41956  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
41957  # $with_builddeps_dir is for example /localhome/builddeps
41958  # depdir is the name of the variable into which we store the depdir, eg MYMOD
41959  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
41960  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
41961  filename=`basename $resource`
41962  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
41963  filebase=${filename%%.*}
41964  extension=${filename#*.}
41965  installdir=$with_builddeps_dir/$filebase
41966  if test ! -f $installdir/$filename.unpacked; then
41967    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
41968$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
41969    if test ! -d $installdir; then
41970      mkdir -p $installdir
41971    fi
41972    if test ! -d $installdir; then
41973      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
41974    fi
41975    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
41976    touch $tmpfile
41977    if test ! -f $tmpfile; then
41978      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
41979    fi
41980
41981  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
41982  # $tmpfile is the local file name for the downloaded file.
41983  VALID_TOOL=no
41984  if test "x$BDEPS_FTP" = xwget; then
41985    VALID_TOOL=yes
41986    wget -O $tmpfile $with_builddeps_server/$resource
41987  fi
41988  if test "x$BDEPS_FTP" = xlftp; then
41989    VALID_TOOL=yes
41990    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
41991  fi
41992  if test "x$BDEPS_FTP" = xftp; then
41993    VALID_TOOL=yes
41994    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
41995    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
41996    FTPUSERPWD=${FTPSERVER%%@*}
41997    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
41998      FTPUSER=${userpwd%%:*}
41999      FTPPWD=${userpwd#*@}
42000      FTPSERVER=${FTPSERVER#*@}
42001    else
42002      FTPUSER=ftp
42003      FTPPWD=ftp
42004    fi
42005    # the "pass" command does not work on some
42006    # ftp clients (read ftp.exe) but if it works,
42007    # passive mode is better!
42008    ( \
42009        echo "user $FTPUSER $FTPPWD"        ; \
42010        echo "pass"                         ; \
42011        echo "bin"                          ; \
42012        echo "get $FTPPATH $tmpfile"              ; \
42013    ) | ftp -in $FTPSERVER
42014  fi
42015  if test "x$VALID_TOOL" != xyes; then
42016    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
42017  fi
42018
42019    mv $tmpfile $installdir/$filename
42020    if test ! -s $installdir/$filename; then
42021      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
42022    fi
42023    case "$extension" in
42024      zip)  echo "Unzipping $installdir/$filename..."
42025        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
42026        ;;
42027      tar.gz) echo "Untaring $installdir/$filename..."
42028        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42029        ;;
42030      tgz) echo "Untaring $installdir/$filename..."
42031        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42032        ;;
42033      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
42034        ;;
42035    esac
42036  fi
42037  if test -f $installdir/$filename.unpacked; then
42038    depdir=$installdir
42039  fi
42040
42041      fi
42042      # Source the builddeps file again, because in the previous command, the depdir
42043      # was updated to point at the current build dependency install directory.
42044      . $builddepsfile
42045      # Now extract variables from the builddeps.conf files.
42046      theroot=${builddep_cups_ROOT}
42047      thecflags=${builddep_cups_CFLAGS}
42048      thelibs=${builddep_cups_LIBS}
42049      if test "x$depdir" = x; then
42050        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
42051      fi
42052      CUPS=$depdir
42053      if test "x$theroot" != x; then
42054        CUPS="$theroot"
42055      fi
42056      if test "x$thecflags" != x; then
42057        CUPS_CFLAGS="$thecflags"
42058      fi
42059      if test "x$thelibs" != x; then
42060        CUPS_LIBS="$thelibs"
42061      fi
42062      CUPS_FOUND=yes
42063
42064    fi
42065
42066  fi
42067
42068    fi
42069    if test "x$CUPS_FOUND" = xno; then
42070      # Are the cups headers installed in the default /usr/include location?
42071      for ac_header in cups/cups.h cups/ppd.h
42072do :
42073  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42074ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
42075if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42076  cat >>confdefs.h <<_ACEOF
42077#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42078_ACEOF
42079
42080            CUPS_FOUND=yes
42081            CUPS_CFLAGS=
42082            DEFAULT_CUPS=yes
42083
42084
42085fi
42086
42087done
42088
42089    fi
42090    if test "x$CUPS_FOUND" = xno; then
42091      # Getting nervous now? Lets poke around for standard Solaris third-party
42092      # package installation locations.
42093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
42094$as_echo_n "checking for cups headers... " >&6; }
42095      if test -s /opt/sfw/cups/include/cups/cups.h; then
42096        # An SFW package seems to be installed!
42097        CUPS_FOUND=yes
42098        CUPS_CFLAGS="-I/opt/sfw/cups/include"
42099      elif test -s /opt/csw/include/cups/cups.h; then
42100        # A CSW package seems to be installed!
42101        CUPS_FOUND=yes
42102        CUPS_CFLAGS="-I/opt/csw/include"
42103      fi
42104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
42105$as_echo "$CUPS_FOUND" >&6; }
42106    fi
42107    if test "x$CUPS_FOUND" = xno; then
42108
42109  # Print a helpful message on how to acquire the necessary build dependency.
42110  # cups is the help tag: freetype, cups, pulse, alsa etc
42111  MISSING_DEPENDENCY=cups
42112
42113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42114    cygwin_help $MISSING_DEPENDENCY
42115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42116    msys_help $MISSING_DEPENDENCY
42117  else
42118    PKGHANDLER_COMMAND=
42119
42120    case $PKGHANDLER in
42121      apt-get)
42122        apt_help     $MISSING_DEPENDENCY ;;
42123      yum)
42124        yum_help     $MISSING_DEPENDENCY ;;
42125      port)
42126        port_help    $MISSING_DEPENDENCY ;;
42127      pkgutil)
42128        pkgutil_help $MISSING_DEPENDENCY ;;
42129      pkgadd)
42130        pkgadd_help  $MISSING_DEPENDENCY ;;
42131    esac
42132
42133    if test "x$PKGHANDLER_COMMAND" != x; then
42134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42135    fi
42136  fi
42137
42138      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
42139    fi
42140  fi
42141
42142
42143
42144
42145
42146
42147  ###############################################################################
42148  #
42149  # The ubiquitous freetype library is used to render fonts.
42150  #
42151
42152# Check whether --with-freetype was given.
42153if test "${with_freetype+set}" = set; then :
42154  withval=$with_freetype;
42155fi
42156
42157
42158# Check whether --with-freetype-include was given.
42159if test "${with_freetype_include+set}" = set; then :
42160  withval=$with_freetype_include;
42161fi
42162
42163
42164# Check whether --with-freetype-lib was given.
42165if test "${with_freetype_lib+set}" = set; then :
42166  withval=$with_freetype_lib;
42167fi
42168
42169  # Check whether --enable-freetype-bundling was given.
42170if test "${enable_freetype_bundling+set}" = set; then :
42171  enableval=$enable_freetype_bundling;
42172fi
42173
42174
42175  FREETYPE_CFLAGS=
42176  FREETYPE_LIBS=
42177  FREETYPE_BUNDLE_LIB_PATH=
42178
42179  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
42180    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
42181      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
42182$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
42183    fi
42184    if test "x$enable_freetype_bundling" != x; then
42185      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
42186$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
42187    fi
42188  else
42189    # freetype is needed to build; go get it!
42190
42191    BUNDLE_FREETYPE="$enable_freetype_bundling"
42192
42193    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
42194      # User has specified settings
42195
42196      if test "x$BUNDLE_FREETYPE" = x; then
42197        # If not specified, default is to bundle freetype
42198        BUNDLE_FREETYPE=yes
42199      fi
42200
42201      if test "x$with_freetype" != x; then
42202        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
42203        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
42204      fi
42205
42206      # Allow --with-freetype-lib and --with-freetype-include to override
42207      if test "x$with_freetype_include" != x; then
42208        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
42209      fi
42210      if test "x$with_freetype_lib" != x; then
42211        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
42212      fi
42213
42214      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
42215        # Okay, we got it. Check that it works.
42216
42217  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42218  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
42219  METHOD="--with-freetype"
42220
42221  # First check if the files exists.
42222  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
42223    # We found an arbitrary include file. That's a good sign.
42224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
42225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
42226    FOUND_FREETYPE=yes
42227
42228    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
42229    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
42230      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
42231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
42232      FOUND_FREETYPE=no
42233    else
42234      if test "x$OPENJDK_TARGET_OS" = xwindows; then
42235        # On Windows, we will need both .lib and .dll file.
42236        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
42237          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
42238$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
42239          FOUND_FREETYPE=no
42240        fi
42241      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
42242        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
42243        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
42244      fi
42245    fi
42246  fi
42247
42248  if test "x$FOUND_FREETYPE" = xyes; then
42249
42250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42251
42252  # Input might be given as Windows format, start by converting to
42253  # unix format.
42254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42255  new_path=`$CYGPATH -u "$path"`
42256
42257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42260  # "foo.exe" is OK but "foo" is an error.
42261  #
42262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42263  # It is also a way to make sure we got the proper file name for the real test later on.
42264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42265  if test "x$test_shortpath" = x; then
42266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42268    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
42269  fi
42270
42271  # Call helper function which possibly converts this using DOS-style short mode.
42272  # If so, the updated path is stored in $new_path.
42273
42274  input_path="$new_path"
42275  # Check if we need to convert this using DOS-style short mode. If the path
42276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42277  # take no chances and rewrite it.
42278  # Note: m4 eats our [], so we need to use [ and ] instead.
42279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42280  if test "x$has_forbidden_chars" != x; then
42281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42285      # Going to short mode and back again did indeed matter. Since short mode is
42286      # case insensitive, let's make it lowercase to improve readability.
42287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42288      # Now convert it back to Unix-stile (cygpath)
42289      input_path=`$CYGPATH -u "$shortmode_path"`
42290      new_path="$input_path"
42291    fi
42292  fi
42293
42294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42295  if test "x$test_cygdrive_prefix" = x; then
42296    # As a simple fix, exclude /usr/bin since it's not a real path.
42297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42299      # a path prefixed by /cygdrive for fixpath to work.
42300      new_path="$CYGWIN_ROOT_PATH$input_path"
42301    fi
42302  fi
42303
42304
42305  if test "x$path" != "x$new_path"; then
42306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42309  fi
42310
42311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42312
42313  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42314  has_colon=`$ECHO $path | $GREP ^.:`
42315  new_path="$path"
42316  if test "x$has_colon" = x; then
42317    # Not in mixed or Windows style, start by that.
42318    new_path=`cmd //c echo $path`
42319  fi
42320
42321
42322  input_path="$new_path"
42323  # Check if we need to convert this using DOS-style short mode. If the path
42324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42325  # take no chances and rewrite it.
42326  # Note: m4 eats our [], so we need to use [ and ] instead.
42327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42328  if test "x$has_forbidden_chars" != x; then
42329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42331  fi
42332
42333
42334  windows_path="$new_path"
42335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42336    unix_path=`$CYGPATH -u "$windows_path"`
42337    new_path="$unix_path"
42338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42340    new_path="$unix_path"
42341  fi
42342
42343  if test "x$path" != "x$new_path"; then
42344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42347  fi
42348
42349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42351
42352  else
42353    # We're on a posix platform. Hooray! :)
42354    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42355    has_space=`$ECHO "$path" | $GREP " "`
42356    if test "x$has_space" != x; then
42357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42359      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42360    fi
42361
42362    # Use eval to expand a potential ~
42363    eval path="$path"
42364    if test ! -f "$path" && test ! -d "$path"; then
42365      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42366    fi
42367
42368    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
42369  fi
42370
42371
42372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42373
42374  # Input might be given as Windows format, start by converting to
42375  # unix format.
42376  path="$POTENTIAL_FREETYPE_LIB_PATH"
42377  new_path=`$CYGPATH -u "$path"`
42378
42379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42382  # "foo.exe" is OK but "foo" is an error.
42383  #
42384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42385  # It is also a way to make sure we got the proper file name for the real test later on.
42386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42387  if test "x$test_shortpath" = x; then
42388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
42391  fi
42392
42393  # Call helper function which possibly converts this using DOS-style short mode.
42394  # If so, the updated path is stored in $new_path.
42395
42396  input_path="$new_path"
42397  # Check if we need to convert this using DOS-style short mode. If the path
42398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42399  # take no chances and rewrite it.
42400  # Note: m4 eats our [], so we need to use [ and ] instead.
42401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42402  if test "x$has_forbidden_chars" != x; then
42403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42407      # Going to short mode and back again did indeed matter. Since short mode is
42408      # case insensitive, let's make it lowercase to improve readability.
42409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42410      # Now convert it back to Unix-stile (cygpath)
42411      input_path=`$CYGPATH -u "$shortmode_path"`
42412      new_path="$input_path"
42413    fi
42414  fi
42415
42416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42417  if test "x$test_cygdrive_prefix" = x; then
42418    # As a simple fix, exclude /usr/bin since it's not a real path.
42419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42421      # a path prefixed by /cygdrive for fixpath to work.
42422      new_path="$CYGWIN_ROOT_PATH$input_path"
42423    fi
42424  fi
42425
42426
42427  if test "x$path" != "x$new_path"; then
42428    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
42429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
42430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
42431  fi
42432
42433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42434
42435  path="$POTENTIAL_FREETYPE_LIB_PATH"
42436  has_colon=`$ECHO $path | $GREP ^.:`
42437  new_path="$path"
42438  if test "x$has_colon" = x; then
42439    # Not in mixed or Windows style, start by that.
42440    new_path=`cmd //c echo $path`
42441  fi
42442
42443
42444  input_path="$new_path"
42445  # Check if we need to convert this using DOS-style short mode. If the path
42446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42447  # take no chances and rewrite it.
42448  # Note: m4 eats our [], so we need to use [ and ] instead.
42449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42450  if test "x$has_forbidden_chars" != x; then
42451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42453  fi
42454
42455
42456  windows_path="$new_path"
42457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42458    unix_path=`$CYGPATH -u "$windows_path"`
42459    new_path="$unix_path"
42460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42462    new_path="$unix_path"
42463  fi
42464
42465  if test "x$path" != "x$new_path"; then
42466    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
42467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
42468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
42469  fi
42470
42471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42473
42474  else
42475    # We're on a posix platform. Hooray! :)
42476    path="$POTENTIAL_FREETYPE_LIB_PATH"
42477    has_space=`$ECHO "$path" | $GREP " "`
42478    if test "x$has_space" != x; then
42479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42482    fi
42483
42484    # Use eval to expand a potential ~
42485    eval path="$path"
42486    if test ! -f "$path" && test ! -d "$path"; then
42487      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42488    fi
42489
42490    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
42491  fi
42492
42493
42494    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
42496$as_echo_n "checking for freetype includes... " >&6; }
42497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
42498$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
42499    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
42500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
42501$as_echo_n "checking for freetype libraries... " >&6; }
42502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
42503$as_echo "$FREETYPE_LIB_PATH" >&6; }
42504  fi
42505
42506        if test "x$FOUND_FREETYPE" != xyes; then
42507          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
42508        fi
42509      else
42510        # User specified only one of lib or include. This is an error.
42511        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
42512          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
42513$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
42514          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
42515        else
42516          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
42517$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
42518          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
42519        fi
42520      fi
42521    else
42522      # User did not specify settings, but we need freetype. Try to locate it.
42523
42524      if test "x$BUNDLE_FREETYPE" = x; then
42525        # If not specified, default is to bundle freetype only on windows
42526        if test "x$OPENJDK_TARGET_OS" = xwindows; then
42527          BUNDLE_FREETYPE=yes
42528        else
42529          BUNDLE_FREETYPE=no
42530        fi
42531      fi
42532
42533      if test "x$FOUND_FREETYPE" != xyes; then
42534        # Check builddeps
42535
42536
42537  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42538    # Source the builddeps file again, to make sure it uses the latest variables!
42539    . $builddepsfile
42540    # Look for a target and build machine specific resource!
42541    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42542    if test "x$resource" = x; then
42543      # Ok, lets instead look for a target specific resource
42544      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
42545    fi
42546    if test "x$resource" = x; then
42547      # Ok, lets instead look for a build specific resource
42548      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
42549    fi
42550    if test "x$resource" = x; then
42551      # Ok, lets instead look for a generic resource
42552      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
42553      resource=${builddep_freetype2}
42554    fi
42555    if test "x$resource" != x; then
42556      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
42557$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
42558      # If the resource in the builddeps.conf file is an existing directory,
42559      # for example /java/linux/cups
42560      if test -d ${resource}; then
42561        depdir=${resource}
42562      else
42563
42564  # freetype2 is for example mymodule
42565  # $resource is for example libs/general/libmymod_1_2_3.zip
42566  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
42567  # $with_builddeps_dir is for example /localhome/builddeps
42568  # depdir is the name of the variable into which we store the depdir, eg MYMOD
42569  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
42570  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
42571  filename=`basename $resource`
42572  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
42573  filebase=${filename%%.*}
42574  extension=${filename#*.}
42575  installdir=$with_builddeps_dir/$filebase
42576  if test ! -f $installdir/$filename.unpacked; then
42577    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
42578$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
42579    if test ! -d $installdir; then
42580      mkdir -p $installdir
42581    fi
42582    if test ! -d $installdir; then
42583      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
42584    fi
42585    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
42586    touch $tmpfile
42587    if test ! -f $tmpfile; then
42588      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
42589    fi
42590
42591  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
42592  # $tmpfile is the local file name for the downloaded file.
42593  VALID_TOOL=no
42594  if test "x$BDEPS_FTP" = xwget; then
42595    VALID_TOOL=yes
42596    wget -O $tmpfile $with_builddeps_server/$resource
42597  fi
42598  if test "x$BDEPS_FTP" = xlftp; then
42599    VALID_TOOL=yes
42600    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
42601  fi
42602  if test "x$BDEPS_FTP" = xftp; then
42603    VALID_TOOL=yes
42604    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
42605    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
42606    FTPUSERPWD=${FTPSERVER%%@*}
42607    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
42608      FTPUSER=${userpwd%%:*}
42609      FTPPWD=${userpwd#*@}
42610      FTPSERVER=${FTPSERVER#*@}
42611    else
42612      FTPUSER=ftp
42613      FTPPWD=ftp
42614    fi
42615    # the "pass" command does not work on some
42616    # ftp clients (read ftp.exe) but if it works,
42617    # passive mode is better!
42618    ( \
42619        echo "user $FTPUSER $FTPPWD"        ; \
42620        echo "pass"                         ; \
42621        echo "bin"                          ; \
42622        echo "get $FTPPATH $tmpfile"              ; \
42623    ) | ftp -in $FTPSERVER
42624  fi
42625  if test "x$VALID_TOOL" != xyes; then
42626    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
42627  fi
42628
42629    mv $tmpfile $installdir/$filename
42630    if test ! -s $installdir/$filename; then
42631      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
42632    fi
42633    case "$extension" in
42634      zip)  echo "Unzipping $installdir/$filename..."
42635        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
42636        ;;
42637      tar.gz) echo "Untaring $installdir/$filename..."
42638        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42639        ;;
42640      tgz) echo "Untaring $installdir/$filename..."
42641        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
42642        ;;
42643      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
42644        ;;
42645    esac
42646  fi
42647  if test -f $installdir/$filename.unpacked; then
42648    depdir=$installdir
42649  fi
42650
42651      fi
42652      # Source the builddeps file again, because in the previous command, the depdir
42653      # was updated to point at the current build dependency install directory.
42654      . $builddepsfile
42655      # Now extract variables from the builddeps.conf files.
42656      theroot=${builddep_freetype2_ROOT}
42657      thecflags=${builddep_freetype2_CFLAGS}
42658      thelibs=${builddep_freetype2_LIBS}
42659      if test "x$depdir" = x; then
42660        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
42661      fi
42662      FREETYPE=$depdir
42663      if test "x$theroot" != x; then
42664        FREETYPE="$theroot"
42665      fi
42666      if test "x$thecflags" != x; then
42667        FREETYPE_CFLAGS="$thecflags"
42668      fi
42669      if test "x$thelibs" != x; then
42670        FREETYPE_LIBS="$thelibs"
42671      fi
42672      FOUND_FREETYPE=yes
42673      else FOUND_FREETYPE=no
42674
42675    fi
42676    else FOUND_FREETYPE=no
42677
42678  fi
42679
42680        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42681        if test "x$FOUND_FREETYPE" = xyes; then
42682          if test "x$BUNDLE_FREETYPE" = xyes; then
42683            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
42684$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
42685            FOUND_FREETYPE=no
42686          else
42687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42688$as_echo_n "checking for freetype... " >&6; }
42689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
42690$as_echo "yes (using builddeps)" >&6; }
42691          fi
42692        fi
42693      fi
42694
42695      if test "x$FOUND_FREETYPE" != xyes; then
42696        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
42697        if test "x$PKG_CONFIG" != x; then
42698
42699pkg_failed=no
42700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
42701$as_echo_n "checking for FREETYPE... " >&6; }
42702
42703if test -n "$FREETYPE_CFLAGS"; then
42704    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
42705 elif test -n "$PKG_CONFIG"; then
42706    if test -n "$PKG_CONFIG" && \
42707    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42708  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42709  ac_status=$?
42710  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42711  test $ac_status = 0; }; then
42712  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
42713else
42714  pkg_failed=yes
42715fi
42716 else
42717    pkg_failed=untried
42718fi
42719if test -n "$FREETYPE_LIBS"; then
42720    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
42721 elif test -n "$PKG_CONFIG"; then
42722    if test -n "$PKG_CONFIG" && \
42723    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42724  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42725  ac_status=$?
42726  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42727  test $ac_status = 0; }; then
42728  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
42729else
42730  pkg_failed=yes
42731fi
42732 else
42733    pkg_failed=untried
42734fi
42735
42736
42737
42738if test $pkg_failed = yes; then
42739
42740if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42741        _pkg_short_errors_supported=yes
42742else
42743        _pkg_short_errors_supported=no
42744fi
42745        if test $_pkg_short_errors_supported = yes; then
42746	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
42747        else
42748	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
42749        fi
42750	# Put the nasty error message in config.log where it belongs
42751	echo "$FREETYPE_PKG_ERRORS" >&5
42752
42753	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42754$as_echo "no" >&6; }
42755                FOUND_FREETYPE=no
42756elif test $pkg_failed = untried; then
42757	FOUND_FREETYPE=no
42758else
42759	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
42760	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
42761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42762$as_echo "yes" >&6; }
42763	FOUND_FREETYPE=yes
42764fi
42765          if test "x$FOUND_FREETYPE" = xyes; then
42766            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
42767            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
42768            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
42769            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42770              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
42771            fi
42772            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42773            if test "x$BUNDLE_FREETYPE" = xyes; then
42774              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
42775$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
42776              FOUND_FREETYPE=no
42777            else
42778              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42779$as_echo_n "checking for freetype... " >&6; }
42780              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
42781$as_echo "yes (using pkg-config)" >&6; }
42782            fi
42783          fi
42784        fi
42785      fi
42786
42787      if test "x$FOUND_FREETYPE" != xyes; then
42788        # Check in well-known locations
42789        if test "x$OPENJDK_TARGET_OS" = xwindows; then
42790          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
42791
42792  windows_path="$FREETYPE_BASE_DIR"
42793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42794    unix_path=`$CYGPATH -u "$windows_path"`
42795    FREETYPE_BASE_DIR="$unix_path"
42796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42798    FREETYPE_BASE_DIR="$unix_path"
42799  fi
42800
42801
42802  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
42803  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
42804  METHOD="well-known location"
42805
42806  # First check if the files exists.
42807  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
42808    # We found an arbitrary include file. That's a good sign.
42809    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
42810$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
42811    FOUND_FREETYPE=yes
42812
42813    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
42814    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
42815      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
42816$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
42817      FOUND_FREETYPE=no
42818    else
42819      if test "x$OPENJDK_TARGET_OS" = xwindows; then
42820        # On Windows, we will need both .lib and .dll file.
42821        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
42823$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
42824          FOUND_FREETYPE=no
42825        fi
42826      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
42827        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
42828        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
42829      fi
42830    fi
42831  fi
42832
42833  if test "x$FOUND_FREETYPE" = xyes; then
42834
42835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42836
42837  # Input might be given as Windows format, start by converting to
42838  # unix format.
42839  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42840  new_path=`$CYGPATH -u "$path"`
42841
42842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42845  # "foo.exe" is OK but "foo" is an error.
42846  #
42847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42848  # It is also a way to make sure we got the proper file name for the real test later on.
42849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42850  if test "x$test_shortpath" = x; then
42851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42853    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
42854  fi
42855
42856  # Call helper function which possibly converts this using DOS-style short mode.
42857  # If so, the updated path is stored in $new_path.
42858
42859  input_path="$new_path"
42860  # Check if we need to convert this using DOS-style short mode. If the path
42861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42862  # take no chances and rewrite it.
42863  # Note: m4 eats our [], so we need to use [ and ] instead.
42864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42865  if test "x$has_forbidden_chars" != x; then
42866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42870      # Going to short mode and back again did indeed matter. Since short mode is
42871      # case insensitive, let's make it lowercase to improve readability.
42872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42873      # Now convert it back to Unix-stile (cygpath)
42874      input_path=`$CYGPATH -u "$shortmode_path"`
42875      new_path="$input_path"
42876    fi
42877  fi
42878
42879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42880  if test "x$test_cygdrive_prefix" = x; then
42881    # As a simple fix, exclude /usr/bin since it's not a real path.
42882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42884      # a path prefixed by /cygdrive for fixpath to work.
42885      new_path="$CYGWIN_ROOT_PATH$input_path"
42886    fi
42887  fi
42888
42889
42890  if test "x$path" != "x$new_path"; then
42891    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42894  fi
42895
42896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42897
42898  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42899  has_colon=`$ECHO $path | $GREP ^.:`
42900  new_path="$path"
42901  if test "x$has_colon" = x; then
42902    # Not in mixed or Windows style, start by that.
42903    new_path=`cmd //c echo $path`
42904  fi
42905
42906
42907  input_path="$new_path"
42908  # Check if we need to convert this using DOS-style short mode. If the path
42909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42910  # take no chances and rewrite it.
42911  # Note: m4 eats our [], so we need to use [ and ] instead.
42912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42913  if test "x$has_forbidden_chars" != x; then
42914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42916  fi
42917
42918
42919  windows_path="$new_path"
42920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42921    unix_path=`$CYGPATH -u "$windows_path"`
42922    new_path="$unix_path"
42923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42925    new_path="$unix_path"
42926  fi
42927
42928  if test "x$path" != "x$new_path"; then
42929    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
42930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
42931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
42932  fi
42933
42934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42936
42937  else
42938    # We're on a posix platform. Hooray! :)
42939    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
42940    has_space=`$ECHO "$path" | $GREP " "`
42941    if test "x$has_space" != x; then
42942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
42943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
42944      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42945    fi
42946
42947    # Use eval to expand a potential ~
42948    eval path="$path"
42949    if test ! -f "$path" && test ! -d "$path"; then
42950      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
42951    fi
42952
42953    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
42954  fi
42955
42956
42957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42958
42959  # Input might be given as Windows format, start by converting to
42960  # unix format.
42961  path="$POTENTIAL_FREETYPE_LIB_PATH"
42962  new_path=`$CYGPATH -u "$path"`
42963
42964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42967  # "foo.exe" is OK but "foo" is an error.
42968  #
42969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42970  # It is also a way to make sure we got the proper file name for the real test later on.
42971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42972  if test "x$test_shortpath" = x; then
42973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
42974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
42975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
42976  fi
42977
42978  # Call helper function which possibly converts this using DOS-style short mode.
42979  # If so, the updated path is stored in $new_path.
42980
42981  input_path="$new_path"
42982  # Check if we need to convert this using DOS-style short mode. If the path
42983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42984  # take no chances and rewrite it.
42985  # Note: m4 eats our [], so we need to use [ and ] instead.
42986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42987  if test "x$has_forbidden_chars" != x; then
42988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42992      # Going to short mode and back again did indeed matter. Since short mode is
42993      # case insensitive, let's make it lowercase to improve readability.
42994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42995      # Now convert it back to Unix-stile (cygpath)
42996      input_path=`$CYGPATH -u "$shortmode_path"`
42997      new_path="$input_path"
42998    fi
42999  fi
43000
43001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43002  if test "x$test_cygdrive_prefix" = x; then
43003    # As a simple fix, exclude /usr/bin since it's not a real path.
43004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43006      # a path prefixed by /cygdrive for fixpath to work.
43007      new_path="$CYGWIN_ROOT_PATH$input_path"
43008    fi
43009  fi
43010
43011
43012  if test "x$path" != "x$new_path"; then
43013    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43016  fi
43017
43018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43019
43020  path="$POTENTIAL_FREETYPE_LIB_PATH"
43021  has_colon=`$ECHO $path | $GREP ^.:`
43022  new_path="$path"
43023  if test "x$has_colon" = x; then
43024    # Not in mixed or Windows style, start by that.
43025    new_path=`cmd //c echo $path`
43026  fi
43027
43028
43029  input_path="$new_path"
43030  # Check if we need to convert this using DOS-style short mode. If the path
43031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43032  # take no chances and rewrite it.
43033  # Note: m4 eats our [], so we need to use [ and ] instead.
43034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43035  if test "x$has_forbidden_chars" != x; then
43036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43038  fi
43039
43040
43041  windows_path="$new_path"
43042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43043    unix_path=`$CYGPATH -u "$windows_path"`
43044    new_path="$unix_path"
43045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43047    new_path="$unix_path"
43048  fi
43049
43050  if test "x$path" != "x$new_path"; then
43051    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43054  fi
43055
43056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43058
43059  else
43060    # We're on a posix platform. Hooray! :)
43061    path="$POTENTIAL_FREETYPE_LIB_PATH"
43062    has_space=`$ECHO "$path" | $GREP " "`
43063    if test "x$has_space" != x; then
43064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43066      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43067    fi
43068
43069    # Use eval to expand a potential ~
43070    eval path="$path"
43071    if test ! -f "$path" && test ! -d "$path"; then
43072      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43073    fi
43074
43075    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43076  fi
43077
43078
43079    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43081$as_echo_n "checking for freetype includes... " >&6; }
43082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43083$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43084    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43086$as_echo_n "checking for freetype libraries... " >&6; }
43087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43088$as_echo "$FREETYPE_LIB_PATH" >&6; }
43089  fi
43090
43091          if test "x$FOUND_FREETYPE" != xyes; then
43092            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
43093
43094  windows_path="$FREETYPE_BASE_DIR"
43095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43096    unix_path=`$CYGPATH -u "$windows_path"`
43097    FREETYPE_BASE_DIR="$unix_path"
43098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43100    FREETYPE_BASE_DIR="$unix_path"
43101  fi
43102
43103
43104  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43105  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43106  METHOD="well-known location"
43107
43108  # First check if the files exists.
43109  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43110    # We found an arbitrary include file. That's a good sign.
43111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43113    FOUND_FREETYPE=yes
43114
43115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43117      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43118$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43119      FOUND_FREETYPE=no
43120    else
43121      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43122        # On Windows, we will need both .lib and .dll file.
43123        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43124          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43126          FOUND_FREETYPE=no
43127        fi
43128      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
43129        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43130        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43131      fi
43132    fi
43133  fi
43134
43135  if test "x$FOUND_FREETYPE" = xyes; then
43136
43137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43138
43139  # Input might be given as Windows format, start by converting to
43140  # unix format.
43141  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43142  new_path=`$CYGPATH -u "$path"`
43143
43144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43147  # "foo.exe" is OK but "foo" is an error.
43148  #
43149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43150  # It is also a way to make sure we got the proper file name for the real test later on.
43151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43152  if test "x$test_shortpath" = x; then
43153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43155    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43156  fi
43157
43158  # Call helper function which possibly converts this using DOS-style short mode.
43159  # If so, the updated path is stored in $new_path.
43160
43161  input_path="$new_path"
43162  # Check if we need to convert this using DOS-style short mode. If the path
43163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43164  # take no chances and rewrite it.
43165  # Note: m4 eats our [], so we need to use [ and ] instead.
43166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43167  if test "x$has_forbidden_chars" != x; then
43168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43172      # Going to short mode and back again did indeed matter. Since short mode is
43173      # case insensitive, let's make it lowercase to improve readability.
43174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43175      # Now convert it back to Unix-stile (cygpath)
43176      input_path=`$CYGPATH -u "$shortmode_path"`
43177      new_path="$input_path"
43178    fi
43179  fi
43180
43181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43182  if test "x$test_cygdrive_prefix" = x; then
43183    # As a simple fix, exclude /usr/bin since it's not a real path.
43184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43186      # a path prefixed by /cygdrive for fixpath to work.
43187      new_path="$CYGWIN_ROOT_PATH$input_path"
43188    fi
43189  fi
43190
43191
43192  if test "x$path" != "x$new_path"; then
43193    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43195$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43196  fi
43197
43198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43199
43200  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43201  has_colon=`$ECHO $path | $GREP ^.:`
43202  new_path="$path"
43203  if test "x$has_colon" = x; then
43204    # Not in mixed or Windows style, start by that.
43205    new_path=`cmd //c echo $path`
43206  fi
43207
43208
43209  input_path="$new_path"
43210  # Check if we need to convert this using DOS-style short mode. If the path
43211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43212  # take no chances and rewrite it.
43213  # Note: m4 eats our [], so we need to use [ and ] instead.
43214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43215  if test "x$has_forbidden_chars" != x; then
43216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43218  fi
43219
43220
43221  windows_path="$new_path"
43222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43223    unix_path=`$CYGPATH -u "$windows_path"`
43224    new_path="$unix_path"
43225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43227    new_path="$unix_path"
43228  fi
43229
43230  if test "x$path" != "x$new_path"; then
43231    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43234  fi
43235
43236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43238
43239  else
43240    # We're on a posix platform. Hooray! :)
43241    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43242    has_space=`$ECHO "$path" | $GREP " "`
43243    if test "x$has_space" != x; then
43244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43246      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43247    fi
43248
43249    # Use eval to expand a potential ~
43250    eval path="$path"
43251    if test ! -f "$path" && test ! -d "$path"; then
43252      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43253    fi
43254
43255    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43256  fi
43257
43258
43259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43260
43261  # Input might be given as Windows format, start by converting to
43262  # unix format.
43263  path="$POTENTIAL_FREETYPE_LIB_PATH"
43264  new_path=`$CYGPATH -u "$path"`
43265
43266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43269  # "foo.exe" is OK but "foo" is an error.
43270  #
43271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43272  # It is also a way to make sure we got the proper file name for the real test later on.
43273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43274  if test "x$test_shortpath" = x; then
43275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43277    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43278  fi
43279
43280  # Call helper function which possibly converts this using DOS-style short mode.
43281  # If so, the updated path is stored in $new_path.
43282
43283  input_path="$new_path"
43284  # Check if we need to convert this using DOS-style short mode. If the path
43285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43286  # take no chances and rewrite it.
43287  # Note: m4 eats our [], so we need to use [ and ] instead.
43288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43289  if test "x$has_forbidden_chars" != x; then
43290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43294      # Going to short mode and back again did indeed matter. Since short mode is
43295      # case insensitive, let's make it lowercase to improve readability.
43296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43297      # Now convert it back to Unix-stile (cygpath)
43298      input_path=`$CYGPATH -u "$shortmode_path"`
43299      new_path="$input_path"
43300    fi
43301  fi
43302
43303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43304  if test "x$test_cygdrive_prefix" = x; then
43305    # As a simple fix, exclude /usr/bin since it's not a real path.
43306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43308      # a path prefixed by /cygdrive for fixpath to work.
43309      new_path="$CYGWIN_ROOT_PATH$input_path"
43310    fi
43311  fi
43312
43313
43314  if test "x$path" != "x$new_path"; then
43315    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43318  fi
43319
43320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43321
43322  path="$POTENTIAL_FREETYPE_LIB_PATH"
43323  has_colon=`$ECHO $path | $GREP ^.:`
43324  new_path="$path"
43325  if test "x$has_colon" = x; then
43326    # Not in mixed or Windows style, start by that.
43327    new_path=`cmd //c echo $path`
43328  fi
43329
43330
43331  input_path="$new_path"
43332  # Check if we need to convert this using DOS-style short mode. If the path
43333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43334  # take no chances and rewrite it.
43335  # Note: m4 eats our [], so we need to use [ and ] instead.
43336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43337  if test "x$has_forbidden_chars" != x; then
43338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43340  fi
43341
43342
43343  windows_path="$new_path"
43344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43345    unix_path=`$CYGPATH -u "$windows_path"`
43346    new_path="$unix_path"
43347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43349    new_path="$unix_path"
43350  fi
43351
43352  if test "x$path" != "x$new_path"; then
43353    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43356  fi
43357
43358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43360
43361  else
43362    # We're on a posix platform. Hooray! :)
43363    path="$POTENTIAL_FREETYPE_LIB_PATH"
43364    has_space=`$ECHO "$path" | $GREP " "`
43365    if test "x$has_space" != x; then
43366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43369    fi
43370
43371    # Use eval to expand a potential ~
43372    eval path="$path"
43373    if test ! -f "$path" && test ! -d "$path"; then
43374      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43375    fi
43376
43377    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43378  fi
43379
43380
43381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43383$as_echo_n "checking for freetype includes... " >&6; }
43384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43388$as_echo_n "checking for freetype libraries... " >&6; }
43389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43390$as_echo "$FREETYPE_LIB_PATH" >&6; }
43391  fi
43392
43393          fi
43394        else
43395          if test "x$SYS_ROOT" = "x/"; then
43396            FREETYPE_ROOT=
43397          else
43398            FREETYPE_ROOT="$SYS_ROOT"
43399          fi
43400          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
43401
43402  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43403  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43404  METHOD="well-known location"
43405
43406  # First check if the files exists.
43407  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43408    # We found an arbitrary include file. That's a good sign.
43409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43410$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43411    FOUND_FREETYPE=yes
43412
43413    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43414    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43415      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43417      FOUND_FREETYPE=no
43418    else
43419      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43420        # On Windows, we will need both .lib and .dll file.
43421        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43422          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43423$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43424          FOUND_FREETYPE=no
43425        fi
43426      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
43427        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43428        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43429      fi
43430    fi
43431  fi
43432
43433  if test "x$FOUND_FREETYPE" = xyes; then
43434
43435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43436
43437  # Input might be given as Windows format, start by converting to
43438  # unix format.
43439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43440  new_path=`$CYGPATH -u "$path"`
43441
43442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43445  # "foo.exe" is OK but "foo" is an error.
43446  #
43447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43448  # It is also a way to make sure we got the proper file name for the real test later on.
43449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43450  if test "x$test_shortpath" = x; then
43451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43454  fi
43455
43456  # Call helper function which possibly converts this using DOS-style short mode.
43457  # If so, the updated path is stored in $new_path.
43458
43459  input_path="$new_path"
43460  # Check if we need to convert this using DOS-style short mode. If the path
43461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43462  # take no chances and rewrite it.
43463  # Note: m4 eats our [], so we need to use [ and ] instead.
43464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43465  if test "x$has_forbidden_chars" != x; then
43466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43470      # Going to short mode and back again did indeed matter. Since short mode is
43471      # case insensitive, let's make it lowercase to improve readability.
43472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43473      # Now convert it back to Unix-stile (cygpath)
43474      input_path=`$CYGPATH -u "$shortmode_path"`
43475      new_path="$input_path"
43476    fi
43477  fi
43478
43479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43480  if test "x$test_cygdrive_prefix" = x; then
43481    # As a simple fix, exclude /usr/bin since it's not a real path.
43482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43484      # a path prefixed by /cygdrive for fixpath to work.
43485      new_path="$CYGWIN_ROOT_PATH$input_path"
43486    fi
43487  fi
43488
43489
43490  if test "x$path" != "x$new_path"; then
43491    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43494  fi
43495
43496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43497
43498  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43499  has_colon=`$ECHO $path | $GREP ^.:`
43500  new_path="$path"
43501  if test "x$has_colon" = x; then
43502    # Not in mixed or Windows style, start by that.
43503    new_path=`cmd //c echo $path`
43504  fi
43505
43506
43507  input_path="$new_path"
43508  # Check if we need to convert this using DOS-style short mode. If the path
43509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43510  # take no chances and rewrite it.
43511  # Note: m4 eats our [], so we need to use [ and ] instead.
43512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43513  if test "x$has_forbidden_chars" != x; then
43514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43516  fi
43517
43518
43519  windows_path="$new_path"
43520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43521    unix_path=`$CYGPATH -u "$windows_path"`
43522    new_path="$unix_path"
43523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43525    new_path="$unix_path"
43526  fi
43527
43528  if test "x$path" != "x$new_path"; then
43529    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43532  fi
43533
43534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43536
43537  else
43538    # We're on a posix platform. Hooray! :)
43539    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43540    has_space=`$ECHO "$path" | $GREP " "`
43541    if test "x$has_space" != x; then
43542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43544      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43545    fi
43546
43547    # Use eval to expand a potential ~
43548    eval path="$path"
43549    if test ! -f "$path" && test ! -d "$path"; then
43550      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43551    fi
43552
43553    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43554  fi
43555
43556
43557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43558
43559  # Input might be given as Windows format, start by converting to
43560  # unix format.
43561  path="$POTENTIAL_FREETYPE_LIB_PATH"
43562  new_path=`$CYGPATH -u "$path"`
43563
43564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43567  # "foo.exe" is OK but "foo" is an error.
43568  #
43569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43570  # It is also a way to make sure we got the proper file name for the real test later on.
43571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43572  if test "x$test_shortpath" = x; then
43573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43576  fi
43577
43578  # Call helper function which possibly converts this using DOS-style short mode.
43579  # If so, the updated path is stored in $new_path.
43580
43581  input_path="$new_path"
43582  # Check if we need to convert this using DOS-style short mode. If the path
43583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43584  # take no chances and rewrite it.
43585  # Note: m4 eats our [], so we need to use [ and ] instead.
43586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43587  if test "x$has_forbidden_chars" != x; then
43588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43592      # Going to short mode and back again did indeed matter. Since short mode is
43593      # case insensitive, let's make it lowercase to improve readability.
43594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43595      # Now convert it back to Unix-stile (cygpath)
43596      input_path=`$CYGPATH -u "$shortmode_path"`
43597      new_path="$input_path"
43598    fi
43599  fi
43600
43601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43602  if test "x$test_cygdrive_prefix" = x; then
43603    # As a simple fix, exclude /usr/bin since it's not a real path.
43604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43606      # a path prefixed by /cygdrive for fixpath to work.
43607      new_path="$CYGWIN_ROOT_PATH$input_path"
43608    fi
43609  fi
43610
43611
43612  if test "x$path" != "x$new_path"; then
43613    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43616  fi
43617
43618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43619
43620  path="$POTENTIAL_FREETYPE_LIB_PATH"
43621  has_colon=`$ECHO $path | $GREP ^.:`
43622  new_path="$path"
43623  if test "x$has_colon" = x; then
43624    # Not in mixed or Windows style, start by that.
43625    new_path=`cmd //c echo $path`
43626  fi
43627
43628
43629  input_path="$new_path"
43630  # Check if we need to convert this using DOS-style short mode. If the path
43631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43632  # take no chances and rewrite it.
43633  # Note: m4 eats our [], so we need to use [ and ] instead.
43634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43635  if test "x$has_forbidden_chars" != x; then
43636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43638  fi
43639
43640
43641  windows_path="$new_path"
43642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43643    unix_path=`$CYGPATH -u "$windows_path"`
43644    new_path="$unix_path"
43645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43647    new_path="$unix_path"
43648  fi
43649
43650  if test "x$path" != "x$new_path"; then
43651    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43654  fi
43655
43656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43658
43659  else
43660    # We're on a posix platform. Hooray! :)
43661    path="$POTENTIAL_FREETYPE_LIB_PATH"
43662    has_space=`$ECHO "$path" | $GREP " "`
43663    if test "x$has_space" != x; then
43664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43666      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43667    fi
43668
43669    # Use eval to expand a potential ~
43670    eval path="$path"
43671    if test ! -f "$path" && test ! -d "$path"; then
43672      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43673    fi
43674
43675    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43676  fi
43677
43678
43679    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43681$as_echo_n "checking for freetype includes... " >&6; }
43682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43683$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43684    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43686$as_echo_n "checking for freetype libraries... " >&6; }
43687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43688$as_echo "$FREETYPE_LIB_PATH" >&6; }
43689  fi
43690
43691
43692          if test "x$FOUND_FREETYPE" != xyes; then
43693            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
43694
43695  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43696  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43697  METHOD="well-known location"
43698
43699  # First check if the files exists.
43700  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43701    # We found an arbitrary include file. That's a good sign.
43702    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43703$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43704    FOUND_FREETYPE=yes
43705
43706    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43707    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43708      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43710      FOUND_FREETYPE=no
43711    else
43712      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43713        # On Windows, we will need both .lib and .dll file.
43714        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43715          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43717          FOUND_FREETYPE=no
43718        fi
43719      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43720        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43721        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43722      fi
43723    fi
43724  fi
43725
43726  if test "x$FOUND_FREETYPE" = xyes; then
43727
43728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729
43730  # Input might be given as Windows format, start by converting to
43731  # unix format.
43732  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43733  new_path=`$CYGPATH -u "$path"`
43734
43735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43738  # "foo.exe" is OK but "foo" is an error.
43739  #
43740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43741  # It is also a way to make sure we got the proper file name for the real test later on.
43742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43743  if test "x$test_shortpath" = x; then
43744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43747  fi
43748
43749  # Call helper function which possibly converts this using DOS-style short mode.
43750  # If so, the updated path is stored in $new_path.
43751
43752  input_path="$new_path"
43753  # Check if we need to convert this using DOS-style short mode. If the path
43754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43755  # take no chances and rewrite it.
43756  # Note: m4 eats our [], so we need to use [ and ] instead.
43757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43758  if test "x$has_forbidden_chars" != x; then
43759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43763      # Going to short mode and back again did indeed matter. Since short mode is
43764      # case insensitive, let's make it lowercase to improve readability.
43765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43766      # Now convert it back to Unix-stile (cygpath)
43767      input_path=`$CYGPATH -u "$shortmode_path"`
43768      new_path="$input_path"
43769    fi
43770  fi
43771
43772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43773  if test "x$test_cygdrive_prefix" = x; then
43774    # As a simple fix, exclude /usr/bin since it's not a real path.
43775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43777      # a path prefixed by /cygdrive for fixpath to work.
43778      new_path="$CYGWIN_ROOT_PATH$input_path"
43779    fi
43780  fi
43781
43782
43783  if test "x$path" != "x$new_path"; then
43784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43787  fi
43788
43789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43790
43791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43792  has_colon=`$ECHO $path | $GREP ^.:`
43793  new_path="$path"
43794  if test "x$has_colon" = x; then
43795    # Not in mixed or Windows style, start by that.
43796    new_path=`cmd //c echo $path`
43797  fi
43798
43799
43800  input_path="$new_path"
43801  # Check if we need to convert this using DOS-style short mode. If the path
43802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43803  # take no chances and rewrite it.
43804  # Note: m4 eats our [], so we need to use [ and ] instead.
43805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43806  if test "x$has_forbidden_chars" != x; then
43807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43809  fi
43810
43811
43812  windows_path="$new_path"
43813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43814    unix_path=`$CYGPATH -u "$windows_path"`
43815    new_path="$unix_path"
43816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43818    new_path="$unix_path"
43819  fi
43820
43821  if test "x$path" != "x$new_path"; then
43822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43825  fi
43826
43827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43829
43830  else
43831    # We're on a posix platform. Hooray! :)
43832    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43833    has_space=`$ECHO "$path" | $GREP " "`
43834    if test "x$has_space" != x; then
43835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43837      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43838    fi
43839
43840    # Use eval to expand a potential ~
43841    eval path="$path"
43842    if test ! -f "$path" && test ! -d "$path"; then
43843      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43844    fi
43845
43846    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43847  fi
43848
43849
43850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43851
43852  # Input might be given as Windows format, start by converting to
43853  # unix format.
43854  path="$POTENTIAL_FREETYPE_LIB_PATH"
43855  new_path=`$CYGPATH -u "$path"`
43856
43857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43860  # "foo.exe" is OK but "foo" is an error.
43861  #
43862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43863  # It is also a way to make sure we got the proper file name for the real test later on.
43864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43865  if test "x$test_shortpath" = x; then
43866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43869  fi
43870
43871  # Call helper function which possibly converts this using DOS-style short mode.
43872  # If so, the updated path is stored in $new_path.
43873
43874  input_path="$new_path"
43875  # Check if we need to convert this using DOS-style short mode. If the path
43876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43877  # take no chances and rewrite it.
43878  # Note: m4 eats our [], so we need to use [ and ] instead.
43879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43880  if test "x$has_forbidden_chars" != x; then
43881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43885      # Going to short mode and back again did indeed matter. Since short mode is
43886      # case insensitive, let's make it lowercase to improve readability.
43887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43888      # Now convert it back to Unix-stile (cygpath)
43889      input_path=`$CYGPATH -u "$shortmode_path"`
43890      new_path="$input_path"
43891    fi
43892  fi
43893
43894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43895  if test "x$test_cygdrive_prefix" = x; then
43896    # As a simple fix, exclude /usr/bin since it's not a real path.
43897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43899      # a path prefixed by /cygdrive for fixpath to work.
43900      new_path="$CYGWIN_ROOT_PATH$input_path"
43901    fi
43902  fi
43903
43904
43905  if test "x$path" != "x$new_path"; then
43906    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43909  fi
43910
43911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43912
43913  path="$POTENTIAL_FREETYPE_LIB_PATH"
43914  has_colon=`$ECHO $path | $GREP ^.:`
43915  new_path="$path"
43916  if test "x$has_colon" = x; then
43917    # Not in mixed or Windows style, start by that.
43918    new_path=`cmd //c echo $path`
43919  fi
43920
43921
43922  input_path="$new_path"
43923  # Check if we need to convert this using DOS-style short mode. If the path
43924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43925  # take no chances and rewrite it.
43926  # Note: m4 eats our [], so we need to use [ and ] instead.
43927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43928  if test "x$has_forbidden_chars" != x; then
43929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43931  fi
43932
43933
43934  windows_path="$new_path"
43935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936    unix_path=`$CYGPATH -u "$windows_path"`
43937    new_path="$unix_path"
43938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940    new_path="$unix_path"
43941  fi
43942
43943  if test "x$path" != "x$new_path"; then
43944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43947  fi
43948
43949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43951
43952  else
43953    # We're on a posix platform. Hooray! :)
43954    path="$POTENTIAL_FREETYPE_LIB_PATH"
43955    has_space=`$ECHO "$path" | $GREP " "`
43956    if test "x$has_space" != x; then
43957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43960    fi
43961
43962    # Use eval to expand a potential ~
43963    eval path="$path"
43964    if test ! -f "$path" && test ! -d "$path"; then
43965      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43966    fi
43967
43968    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43969  fi
43970
43971
43972    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43974$as_echo_n "checking for freetype includes... " >&6; }
43975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43976$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43977    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43979$as_echo_n "checking for freetype libraries... " >&6; }
43980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43981$as_echo "$FREETYPE_LIB_PATH" >&6; }
43982  fi
43983
43984          fi
43985
43986          if test "x$FOUND_FREETYPE" != xyes; then
43987            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
43988            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43989
43990  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43991  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
43992  METHOD="well-known location"
43993
43994  # First check if the files exists.
43995  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43996    # We found an arbitrary include file. That's a good sign.
43997    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43998$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43999    FOUND_FREETYPE=yes
44000
44001    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44002    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44003      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44004$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44005      FOUND_FREETYPE=no
44006    else
44007      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44008        # On Windows, we will need both .lib and .dll file.
44009        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44010          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44011$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44012          FOUND_FREETYPE=no
44013        fi
44014      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
44015        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44016        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44017      fi
44018    fi
44019  fi
44020
44021  if test "x$FOUND_FREETYPE" = xyes; then
44022
44023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44024
44025  # Input might be given as Windows format, start by converting to
44026  # unix format.
44027  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44028  new_path=`$CYGPATH -u "$path"`
44029
44030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44033  # "foo.exe" is OK but "foo" is an error.
44034  #
44035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44036  # It is also a way to make sure we got the proper file name for the real test later on.
44037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44038  if test "x$test_shortpath" = x; then
44039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44041    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44042  fi
44043
44044  # Call helper function which possibly converts this using DOS-style short mode.
44045  # If so, the updated path is stored in $new_path.
44046
44047  input_path="$new_path"
44048  # Check if we need to convert this using DOS-style short mode. If the path
44049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44050  # take no chances and rewrite it.
44051  # Note: m4 eats our [], so we need to use [ and ] instead.
44052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44053  if test "x$has_forbidden_chars" != x; then
44054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44058      # Going to short mode and back again did indeed matter. Since short mode is
44059      # case insensitive, let's make it lowercase to improve readability.
44060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44061      # Now convert it back to Unix-stile (cygpath)
44062      input_path=`$CYGPATH -u "$shortmode_path"`
44063      new_path="$input_path"
44064    fi
44065  fi
44066
44067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44068  if test "x$test_cygdrive_prefix" = x; then
44069    # As a simple fix, exclude /usr/bin since it's not a real path.
44070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44072      # a path prefixed by /cygdrive for fixpath to work.
44073      new_path="$CYGWIN_ROOT_PATH$input_path"
44074    fi
44075  fi
44076
44077
44078  if test "x$path" != "x$new_path"; then
44079    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44082  fi
44083
44084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44085
44086  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44087  has_colon=`$ECHO $path | $GREP ^.:`
44088  new_path="$path"
44089  if test "x$has_colon" = x; then
44090    # Not in mixed or Windows style, start by that.
44091    new_path=`cmd //c echo $path`
44092  fi
44093
44094
44095  input_path="$new_path"
44096  # Check if we need to convert this using DOS-style short mode. If the path
44097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44098  # take no chances and rewrite it.
44099  # Note: m4 eats our [], so we need to use [ and ] instead.
44100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44101  if test "x$has_forbidden_chars" != x; then
44102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44104  fi
44105
44106
44107  windows_path="$new_path"
44108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44109    unix_path=`$CYGPATH -u "$windows_path"`
44110    new_path="$unix_path"
44111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44113    new_path="$unix_path"
44114  fi
44115
44116  if test "x$path" != "x$new_path"; then
44117    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44120  fi
44121
44122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44124
44125  else
44126    # We're on a posix platform. Hooray! :)
44127    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44128    has_space=`$ECHO "$path" | $GREP " "`
44129    if test "x$has_space" != x; then
44130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44132      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44133    fi
44134
44135    # Use eval to expand a potential ~
44136    eval path="$path"
44137    if test ! -f "$path" && test ! -d "$path"; then
44138      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44139    fi
44140
44141    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44142  fi
44143
44144
44145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44146
44147  # Input might be given as Windows format, start by converting to
44148  # unix format.
44149  path="$POTENTIAL_FREETYPE_LIB_PATH"
44150  new_path=`$CYGPATH -u "$path"`
44151
44152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44155  # "foo.exe" is OK but "foo" is an error.
44156  #
44157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44158  # It is also a way to make sure we got the proper file name for the real test later on.
44159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44160  if test "x$test_shortpath" = x; then
44161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44163    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44164  fi
44165
44166  # Call helper function which possibly converts this using DOS-style short mode.
44167  # If so, the updated path is stored in $new_path.
44168
44169  input_path="$new_path"
44170  # Check if we need to convert this using DOS-style short mode. If the path
44171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44172  # take no chances and rewrite it.
44173  # Note: m4 eats our [], so we need to use [ and ] instead.
44174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44175  if test "x$has_forbidden_chars" != x; then
44176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44180      # Going to short mode and back again did indeed matter. Since short mode is
44181      # case insensitive, let's make it lowercase to improve readability.
44182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44183      # Now convert it back to Unix-stile (cygpath)
44184      input_path=`$CYGPATH -u "$shortmode_path"`
44185      new_path="$input_path"
44186    fi
44187  fi
44188
44189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44190  if test "x$test_cygdrive_prefix" = x; then
44191    # As a simple fix, exclude /usr/bin since it's not a real path.
44192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44194      # a path prefixed by /cygdrive for fixpath to work.
44195      new_path="$CYGWIN_ROOT_PATH$input_path"
44196    fi
44197  fi
44198
44199
44200  if test "x$path" != "x$new_path"; then
44201    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44204  fi
44205
44206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44207
44208  path="$POTENTIAL_FREETYPE_LIB_PATH"
44209  has_colon=`$ECHO $path | $GREP ^.:`
44210  new_path="$path"
44211  if test "x$has_colon" = x; then
44212    # Not in mixed or Windows style, start by that.
44213    new_path=`cmd //c echo $path`
44214  fi
44215
44216
44217  input_path="$new_path"
44218  # Check if we need to convert this using DOS-style short mode. If the path
44219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44220  # take no chances and rewrite it.
44221  # Note: m4 eats our [], so we need to use [ and ] instead.
44222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44223  if test "x$has_forbidden_chars" != x; then
44224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44226  fi
44227
44228
44229  windows_path="$new_path"
44230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44231    unix_path=`$CYGPATH -u "$windows_path"`
44232    new_path="$unix_path"
44233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44235    new_path="$unix_path"
44236  fi
44237
44238  if test "x$path" != "x$new_path"; then
44239    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44242  fi
44243
44244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44246
44247  else
44248    # We're on a posix platform. Hooray! :)
44249    path="$POTENTIAL_FREETYPE_LIB_PATH"
44250    has_space=`$ECHO "$path" | $GREP " "`
44251    if test "x$has_space" != x; then
44252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44254      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44255    fi
44256
44257    # Use eval to expand a potential ~
44258    eval path="$path"
44259    if test ! -f "$path" && test ! -d "$path"; then
44260      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44261    fi
44262
44263    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44264  fi
44265
44266
44267    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44269$as_echo_n "checking for freetype includes... " >&6; }
44270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44271$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44272    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44274$as_echo_n "checking for freetype libraries... " >&6; }
44275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44276$as_echo "$FREETYPE_LIB_PATH" >&6; }
44277  fi
44278
44279            else
44280
44281  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44282  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
44283  METHOD="well-known location"
44284
44285  # First check if the files exists.
44286  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44287    # We found an arbitrary include file. That's a good sign.
44288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44289$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44290    FOUND_FREETYPE=yes
44291
44292    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44293    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44295$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44296      FOUND_FREETYPE=no
44297    else
44298      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44299        # On Windows, we will need both .lib and .dll file.
44300        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44301          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44303          FOUND_FREETYPE=no
44304        fi
44305      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44306        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44307        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44308      fi
44309    fi
44310  fi
44311
44312  if test "x$FOUND_FREETYPE" = xyes; then
44313
44314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44315
44316  # Input might be given as Windows format, start by converting to
44317  # unix format.
44318  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44319  new_path=`$CYGPATH -u "$path"`
44320
44321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44324  # "foo.exe" is OK but "foo" is an error.
44325  #
44326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44327  # It is also a way to make sure we got the proper file name for the real test later on.
44328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44329  if test "x$test_shortpath" = x; then
44330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44333  fi
44334
44335  # Call helper function which possibly converts this using DOS-style short mode.
44336  # If so, the updated path is stored in $new_path.
44337
44338  input_path="$new_path"
44339  # Check if we need to convert this using DOS-style short mode. If the path
44340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44341  # take no chances and rewrite it.
44342  # Note: m4 eats our [], so we need to use [ and ] instead.
44343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44344  if test "x$has_forbidden_chars" != x; then
44345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44349      # Going to short mode and back again did indeed matter. Since short mode is
44350      # case insensitive, let's make it lowercase to improve readability.
44351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44352      # Now convert it back to Unix-stile (cygpath)
44353      input_path=`$CYGPATH -u "$shortmode_path"`
44354      new_path="$input_path"
44355    fi
44356  fi
44357
44358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44359  if test "x$test_cygdrive_prefix" = x; then
44360    # As a simple fix, exclude /usr/bin since it's not a real path.
44361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44363      # a path prefixed by /cygdrive for fixpath to work.
44364      new_path="$CYGWIN_ROOT_PATH$input_path"
44365    fi
44366  fi
44367
44368
44369  if test "x$path" != "x$new_path"; then
44370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44373  fi
44374
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376
44377  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44378  has_colon=`$ECHO $path | $GREP ^.:`
44379  new_path="$path"
44380  if test "x$has_colon" = x; then
44381    # Not in mixed or Windows style, start by that.
44382    new_path=`cmd //c echo $path`
44383  fi
44384
44385
44386  input_path="$new_path"
44387  # Check if we need to convert this using DOS-style short mode. If the path
44388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44389  # take no chances and rewrite it.
44390  # Note: m4 eats our [], so we need to use [ and ] instead.
44391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44392  if test "x$has_forbidden_chars" != x; then
44393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44395  fi
44396
44397
44398  windows_path="$new_path"
44399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44400    unix_path=`$CYGPATH -u "$windows_path"`
44401    new_path="$unix_path"
44402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44404    new_path="$unix_path"
44405  fi
44406
44407  if test "x$path" != "x$new_path"; then
44408    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44411  fi
44412
44413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44415
44416  else
44417    # We're on a posix platform. Hooray! :)
44418    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44419    has_space=`$ECHO "$path" | $GREP " "`
44420    if test "x$has_space" != x; then
44421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44423      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44424    fi
44425
44426    # Use eval to expand a potential ~
44427    eval path="$path"
44428    if test ! -f "$path" && test ! -d "$path"; then
44429      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44430    fi
44431
44432    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44433  fi
44434
44435
44436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44437
44438  # Input might be given as Windows format, start by converting to
44439  # unix format.
44440  path="$POTENTIAL_FREETYPE_LIB_PATH"
44441  new_path=`$CYGPATH -u "$path"`
44442
44443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44446  # "foo.exe" is OK but "foo" is an error.
44447  #
44448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44449  # It is also a way to make sure we got the proper file name for the real test later on.
44450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44451  if test "x$test_shortpath" = x; then
44452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44455  fi
44456
44457  # Call helper function which possibly converts this using DOS-style short mode.
44458  # If so, the updated path is stored in $new_path.
44459
44460  input_path="$new_path"
44461  # Check if we need to convert this using DOS-style short mode. If the path
44462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44463  # take no chances and rewrite it.
44464  # Note: m4 eats our [], so we need to use [ and ] instead.
44465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44466  if test "x$has_forbidden_chars" != x; then
44467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44471      # Going to short mode and back again did indeed matter. Since short mode is
44472      # case insensitive, let's make it lowercase to improve readability.
44473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44474      # Now convert it back to Unix-stile (cygpath)
44475      input_path=`$CYGPATH -u "$shortmode_path"`
44476      new_path="$input_path"
44477    fi
44478  fi
44479
44480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44481  if test "x$test_cygdrive_prefix" = x; then
44482    # As a simple fix, exclude /usr/bin since it's not a real path.
44483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44485      # a path prefixed by /cygdrive for fixpath to work.
44486      new_path="$CYGWIN_ROOT_PATH$input_path"
44487    fi
44488  fi
44489
44490
44491  if test "x$path" != "x$new_path"; then
44492    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44495  fi
44496
44497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44498
44499  path="$POTENTIAL_FREETYPE_LIB_PATH"
44500  has_colon=`$ECHO $path | $GREP ^.:`
44501  new_path="$path"
44502  if test "x$has_colon" = x; then
44503    # Not in mixed or Windows style, start by that.
44504    new_path=`cmd //c echo $path`
44505  fi
44506
44507
44508  input_path="$new_path"
44509  # Check if we need to convert this using DOS-style short mode. If the path
44510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44511  # take no chances and rewrite it.
44512  # Note: m4 eats our [], so we need to use [ and ] instead.
44513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44514  if test "x$has_forbidden_chars" != x; then
44515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44517  fi
44518
44519
44520  windows_path="$new_path"
44521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44522    unix_path=`$CYGPATH -u "$windows_path"`
44523    new_path="$unix_path"
44524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44526    new_path="$unix_path"
44527  fi
44528
44529  if test "x$path" != "x$new_path"; then
44530    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44533  fi
44534
44535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44537
44538  else
44539    # We're on a posix platform. Hooray! :)
44540    path="$POTENTIAL_FREETYPE_LIB_PATH"
44541    has_space=`$ECHO "$path" | $GREP " "`
44542    if test "x$has_space" != x; then
44543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44546    fi
44547
44548    # Use eval to expand a potential ~
44549    eval path="$path"
44550    if test ! -f "$path" && test ! -d "$path"; then
44551      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44552    fi
44553
44554    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44555  fi
44556
44557
44558    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44560$as_echo_n "checking for freetype includes... " >&6; }
44561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44562$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44563    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44565$as_echo_n "checking for freetype libraries... " >&6; }
44566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44567$as_echo "$FREETYPE_LIB_PATH" >&6; }
44568  fi
44569
44570              if test "x$FOUND_FREETYPE" != xyes; then
44571
44572  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44573  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
44574  METHOD="well-known location"
44575
44576  # First check if the files exists.
44577  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44578    # We found an arbitrary include file. That's a good sign.
44579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44580$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44581    FOUND_FREETYPE=yes
44582
44583    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44584    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44585      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44586$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44587      FOUND_FREETYPE=no
44588    else
44589      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44590        # On Windows, we will need both .lib and .dll file.
44591        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44592          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44593$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44594          FOUND_FREETYPE=no
44595        fi
44596      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
44597        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44598        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44599      fi
44600    fi
44601  fi
44602
44603  if test "x$FOUND_FREETYPE" = xyes; then
44604
44605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44606
44607  # Input might be given as Windows format, start by converting to
44608  # unix format.
44609  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44610  new_path=`$CYGPATH -u "$path"`
44611
44612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44615  # "foo.exe" is OK but "foo" is an error.
44616  #
44617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44618  # It is also a way to make sure we got the proper file name for the real test later on.
44619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44620  if test "x$test_shortpath" = x; then
44621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44624  fi
44625
44626  # Call helper function which possibly converts this using DOS-style short mode.
44627  # If so, the updated path is stored in $new_path.
44628
44629  input_path="$new_path"
44630  # Check if we need to convert this using DOS-style short mode. If the path
44631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44632  # take no chances and rewrite it.
44633  # Note: m4 eats our [], so we need to use [ and ] instead.
44634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44635  if test "x$has_forbidden_chars" != x; then
44636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44640      # Going to short mode and back again did indeed matter. Since short mode is
44641      # case insensitive, let's make it lowercase to improve readability.
44642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44643      # Now convert it back to Unix-stile (cygpath)
44644      input_path=`$CYGPATH -u "$shortmode_path"`
44645      new_path="$input_path"
44646    fi
44647  fi
44648
44649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44650  if test "x$test_cygdrive_prefix" = x; then
44651    # As a simple fix, exclude /usr/bin since it's not a real path.
44652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44654      # a path prefixed by /cygdrive for fixpath to work.
44655      new_path="$CYGWIN_ROOT_PATH$input_path"
44656    fi
44657  fi
44658
44659
44660  if test "x$path" != "x$new_path"; then
44661    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44664  fi
44665
44666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44667
44668  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44669  has_colon=`$ECHO $path | $GREP ^.:`
44670  new_path="$path"
44671  if test "x$has_colon" = x; then
44672    # Not in mixed or Windows style, start by that.
44673    new_path=`cmd //c echo $path`
44674  fi
44675
44676
44677  input_path="$new_path"
44678  # Check if we need to convert this using DOS-style short mode. If the path
44679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44680  # take no chances and rewrite it.
44681  # Note: m4 eats our [], so we need to use [ and ] instead.
44682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44683  if test "x$has_forbidden_chars" != x; then
44684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44686  fi
44687
44688
44689  windows_path="$new_path"
44690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44691    unix_path=`$CYGPATH -u "$windows_path"`
44692    new_path="$unix_path"
44693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44695    new_path="$unix_path"
44696  fi
44697
44698  if test "x$path" != "x$new_path"; then
44699    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44702  fi
44703
44704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44706
44707  else
44708    # We're on a posix platform. Hooray! :)
44709    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44710    has_space=`$ECHO "$path" | $GREP " "`
44711    if test "x$has_space" != x; then
44712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44714      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44715    fi
44716
44717    # Use eval to expand a potential ~
44718    eval path="$path"
44719    if test ! -f "$path" && test ! -d "$path"; then
44720      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44721    fi
44722
44723    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44724  fi
44725
44726
44727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44728
44729  # Input might be given as Windows format, start by converting to
44730  # unix format.
44731  path="$POTENTIAL_FREETYPE_LIB_PATH"
44732  new_path=`$CYGPATH -u "$path"`
44733
44734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44737  # "foo.exe" is OK but "foo" is an error.
44738  #
44739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44740  # It is also a way to make sure we got the proper file name for the real test later on.
44741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44742  if test "x$test_shortpath" = x; then
44743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44745    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44746  fi
44747
44748  # Call helper function which possibly converts this using DOS-style short mode.
44749  # If so, the updated path is stored in $new_path.
44750
44751  input_path="$new_path"
44752  # Check if we need to convert this using DOS-style short mode. If the path
44753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44754  # take no chances and rewrite it.
44755  # Note: m4 eats our [], so we need to use [ and ] instead.
44756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44757  if test "x$has_forbidden_chars" != x; then
44758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44762      # Going to short mode and back again did indeed matter. Since short mode is
44763      # case insensitive, let's make it lowercase to improve readability.
44764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44765      # Now convert it back to Unix-stile (cygpath)
44766      input_path=`$CYGPATH -u "$shortmode_path"`
44767      new_path="$input_path"
44768    fi
44769  fi
44770
44771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44772  if test "x$test_cygdrive_prefix" = x; then
44773    # As a simple fix, exclude /usr/bin since it's not a real path.
44774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44776      # a path prefixed by /cygdrive for fixpath to work.
44777      new_path="$CYGWIN_ROOT_PATH$input_path"
44778    fi
44779  fi
44780
44781
44782  if test "x$path" != "x$new_path"; then
44783    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44786  fi
44787
44788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44789
44790  path="$POTENTIAL_FREETYPE_LIB_PATH"
44791  has_colon=`$ECHO $path | $GREP ^.:`
44792  new_path="$path"
44793  if test "x$has_colon" = x; then
44794    # Not in mixed or Windows style, start by that.
44795    new_path=`cmd //c echo $path`
44796  fi
44797
44798
44799  input_path="$new_path"
44800  # Check if we need to convert this using DOS-style short mode. If the path
44801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44802  # take no chances and rewrite it.
44803  # Note: m4 eats our [], so we need to use [ and ] instead.
44804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44805  if test "x$has_forbidden_chars" != x; then
44806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44808  fi
44809
44810
44811  windows_path="$new_path"
44812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44813    unix_path=`$CYGPATH -u "$windows_path"`
44814    new_path="$unix_path"
44815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44817    new_path="$unix_path"
44818  fi
44819
44820  if test "x$path" != "x$new_path"; then
44821    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44824  fi
44825
44826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44828
44829  else
44830    # We're on a posix platform. Hooray! :)
44831    path="$POTENTIAL_FREETYPE_LIB_PATH"
44832    has_space=`$ECHO "$path" | $GREP " "`
44833    if test "x$has_space" != x; then
44834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44836      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44837    fi
44838
44839    # Use eval to expand a potential ~
44840    eval path="$path"
44841    if test ! -f "$path" && test ! -d "$path"; then
44842      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44843    fi
44844
44845    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44846  fi
44847
44848
44849    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44851$as_echo_n "checking for freetype includes... " >&6; }
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44853$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44854    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44856$as_echo_n "checking for freetype libraries... " >&6; }
44857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44858$as_echo "$FREETYPE_LIB_PATH" >&6; }
44859  fi
44860
44861              fi
44862            fi
44863          fi
44864        fi
44865      fi # end check in well-known locations
44866
44867      if test "x$FOUND_FREETYPE" != xyes; then
44868
44869  # Print a helpful message on how to acquire the necessary build dependency.
44870  # freetype is the help tag: freetype, cups, pulse, alsa etc
44871  MISSING_DEPENDENCY=freetype
44872
44873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44874    cygwin_help $MISSING_DEPENDENCY
44875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44876    msys_help $MISSING_DEPENDENCY
44877  else
44878    PKGHANDLER_COMMAND=
44879
44880    case $PKGHANDLER in
44881      apt-get)
44882        apt_help     $MISSING_DEPENDENCY ;;
44883      yum)
44884        yum_help     $MISSING_DEPENDENCY ;;
44885      port)
44886        port_help    $MISSING_DEPENDENCY ;;
44887      pkgutil)
44888        pkgutil_help $MISSING_DEPENDENCY ;;
44889      pkgadd)
44890        pkgadd_help  $MISSING_DEPENDENCY ;;
44891    esac
44892
44893    if test "x$PKGHANDLER_COMMAND" != x; then
44894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44895    fi
44896  fi
44897
44898        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
44899      fi
44900    fi # end user specified settings
44901
44902    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
44903    if test "x$FREETYPE_CFLAGS" = x; then
44904
44905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44906
44907  # Input might be given as Windows format, start by converting to
44908  # unix format.
44909  path="$FREETYPE_INCLUDE_PATH"
44910  new_path=`$CYGPATH -u "$path"`
44911
44912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44915  # "foo.exe" is OK but "foo" is an error.
44916  #
44917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44918  # It is also a way to make sure we got the proper file name for the real test later on.
44919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44920  if test "x$test_shortpath" = x; then
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44922$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44923    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
44924  fi
44925
44926  # Call helper function which possibly converts this using DOS-style short mode.
44927  # If so, the updated path is stored in $new_path.
44928
44929  input_path="$new_path"
44930  # Check if we need to convert this using DOS-style short mode. If the path
44931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44932  # take no chances and rewrite it.
44933  # Note: m4 eats our [], so we need to use [ and ] instead.
44934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44935  if test "x$has_forbidden_chars" != x; then
44936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44940      # Going to short mode and back again did indeed matter. Since short mode is
44941      # case insensitive, let's make it lowercase to improve readability.
44942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44943      # Now convert it back to Unix-stile (cygpath)
44944      input_path=`$CYGPATH -u "$shortmode_path"`
44945      new_path="$input_path"
44946    fi
44947  fi
44948
44949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44950  if test "x$test_cygdrive_prefix" = x; then
44951    # As a simple fix, exclude /usr/bin since it's not a real path.
44952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44954      # a path prefixed by /cygdrive for fixpath to work.
44955      new_path="$CYGWIN_ROOT_PATH$input_path"
44956    fi
44957  fi
44958
44959
44960  if test "x$path" != "x$new_path"; then
44961    FREETYPE_INCLUDE_PATH="$new_path"
44962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44963$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44964  fi
44965
44966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44967
44968  path="$FREETYPE_INCLUDE_PATH"
44969  has_colon=`$ECHO $path | $GREP ^.:`
44970  new_path="$path"
44971  if test "x$has_colon" = x; then
44972    # Not in mixed or Windows style, start by that.
44973    new_path=`cmd //c echo $path`
44974  fi
44975
44976
44977  input_path="$new_path"
44978  # Check if we need to convert this using DOS-style short mode. If the path
44979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44980  # take no chances and rewrite it.
44981  # Note: m4 eats our [], so we need to use [ and ] instead.
44982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44983  if test "x$has_forbidden_chars" != x; then
44984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44986  fi
44987
44988
44989  windows_path="$new_path"
44990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44991    unix_path=`$CYGPATH -u "$windows_path"`
44992    new_path="$unix_path"
44993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44995    new_path="$unix_path"
44996  fi
44997
44998  if test "x$path" != "x$new_path"; then
44999    FREETYPE_INCLUDE_PATH="$new_path"
45000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45001$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45002  fi
45003
45004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45006
45007  else
45008    # We're on a posix platform. Hooray! :)
45009    path="$FREETYPE_INCLUDE_PATH"
45010    has_space=`$ECHO "$path" | $GREP " "`
45011    if test "x$has_space" != x; then
45012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45013$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45014      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45015    fi
45016
45017    # Use eval to expand a potential ~
45018    eval path="$path"
45019    if test ! -f "$path" && test ! -d "$path"; then
45020      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45021    fi
45022
45023    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45024  fi
45025
45026      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
45027        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
45028      else
45029        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
45030      fi
45031    fi
45032
45033    if test "x$FREETYPE_LIBS" = x; then
45034
45035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45036
45037  # Input might be given as Windows format, start by converting to
45038  # unix format.
45039  path="$FREETYPE_LIB_PATH"
45040  new_path=`$CYGPATH -u "$path"`
45041
45042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45045  # "foo.exe" is OK but "foo" is an error.
45046  #
45047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45048  # It is also a way to make sure we got the proper file name for the real test later on.
45049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45050  if test "x$test_shortpath" = x; then
45051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45052$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45053    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
45054  fi
45055
45056  # Call helper function which possibly converts this using DOS-style short mode.
45057  # If so, the updated path is stored in $new_path.
45058
45059  input_path="$new_path"
45060  # Check if we need to convert this using DOS-style short mode. If the path
45061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45062  # take no chances and rewrite it.
45063  # Note: m4 eats our [], so we need to use [ and ] instead.
45064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45065  if test "x$has_forbidden_chars" != x; then
45066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45070      # Going to short mode and back again did indeed matter. Since short mode is
45071      # case insensitive, let's make it lowercase to improve readability.
45072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45073      # Now convert it back to Unix-stile (cygpath)
45074      input_path=`$CYGPATH -u "$shortmode_path"`
45075      new_path="$input_path"
45076    fi
45077  fi
45078
45079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45080  if test "x$test_cygdrive_prefix" = x; then
45081    # As a simple fix, exclude /usr/bin since it's not a real path.
45082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45084      # a path prefixed by /cygdrive for fixpath to work.
45085      new_path="$CYGWIN_ROOT_PATH$input_path"
45086    fi
45087  fi
45088
45089
45090  if test "x$path" != "x$new_path"; then
45091    FREETYPE_LIB_PATH="$new_path"
45092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
45093$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45094  fi
45095
45096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45097
45098  path="$FREETYPE_LIB_PATH"
45099  has_colon=`$ECHO $path | $GREP ^.:`
45100  new_path="$path"
45101  if test "x$has_colon" = x; then
45102    # Not in mixed or Windows style, start by that.
45103    new_path=`cmd //c echo $path`
45104  fi
45105
45106
45107  input_path="$new_path"
45108  # Check if we need to convert this using DOS-style short mode. If the path
45109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45110  # take no chances and rewrite it.
45111  # Note: m4 eats our [], so we need to use [ and ] instead.
45112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45113  if test "x$has_forbidden_chars" != x; then
45114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45116  fi
45117
45118
45119  windows_path="$new_path"
45120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45121    unix_path=`$CYGPATH -u "$windows_path"`
45122    new_path="$unix_path"
45123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45125    new_path="$unix_path"
45126  fi
45127
45128  if test "x$path" != "x$new_path"; then
45129    FREETYPE_LIB_PATH="$new_path"
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
45131$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45132  fi
45133
45134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45136
45137  else
45138    # We're on a posix platform. Hooray! :)
45139    path="$FREETYPE_LIB_PATH"
45140    has_space=`$ECHO "$path" | $GREP " "`
45141    if test "x$has_space" != x; then
45142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45143$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45144      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45145    fi
45146
45147    # Use eval to expand a potential ~
45148    eval path="$path"
45149    if test ! -f "$path" && test ! -d "$path"; then
45150      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45151    fi
45152
45153    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45154  fi
45155
45156      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45157        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
45158      else
45159        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
45160      fi
45161    fi
45162
45163    # Try to compile it
45164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
45165$as_echo_n "checking if we can compile and link with freetype... " >&6; }
45166    ac_ext=cpp
45167ac_cpp='$CXXCPP $CPPFLAGS'
45168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45171
45172    PREV_CXXCFLAGS="$CXXFLAGS"
45173    PREV_LIBS="$LIBS"
45174    PREV_CXX="$CXX"
45175    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
45176    LIBS="$LIBS $FREETYPE_LIBS"
45177    CXX="$FIXPATH $CXX"
45178    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45179/* end confdefs.h.  */
45180
45181          #include<ft2build.h>
45182          #include FT_FREETYPE_H
45183          int main () {
45184            FT_Init_FreeType(NULL);
45185            return 0;
45186          }
45187
45188_ACEOF
45189if ac_fn_cxx_try_link "$LINENO"; then :
45190
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45192$as_echo "yes" >&6; }
45193
45194else
45195
45196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45197$as_echo "no" >&6; }
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
45199$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
45201$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
45202
45203
45204  # Print a helpful message on how to acquire the necessary build dependency.
45205  # freetype is the help tag: freetype, cups, pulse, alsa etc
45206  MISSING_DEPENDENCY=freetype
45207
45208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45209    cygwin_help $MISSING_DEPENDENCY
45210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45211    msys_help $MISSING_DEPENDENCY
45212  else
45213    PKGHANDLER_COMMAND=
45214
45215    case $PKGHANDLER in
45216      apt-get)
45217        apt_help     $MISSING_DEPENDENCY ;;
45218      yum)
45219        yum_help     $MISSING_DEPENDENCY ;;
45220      port)
45221        port_help    $MISSING_DEPENDENCY ;;
45222      pkgutil)
45223        pkgutil_help $MISSING_DEPENDENCY ;;
45224      pkgadd)
45225        pkgadd_help  $MISSING_DEPENDENCY ;;
45226    esac
45227
45228    if test "x$PKGHANDLER_COMMAND" != x; then
45229      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45230    fi
45231  fi
45232
45233
45234          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
45235
45236
45237fi
45238rm -f core conftest.err conftest.$ac_objext \
45239    conftest$ac_exeext conftest.$ac_ext
45240    CXXCFLAGS="$PREV_CXXFLAGS"
45241    LIBS="$PREV_LIBS"
45242    CXX="$PREV_CXX"
45243    ac_ext=cpp
45244ac_cpp='$CXXCPP $CPPFLAGS'
45245ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45246ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45247ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45248
45249
45250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
45251$as_echo_n "checking if we should bundle freetype... " >&6; }
45252    if test "x$BUNDLE_FREETYPE" = xyes; then
45253      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
45254    fi
45255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
45256$as_echo "$BUNDLE_FREETYPE" >&6; }
45257
45258  fi # end freetype needed
45259
45260
45261
45262
45263
45264
45265
45266  ###############################################################################
45267  #
45268  # Check for alsa headers and libraries. Used on Linux/GNU systems.
45269  #
45270
45271# Check whether --with-alsa was given.
45272if test "${with_alsa+set}" = set; then :
45273  withval=$with_alsa;
45274fi
45275
45276
45277# Check whether --with-alsa-include was given.
45278if test "${with_alsa_include+set}" = set; then :
45279  withval=$with_alsa_include;
45280fi
45281
45282
45283# Check whether --with-alsa-lib was given.
45284if test "${with_alsa_lib+set}" = set; then :
45285  withval=$with_alsa_lib;
45286fi
45287
45288
45289  if test "x$ALSA_NOT_NEEDED" = xyes; then
45290    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
45291      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
45292$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
45293    fi
45294    ALSA_CFLAGS=
45295    ALSA_LIBS=
45296  else
45297    ALSA_FOUND=no
45298
45299    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
45300      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
45301    fi
45302
45303    if test "x${with_alsa}" != x; then
45304      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
45305      ALSA_CFLAGS="-I${with_alsa}/include"
45306      ALSA_FOUND=yes
45307    fi
45308    if test "x${with_alsa_include}" != x; then
45309      ALSA_CFLAGS="-I${with_alsa_include}"
45310      ALSA_FOUND=yes
45311    fi
45312    if test "x${with_alsa_lib}" != x; then
45313      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
45314      ALSA_FOUND=yes
45315    fi
45316    if test "x$ALSA_FOUND" = xno; then
45317
45318
45319  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45320    # Source the builddeps file again, to make sure it uses the latest variables!
45321    . $builddepsfile
45322    # Look for a target and build machine specific resource!
45323    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45324    if test "x$resource" = x; then
45325      # Ok, lets instead look for a target specific resource
45326      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
45327    fi
45328    if test "x$resource" = x; then
45329      # Ok, lets instead look for a build specific resource
45330      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
45331    fi
45332    if test "x$resource" = x; then
45333      # Ok, lets instead look for a generic resource
45334      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
45335      resource=${builddep_alsa}
45336    fi
45337    if test "x$resource" != x; then
45338      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
45339$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
45340      # If the resource in the builddeps.conf file is an existing directory,
45341      # for example /java/linux/cups
45342      if test -d ${resource}; then
45343        depdir=${resource}
45344      else
45345
45346  # alsa is for example mymodule
45347  # $resource is for example libs/general/libmymod_1_2_3.zip
45348  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45349  # $with_builddeps_dir is for example /localhome/builddeps
45350  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45351  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45352  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45353  filename=`basename $resource`
45354  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45355  filebase=${filename%%.*}
45356  extension=${filename#*.}
45357  installdir=$with_builddeps_dir/$filebase
45358  if test ! -f $installdir/$filename.unpacked; then
45359    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
45360$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45361    if test ! -d $installdir; then
45362      mkdir -p $installdir
45363    fi
45364    if test ! -d $installdir; then
45365      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45366    fi
45367    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
45368    touch $tmpfile
45369    if test ! -f $tmpfile; then
45370      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45371    fi
45372
45373  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45374  # $tmpfile is the local file name for the downloaded file.
45375  VALID_TOOL=no
45376  if test "x$BDEPS_FTP" = xwget; then
45377    VALID_TOOL=yes
45378    wget -O $tmpfile $with_builddeps_server/$resource
45379  fi
45380  if test "x$BDEPS_FTP" = xlftp; then
45381    VALID_TOOL=yes
45382    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45383  fi
45384  if test "x$BDEPS_FTP" = xftp; then
45385    VALID_TOOL=yes
45386    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45387    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45388    FTPUSERPWD=${FTPSERVER%%@*}
45389    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45390      FTPUSER=${userpwd%%:*}
45391      FTPPWD=${userpwd#*@}
45392      FTPSERVER=${FTPSERVER#*@}
45393    else
45394      FTPUSER=ftp
45395      FTPPWD=ftp
45396    fi
45397    # the "pass" command does not work on some
45398    # ftp clients (read ftp.exe) but if it works,
45399    # passive mode is better!
45400    ( \
45401        echo "user $FTPUSER $FTPPWD"        ; \
45402        echo "pass"                         ; \
45403        echo "bin"                          ; \
45404        echo "get $FTPPATH $tmpfile"              ; \
45405    ) | ftp -in $FTPSERVER
45406  fi
45407  if test "x$VALID_TOOL" != xyes; then
45408    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45409  fi
45410
45411    mv $tmpfile $installdir/$filename
45412    if test ! -s $installdir/$filename; then
45413      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45414    fi
45415    case "$extension" in
45416      zip)  echo "Unzipping $installdir/$filename..."
45417        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45418        ;;
45419      tar.gz) echo "Untaring $installdir/$filename..."
45420        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45421        ;;
45422      tgz) echo "Untaring $installdir/$filename..."
45423        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45424        ;;
45425      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45426        ;;
45427    esac
45428  fi
45429  if test -f $installdir/$filename.unpacked; then
45430    depdir=$installdir
45431  fi
45432
45433      fi
45434      # Source the builddeps file again, because in the previous command, the depdir
45435      # was updated to point at the current build dependency install directory.
45436      . $builddepsfile
45437      # Now extract variables from the builddeps.conf files.
45438      theroot=${builddep_alsa_ROOT}
45439      thecflags=${builddep_alsa_CFLAGS}
45440      thelibs=${builddep_alsa_LIBS}
45441      if test "x$depdir" = x; then
45442        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
45443      fi
45444      ALSA=$depdir
45445      if test "x$theroot" != x; then
45446        ALSA="$theroot"
45447      fi
45448      if test "x$thecflags" != x; then
45449        ALSA_CFLAGS="$thecflags"
45450      fi
45451      if test "x$thelibs" != x; then
45452        ALSA_LIBS="$thelibs"
45453      fi
45454      ALSA_FOUND=yes
45455      else ALSA_FOUND=no
45456
45457    fi
45458    else ALSA_FOUND=no
45459
45460  fi
45461
45462    fi
45463    if test "x$ALSA_FOUND" = xno; then
45464
45465pkg_failed=no
45466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
45467$as_echo_n "checking for ALSA... " >&6; }
45468
45469if test -n "$ALSA_CFLAGS"; then
45470    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
45471 elif test -n "$PKG_CONFIG"; then
45472    if test -n "$PKG_CONFIG" && \
45473    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45474  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45475  ac_status=$?
45476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45477  test $ac_status = 0; }; then
45478  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
45479else
45480  pkg_failed=yes
45481fi
45482 else
45483    pkg_failed=untried
45484fi
45485if test -n "$ALSA_LIBS"; then
45486    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
45487 elif test -n "$PKG_CONFIG"; then
45488    if test -n "$PKG_CONFIG" && \
45489    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45490  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45491  ac_status=$?
45492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45493  test $ac_status = 0; }; then
45494  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
45495else
45496  pkg_failed=yes
45497fi
45498 else
45499    pkg_failed=untried
45500fi
45501
45502
45503
45504if test $pkg_failed = yes; then
45505
45506if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45507        _pkg_short_errors_supported=yes
45508else
45509        _pkg_short_errors_supported=no
45510fi
45511        if test $_pkg_short_errors_supported = yes; then
45512	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
45513        else
45514	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
45515        fi
45516	# Put the nasty error message in config.log where it belongs
45517	echo "$ALSA_PKG_ERRORS" >&5
45518
45519	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45520$as_echo "no" >&6; }
45521                ALSA_FOUND=no
45522elif test $pkg_failed = untried; then
45523	ALSA_FOUND=no
45524else
45525	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
45526	ALSA_LIBS=$pkg_cv_ALSA_LIBS
45527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45528$as_echo "yes" >&6; }
45529	ALSA_FOUND=yes
45530fi
45531    fi
45532    if test "x$ALSA_FOUND" = xno; then
45533      for ac_header in alsa/asoundlib.h
45534do :
45535  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
45536if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
45537  cat >>confdefs.h <<_ACEOF
45538#define HAVE_ALSA_ASOUNDLIB_H 1
45539_ACEOF
45540
45541            ALSA_FOUND=yes
45542            ALSA_CFLAGS=-Iignoreme
45543            ALSA_LIBS=-lasound
45544            DEFAULT_ALSA=yes
45545
45546else
45547  ALSA_FOUND=no
45548fi
45549
45550done
45551
45552    fi
45553    if test "x$ALSA_FOUND" = xno; then
45554
45555  # Print a helpful message on how to acquire the necessary build dependency.
45556  # alsa is the help tag: freetype, cups, pulse, alsa etc
45557  MISSING_DEPENDENCY=alsa
45558
45559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45560    cygwin_help $MISSING_DEPENDENCY
45561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45562    msys_help $MISSING_DEPENDENCY
45563  else
45564    PKGHANDLER_COMMAND=
45565
45566    case $PKGHANDLER in
45567      apt-get)
45568        apt_help     $MISSING_DEPENDENCY ;;
45569      yum)
45570        yum_help     $MISSING_DEPENDENCY ;;
45571      port)
45572        port_help    $MISSING_DEPENDENCY ;;
45573      pkgutil)
45574        pkgutil_help $MISSING_DEPENDENCY ;;
45575      pkgadd)
45576        pkgadd_help  $MISSING_DEPENDENCY ;;
45577    esac
45578
45579    if test "x$PKGHANDLER_COMMAND" != x; then
45580      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45581    fi
45582  fi
45583
45584      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
45585    fi
45586  fi
45587
45588
45589
45590
45591
45592
45593  ###############################################################################
45594  #
45595  # Check for the jpeg library
45596  #
45597
45598  USE_EXTERNAL_LIBJPEG=true
45599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
45600$as_echo_n "checking for main in -ljpeg... " >&6; }
45601if ${ac_cv_lib_jpeg_main+:} false; then :
45602  $as_echo_n "(cached) " >&6
45603else
45604  ac_check_lib_save_LIBS=$LIBS
45605LIBS="-ljpeg  $LIBS"
45606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45607/* end confdefs.h.  */
45608
45609
45610int
45611main ()
45612{
45613return main ();
45614  ;
45615  return 0;
45616}
45617_ACEOF
45618if ac_fn_cxx_try_link "$LINENO"; then :
45619  ac_cv_lib_jpeg_main=yes
45620else
45621  ac_cv_lib_jpeg_main=no
45622fi
45623rm -f core conftest.err conftest.$ac_objext \
45624    conftest$ac_exeext conftest.$ac_ext
45625LIBS=$ac_check_lib_save_LIBS
45626fi
45627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
45628$as_echo "$ac_cv_lib_jpeg_main" >&6; }
45629if test "x$ac_cv_lib_jpeg_main" = xyes; then :
45630  cat >>confdefs.h <<_ACEOF
45631#define HAVE_LIBJPEG 1
45632_ACEOF
45633
45634  LIBS="-ljpeg $LIBS"
45635
45636else
45637   USE_EXTERNAL_LIBJPEG=false
45638      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
45639$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
45640
45641fi
45642
45643
45644
45645  ###############################################################################
45646  #
45647  # Check for the gif library
45648  #
45649
45650
45651# Check whether --with-giflib was given.
45652if test "${with_giflib+set}" = set; then :
45653  withval=$with_giflib;
45654fi
45655
45656
45657
45658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
45659$as_echo_n "checking for which giflib to use... " >&6; }
45660
45661  # default is bundled
45662  DEFAULT_GIFLIB=bundled
45663
45664  #
45665  # if user didn't specify, use DEFAULT_GIFLIB
45666  #
45667  if test "x${with_giflib}" = "x"; then
45668    with_giflib=${DEFAULT_GIFLIB}
45669  fi
45670
45671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
45672$as_echo "${with_giflib}" >&6; }
45673
45674  if test "x${with_giflib}" = "xbundled"; then
45675    USE_EXTERNAL_LIBGIF=false
45676  elif test "x${with_giflib}" = "xsystem"; then
45677    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
45678if test "x$ac_cv_header_gif_lib_h" = xyes; then :
45679
45680else
45681   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
45682fi
45683
45684
45685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
45686$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
45687if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
45688  $as_echo_n "(cached) " >&6
45689else
45690  ac_check_lib_save_LIBS=$LIBS
45691LIBS="-lgif  $LIBS"
45692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45693/* end confdefs.h.  */
45694
45695/* Override any GCC internal prototype to avoid an error.
45696   Use char because int might match the return type of a GCC
45697   builtin and then its argument prototype would still apply.  */
45698#ifdef __cplusplus
45699extern "C"
45700#endif
45701char DGifGetCode ();
45702int
45703main ()
45704{
45705return DGifGetCode ();
45706  ;
45707  return 0;
45708}
45709_ACEOF
45710if ac_fn_cxx_try_link "$LINENO"; then :
45711  ac_cv_lib_gif_DGifGetCode=yes
45712else
45713  ac_cv_lib_gif_DGifGetCode=no
45714fi
45715rm -f core conftest.err conftest.$ac_objext \
45716    conftest$ac_exeext conftest.$ac_ext
45717LIBS=$ac_check_lib_save_LIBS
45718fi
45719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
45720$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
45721if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
45722  cat >>confdefs.h <<_ACEOF
45723#define HAVE_LIBGIF 1
45724_ACEOF
45725
45726  LIBS="-lgif $LIBS"
45727
45728else
45729   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
45730fi
45731
45732
45733    USE_EXTERNAL_LIBGIF=true
45734  else
45735    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
45736  fi
45737
45738
45739  ###############################################################################
45740  #
45741  # Check for the zlib library
45742  #
45743
45744
45745# Check whether --with-zlib was given.
45746if test "${with_zlib+set}" = set; then :
45747  withval=$with_zlib;
45748fi
45749
45750
45751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
45752$as_echo_n "checking for compress in -lz... " >&6; }
45753if ${ac_cv_lib_z_compress+:} false; then :
45754  $as_echo_n "(cached) " >&6
45755else
45756  ac_check_lib_save_LIBS=$LIBS
45757LIBS="-lz  $LIBS"
45758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45759/* end confdefs.h.  */
45760
45761/* Override any GCC internal prototype to avoid an error.
45762   Use char because int might match the return type of a GCC
45763   builtin and then its argument prototype would still apply.  */
45764#ifdef __cplusplus
45765extern "C"
45766#endif
45767char compress ();
45768int
45769main ()
45770{
45771return compress ();
45772  ;
45773  return 0;
45774}
45775_ACEOF
45776if ac_fn_cxx_try_link "$LINENO"; then :
45777  ac_cv_lib_z_compress=yes
45778else
45779  ac_cv_lib_z_compress=no
45780fi
45781rm -f core conftest.err conftest.$ac_objext \
45782    conftest$ac_exeext conftest.$ac_ext
45783LIBS=$ac_check_lib_save_LIBS
45784fi
45785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
45786$as_echo "$ac_cv_lib_z_compress" >&6; }
45787if test "x$ac_cv_lib_z_compress" = xyes; then :
45788   ZLIB_FOUND=yes
45789else
45790   ZLIB_FOUND=no
45791fi
45792
45793
45794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
45795$as_echo_n "checking for which zlib to use... " >&6; }
45796
45797  DEFAULT_ZLIB=bundled
45798  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45799    #
45800    # On macosx default is system...on others default is
45801    #
45802    DEFAULT_ZLIB=system
45803  fi
45804
45805  if test "x${ZLIB_FOUND}" != "xyes"; then
45806    #
45807    # If we don't find any system...set default to bundled
45808    #
45809    DEFAULT_ZLIB=bundled
45810  fi
45811
45812  #
45813  # If user didn't specify, use DEFAULT_ZLIB
45814  #
45815  if test "x${with_zlib}" = "x"; then
45816    with_zlib=${DEFAULT_ZLIB}
45817  fi
45818
45819  if test "x${with_zlib}" = "xbundled"; then
45820    USE_EXTERNAL_LIBZ=false
45821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
45822$as_echo "bundled" >&6; }
45823  elif test "x${with_zlib}" = "xsystem"; then
45824    if test "x${ZLIB_FOUND}" = "xyes"; then
45825      USE_EXTERNAL_LIBZ=true
45826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
45827$as_echo "system" >&6; }
45828    else
45829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
45830$as_echo "system not found" >&6; }
45831      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
45832    fi
45833  else
45834    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
45835  fi
45836
45837
45838
45839  ###############################################################################
45840  LIBZIP_CAN_USE_MMAP=true
45841
45842
45843
45844  ###############################################################################
45845  #
45846  # Check if altzone exists in time.h
45847  #
45848
45849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45850/* end confdefs.h.  */
45851#include <time.h>
45852int
45853main ()
45854{
45855return (int)altzone;
45856  ;
45857  return 0;
45858}
45859_ACEOF
45860if ac_fn_cxx_try_link "$LINENO"; then :
45861  has_altzone=yes
45862else
45863  has_altzone=no
45864fi
45865rm -f core conftest.err conftest.$ac_objext \
45866    conftest$ac_exeext conftest.$ac_ext
45867  if test "x$has_altzone" = xyes; then
45868
45869$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
45870
45871  fi
45872
45873  ###############################################################################
45874  #
45875  # Check the maths library
45876  #
45877
45878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
45879$as_echo_n "checking for cos in -lm... " >&6; }
45880if ${ac_cv_lib_m_cos+:} false; then :
45881  $as_echo_n "(cached) " >&6
45882else
45883  ac_check_lib_save_LIBS=$LIBS
45884LIBS="-lm  $LIBS"
45885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45886/* end confdefs.h.  */
45887
45888/* Override any GCC internal prototype to avoid an error.
45889   Use char because int might match the return type of a GCC
45890   builtin and then its argument prototype would still apply.  */
45891#ifdef __cplusplus
45892extern "C"
45893#endif
45894char cos ();
45895int
45896main ()
45897{
45898return cos ();
45899  ;
45900  return 0;
45901}
45902_ACEOF
45903if ac_fn_cxx_try_link "$LINENO"; then :
45904  ac_cv_lib_m_cos=yes
45905else
45906  ac_cv_lib_m_cos=no
45907fi
45908rm -f core conftest.err conftest.$ac_objext \
45909    conftest$ac_exeext conftest.$ac_ext
45910LIBS=$ac_check_lib_save_LIBS
45911fi
45912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
45913$as_echo "$ac_cv_lib_m_cos" >&6; }
45914if test "x$ac_cv_lib_m_cos" = xyes; then :
45915  cat >>confdefs.h <<_ACEOF
45916#define HAVE_LIBM 1
45917_ACEOF
45918
45919  LIBS="-lm $LIBS"
45920
45921else
45922
45923        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
45924$as_echo "$as_me: Maths library was not found" >&6;}
45925
45926
45927fi
45928
45929
45930
45931  ###############################################################################
45932  #
45933  # Check for libdl.so
45934
45935  save_LIBS="$LIBS"
45936  LIBS=""
45937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
45938$as_echo_n "checking for dlopen in -ldl... " >&6; }
45939if ${ac_cv_lib_dl_dlopen+:} false; then :
45940  $as_echo_n "(cached) " >&6
45941else
45942  ac_check_lib_save_LIBS=$LIBS
45943LIBS="-ldl  $LIBS"
45944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45945/* end confdefs.h.  */
45946
45947/* Override any GCC internal prototype to avoid an error.
45948   Use char because int might match the return type of a GCC
45949   builtin and then its argument prototype would still apply.  */
45950#ifdef __cplusplus
45951extern "C"
45952#endif
45953char dlopen ();
45954int
45955main ()
45956{
45957return dlopen ();
45958  ;
45959  return 0;
45960}
45961_ACEOF
45962if ac_fn_cxx_try_link "$LINENO"; then :
45963  ac_cv_lib_dl_dlopen=yes
45964else
45965  ac_cv_lib_dl_dlopen=no
45966fi
45967rm -f core conftest.err conftest.$ac_objext \
45968    conftest$ac_exeext conftest.$ac_ext
45969LIBS=$ac_check_lib_save_LIBS
45970fi
45971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
45972$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
45973if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
45974  cat >>confdefs.h <<_ACEOF
45975#define HAVE_LIBDL 1
45976_ACEOF
45977
45978  LIBS="-ldl $LIBS"
45979
45980fi
45981
45982  LIBDL="$LIBS"
45983
45984  LIBS="$save_LIBS"
45985
45986
45987  ###############################################################################
45988  #
45989  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45990  # dynamic build is configured on command line.
45991  #
45992
45993# Check whether --with-stdc++lib was given.
45994if test "${with_stdc__lib+set}" = set; then :
45995  withval=$with_stdc__lib;
45996        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45997                && test "x$with_stdc__lib" != xdefault; then
45998          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45999        fi
46000
46001else
46002  with_stdc__lib=default
46003
46004fi
46005
46006
46007  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46008    # Test if -lstdc++ works.
46009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
46010$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
46011    ac_ext=cpp
46012ac_cpp='$CXXCPP $CPPFLAGS'
46013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46016
46017    OLD_CXXFLAGS="$CXXFLAGS"
46018    CXXFLAGS="$CXXFLAGS -lstdc++"
46019    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46020/* end confdefs.h.  */
46021
46022int
46023main ()
46024{
46025return 0;
46026  ;
46027  return 0;
46028}
46029_ACEOF
46030if ac_fn_cxx_try_link "$LINENO"; then :
46031  has_dynamic_libstdcxx=yes
46032else
46033  has_dynamic_libstdcxx=no
46034fi
46035rm -f core conftest.err conftest.$ac_objext \
46036    conftest$ac_exeext conftest.$ac_ext
46037    CXXFLAGS="$OLD_CXXFLAGS"
46038    ac_ext=cpp
46039ac_cpp='$CXXCPP $CPPFLAGS'
46040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46043
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
46045$as_echo "$has_dynamic_libstdcxx" >&6; }
46046
46047    # Test if stdc++ can be linked statically.
46048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
46049$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
46050    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
46051    ac_ext=cpp
46052ac_cpp='$CXXCPP $CPPFLAGS'
46053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46056
46057    OLD_LIBS="$LIBS"
46058    OLD_CXX="$CXX"
46059    LIBS="$STATIC_STDCXX_FLAGS"
46060    CXX="$CC"
46061    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46062/* end confdefs.h.  */
46063
46064int
46065main ()
46066{
46067return 0;
46068  ;
46069  return 0;
46070}
46071_ACEOF
46072if ac_fn_cxx_try_link "$LINENO"; then :
46073  has_static_libstdcxx=yes
46074else
46075  has_static_libstdcxx=no
46076fi
46077rm -f core conftest.err conftest.$ac_objext \
46078    conftest$ac_exeext conftest.$ac_ext
46079    LIBS="$OLD_LIBS"
46080    CXX="$OLD_CXX"
46081    ac_ext=cpp
46082ac_cpp='$CXXCPP $CPPFLAGS'
46083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46086
46087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
46088$as_echo "$has_static_libstdcxx" >&6; }
46089
46090    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
46091      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
46092    fi
46093
46094    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
46095      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
46096    fi
46097
46098    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
46099      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
46100    fi
46101
46102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
46103$as_echo_n "checking how to link with libstdc++... " >&6; }
46104    # If dynamic was requested, it's available since it would fail above otherwise.
46105    # If dynamic wasn't requested, go with static unless it isn't available.
46106    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46107      LIBCXX="$LIBCXX -lstdc++"
46108      LDCXX="$CXX"
46109      STATIC_CXX_SETTING="STATIC_CXX=false"
46110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
46111$as_echo "dynamic" >&6; }
46112    else
46113      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
46114      LDCXX="$CC"
46115      STATIC_CXX_SETTING="STATIC_CXX=true"
46116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
46117$as_echo "static" >&6; }
46118    fi
46119  fi
46120
46121
46122  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46123    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
46124
46125pkg_failed=no
46126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
46127$as_echo_n "checking for LIBFFI... " >&6; }
46128
46129if test -n "$LIBFFI_CFLAGS"; then
46130    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
46131 elif test -n "$PKG_CONFIG"; then
46132    if test -n "$PKG_CONFIG" && \
46133    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
46134  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
46135  ac_status=$?
46136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46137  test $ac_status = 0; }; then
46138  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
46139else
46140  pkg_failed=yes
46141fi
46142 else
46143    pkg_failed=untried
46144fi
46145if test -n "$LIBFFI_LIBS"; then
46146    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
46147 elif test -n "$PKG_CONFIG"; then
46148    if test -n "$PKG_CONFIG" && \
46149    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
46150  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
46151  ac_status=$?
46152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46153  test $ac_status = 0; }; then
46154  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
46155else
46156  pkg_failed=yes
46157fi
46158 else
46159    pkg_failed=untried
46160fi
46161
46162
46163
46164if test $pkg_failed = yes; then
46165
46166if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46167        _pkg_short_errors_supported=yes
46168else
46169        _pkg_short_errors_supported=no
46170fi
46171        if test $_pkg_short_errors_supported = yes; then
46172	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
46173        else
46174	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
46175        fi
46176	# Put the nasty error message in config.log where it belongs
46177	echo "$LIBFFI_PKG_ERRORS" >&5
46178
46179	as_fn_error $? "Package requirements (libffi) were not met:
46180
46181$LIBFFI_PKG_ERRORS
46182
46183Consider adjusting the PKG_CONFIG_PATH environment variable if you
46184installed software in a non-standard prefix.
46185
46186Alternatively, you may set the environment variables LIBFFI_CFLAGS
46187and LIBFFI_LIBS to avoid the need to call pkg-config.
46188See the pkg-config man page for more details.
46189" "$LINENO" 5
46190elif test $pkg_failed = untried; then
46191	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46193as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
46194is in your PATH or set the PKG_CONFIG environment variable to the full
46195path to pkg-config.
46196
46197Alternatively, you may set the environment variables LIBFFI_CFLAGS
46198and LIBFFI_LIBS to avoid the need to call pkg-config.
46199See the pkg-config man page for more details.
46200
46201To get pkg-config, see <http://pkg-config.freedesktop.org/>.
46202See \`config.log' for more details" "$LINENO" 5; }
46203else
46204	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
46205	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
46206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46207$as_echo "yes" >&6; }
46208	:
46209fi
46210
46211  fi
46212
46213  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46214    # Extract the first word of "llvm-config", so it can be a program name with args.
46215set dummy llvm-config; ac_word=$2
46216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46217$as_echo_n "checking for $ac_word... " >&6; }
46218if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
46219  $as_echo_n "(cached) " >&6
46220else
46221  if test -n "$LLVM_CONFIG"; then
46222  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
46223else
46224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46225for as_dir in $PATH
46226do
46227  IFS=$as_save_IFS
46228  test -z "$as_dir" && as_dir=.
46229    for ac_exec_ext in '' $ac_executable_extensions; do
46230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46231    ac_cv_prog_LLVM_CONFIG="llvm-config"
46232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46233    break 2
46234  fi
46235done
46236  done
46237IFS=$as_save_IFS
46238
46239fi
46240fi
46241LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
46242if test -n "$LLVM_CONFIG"; then
46243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
46244$as_echo "$LLVM_CONFIG" >&6; }
46245else
46246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46247$as_echo "no" >&6; }
46248fi
46249
46250
46251
46252    if test "x$LLVM_CONFIG" != xllvm-config; then
46253      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
46254    fi
46255
46256    llvm_components="jit mcjit engine nativecodegen native"
46257    unset LLVM_CFLAGS
46258    for flag in $("$LLVM_CONFIG" --cxxflags); do
46259      if echo "${flag}" | grep -q '^-[ID]'; then
46260        if test "${flag}" != "-D_DEBUG" ; then
46261          if test "${LLVM_CFLAGS}" != "" ; then
46262            LLVM_CFLAGS="${LLVM_CFLAGS} "
46263          fi
46264          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
46265        fi
46266      fi
46267    done
46268    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
46269    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
46270
46271    unset LLVM_LDFLAGS
46272    for flag in $("${LLVM_CONFIG}" --ldflags); do
46273      if echo "${flag}" | grep -q '^-L'; then
46274        if test "${LLVM_LDFLAGS}" != ""; then
46275          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
46276        fi
46277        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
46278      fi
46279    done
46280
46281    unset LLVM_LIBS
46282    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
46283      if echo "${flag}" | grep -q '^-l'; then
46284        if test "${LLVM_LIBS}" != ""; then
46285          LLVM_LIBS="${LLVM_LIBS} "
46286        fi
46287        LLVM_LIBS="${LLVM_LIBS}${flag}"
46288      fi
46289    done
46290
46291
46292
46293
46294  fi
46295
46296  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46297  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
46298    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46299  fi
46300
46301  # TODO better (platform agnostic) test
46302  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
46303    LIBCXX="-lstdc++"
46304  fi
46305
46306
46307
46308
46309
46310###############################################################################
46311#
46312# We need to do some final tweaking, when everything else is done.
46313#
46314###############################################################################
46315
46316
46317  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
46318
46319
46320  # The name of the Service Agent jar.
46321  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
46322  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46323    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
46324  fi
46325
46326
46327
46328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
46329$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
46330
46331    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
46332      ENABLE_INTREE_EC=yes
46333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46334$as_echo "yes" >&6; }
46335    else
46336      ENABLE_INTREE_EC=no
46337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46338$as_echo "no" >&6; }
46339    fi
46340
46341
46342
46343
46344###############################################################################
46345#
46346# Configure parts of the build that only affect the build performance,
46347# not the result.
46348#
46349###############################################################################
46350
46351
46352  # How many cores do we have on this build system?
46353
46354# Check whether --with-num-cores was given.
46355if test "${with_num_cores+set}" = set; then :
46356  withval=$with_num_cores;
46357fi
46358
46359  if test "x$with_num_cores" = x; then
46360    # The number of cores were not specified, try to probe them.
46361
46362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
46363$as_echo_n "checking for number of cores... " >&6; }
46364  NUM_CORES=1
46365  FOUND_CORES=no
46366
46367  if test -f /proc/cpuinfo; then
46368    # Looks like a Linux (or cygwin) system
46369    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
46370    FOUND_CORES=yes
46371  elif test -x /usr/sbin/psrinfo; then
46372    # Looks like a Solaris system
46373    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
46374    FOUND_CORES=yes
46375  elif test -x /usr/sbin/system_profiler; then
46376    # Looks like a MacOSX system
46377    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
46378    FOUND_CORES=yes
46379  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
46380    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
46381    FOUND_CORES=yes
46382  elif test -n "$NUMBER_OF_PROCESSORS"; then
46383    # On windows, look in the env
46384    NUM_CORES=$NUMBER_OF_PROCESSORS
46385    FOUND_CORES=yes
46386  fi
46387
46388  if test "x$FOUND_CORES" = xyes; then
46389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
46390$as_echo "$NUM_CORES" >&6; }
46391  else
46392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
46393$as_echo "could not detect number of cores, defaulting to 1" >&6; }
46394    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
46395$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
46396  fi
46397
46398  else
46399    NUM_CORES=$with_num_cores
46400  fi
46401
46402
46403
46404  # How much memory do we have on this build system?
46405
46406# Check whether --with-memory-size was given.
46407if test "${with_memory_size+set}" = set; then :
46408  withval=$with_memory_size;
46409fi
46410
46411  if test "x$with_memory_size" = x; then
46412    # The memory size was not specified, try to probe it.
46413
46414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
46415$as_echo_n "checking for memory size... " >&6; }
46416  # Default to 1024 MB
46417  MEMORY_SIZE=1024
46418  FOUND_MEM=no
46419
46420  if test -f /proc/meminfo; then
46421    # Looks like a Linux (or cygwin) system
46422    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
46423    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
46424    FOUND_MEM=yes
46425  elif test -x /usr/sbin/prtconf; then
46426    # Looks like a Solaris or AIX system
46427    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
46428    FOUND_MEM=yes
46429  elif test -x /usr/sbin/system_profiler; then
46430    # Looks like a MacOSX system
46431    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
46432    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
46433    FOUND_MEM=yes
46434  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
46435    # Windows, but without cygwin
46436    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
46437    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
46438    FOUND_MEM=yes
46439  fi
46440
46441  if test "x$FOUND_MEM" = xyes; then
46442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
46443$as_echo "$MEMORY_SIZE MB" >&6; }
46444  else
46445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
46446$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
46447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
46448$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
46449  fi
46450
46451  else
46452    MEMORY_SIZE=$with_memory_size
46453  fi
46454
46455
46456
46457  # Provide a decent default number of parallel jobs for make depending on
46458  # number of cores, amount of memory and machine architecture.
46459
46460# Check whether --with-jobs was given.
46461if test "${with_jobs+set}" = set; then :
46462  withval=$with_jobs;
46463fi
46464
46465  if test "x$with_jobs" = x; then
46466    # Number of jobs was not specified, calculate.
46467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
46468$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
46469    # Approximate memory in GB, rounding up a bit.
46470    memory_gb=`expr $MEMORY_SIZE / 1100`
46471    # Pick the lowest of memory in gb and number of cores.
46472    if test "$memory_gb" -lt "$NUM_CORES"; then
46473      JOBS="$memory_gb"
46474    else
46475      JOBS="$NUM_CORES"
46476      # On bigger machines, leave some room for other processes to run
46477      if test "$JOBS" -gt "4"; then
46478        JOBS=`expr $JOBS '*' 90 / 100`
46479      fi
46480    fi
46481    # Cap number of jobs to 16
46482    if test "$JOBS" -gt "16"; then
46483      JOBS=16
46484    fi
46485    if test "$JOBS" -eq "0"; then
46486      JOBS=1
46487    fi
46488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
46489$as_echo "$JOBS" >&6; }
46490  else
46491    JOBS=$with_jobs
46492  fi
46493
46494
46495
46496# Setup smart javac (after cores and memory have been setup)
46497
46498
46499# Check whether --with-sjavac-server-java was given.
46500if test "${with_sjavac_server_java+set}" = set; then :
46501  withval=$with_sjavac_server_java;
46502fi
46503
46504
46505  if test "x$with_sjavac_server_java" != x; then
46506    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
46507    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
46508    if test "x$FOUND_VERSION" = x; then
46509      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
46510    fi
46511  else
46512    SJAVAC_SERVER_JAVA=""
46513    # Hotspot specific options.
46514
46515  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
46516  $ECHO "Command: $JAVA -verbosegc -version" >&5
46517  OUTPUT=`$JAVA -verbosegc -version 2>&1`
46518  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46519  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46520  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46521    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
46522    JVM_ARG_OK=true
46523  else
46524    $ECHO "Arg failed:" >&5
46525    $ECHO "$OUTPUT" >&5
46526    JVM_ARG_OK=false
46527  fi
46528
46529    # JRockit specific options.
46530
46531  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
46532  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
46533  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
46534  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46535  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46536  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46537    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
46538    JVM_ARG_OK=true
46539  else
46540    $ECHO "Arg failed:" >&5
46541    $ECHO "$OUTPUT" >&5
46542    JVM_ARG_OK=false
46543  fi
46544
46545    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
46546  fi
46547
46548
46549  if test "$MEMORY_SIZE" -gt "2500"; then
46550
46551  $ECHO "Check if jvm arg is ok: -d64" >&5
46552  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
46553  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
46554  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46555  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46556  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46557    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
46558    JVM_ARG_OK=true
46559  else
46560    $ECHO "Arg failed:" >&5
46561    $ECHO "$OUTPUT" >&5
46562    JVM_ARG_OK=false
46563  fi
46564
46565    if test "$JVM_ARG_OK" = true; then
46566      JVM_64BIT=true
46567      JVM_ARG_OK=false
46568    fi
46569  fi
46570
46571  if test "$JVM_64BIT" = true; then
46572    if test "$MEMORY_SIZE" -gt "17000"; then
46573
46574  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
46575  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
46576  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
46577  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46578  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46579  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46580    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
46581    JVM_ARG_OK=true
46582  else
46583    $ECHO "Arg failed:" >&5
46584    $ECHO "$OUTPUT" >&5
46585    JVM_ARG_OK=false
46586  fi
46587
46588    fi
46589    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
46590
46591  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
46592  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
46593  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
46594  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46595  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46596  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46597    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
46598    JVM_ARG_OK=true
46599  else
46600    $ECHO "Arg failed:" >&5
46601    $ECHO "$OUTPUT" >&5
46602    JVM_ARG_OK=false
46603  fi
46604
46605    fi
46606    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
46607
46608  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
46609  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
46610  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
46611  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46612  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46613  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46614    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
46615    JVM_ARG_OK=true
46616  else
46617    $ECHO "Arg failed:" >&5
46618    $ECHO "$OUTPUT" >&5
46619    JVM_ARG_OK=false
46620  fi
46621
46622    fi
46623    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
46624
46625  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
46626  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
46627  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
46628  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46629  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46630  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46631    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
46632    JVM_ARG_OK=true
46633  else
46634    $ECHO "Arg failed:" >&5
46635    $ECHO "$OUTPUT" >&5
46636    JVM_ARG_OK=false
46637  fi
46638
46639    fi
46640  fi
46641  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
46642
46643  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
46644  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
46645  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
46646  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46647  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46648  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46649    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
46650    JVM_ARG_OK=true
46651  else
46652    $ECHO "Arg failed:" >&5
46653    $ECHO "$OUTPUT" >&5
46654    JVM_ARG_OK=false
46655  fi
46656
46657  fi
46658  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
46659
46660  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
46661  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
46662  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
46663  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46664  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46665  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46666    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
46667    JVM_ARG_OK=true
46668  else
46669    $ECHO "Arg failed:" >&5
46670    $ECHO "$OUTPUT" >&5
46671    JVM_ARG_OK=false
46672  fi
46673
46674  fi
46675  if test "$JVM_ARG_OK" = false; then
46676
46677  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
46678  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
46679  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
46680  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
46681  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
46682  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
46683    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
46684    JVM_ARG_OK=true
46685  else
46686    $ECHO "Arg failed:" >&5
46687    $ECHO "$OUTPUT" >&5
46688    JVM_ARG_OK=false
46689  fi
46690
46691  fi
46692
46693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
46694$as_echo_n "checking whether to use sjavac... " >&6; }
46695  # Check whether --enable-sjavac was given.
46696if test "${enable_sjavac+set}" = set; then :
46697  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
46698else
46699  ENABLE_SJAVAC='no'
46700fi
46701
46702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
46703$as_echo "$ENABLE_SJAVAC" >&6; }
46704
46705
46706  if test "x$ENABLE_SJAVAC" = xyes; then
46707    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
46708  else
46709    SJAVAC_SERVER_DIR=
46710  fi
46711
46712
46713
46714# Can the C/C++ compiler use precompiled headers?
46715
46716
46717  ###############################################################################
46718  #
46719  # Can the C/C++ compiler use precompiled headers?
46720  #
46721  # Check whether --enable-precompiled-headers was given.
46722if test "${enable_precompiled_headers+set}" = set; then :
46723  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
46724else
46725  ENABLE_PRECOMPH=yes
46726fi
46727
46728
46729  USE_PRECOMPILED_HEADER=1
46730  if test "x$ENABLE_PRECOMPH" = xno; then
46731    USE_PRECOMPILED_HEADER=0
46732  fi
46733
46734  if test "x$ENABLE_PRECOMPH" = xyes; then
46735    # Check that the compiler actually supports precomp headers.
46736    if test "x$GCC" = xyes; then
46737      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
46738$as_echo_n "checking that precompiled headers work... " >&6; }
46739      echo "int alfa();" > conftest.h
46740      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
46741      if test ! -f conftest.hpp.gch; then
46742        USE_PRECOMPILED_HEADER=0
46743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46744$as_echo "no" >&6; }
46745      else
46746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46747$as_echo "yes" >&6; }
46748      fi
46749      rm -f conftest.h conftest.hpp.gch
46750    fi
46751  fi
46752
46753
46754
46755
46756# Setup use of ccache, if available
46757
46758  # Check whether --enable-ccache was given.
46759if test "${enable_ccache+set}" = set; then :
46760  enableval=$enable_ccache;
46761fi
46762
46763
46764  CCACHE=
46765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
46766$as_echo_n "checking is ccache enabled... " >&6; }
46767  ENABLE_CCACHE=$enable_ccache
46768  if test "x$enable_ccache" = xyes; then
46769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46770$as_echo "yes" >&6; }
46771    OLD_PATH="$PATH"
46772    if test "x$TOOLS_DIR" != x; then
46773      PATH=$TOOLS_DIR:$PATH
46774    fi
46775
46776
46777
46778  # Publish this variable in the help.
46779
46780
46781  if test "x$CCACHE" = x; then
46782    # The variable is not set by user, try to locate tool using the code snippet
46783    for ac_prog in ccache
46784do
46785  # Extract the first word of "$ac_prog", so it can be a program name with args.
46786set dummy $ac_prog; ac_word=$2
46787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46788$as_echo_n "checking for $ac_word... " >&6; }
46789if ${ac_cv_path_CCACHE+:} false; then :
46790  $as_echo_n "(cached) " >&6
46791else
46792  case $CCACHE in
46793  [\\/]* | ?:[\\/]*)
46794  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
46795  ;;
46796  *)
46797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46798for as_dir in $PATH
46799do
46800  IFS=$as_save_IFS
46801  test -z "$as_dir" && as_dir=.
46802    for ac_exec_ext in '' $ac_executable_extensions; do
46803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46804    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
46805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46806    break 2
46807  fi
46808done
46809  done
46810IFS=$as_save_IFS
46811
46812  ;;
46813esac
46814fi
46815CCACHE=$ac_cv_path_CCACHE
46816if test -n "$CCACHE"; then
46817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
46818$as_echo "$CCACHE" >&6; }
46819else
46820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46821$as_echo "no" >&6; }
46822fi
46823
46824
46825  test -n "$CCACHE" && break
46826done
46827
46828  else
46829    # The variable is set, but is it from the command line or the environment?
46830
46831    # Try to remove the string !CCACHE! from our list.
46832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
46833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46834      # If it failed, the variable was not from the command line. Ignore it,
46835      # but warn the user (except for BASH, which is always set by the calling BASH).
46836      if test "xCCACHE" != xBASH; then
46837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
46838$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
46839      fi
46840      # Try to locate tool using the code snippet
46841      for ac_prog in ccache
46842do
46843  # Extract the first word of "$ac_prog", so it can be a program name with args.
46844set dummy $ac_prog; ac_word=$2
46845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46846$as_echo_n "checking for $ac_word... " >&6; }
46847if ${ac_cv_path_CCACHE+:} false; then :
46848  $as_echo_n "(cached) " >&6
46849else
46850  case $CCACHE in
46851  [\\/]* | ?:[\\/]*)
46852  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
46853  ;;
46854  *)
46855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46856for as_dir in $PATH
46857do
46858  IFS=$as_save_IFS
46859  test -z "$as_dir" && as_dir=.
46860    for ac_exec_ext in '' $ac_executable_extensions; do
46861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46862    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
46863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46864    break 2
46865  fi
46866done
46867  done
46868IFS=$as_save_IFS
46869
46870  ;;
46871esac
46872fi
46873CCACHE=$ac_cv_path_CCACHE
46874if test -n "$CCACHE"; then
46875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
46876$as_echo "$CCACHE" >&6; }
46877else
46878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46879$as_echo "no" >&6; }
46880fi
46881
46882
46883  test -n "$CCACHE" && break
46884done
46885
46886    else
46887      # If it succeeded, then it was overridden by the user. We will use it
46888      # for the tool.
46889
46890      # First remove it from the list of overridden variables, so we can test
46891      # for unknown variables in the end.
46892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46893
46894      # Check if the provided tool contains a complete path.
46895      tool_specified="$CCACHE"
46896      tool_basename="${tool_specified##*/}"
46897      if test "x$tool_basename" = "x$tool_specified"; then
46898        # A command without a complete path is provided, search $PATH.
46899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
46900$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
46901        # Extract the first word of "$tool_basename", so it can be a program name with args.
46902set dummy $tool_basename; ac_word=$2
46903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46904$as_echo_n "checking for $ac_word... " >&6; }
46905if ${ac_cv_path_CCACHE+:} false; then :
46906  $as_echo_n "(cached) " >&6
46907else
46908  case $CCACHE in
46909  [\\/]* | ?:[\\/]*)
46910  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
46911  ;;
46912  *)
46913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46914for as_dir in $PATH
46915do
46916  IFS=$as_save_IFS
46917  test -z "$as_dir" && as_dir=.
46918    for ac_exec_ext in '' $ac_executable_extensions; do
46919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46920    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
46921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46922    break 2
46923  fi
46924done
46925  done
46926IFS=$as_save_IFS
46927
46928  ;;
46929esac
46930fi
46931CCACHE=$ac_cv_path_CCACHE
46932if test -n "$CCACHE"; then
46933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
46934$as_echo "$CCACHE" >&6; }
46935else
46936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46937$as_echo "no" >&6; }
46938fi
46939
46940
46941        if test "x$CCACHE" = x; then
46942          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46943        fi
46944      else
46945        # Otherwise we believe it is a complete path. Use it as it is.
46946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
46947$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
46948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
46949$as_echo_n "checking for CCACHE... " >&6; }
46950        if test ! -x "$tool_specified"; then
46951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46952$as_echo "not found" >&6; }
46953          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
46954        fi
46955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46956$as_echo "$tool_specified" >&6; }
46957      fi
46958    fi
46959  fi
46960
46961
46962
46963  if test "x$CCACHE" = x; then
46964    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
46965  fi
46966
46967
46968    CCACHE_STATUS="enabled"
46969    PATH="$OLD_PATH"
46970  elif test "x$enable_ccache" = xno; then
46971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
46972$as_echo "no, explicitly disabled" >&6; }
46973  elif test "x$enable_ccache" = x; then
46974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46975$as_echo "no" >&6; }
46976  else
46977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
46978$as_echo "unknown" >&6; }
46979    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
46980  fi
46981
46982
46983
46984# Check whether --with-ccache-dir was given.
46985if test "${with_ccache_dir+set}" = set; then :
46986  withval=$with_ccache_dir;
46987fi
46988
46989
46990  if test "x$with_ccache_dir" != x; then
46991    # When using a non home ccache directory, assume the use is to share ccache files
46992    # with other users. Thus change the umask.
46993    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
46994    if test "x$CCACHE" = x; then
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
46996$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
46997    fi
46998  fi
46999
47000  if test "x$CCACHE" != x; then
47001
47002  if test "x$CCACHE" != x; then
47003    # Only use ccache if it is 3.1.4 or later, which supports
47004    # precompiled headers.
47005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
47006$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
47007    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
47008    if test "x$HAS_GOOD_CCACHE" = x; then
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
47010$as_echo "no, disabling ccache" >&6; }
47011      CCACHE=
47012      CCACHE_STATUS="disabled"
47013    else
47014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47015$as_echo "yes" >&6; }
47016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
47017$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
47018      PUSHED_FLAGS="$CXXFLAGS"
47019      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
47020      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47021/* end confdefs.h.  */
47022
47023int
47024main ()
47025{
47026
47027  ;
47028  return 0;
47029}
47030_ACEOF
47031if ac_fn_cxx_try_compile "$LINENO"; then :
47032  CC_KNOWS_CCACHE_TRICK=yes
47033else
47034  CC_KNOWS_CCACHE_TRICK=no
47035fi
47036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47037      CXXFLAGS="$PUSHED_FLAGS"
47038      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
47039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47040$as_echo "yes" >&6; }
47041      else
47042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
47043$as_echo "no, disabling ccaching of precompiled headers" >&6; }
47044        CCACHE=
47045        CCACHE_STATUS="disabled"
47046      fi
47047    fi
47048  fi
47049
47050  if test "x$CCACHE" != x; then
47051    CCACHE_SLOPPINESS=time_macros
47052    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
47053    CCACHE_FLAGS=-fpch-preprocess
47054
47055    if test "x$SET_CCACHE_DIR" != x; then
47056      mkdir -p $CCACHE_DIR > /dev/null 2>&1
47057      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
47058    fi
47059  fi
47060
47061  fi
47062
47063
47064###############################################################################
47065#
47066# And now the finish...
47067#
47068###############################################################################
47069
47070# Check for some common pitfalls
47071
47072  if test x"$OPENJDK_BUILD_OS" = xwindows; then
47073    file_to_test="$SRC_ROOT/LICENSE"
47074    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
47075      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
47076    fi
47077  fi
47078
47079
47080  # Did user specify any unknown variables?
47081
47082  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
47083    # Replace the separating ! with spaces before presenting for end user.
47084    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
47085    as_fn_error $? "The following variables are unknown to configure: $unknown_variables" "$LINENO" 5
47086  fi
47087
47088
47089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
47090$as_echo_n "checking if build directory is on local disk... " >&6; }
47091
47092  # df -l lists only local disks; if the given directory is not found then
47093  # a non-zero exit code is given
47094  if test "x$DF" = x; then
47095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47096      # msys does not have df; use Windows "net use" instead.
47097      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
47098      if test "x$IS_NETWORK_DISK" = x; then
47099        OUTPUT_DIR_IS_LOCAL="yes"
47100      else
47101        OUTPUT_DIR_IS_LOCAL="no"
47102      fi
47103    else
47104      # No df here, say it's local
47105      OUTPUT_DIR_IS_LOCAL="yes"
47106    fi
47107  else
47108    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
47109      OUTPUT_DIR_IS_LOCAL="yes"
47110    else
47111      OUTPUT_DIR_IS_LOCAL="no"
47112    fi
47113  fi
47114
47115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
47116$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
47117
47118
47119
47120  # Check if the user has any old-style ALT_ variables set.
47121  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
47122
47123  # Before generating output files, test if they exist. If they do, this is a reconfigure.
47124  # Since we can't properly handle the dependencies for this, warn the user about the situation
47125  if test -e $OUTPUT_ROOT/spec.gmk; then
47126    IS_RECONFIGURE=yes
47127  else
47128    IS_RECONFIGURE=no
47129  fi
47130
47131
47132# At the end, call the custom hook. (Dummy macro if no custom sources available)
47133
47134
47135# We're messing a bit with internal autoconf variables to put the config.status
47136# in the output directory instead of the current directory.
47137CONFIG_STATUS="$OUTPUT_ROOT/config.status"
47138
47139# Create the actual output files. Now the main work of configure is done.
47140cat >confcache <<\_ACEOF
47141# This file is a shell script that caches the results of configure
47142# tests run on this system so they can be shared between configure
47143# scripts and configure runs, see configure's option --config-cache.
47144# It is not useful on other systems.  If it contains results you don't
47145# want to keep, you may remove or edit it.
47146#
47147# config.status only pays attention to the cache file if you give it
47148# the --recheck option to rerun configure.
47149#
47150# `ac_cv_env_foo' variables (set or unset) will be overridden when
47151# loading this file, other *unset* `ac_cv_foo' will be assigned the
47152# following values.
47153
47154_ACEOF
47155
47156# The following way of writing the cache mishandles newlines in values,
47157# but we know of no workaround that is simple, portable, and efficient.
47158# So, we kill variables containing newlines.
47159# Ultrix sh set writes to stderr and can't be redirected directly,
47160# and sets the high bit in the cache file unless we assign to the vars.
47161(
47162  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
47163    eval ac_val=\$$ac_var
47164    case $ac_val in #(
47165    *${as_nl}*)
47166      case $ac_var in #(
47167      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
47168$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
47169      esac
47170      case $ac_var in #(
47171      _ | IFS | as_nl) ;; #(
47172      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
47173      *) { eval $ac_var=; unset $ac_var;} ;;
47174      esac ;;
47175    esac
47176  done
47177
47178  (set) 2>&1 |
47179    case $as_nl`(ac_space=' '; set) 2>&1` in #(
47180    *${as_nl}ac_space=\ *)
47181      # `set' does not quote correctly, so add quotes: double-quote
47182      # substitution turns \\\\ into \\, and sed turns \\ into \.
47183      sed -n \
47184	"s/'/'\\\\''/g;
47185	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
47186      ;; #(
47187    *)
47188      # `set' quotes correctly as required by POSIX, so do not add quotes.
47189      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
47190      ;;
47191    esac |
47192    sort
47193) |
47194  sed '
47195     /^ac_cv_env_/b end
47196     t clear
47197     :clear
47198     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
47199     t end
47200     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
47201     :end' >>confcache
47202if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
47203  if test -w "$cache_file"; then
47204    if test "x$cache_file" != "x/dev/null"; then
47205      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
47206$as_echo "$as_me: updating cache $cache_file" >&6;}
47207      if test ! -f "$cache_file" || test -h "$cache_file"; then
47208	cat confcache >"$cache_file"
47209      else
47210        case $cache_file in #(
47211        */* | ?:*)
47212	  mv -f confcache "$cache_file"$$ &&
47213	  mv -f "$cache_file"$$ "$cache_file" ;; #(
47214        *)
47215	  mv -f confcache "$cache_file" ;;
47216	esac
47217      fi
47218    fi
47219  else
47220    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
47221$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
47222  fi
47223fi
47224rm -f confcache
47225
47226test "x$prefix" = xNONE && prefix=$ac_default_prefix
47227# Let make expand exec_prefix.
47228test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
47229
47230DEFS=-DHAVE_CONFIG_H
47231
47232ac_libobjs=
47233ac_ltlibobjs=
47234U=
47235for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
47236  # 1. Remove the extension, and $U if already installed.
47237  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
47238  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
47239  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
47240  #    will be set to the directory where LIBOBJS objects are built.
47241  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
47242  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
47243done
47244LIBOBJS=$ac_libobjs
47245
47246LTLIBOBJS=$ac_ltlibobjs
47247
47248
47249
47250: "${CONFIG_STATUS=./config.status}"
47251ac_write_fail=0
47252ac_clean_files_save=$ac_clean_files
47253ac_clean_files="$ac_clean_files $CONFIG_STATUS"
47254{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
47255$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
47256as_write_fail=0
47257cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
47258#! $SHELL
47259# Generated by $as_me.
47260# Run this file to recreate the current configuration.
47261# Compiler output produced by configure, useful for debugging
47262# configure, is in config.log if it exists.
47263
47264debug=false
47265ac_cs_recheck=false
47266ac_cs_silent=false
47267
47268SHELL=\${CONFIG_SHELL-$SHELL}
47269export SHELL
47270_ASEOF
47271cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
47272## -------------------- ##
47273## M4sh Initialization. ##
47274## -------------------- ##
47275
47276# Be more Bourne compatible
47277DUALCASE=1; export DUALCASE # for MKS sh
47278if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
47279  emulate sh
47280  NULLCMD=:
47281  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
47282  # is contrary to our usage.  Disable this feature.
47283  alias -g '${1+"$@"}'='"$@"'
47284  setopt NO_GLOB_SUBST
47285else
47286  case `(set -o) 2>/dev/null` in #(
47287  *posix*) :
47288    set -o posix ;; #(
47289  *) :
47290     ;;
47291esac
47292fi
47293
47294
47295as_nl='
47296'
47297export as_nl
47298# Printing a long string crashes Solaris 7 /usr/bin/printf.
47299as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47300as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
47301as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47302# Prefer a ksh shell builtin over an external printf program on Solaris,
47303# but without wasting forks for bash or zsh.
47304if test -z "$BASH_VERSION$ZSH_VERSION" \
47305    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47306  as_echo='print -r --'
47307  as_echo_n='print -rn --'
47308elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47309  as_echo='printf %s\n'
47310  as_echo_n='printf %s'
47311else
47312  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
47313    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
47314    as_echo_n='/usr/ucb/echo -n'
47315  else
47316    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
47317    as_echo_n_body='eval
47318      arg=$1;
47319      case $arg in #(
47320      *"$as_nl"*)
47321	expr "X$arg" : "X\\(.*\\)$as_nl";
47322	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
47323      esac;
47324      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
47325    '
47326    export as_echo_n_body
47327    as_echo_n='sh -c $as_echo_n_body as_echo'
47328  fi
47329  export as_echo_body
47330  as_echo='sh -c $as_echo_body as_echo'
47331fi
47332
47333# The user is always right.
47334if test "${PATH_SEPARATOR+set}" != set; then
47335  PATH_SEPARATOR=:
47336  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
47337    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
47338      PATH_SEPARATOR=';'
47339  }
47340fi
47341
47342
47343# IFS
47344# We need space, tab and new line, in precisely that order.  Quoting is
47345# there to prevent editors from complaining about space-tab.
47346# (If _AS_PATH_WALK were called with IFS unset, it would disable word
47347# splitting by setting IFS to empty value.)
47348IFS=" ""	$as_nl"
47349
47350# Find who we are.  Look in the path if we contain no directory separator.
47351as_myself=
47352case $0 in #((
47353  *[\\/]* ) as_myself=$0 ;;
47354  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47355for as_dir in $PATH
47356do
47357  IFS=$as_save_IFS
47358  test -z "$as_dir" && as_dir=.
47359    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
47360  done
47361IFS=$as_save_IFS
47362
47363     ;;
47364esac
47365# We did not find ourselves, most probably we were run as `sh COMMAND'
47366# in which case we are not to be found in the path.
47367if test "x$as_myself" = x; then
47368  as_myself=$0
47369fi
47370if test ! -f "$as_myself"; then
47371  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
47372  exit 1
47373fi
47374
47375# Unset variables that we do not need and which cause bugs (e.g. in
47376# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
47377# suppresses any "Segmentation fault" message there.  '((' could
47378# trigger a bug in pdksh 5.2.14.
47379for as_var in BASH_ENV ENV MAIL MAILPATH
47380do eval test x\${$as_var+set} = xset \
47381  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
47382done
47383PS1='$ '
47384PS2='> '
47385PS4='+ '
47386
47387# NLS nuisances.
47388LC_ALL=C
47389export LC_ALL
47390LANGUAGE=C
47391export LANGUAGE
47392
47393# CDPATH.
47394(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
47395
47396
47397# as_fn_error STATUS ERROR [LINENO LOG_FD]
47398# ----------------------------------------
47399# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
47400# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
47401# script with STATUS, using 1 if that was 0.
47402as_fn_error ()
47403{
47404  as_status=$1; test $as_status -eq 0 && as_status=1
47405  if test "$4"; then
47406    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
47407    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
47408  fi
47409  $as_echo "$as_me: error: $2" >&2
47410  as_fn_exit $as_status
47411} # as_fn_error
47412
47413
47414# as_fn_set_status STATUS
47415# -----------------------
47416# Set $? to STATUS, without forking.
47417as_fn_set_status ()
47418{
47419  return $1
47420} # as_fn_set_status
47421
47422# as_fn_exit STATUS
47423# -----------------
47424# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
47425as_fn_exit ()
47426{
47427  set +e
47428  as_fn_set_status $1
47429  exit $1
47430} # as_fn_exit
47431
47432# as_fn_unset VAR
47433# ---------------
47434# Portably unset VAR.
47435as_fn_unset ()
47436{
47437  { eval $1=; unset $1;}
47438}
47439as_unset=as_fn_unset
47440# as_fn_append VAR VALUE
47441# ----------------------
47442# Append the text in VALUE to the end of the definition contained in VAR. Take
47443# advantage of any shell optimizations that allow amortized linear growth over
47444# repeated appends, instead of the typical quadratic growth present in naive
47445# implementations.
47446if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
47447  eval 'as_fn_append ()
47448  {
47449    eval $1+=\$2
47450  }'
47451else
47452  as_fn_append ()
47453  {
47454    eval $1=\$$1\$2
47455  }
47456fi # as_fn_append
47457
47458# as_fn_arith ARG...
47459# ------------------
47460# Perform arithmetic evaluation on the ARGs, and store the result in the
47461# global $as_val. Take advantage of shells that can avoid forks. The arguments
47462# must be portable across $(()) and expr.
47463if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
47464  eval 'as_fn_arith ()
47465  {
47466    as_val=$(( $* ))
47467  }'
47468else
47469  as_fn_arith ()
47470  {
47471    as_val=`expr "$@" || test $? -eq 1`
47472  }
47473fi # as_fn_arith
47474
47475
47476if expr a : '\(a\)' >/dev/null 2>&1 &&
47477   test "X`expr 00001 : '.*\(...\)'`" = X001; then
47478  as_expr=expr
47479else
47480  as_expr=false
47481fi
47482
47483if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
47484  as_basename=basename
47485else
47486  as_basename=false
47487fi
47488
47489if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
47490  as_dirname=dirname
47491else
47492  as_dirname=false
47493fi
47494
47495as_me=`$as_basename -- "$0" ||
47496$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
47497	 X"$0" : 'X\(//\)$' \| \
47498	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
47499$as_echo X/"$0" |
47500    sed '/^.*\/\([^/][^/]*\)\/*$/{
47501	    s//\1/
47502	    q
47503	  }
47504	  /^X\/\(\/\/\)$/{
47505	    s//\1/
47506	    q
47507	  }
47508	  /^X\/\(\/\).*/{
47509	    s//\1/
47510	    q
47511	  }
47512	  s/.*/./; q'`
47513
47514# Avoid depending upon Character Ranges.
47515as_cr_letters='abcdefghijklmnopqrstuvwxyz'
47516as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
47517as_cr_Letters=$as_cr_letters$as_cr_LETTERS
47518as_cr_digits='0123456789'
47519as_cr_alnum=$as_cr_Letters$as_cr_digits
47520
47521ECHO_C= ECHO_N= ECHO_T=
47522case `echo -n x` in #(((((
47523-n*)
47524  case `echo 'xy\c'` in
47525  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
47526  xy)  ECHO_C='\c';;
47527  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
47528       ECHO_T='	';;
47529  esac;;
47530*)
47531  ECHO_N='-n';;
47532esac
47533
47534rm -f conf$$ conf$$.exe conf$$.file
47535if test -d conf$$.dir; then
47536  rm -f conf$$.dir/conf$$.file
47537else
47538  rm -f conf$$.dir
47539  mkdir conf$$.dir 2>/dev/null
47540fi
47541if (echo >conf$$.file) 2>/dev/null; then
47542  if ln -s conf$$.file conf$$ 2>/dev/null; then
47543    as_ln_s='ln -s'
47544    # ... but there are two gotchas:
47545    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
47546    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
47547    # In both cases, we have to default to `cp -pR'.
47548    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
47549      as_ln_s='cp -pR'
47550  elif ln conf$$.file conf$$ 2>/dev/null; then
47551    as_ln_s=ln
47552  else
47553    as_ln_s='cp -pR'
47554  fi
47555else
47556  as_ln_s='cp -pR'
47557fi
47558rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
47559rmdir conf$$.dir 2>/dev/null
47560
47561
47562# as_fn_mkdir_p
47563# -------------
47564# Create "$as_dir" as a directory, including parents if necessary.
47565as_fn_mkdir_p ()
47566{
47567
47568  case $as_dir in #(
47569  -*) as_dir=./$as_dir;;
47570  esac
47571  test -d "$as_dir" || eval $as_mkdir_p || {
47572    as_dirs=
47573    while :; do
47574      case $as_dir in #(
47575      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
47576      *) as_qdir=$as_dir;;
47577      esac
47578      as_dirs="'$as_qdir' $as_dirs"
47579      as_dir=`$as_dirname -- "$as_dir" ||
47580$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
47581	 X"$as_dir" : 'X\(//\)[^/]' \| \
47582	 X"$as_dir" : 'X\(//\)$' \| \
47583	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
47584$as_echo X"$as_dir" |
47585    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
47586	    s//\1/
47587	    q
47588	  }
47589	  /^X\(\/\/\)[^/].*/{
47590	    s//\1/
47591	    q
47592	  }
47593	  /^X\(\/\/\)$/{
47594	    s//\1/
47595	    q
47596	  }
47597	  /^X\(\/\).*/{
47598	    s//\1/
47599	    q
47600	  }
47601	  s/.*/./; q'`
47602      test -d "$as_dir" && break
47603    done
47604    test -z "$as_dirs" || eval "mkdir $as_dirs"
47605  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
47606
47607
47608} # as_fn_mkdir_p
47609if mkdir -p . 2>/dev/null; then
47610  as_mkdir_p='mkdir -p "$as_dir"'
47611else
47612  test -d ./-p && rmdir ./-p
47613  as_mkdir_p=false
47614fi
47615
47616
47617# as_fn_executable_p FILE
47618# -----------------------
47619# Test if FILE is an executable regular file.
47620as_fn_executable_p ()
47621{
47622  test -f "$1" && test -x "$1"
47623} # as_fn_executable_p
47624as_test_x='test -x'
47625as_executable_p=as_fn_executable_p
47626
47627# Sed expression to map a string onto a valid CPP name.
47628as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
47629
47630# Sed expression to map a string onto a valid variable name.
47631as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
47632
47633
47634exec 6>&1
47635## ----------------------------------- ##
47636## Main body of $CONFIG_STATUS script. ##
47637## ----------------------------------- ##
47638_ASEOF
47639test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
47640
47641cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47642# Save the log message, to keep $0 and so on meaningful, and to
47643# report actual input values of CONFIG_FILES etc. instead of their
47644# values after options handling.
47645ac_log="
47646This file was extended by OpenJDK $as_me jdk8, which was
47647generated by GNU Autoconf 2.69.  Invocation command line was
47648
47649  CONFIG_FILES    = $CONFIG_FILES
47650  CONFIG_HEADERS  = $CONFIG_HEADERS
47651  CONFIG_LINKS    = $CONFIG_LINKS
47652  CONFIG_COMMANDS = $CONFIG_COMMANDS
47653  $ $0 $@
47654
47655on `(hostname || uname -n) 2>/dev/null | sed 1q`
47656"
47657
47658_ACEOF
47659
47660case $ac_config_files in *"
47661"*) set x $ac_config_files; shift; ac_config_files=$*;;
47662esac
47663
47664case $ac_config_headers in *"
47665"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
47666esac
47667
47668
47669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47670# Files that config.status was made for.
47671config_files="$ac_config_files"
47672config_headers="$ac_config_headers"
47673
47674_ACEOF
47675
47676cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47677ac_cs_usage="\
47678\`$as_me' instantiates files and other configuration actions
47679from templates according to the current configuration.  Unless the files
47680and actions are specified as TAGs, all are instantiated by default.
47681
47682Usage: $0 [OPTION]... [TAG]...
47683
47684  -h, --help       print this help, then exit
47685  -V, --version    print version number and configuration settings, then exit
47686      --config     print configuration, then exit
47687  -q, --quiet, --silent
47688                   do not print progress messages
47689  -d, --debug      don't remove temporary files
47690      --recheck    update $as_me by reconfiguring in the same conditions
47691      --file=FILE[:TEMPLATE]
47692                   instantiate the configuration file FILE
47693      --header=FILE[:TEMPLATE]
47694                   instantiate the configuration header FILE
47695
47696Configuration files:
47697$config_files
47698
47699Configuration headers:
47700$config_headers
47701
47702Report bugs to <build-dev@openjdk.java.net>.
47703OpenJDK home page: <http://openjdk.java.net>."
47704
47705_ACEOF
47706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47707ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
47708ac_cs_version="\\
47709OpenJDK config.status jdk8
47710configured by $0, generated by GNU Autoconf 2.69,
47711  with options \\"\$ac_cs_config\\"
47712
47713Copyright (C) 2012 Free Software Foundation, Inc.
47714This config.status script is free software; the Free Software Foundation
47715gives unlimited permission to copy, distribute and modify it."
47716
47717ac_pwd='$ac_pwd'
47718srcdir='$srcdir'
47719AWK='$AWK'
47720test -n "\$AWK" || AWK=awk
47721_ACEOF
47722
47723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47724# The default lists apply if the user does not specify any file.
47725ac_need_defaults=:
47726while test $# != 0
47727do
47728  case $1 in
47729  --*=?*)
47730    ac_option=`expr "X$1" : 'X\([^=]*\)='`
47731    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
47732    ac_shift=:
47733    ;;
47734  --*=)
47735    ac_option=`expr "X$1" : 'X\([^=]*\)='`
47736    ac_optarg=
47737    ac_shift=:
47738    ;;
47739  *)
47740    ac_option=$1
47741    ac_optarg=$2
47742    ac_shift=shift
47743    ;;
47744  esac
47745
47746  case $ac_option in
47747  # Handling of the options.
47748  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
47749    ac_cs_recheck=: ;;
47750  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
47751    $as_echo "$ac_cs_version"; exit ;;
47752  --config | --confi | --conf | --con | --co | --c )
47753    $as_echo "$ac_cs_config"; exit ;;
47754  --debug | --debu | --deb | --de | --d | -d )
47755    debug=: ;;
47756  --file | --fil | --fi | --f )
47757    $ac_shift
47758    case $ac_optarg in
47759    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47760    '') as_fn_error $? "missing file argument" ;;
47761    esac
47762    as_fn_append CONFIG_FILES " '$ac_optarg'"
47763    ac_need_defaults=false;;
47764  --header | --heade | --head | --hea )
47765    $ac_shift
47766    case $ac_optarg in
47767    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
47768    esac
47769    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
47770    ac_need_defaults=false;;
47771  --he | --h)
47772    # Conflict between --help and --header
47773    as_fn_error $? "ambiguous option: \`$1'
47774Try \`$0 --help' for more information.";;
47775  --help | --hel | -h )
47776    $as_echo "$ac_cs_usage"; exit ;;
47777  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
47778  | -silent | --silent | --silen | --sile | --sil | --si | --s)
47779    ac_cs_silent=: ;;
47780
47781  # This is an error.
47782  -*) as_fn_error $? "unrecognized option: \`$1'
47783Try \`$0 --help' for more information." ;;
47784
47785  *) as_fn_append ac_config_targets " $1"
47786     ac_need_defaults=false ;;
47787
47788  esac
47789  shift
47790done
47791
47792ac_configure_extra_args=
47793
47794if $ac_cs_silent; then
47795  exec 6>/dev/null
47796  ac_configure_extra_args="$ac_configure_extra_args --silent"
47797fi
47798
47799_ACEOF
47800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47801if \$ac_cs_recheck; then
47802  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
47803  shift
47804  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
47805  CONFIG_SHELL='$SHELL'
47806  export CONFIG_SHELL
47807  exec "\$@"
47808fi
47809
47810_ACEOF
47811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47812exec 5>>config.log
47813{
47814  echo
47815  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
47816## Running $as_me. ##
47817_ASBOX
47818  $as_echo "$ac_log"
47819} >&5
47820
47821_ACEOF
47822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47823_ACEOF
47824
47825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47826
47827# Handling of arguments.
47828for ac_config_target in $ac_config_targets
47829do
47830  case $ac_config_target in
47831    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
47832    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
47833    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
47834    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
47835    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
47836    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
47837    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
47838
47839  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
47840  esac
47841done
47842
47843
47844# If the user did not use the arguments to specify the items to instantiate,
47845# then the envvar interface is used.  Set only those that are not.
47846# We use the long form for the default assignment because of an extremely
47847# bizarre bug on SunOS 4.1.3.
47848if $ac_need_defaults; then
47849  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
47850  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
47851fi
47852
47853# Have a temporary directory for convenience.  Make it in the build tree
47854# simply because there is no reason against having it here, and in addition,
47855# creating and moving files from /tmp can sometimes cause problems.
47856# Hook for its removal unless debugging.
47857# Note that there is a small window in which the directory will not be cleaned:
47858# after its creation but before its name has been assigned to `$tmp'.
47859$debug ||
47860{
47861  tmp= ac_tmp=
47862  trap 'exit_status=$?
47863  : "${ac_tmp:=$tmp}"
47864  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
47865' 0
47866  trap 'as_fn_exit 1' 1 2 13 15
47867}
47868# Create a (secure) tmp directory for tmp files.
47869
47870{
47871  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
47872  test -d "$tmp"
47873}  ||
47874{
47875  tmp=./conf$$-$RANDOM
47876  (umask 077 && mkdir "$tmp")
47877} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
47878ac_tmp=$tmp
47879
47880# Set up the scripts for CONFIG_FILES section.
47881# No need to generate them if there are no CONFIG_FILES.
47882# This happens for instance with `./config.status config.h'.
47883if test -n "$CONFIG_FILES"; then
47884
47885
47886ac_cr=`echo X | tr X '\015'`
47887# On cygwin, bash can eat \r inside `` if the user requested igncr.
47888# But we know of no other shell where ac_cr would be empty at this
47889# point, so we can use a bashism as a fallback.
47890if test "x$ac_cr" = x; then
47891  eval ac_cr=\$\'\\r\'
47892fi
47893ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
47894if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
47895  ac_cs_awk_cr='\\r'
47896else
47897  ac_cs_awk_cr=$ac_cr
47898fi
47899
47900echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
47901_ACEOF
47902
47903
47904{
47905  echo "cat >conf$$subs.awk <<_ACEOF" &&
47906  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
47907  echo "_ACEOF"
47908} >conf$$subs.sh ||
47909  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47910ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
47911ac_delim='%!_!# '
47912for ac_last_try in false false false false false :; do
47913  . ./conf$$subs.sh ||
47914    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47915
47916  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
47917  if test $ac_delim_n = $ac_delim_num; then
47918    break
47919  elif $ac_last_try; then
47920    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
47921  else
47922    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
47923  fi
47924done
47925rm -f conf$$subs.sh
47926
47927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47928cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
47929_ACEOF
47930sed -n '
47931h
47932s/^/S["/; s/!.*/"]=/
47933p
47934g
47935s/^[^!]*!//
47936:repl
47937t repl
47938s/'"$ac_delim"'$//
47939t delim
47940:nl
47941h
47942s/\(.\{148\}\)..*/\1/
47943t more1
47944s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
47945p
47946n
47947b repl
47948:more1
47949s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47950p
47951g
47952s/.\{148\}//
47953t nl
47954:delim
47955h
47956s/\(.\{148\}\)..*/\1/
47957t more2
47958s/["\\]/\\&/g; s/^/"/; s/$/"/
47959p
47960b
47961:more2
47962s/["\\]/\\&/g; s/^/"/; s/$/"\\/
47963p
47964g
47965s/.\{148\}//
47966t delim
47967' <conf$$subs.awk | sed '
47968/^[^""]/{
47969  N
47970  s/\n//
47971}
47972' >>$CONFIG_STATUS || ac_write_fail=1
47973rm -f conf$$subs.awk
47974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
47975_ACAWK
47976cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
47977  for (key in S) S_is_set[key] = 1
47978  FS = ""
47979
47980}
47981{
47982  line = $ 0
47983  nfields = split(line, field, "@")
47984  substed = 0
47985  len = length(field[1])
47986  for (i = 2; i < nfields; i++) {
47987    key = field[i]
47988    keylen = length(key)
47989    if (S_is_set[key]) {
47990      value = S[key]
47991      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
47992      len += length(value) + length(field[++i])
47993      substed = 1
47994    } else
47995      len += 1 + keylen
47996  }
47997
47998  print line
47999}
48000
48001_ACAWK
48002_ACEOF
48003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48004if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
48005  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
48006else
48007  cat
48008fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
48009  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
48010_ACEOF
48011
48012# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
48013# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
48014# trailing colons and then remove the whole line if VPATH becomes empty
48015# (actually we leave an empty line to preserve line numbers).
48016if test "x$srcdir" = x.; then
48017  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
48018h
48019s///
48020s/^/:/
48021s/[	 ]*$/:/
48022s/:\$(srcdir):/:/g
48023s/:\${srcdir}:/:/g
48024s/:@srcdir@:/:/g
48025s/^:*//
48026s/:*$//
48027x
48028s/\(=[	 ]*\).*/\1/
48029G
48030s/\n//
48031s/^[^=]*=[	 ]*$//
48032}'
48033fi
48034
48035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48036fi # test -n "$CONFIG_FILES"
48037
48038# Set up the scripts for CONFIG_HEADERS section.
48039# No need to generate them if there are no CONFIG_HEADERS.
48040# This happens for instance with `./config.status Makefile'.
48041if test -n "$CONFIG_HEADERS"; then
48042cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
48043BEGIN {
48044_ACEOF
48045
48046# Transform confdefs.h into an awk script `defines.awk', embedded as
48047# here-document in config.status, that substitutes the proper values into
48048# config.h.in to produce config.h.
48049
48050# Create a delimiter string that does not exist in confdefs.h, to ease
48051# handling of long lines.
48052ac_delim='%!_!# '
48053for ac_last_try in false false :; do
48054  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
48055  if test -z "$ac_tt"; then
48056    break
48057  elif $ac_last_try; then
48058    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
48059  else
48060    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
48061  fi
48062done
48063
48064# For the awk script, D is an array of macro values keyed by name,
48065# likewise P contains macro parameters if any.  Preserve backslash
48066# newline sequences.
48067
48068ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
48069sed -n '
48070s/.\{148\}/&'"$ac_delim"'/g
48071t rset
48072:rset
48073s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
48074t def
48075d
48076:def
48077s/\\$//
48078t bsnl
48079s/["\\]/\\&/g
48080s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
48081D["\1"]=" \3"/p
48082s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
48083d
48084:bsnl
48085s/["\\]/\\&/g
48086s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
48087D["\1"]=" \3\\\\\\n"\\/p
48088t cont
48089s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
48090t cont
48091d
48092:cont
48093n
48094s/.\{148\}/&'"$ac_delim"'/g
48095t clear
48096:clear
48097s/\\$//
48098t bsnlc
48099s/["\\]/\\&/g; s/^/"/; s/$/"/p
48100d
48101:bsnlc
48102s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
48103b cont
48104' <confdefs.h | sed '
48105s/'"$ac_delim"'/"\\\
48106"/g' >>$CONFIG_STATUS || ac_write_fail=1
48107
48108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48109  for (key in D) D_is_set[key] = 1
48110  FS = ""
48111}
48112/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
48113  line = \$ 0
48114  split(line, arg, " ")
48115  if (arg[1] == "#") {
48116    defundef = arg[2]
48117    mac1 = arg[3]
48118  } else {
48119    defundef = substr(arg[1], 2)
48120    mac1 = arg[2]
48121  }
48122  split(mac1, mac2, "(") #)
48123  macro = mac2[1]
48124  prefix = substr(line, 1, index(line, defundef) - 1)
48125  if (D_is_set[macro]) {
48126    # Preserve the white space surrounding the "#".
48127    print prefix "define", macro P[macro] D[macro]
48128    next
48129  } else {
48130    # Replace #undef with comments.  This is necessary, for example,
48131    # in the case of _POSIX_SOURCE, which is predefined and required
48132    # on some systems where configure will not decide to define it.
48133    if (defundef == "undef") {
48134      print "/*", prefix defundef, macro, "*/"
48135      next
48136    }
48137  }
48138}
48139{ print }
48140_ACAWK
48141_ACEOF
48142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48143  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
48144fi # test -n "$CONFIG_HEADERS"
48145
48146
48147eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
48148shift
48149for ac_tag
48150do
48151  case $ac_tag in
48152  :[FHLC]) ac_mode=$ac_tag; continue;;
48153  esac
48154  case $ac_mode$ac_tag in
48155  :[FHL]*:*);;
48156  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
48157  :[FH]-) ac_tag=-:-;;
48158  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
48159  esac
48160  ac_save_IFS=$IFS
48161  IFS=:
48162  set x $ac_tag
48163  IFS=$ac_save_IFS
48164  shift
48165  ac_file=$1
48166  shift
48167
48168  case $ac_mode in
48169  :L) ac_source=$1;;
48170  :[FH])
48171    ac_file_inputs=
48172    for ac_f
48173    do
48174      case $ac_f in
48175      -) ac_f="$ac_tmp/stdin";;
48176      *) # Look for the file first in the build tree, then in the source tree
48177	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
48178	 # because $ac_f cannot contain `:'.
48179	 test -f "$ac_f" ||
48180	   case $ac_f in
48181	   [\\/$]*) false;;
48182	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
48183	   esac ||
48184	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
48185      esac
48186      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
48187      as_fn_append ac_file_inputs " '$ac_f'"
48188    done
48189
48190    # Let's still pretend it is `configure' which instantiates (i.e., don't
48191    # use $as_me), people would be surprised to read:
48192    #    /* config.h.  Generated by config.status.  */
48193    configure_input='Generated from '`
48194	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
48195	`' by configure.'
48196    if test x"$ac_file" != x-; then
48197      configure_input="$ac_file.  $configure_input"
48198      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
48199$as_echo "$as_me: creating $ac_file" >&6;}
48200    fi
48201    # Neutralize special characters interpreted by sed in replacement strings.
48202    case $configure_input in #(
48203    *\&* | *\|* | *\\* )
48204       ac_sed_conf_input=`$as_echo "$configure_input" |
48205       sed 's/[\\\\&|]/\\\\&/g'`;; #(
48206    *) ac_sed_conf_input=$configure_input;;
48207    esac
48208
48209    case $ac_tag in
48210    *:-:* | *:-) cat >"$ac_tmp/stdin" \
48211      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
48212    esac
48213    ;;
48214  esac
48215
48216  ac_dir=`$as_dirname -- "$ac_file" ||
48217$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
48218	 X"$ac_file" : 'X\(//\)[^/]' \| \
48219	 X"$ac_file" : 'X\(//\)$' \| \
48220	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
48221$as_echo X"$ac_file" |
48222    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
48223	    s//\1/
48224	    q
48225	  }
48226	  /^X\(\/\/\)[^/].*/{
48227	    s//\1/
48228	    q
48229	  }
48230	  /^X\(\/\/\)$/{
48231	    s//\1/
48232	    q
48233	  }
48234	  /^X\(\/\).*/{
48235	    s//\1/
48236	    q
48237	  }
48238	  s/.*/./; q'`
48239  as_dir="$ac_dir"; as_fn_mkdir_p
48240  ac_builddir=.
48241
48242case "$ac_dir" in
48243.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
48244*)
48245  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
48246  # A ".." for each directory in $ac_dir_suffix.
48247  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
48248  case $ac_top_builddir_sub in
48249  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
48250  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
48251  esac ;;
48252esac
48253ac_abs_top_builddir=$ac_pwd
48254ac_abs_builddir=$ac_pwd$ac_dir_suffix
48255# for backward compatibility:
48256ac_top_builddir=$ac_top_build_prefix
48257
48258case $srcdir in
48259  .)  # We are building in place.
48260    ac_srcdir=.
48261    ac_top_srcdir=$ac_top_builddir_sub
48262    ac_abs_top_srcdir=$ac_pwd ;;
48263  [\\/]* | ?:[\\/]* )  # Absolute name.
48264    ac_srcdir=$srcdir$ac_dir_suffix;
48265    ac_top_srcdir=$srcdir
48266    ac_abs_top_srcdir=$srcdir ;;
48267  *) # Relative name.
48268    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
48269    ac_top_srcdir=$ac_top_build_prefix$srcdir
48270    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
48271esac
48272ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
48273
48274
48275  case $ac_mode in
48276  :F)
48277  #
48278  # CONFIG_FILE
48279  #
48280
48281_ACEOF
48282
48283cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48284# If the template does not know about datarootdir, expand it.
48285# FIXME: This hack should be removed a few years after 2.60.
48286ac_datarootdir_hack=; ac_datarootdir_seen=
48287ac_sed_dataroot='
48288/datarootdir/ {
48289  p
48290  q
48291}
48292/@datadir@/p
48293/@docdir@/p
48294/@infodir@/p
48295/@localedir@/p
48296/@mandir@/p'
48297case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
48298*datarootdir*) ac_datarootdir_seen=yes;;
48299*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
48300  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
48301$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
48302_ACEOF
48303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48304  ac_datarootdir_hack='
48305  s&@datadir@&$datadir&g
48306  s&@docdir@&$docdir&g
48307  s&@infodir@&$infodir&g
48308  s&@localedir@&$localedir&g
48309  s&@mandir@&$mandir&g
48310  s&\\\${datarootdir}&$datarootdir&g' ;;
48311esac
48312_ACEOF
48313
48314# Neutralize VPATH when `$srcdir' = `.'.
48315# Shell code in configure.ac might set extrasub.
48316# FIXME: do we really want to maintain this feature?
48317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48318ac_sed_extra="$ac_vpsub
48319$extrasub
48320_ACEOF
48321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
48322:t
48323/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
48324s|@configure_input@|$ac_sed_conf_input|;t t
48325s&@top_builddir@&$ac_top_builddir_sub&;t t
48326s&@top_build_prefix@&$ac_top_build_prefix&;t t
48327s&@srcdir@&$ac_srcdir&;t t
48328s&@abs_srcdir@&$ac_abs_srcdir&;t t
48329s&@top_srcdir@&$ac_top_srcdir&;t t
48330s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
48331s&@builddir@&$ac_builddir&;t t
48332s&@abs_builddir@&$ac_abs_builddir&;t t
48333s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
48334$ac_datarootdir_hack
48335"
48336eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
48337  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48338
48339test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
48340  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
48341  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
48342      "$ac_tmp/out"`; test -z "$ac_out"; } &&
48343  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
48344which seems to be undefined.  Please make sure it is defined" >&5
48345$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
48346which seems to be undefined.  Please make sure it is defined" >&2;}
48347
48348  rm -f "$ac_tmp/stdin"
48349  case $ac_file in
48350  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
48351  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
48352  esac \
48353  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48354 ;;
48355  :H)
48356  #
48357  # CONFIG_HEADER
48358  #
48359  if test x"$ac_file" != x-; then
48360    {
48361      $as_echo "/* $configure_input  */" \
48362      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
48363    } >"$ac_tmp/config.h" \
48364      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
48365    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
48366      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
48367$as_echo "$as_me: $ac_file is unchanged" >&6;}
48368    else
48369      rm -f "$ac_file"
48370      mv "$ac_tmp/config.h" "$ac_file" \
48371	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
48372    fi
48373  else
48374    $as_echo "/* $configure_input  */" \
48375      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
48376      || as_fn_error $? "could not create -" "$LINENO" 5
48377  fi
48378 ;;
48379
48380
48381  esac
48382
48383done # for ac_tag
48384
48385
48386as_fn_exit 0
48387_ACEOF
48388ac_clean_files=$ac_clean_files_save
48389
48390test $ac_write_fail = 0 ||
48391  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
48392
48393
48394# configure is writing to config.log, and then calls config.status.
48395# config.status does its own redirection, appending to config.log.
48396# Unfortunately, on DOS this fails, as config.log is still kept open
48397# by configure, so config.status won't be able to write to it; its
48398# output is simply discarded.  So we exec the FD to /dev/null,
48399# effectively closing config.log, so it can be properly (re)opened and
48400# appended to by config.status.  When coming back to configure, we
48401# need to make the FD available again.
48402if test "$no_create" != yes; then
48403  ac_cs_success=:
48404  ac_config_status_args=
48405  test "$silent" = yes &&
48406    ac_config_status_args="$ac_config_status_args --quiet"
48407  exec 5>/dev/null
48408  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
48409  exec 5>>config.log
48410  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
48411  # would make configure fail if this is the last instruction.
48412  $ac_cs_success || as_fn_exit 1
48413fi
48414if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
48415  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
48416$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
48417fi
48418
48419
48420# Try to move the config.log file to the output directory.
48421if test -e ./config.log; then
48422  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
48423fi
48424
48425# Make the compare script executable
48426$CHMOD +x $OUTPUT_ROOT/compare.sh
48427
48428# Finally output some useful information to the user
48429
48430  # Finally output some useful information to the user
48431
48432  printf "\n"
48433  printf "====================================================\n"
48434  printf "A new configuration has been successfully created in\n"
48435  printf "$OUTPUT_ROOT\n"
48436  if test "x$CONFIGURE_COMMAND_LINE" != x; then
48437    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
48438  else
48439    printf "using default settings.\n"
48440  fi
48441
48442  printf "\n"
48443  printf "Configuration summary:\n"
48444  printf "* Debug level:    $DEBUG_LEVEL\n"
48445  printf "* JDK variant:    $JDK_VARIANT\n"
48446  printf "* JVM variants:   $with_jvm_variants\n"
48447  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
48448
48449  printf "\n"
48450  printf "Tools summary:\n"
48451  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
48452    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
48453  fi
48454  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
48455  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
48456  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
48457
48458  printf "\n"
48459  printf "Build performance summary:\n"
48460  printf "* Cores to use:   $JOBS\n"
48461  printf "* Memory limit:   $MEMORY_SIZE MB\n"
48462  if test "x$CCACHE_STATUS" != "x"; then
48463    printf "* ccache status:  $CCACHE_STATUS\n"
48464  fi
48465  printf "\n"
48466
48467  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
48468    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
48469    printf "will result in longer build times.\n"
48470    printf "\n"
48471  fi
48472
48473  if test "x$FOUND_ALT_VARIABLES" != "x"; then
48474    printf "WARNING: You have old-style ALT_ environment variables set.\n"
48475    printf "These are not respected, and will be ignored. It is recommended\n"
48476    printf "that you clean your environment. The following variables are set:\n"
48477    printf "$FOUND_ALT_VARIABLES\n"
48478    printf "\n"
48479  fi
48480
48481  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
48482    printf "WARNING: Your build output directory is not on a local disk.\n"
48483    printf "This will severely degrade build performance!\n"
48484    printf "It is recommended that you create an output directory on a local disk,\n"
48485    printf "and run the configure script again from that directory.\n"
48486    printf "\n"
48487  fi
48488
48489  if test "x$IS_RECONFIGURE" = "xyes"; then
48490    printf "WARNING: The result of this configuration has overridden an older\n"
48491    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
48492    printf "proper build. Failure to do so might result in strange build problems.\n"
48493    printf "\n"
48494  fi
48495
48496